CN112583806B - Resource sharing method, device, terminal, server and storage medium - Google Patents

Resource sharing method, device, terminal, server and storage medium Download PDF

Info

Publication number
CN112583806B
CN112583806B CN202011412093.0A CN202011412093A CN112583806B CN 112583806 B CN112583806 B CN 112583806B CN 202011412093 A CN202011412093 A CN 202011412093A CN 112583806 B CN112583806 B CN 112583806B
Authority
CN
China
Prior art keywords
terminal
media resource
user
resource
server
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
CN202011412093.0A
Other languages
Chinese (zh)
Other versions
CN112583806A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN202011412093.0A priority Critical patent/CN112583806B/en
Publication of CN112583806A publication Critical patent/CN112583806A/en
Application granted granted Critical
Publication of CN112583806B publication Critical patent/CN112583806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a resource sharing method, a device, a terminal, a server and a storage medium, and belongs to the technical field of Internet. The method comprises the following steps: if the resource sharing operation based on the first media resource is detected, a sharing request is sent to a server, the first media resource is acquired in response to the second terminal agreeing to the sharing request, and the first media resource and the playing time stamp at the current moment are sent to the second terminal. According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, and the sharing of the media resource can be realized through the end-to-end transmission mode, so that the user experience is improved.

Description

Resource sharing method, device, terminal, server and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a terminal, a server, and a storage medium for resource sharing.
Background
With the continuous development of internet technology, the playing modes of audio and video media resources are more and more diversified. For example, a user can start a song listening function together through a song playing application, and share the song with friends, so that the same song is shared with the friends.
At present, in the process of playing songs, if a user wants to share the currently played songs with friends, clicking operation can be implemented on a song together listening button in a song playing interface, a user terminal is triggered to send invitations to the friend terminal, and after the friends accept the invitations, the user terminal can listen to songs together.
Disclosure of Invention
The embodiment of the application provides a resource sharing method, a device, a terminal, a server and a storage medium, which can realize sharing of media resources and improve user experience. The technical scheme is as follows:
in one aspect, a method for sharing resources is provided, where the method is applied to a first terminal, and the method includes:
if a resource sharing operation based on the first media resource is detected, sending a sharing request to a server, wherein the sharing request is used for requesting to share the first media resource with a second terminal;
responding to the second terminal agreeing to the sharing request, and acquiring the first media resource;
and sending the first media resource and a playing time stamp of the current moment to the second terminal, wherein the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp.
In one possible implementation manner, the sharing request is used for triggering the second terminal to send an agreement message to the server, the agreement message is used for triggering the server to check the second terminal, and if the check is passed, the terminal information of the first terminal is sent to the second terminal, the terminal information is used for triggering the second terminal to acquire the first media resource from the first terminal, and the sending the first media resource and the play timestamp of the current moment to the second terminal includes:
And receiving a resource acquisition request sent by the second terminal based on the terminal information, and executing the step of acquiring the first media resource.
In one possible implementation, after the second terminal agrees to the sharing request to obtain the first media resource, the method further includes:
acquiring a second media resource, and combining the first media resource and the second media resource to obtain a combined first media resource;
and sending the combined first media resource to the second terminal.
In one possible implementation, the second media asset is background audio or accompaniment audio.
In one possible implementation, after the second terminal agrees to the sharing request to obtain the first media resource, the method further includes:
acquiring an associated media resource of the first media resource, wherein the associated media resource is a media resource with different types and the same content as the first media resource;
and sending the associated media resource to the second terminal.
In one possible implementation, the obtaining the associated media asset of the first media asset includes:
sending an associated resource acquisition request to the server, wherein the associated resource acquisition request carries resource information of the first media resource;
And receiving the associated media resources returned by the server based on the resource information.
In one possible implementation, the method further includes:
acquiring audio data of an account number registered by the first terminal;
and sending the audio data and the first media resource to the server, wherein the audio data and the first media resource are used for triggering the server to combine the audio data and the first media resource to obtain a combined first media resource, and sending the combined first media resource and the playing time stamp of the current moment to the second terminal.
In one possible implementation, the sharing request carries a resource link of the first media resource.
In one aspect, a method for sharing resources is provided, where the method is applied to a server, and the method includes:
receiving a sharing request sent by a first terminal, wherein the sharing request is used for requesting sharing of a first media resource with a second terminal;
sending the sharing request to the second terminal;
and receiving an agreement message sent by the second terminal based on the sharing request, sending the agreement message to the first terminal, wherein the agreement message is used for indicating the second terminal to agree with the sharing request, the agreement message is used for triggering the first terminal to send the first media resource and a playing time stamp at the current moment to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp.
In one possible implementation manner, after the receiving the consent message sent by the second terminal, the method further includes:
and checking the second terminal, and if the second terminal passes the check, sending terminal information of the first terminal to the second terminal, wherein the terminal information is used for triggering the second terminal to acquire a first media resource and a playing time stamp at the current moment from the first terminal.
In one possible implementation manner, the verifying the second terminal includes:
and if the terminal identification of the second terminal is the same as the terminal identification of the second terminal carried in the sharing request, determining that the second terminal passes the verification.
In one possible implementation, the method further includes:
receiving an associated resource acquisition request sent by the first terminal, wherein the associated resource acquisition request carries resource information of the first media resource, and the associated media resource is a media resource with different types and the same content as the first media resource;
determining an associated media resource corresponding to the resource information of the first media resource based on the resource information of the first media resource and the corresponding relation between the resource information and the associated media resource;
And sending the associated media resource to the first terminal.
In one possible implementation, the method further includes:
receiving audio data of an account number registered by the first terminal and the first media resource;
combining the audio data and the first media resource to obtain a combined first media resource;
and sending the combined first media resource and the play time stamp of the current moment to the second terminal.
In one possible implementation manner, after the receiving the grant message sent by the second terminal based on the sharing request, the method further includes:
and sending the first media resource and the playing time stamp of the current moment to the second terminal.
In one aspect, a method for sharing resources is provided, where the method is applied to a second terminal, and the method includes:
receiving a sharing request sent by a server, wherein the sharing request is used for requesting to share a first media resource with the second terminal;
if the approval operation of the sharing request is detected, sending an approval message to the server, wherein the approval message is used for indicating the second terminal to approve the sharing request;
receiving the first media resource and the playing time stamp of the current moment sent by the first terminal based on the agreement message;
And playing the first media resource based on the playing time stamp.
In one possible implementation manner, after the sending of the grant message to the server if the grant operation for the sharing request is detected, the method further includes:
receiving the terminal information returned by the server after the second terminal passes the verification and checking the server based on the agreement message;
and sending a resource acquisition request to the first terminal based on the terminal information.
In one possible implementation, the method further includes:
receiving a play time stamp of the first terminal at the current moment and the combined first media resource sent by the first terminal based on the combination of the first media resource and the second media resource;
and playing the combined first media resource based on the playing time stamp of the current moment.
In one possible implementation, the method further includes:
receiving a play time stamp of the combined first media resource and the current moment, which are sent by the server based on the combination of the audio data of the account number logged in by the first terminal and the first media resource;
and playing the combined first media resource based on the playing time stamp of the current moment.
In one aspect, there is provided a resource sharing apparatus provided as a first terminal, the apparatus comprising:
the sending module is used for sending a sharing request to the server if the resource sharing operation based on the first media resource is detected, wherein the sharing request is used for requesting to share the first media resource with the second terminal;
the acquisition module is used for responding to the second terminal agreeing to the sharing request and acquiring the first media resource;
the sending module is further configured to send the first media resource and a play timestamp of the current time to the second terminal, where the play timestamp is used to trigger the second terminal to play the first media resource based on the play timestamp.
In one possible implementation manner, the sharing request is used for triggering the second terminal to send an agreement message to the server, the agreement message is used for triggering the server to check the second terminal, and if the check is passed, terminal information of the first terminal is sent to the second terminal, the terminal information is used for triggering the second terminal to acquire the first media resource from the first terminal, and the sending module is used for:
and receiving a resource acquisition request sent by the second terminal based on the terminal information, and executing the step of acquiring the first media resource.
In a possible implementation manner, the obtaining module is further configured to obtain a second media resource, and combine the first media resource and the second media resource to obtain a combined first media resource;
the sending module is further configured to send the combined first media resource to the second terminal.
In one possible implementation, the second media asset is background audio or accompaniment audio.
In one possible implementation, the obtaining module is further configured to obtain an associated media resource of the first media resource, where the associated media resource is a media resource of a different type but the same content as the first media resource;
the sending module is further configured to send the associated media resource to the second terminal.
In one possible implementation, the acquiring module includes:
a sending sub-module, configured to send an associated resource acquisition request to the server, where the associated resource acquisition request carries resource information of the first media resource;
and the receiving sub-module is used for receiving the associated media resource returned by the server based on the resource information.
In a possible implementation manner, the obtaining module is further configured to obtain audio data of an account number logged in by the first terminal;
The sending module is further configured to send the audio data and the first media resource to the server, where the audio data and the first media resource are used to trigger the server to combine the audio data and the first media resource to obtain a combined first media resource, and send the combined first media resource and the play timestamp of the current moment to the second terminal.
In one possible implementation, the sharing request carries a resource link of the first media resource.
In one aspect, there is provided a resource sharing apparatus provided as a server, the apparatus comprising:
the receiving module is used for receiving a sharing request sent by the first terminal, wherein the sharing request is used for requesting to share the first media resource with the second terminal;
a sending module, configured to send the sharing request to the second terminal;
the receiving module is further configured to receive an approval message sent by the second terminal based on the sharing request, send the approval message to the first terminal, where the approval message is used to instruct the second terminal to approve the sharing request, the approval message is used to trigger the first terminal to send the first media resource and a play timestamp of the current moment to the second terminal, and the play timestamp is used to trigger the second terminal to play the first media resource based on the play timestamp.
In one possible implementation, the apparatus further includes:
and the verification module is used for verifying the second terminal, and if the second terminal passes the verification, the verification module sends the terminal information of the first terminal to the second terminal, wherein the terminal information is used for triggering the second terminal to acquire the first media resource and the playing time stamp of the current moment from the first terminal.
In one possible implementation, the verification module is configured to:
and if the terminal identification of the second terminal is the same as the terminal identification of the second terminal carried in the sharing request, determining that the second terminal passes the verification.
In a possible implementation manner, the receiving module is further configured to receive an associated resource acquisition request sent by the first terminal, where the associated resource acquisition request carries resource information of the first media resource, and the associated media resource is a media resource with a different type and the same content as the first media resource;
the device also comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining the associated media resource corresponding to the resource information of the first media resource based on the resource information of the first media resource and the corresponding relation between the resource information and the associated media resource;
The sending module is further configured to send the associated media resource to the first terminal.
In a possible implementation manner, the receiving module is further configured to receive audio data of an account number logged in by the first terminal and the first media resource;
the device also comprises a merging module, a merging module and a merging module, wherein the merging module is used for merging the audio data and the first media resource to obtain a merged first media resource;
the sending module is further configured to send the combined first media resource and the play timestamp of the current time to the second terminal.
In a possible implementation manner, the sending module is further configured to send the first media resource and the play timestamp of the current time to the second terminal.
In one aspect, there is provided a resource sharing apparatus provided as a second terminal, the apparatus comprising:
the receiving module is used for receiving a sharing request sent by the server, wherein the sharing request is used for requesting to share the first media resource with the second terminal;
the sending module is used for sending an approval message to the server if the approval operation of the sharing request is detected, wherein the approval message is used for indicating the second terminal to approve the sharing request;
The receiving module is used for receiving the first media resource and the playing time stamp of the current moment sent by the first terminal based on the agreement message;
and the playing module is used for playing the first media resource based on the playing time stamp.
In one possible implementation, the apparatus further includes:
the receiving module is further used for receiving terminal information returned by the second terminal after the second terminal passes the verification, wherein the server performs verification based on the agreement message;
the sending module is further configured to send a resource acquisition request to the first terminal based on the terminal information.
In one possible implementation, the apparatus further includes:
the receiving module is further configured to receive a play timestamp of the current moment and the combined first media resource sent by the first terminal based on combining the first media resource and the second media resource;
the playing module is further configured to play the combined first media asset based on the playing timestamp of the current time.
In one possible implementation, the apparatus further includes:
the receiving module is further configured to receive a play timestamp of the current moment and the combined first media resource sent by the server based on combining the audio data of the account number logged in by the first terminal and the first media resource;
The playing module is further configured to play the combined first media asset based on the playing timestamp of the current time.
In one aspect, a terminal is provided that includes a processor and a memory having stored therein at least one program code that is loaded and executed by the processor to implement the above-described resource sharing method.
In one aspect, a server is provided that includes a processor and a memory having at least one program code stored therein, the at least one program code loaded and executed by the processor to implement the resource sharing method described above.
In one aspect, a computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement the above-described resource sharing method is provided.
In one aspect, a computer program product or a computer program is provided, the computer program product or computer program comprising computer program code stored in a computer readable storage medium, the computer program code being read from the computer readable storage medium by a processor of a terminal or a server, the computer program code being executed by the processor such that the terminal or the server performs the above-described resource sharing method.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an implementation environment of a resource sharing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 5 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 6 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 7 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 8 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 9 is a flowchart of a method for sharing resources according to an embodiment of the present application;
FIG. 10 is a flowchart of a method for sharing resources according to an embodiment of the present application;
fig. 11 is a schematic diagram of a live connection according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a resource sharing device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a resource sharing device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a resource sharing device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of a resource sharing method according to an embodiment of the present application. Referring to fig. 1, the implementation environment includes: a terminal 101 and a server 102.
The terminal 101 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop portable computer. The terminal 101 has a communication function and can access the internet. The terminal 101 may refer broadly to one of a plurality of terminals, and the present embodiment is illustrated only with the terminal 101. Those skilled in the art will recognize that the number of terminals may be greater or lesser. The terminal 101 may be provided with an application program having a media resource playing function and a media resource sharing function. The embodiment of the application adopts the target application program to represent the application program with the media resource playing function and the media resource sharing function.
In the present embodiment, the terminal 101 includes a first terminal 1011 and a second terminal 1012. The first terminal 1011 is used to represent a terminal operated by a first user who shares a media resource, that is, a terminal which transmits a sharing request. The second terminal 1012 is used to represent a terminal operated by a second user of the shared media resource, i.e. a terminal receiving the sharing request. For example, taking a media resource as a song, if a first user wants to listen to the song together with a second user, the first terminal 1011 may perform an operation to select the song to be listened to, perform a click operation on a song-together listening button in an interface of the song, and select a user account (i.e., an account of the second user) to listen to the song together, the first terminal 1011 sends a sharing request to the second terminal 1012, the second terminal 1012 receives the sharing request, and if the second terminal 1012 agrees to the sharing request, the first user and the second user start listening to the song together, so as to realize the sharing of the song.
The server 102 may be an independent physical server, a server cluster or a distributed file system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligence platform. The server 102 and the terminal 101 may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present application. Alternatively, the number of servers 102 may be greater or lesser, which is not limited in the embodiments of the present application. Of course, the server 102 may also include other functional servers to provide more comprehensive and diverse services. In this embodiment of the present application, the server is configured to provide a resource storage service, a terminal verification service, a resource merging service, a resource transmission service, and so on.
Fig. 2 is a flowchart of a resource sharing method provided in an embodiment of the present application. This embodiment applies to the first terminal, see fig. 2, and comprises:
201. And if the first terminal detects the resource sharing operation based on the first media resource, sending a sharing request to the server, wherein the sharing request is used for requesting to share the first media resource with the second terminal.
202. And the first terminal responds to the second terminal agreeing to the sharing request to acquire the first media resource.
203. The first terminal sends the first media resource and a playing time stamp of the current moment to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
Fig. 3 is a flowchart of a resource sharing method provided in an embodiment of the present application. This embodiment applies to a server, see fig. 3, and includes:
301. The server receives a sharing request sent by the first terminal, where the sharing request is used for requesting sharing of the first media resource with the second terminal.
302. The server sends the sharing request to the second terminal.
303. The server receives an agreement message sent by the second terminal based on the sharing request, and sends the agreement message to the first terminal, wherein the agreement message is used for indicating the second terminal to agree with the sharing request, the agreement message is used for triggering the first terminal to send the first media resource and a playing time stamp of the current moment to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
Fig. 4 is a flowchart of a resource sharing method provided in an embodiment of the present application. This embodiment applies to a second terminal, see fig. 4, comprising:
401. The second terminal receives a sharing request sent by the server, where the sharing request is used to request sharing of the first media resource with the second terminal.
402. And if the second terminal detects the approval operation of the sharing request, sending an approval message to the server, wherein the approval message is used for indicating the second terminal to approve the sharing request.
403. The second terminal receives the first media resource and the playing time stamp of the current moment sent by the first terminal based on the agreement message.
404. And the second terminal plays the first media resource based on the play time stamp.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
Fig. 2 to fig. 4 are only basic flow of the present application, and the scheme provided in the present application is further described below based on a specific embodiment, and fig. 5 is a flowchart of a resource sharing method provided in an embodiment of the present application, and referring to fig. 5, the method includes:
501. And if the first terminal detects the resource sharing operation based on the first media resource, sending a sharing request to the server, wherein the sharing request is used for requesting to share the first media resource with the second terminal.
The first terminal is used for representing a terminal operated by a first user sharing the media resource, namely, a terminal sending the sharing request. The second terminal is used to represent a terminal operated by a second user of the shared media resource, i.e. a terminal receiving the sharing request. The first media asset refers to a media asset to be shared. Optionally, the asset type of the first media asset is a song or a video. In this embodiment of the present application, the first media resource is a media resource. It should be appreciated that if a first user wants to share media assets, the first user needs to be a member-type user. Alternatively, the resource sharing operation refers to a click operation on a sharing button.
In one possible implementation manner, the first user performs an operation on the first terminal, performs a selection operation on the first media resource in the target application program, and then the first terminal detects the selection operation on the first media resource and displays a resource interface of the first media resource, where the resource interface includes a sharing button, for example, a song together listening button. If the first user wants to share the first media resource with the second user, clicking operation is carried out on a sharing button in the resource interface, and a user account of the second user is selected in a sharing panel displayed by the first terminal based on the clicking operation, the first terminal detects the resource sharing operation on the first media resource and sends a sharing request to the server.
Optionally, the sharing panel displayed by the first terminal based on the clicking operation includes a plurality of sharing modes, such as a mode of sharing through a target application program, a mode of sharing through a social application program and a mode of sharing through a third party application program. The sharing manner adopted by the first terminal is not limited in the embodiment of the present application.
In the embodiment of the present application, a process of resource sharing is described by taking a first terminal and a second terminal as examples. In another possible implementation manner, the first terminal can also perform resource sharing with a plurality of terminals, so as to realize multi-person resource sharing. For example, the first user may select user accounts of a plurality of friend users in a sharing panel displayed by the first terminal based on the clicking operation, so as to enable the user accounts to share resources with the plurality of friend users.
502. The server receives a sharing request sent by the first terminal.
Optionally, the sharing request carries a terminal identifier of the first terminal and a terminal identifier of the second terminal.
In one possible implementation manner, the server receives a sharing request sent by the first terminal, and obtains an identifier of the first terminal and an identifier of the second terminal carried by the sharing request from a specific field of the sharing request.
503. The server sends the sharing request to the second terminal.
In one possible implementation manner, after receiving the sharing request sent by the first terminal, the server sends the sharing request to the second terminal according to the identifier of the second terminal carried by the sharing request.
504. The second terminal receives the sharing request sent by the server.
In one possible implementation manner, the second terminal receives the sharing request sent by the server, and displays a prompt message of the sharing request on an interface of the second terminal, where the prompt message is used to prompt the first terminal to request to share the first media resource with the second terminal.
Optionally, the process of displaying the prompt message of the sharing request by the second terminal includes any one of the following:
in a possible implementation manner, a prompt message of the sharing request is popped up in a main interface of the second terminal. For example, the hint message may be "the first user invites you to listen to songs together through an x application".
In another possible implementation manner, if the first terminal sends the sharing request to the friend user (the second user) in the target application program through the target application program, that is, through the target application program, the second terminal displays the prompt message of the sharing request in the target application program of the second terminal after receiving the sharing request. Of course, if the first terminal shares through the social application, the second terminal displays the prompt message of the sharing request in the social application program of the second terminal after receiving the sharing request. For example, the second terminal displays the prompt message of the sharing request in a session frame corresponding to the account number of the first user in the social application program.
Optionally, the sharing request further carries a resource link of the first media resource, and after receiving the sharing request sent by the server, the second terminal obtains the resource link of the first media resource carried by the sharing request, and displays the resource link of the first media resource on the second terminal.
505. And if the second terminal detects the approval operation of the sharing request, sending an approval message to the server, wherein the approval message is used for indicating the second terminal to approve the sharing request.
Wherein the consent operation may be a triggering operation of the hint message of the sharing request, for example, the consent operation may be a clicking operation of the resource link of the first media resource. The consent message carries the terminal identification of the second terminal.
In one possible implementation manner, after the second terminal displays the prompt message of the sharing request, if the second user performs a triggering operation on the prompt message of the sharing request, the second terminal detects an agreement operation on the sharing request, and sends an agreement message to the server.
506. And the server receives the agreement message sent by the second terminal based on the sharing request, checks the second terminal, and if the second terminal passes the check, the server sends the terminal information of the first terminal to the second terminal.
The terminal information is used for triggering the second terminal to acquire the first media resource and the playing time stamp of the current moment from the first terminal. Optionally, the terminal information refers to an IP address (Internet Protocol Address ). It should be noted that, the sharing request is used for triggering the second terminal to send an agreement message to the server, where the agreement message is used for triggering the server to check the second terminal, and if the check is passed, the terminal information of the first terminal is sent to the second terminal.
In a possible implementation manner, the server receives the grant message sent by the second terminal based on the sharing request, obtains the terminal identifier of the second terminal carried by the grant message, determines that the second terminal passes the verification if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, and then sends the terminal information of the first terminal to the second terminal.
In another possible implementation manner, if the terminal identifier of the second terminal is different from the terminal identifier of the second terminal carried in the sharing request, it is determined that the second terminal fails to pass the verification, and a verification failure message is sent to the second terminal, where the verification failure message is used to prompt that the shared media resource cannot be acquired. In the process, terminal verification is performed according to the terminal identification of the second terminal, so that the verification result can be rapidly determined while the safety and the reliability of the shared media resource are ensured, the verification efficiency is improved, and the resource sharing efficiency is further improved.
The above-described procedure is a procedure for performing a check based on the terminal identification of the second terminal. In another possible implementation, the server is further capable of performing a verification based on the account identification of the second user. It should be understood that, if the second user is shared by the target application, the account identifier of the second user is the account identifier of the corresponding target application, and if the second user is shared by the social application, the account identifier of the second user is the account identifier of the corresponding social application. Optionally, the sharing request carries an account identifier of the account corresponding to the first user and an account identifier of the account corresponding to the second user. The corresponding verification process is as follows: and the server receives an agreement message sent by the second terminal based on the sharing request, acquires the account number identification of the second user carried by the agreement message, and determines that the second terminal passes the verification if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, so that the server sends the terminal information of the first terminal to the second terminal. In the process, verification is carried out through the account identification, and whether the account identification of the second user is the account identification of the shared user of the first user is judged, so that the safety and reliability of the shared media resource are ensured.
Optionally, the server can also perform login verification on the second terminal. The corresponding process is as follows: the server receives an agreement message sent by the second terminal based on the sharing request, acquires an account identifier of a second user carried by the agreement message, judges whether the account of the second user is in a login state according to the account identifier of the second user, determines that the second terminal passes login verification if the account of the second user is in the login state, and determines that the second terminal fails login verification if the account of the second user is in a non-login state.
Optionally, the process of determining the terminal information of the first terminal by the server includes: and the server determines the terminal information corresponding to the terminal identification of the first terminal according to the terminal identification of the first terminal carried by the sharing request and the corresponding relation between the terminal identification and the terminal information.
507. And the second terminal receives the terminal information returned by the server.
508. The second terminal sends a resource acquisition request to the first terminal based on the terminal information.
In one possible implementation manner, the second terminal receives the approval message and performs verification based on the approval message, determines terminal information returned by the second terminal after verification, and sends a resource acquisition request to the first terminal according to the terminal information so as to acquire the shared media resource. In the embodiment of the application, the resource sharing is realized by adopting a peer-to-peer (p 2 p) transmission mode, so that the safety and reliability of the shared media resource can be ensured.
509. And the first terminal receives a resource acquisition request sent by the second terminal based on the terminal information, and acquires the first media resource.
In one possible implementation manner, after receiving a resource acquisition request sent by the second terminal based on the terminal information, the first terminal acquires a resource identifier carried by the resource acquisition request, and acquires a first media resource corresponding to the resource identifier from a server.
510. The first terminal sends the first media resource and a playing time stamp of the current moment to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp.
In one possible implementation manner, after the first terminal obtains the first media resource, the first terminal obtains a play time stamp of the current time of the first terminal, and sends the first media resource and the play time stamp of the current time to the second terminal.
Optionally, the first terminal writes the play time stamp of the current time in a specific field of the data file of the first media asset.
511. The second terminal receives the first media resource and the playing time stamp of the current moment sent by the first terminal based on the agreement message.
Optionally, after receiving the first media resource sent by the first terminal based on the consent message, the second terminal obtains a play timestamp of the current time carried by the first media resource from a specific field of a data file of the first media resource.
512. And the second terminal plays the first media resource based on the play time stamp.
In one possible implementation manner, after the second terminal obtains the first media resource and the playing time stamp of the current moment, the first media resource is played by using the player in the target application program and using the playing time stamp as a playing starting point.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
Fig. 5 is a process of implementing media resource sharing by a p2p transmission scheme. In another possible implementation, sharing of media resources can also be achieved based on the following. Fig. 6 is a flowchart of a resource sharing method provided in an embodiment of the present application, referring to fig. 6, where the embodiment includes:
601. And if the first terminal detects the resource sharing operation based on the first media resource, sending a sharing request to the server, wherein the sharing request is used for requesting to share the first media resource with the second terminal.
602. The server receives a sharing request sent by the first terminal.
603. The server sends the sharing request to the second terminal.
604. The second terminal receives the sharing request sent by the server.
605. And if the second terminal detects the approval operation of the sharing request, sending an approval message to the server, wherein the approval message is used for indicating the second terminal to approve the sharing request.
606. And the server receives the agreement message sent by the second terminal based on the sharing request, checks the second terminal, and if the second terminal passes the check, the server sends the terminal information of the first terminal to the second terminal.
607. And the second terminal receives the terminal information returned by the server.
608. The second terminal sends a resource acquisition request to the first terminal based on the terminal information.
The contents of steps 601 to 608 are referred to steps 501 to 508, and will not be described again.
609. The first terminal receives a resource acquisition request sent by the second terminal based on the terminal information, and acquires a first media resource and a second media resource.
Wherein the second media asset refers to a media asset for merging. Optionally, the second media asset is background audio or accompaniment audio.
In one possible implementation manner, a first terminal receives a resource acquisition request sent by a second terminal based on the terminal information, acquires a resource identifier carried by the resource acquisition request, acquires a first media resource corresponding to the resource identifier from a server, and acquires a second media resource from the server.
Optionally, the server has a plurality of second media assets pre-stored. In a possible implementation manner, when the server receives the request for acquiring the second media resources from the first terminal, the server may randomly select one second media resource from a plurality of second media resources stored in advance, and send the selected second media resource to the first terminal. In another possible implementation manner, when receiving the request for acquiring the second media resource from the first terminal, the server selects a media resource matched with the first media resource from a plurality of prestored second media resources as the second media resource, and sends the second media resource to the first terminal. For example, a media asset that matches a first media asset may be a media asset that has a similarity of audio features to the first media asset that is greater than a certain threshold, or may be a media asset that has a fusion to the first media asset that is greater than a certain threshold. The process of determining the second media resource is not limited in the embodiments of the present application.
It should be noted that, after the first terminal obtains the second media resource from the server, the second media resource may be stored locally, and when the subsequent resources are shared, the first media resource may be combined according to the locally stored second media resource, so that the efficiency of resource combination can be improved, and further, the efficiency of resource sharing is improved.
610. And the first terminal combines the first media resource and the second media resource to obtain a combined first media resource.
It should be appreciated that the merged first media asset is the actual shared media asset.
Steps 609 to 610 are based on the combination of the first media resource and the second media resource to realize the sharing of the media resources. In another possible implementation, the first terminal obtains an associated media resource of the first media resource, where the associated media resource is a media resource of a different type but the same content as the first media resource, and sends the associated media resource to the second terminal. For example, taking a media asset as an example of a song, the associated media asset may be a evergreen song.
Optionally, the process of obtaining the associated media resource of the first media resource by the first terminal includes: the first terminal sends an associated resource acquisition request to the server, wherein the associated resource acquisition request carries resource information of the first media resource. The resource information may be a resource name, resource description information, and the like. For example, taking a media asset as a song, the asset information may be song title, singer title, lyric information, etc. The server receives an associated resource acquisition request sent by the first terminal, acquires resource information of a first media resource carried by the associated resource acquisition request, and determines an associated media resource corresponding to the resource information of the first media resource based on the resource information of the first media resource and the corresponding relation between the resource information and the associated media resource. The server sends the associated media resource to the first terminal, and the first terminal receives the associated media resource returned by the server based on the resource information. The server is associated with a media resource information base, and the media resource information base stores the corresponding relation between the resource information of a plurality of media resources and the associated media resources. In the process, the server can be preset with the associated media resources corresponding to the media resources, so that the subsequent associated media resources can be conveniently acquired, the efficiency of acquiring the associated media resources is improved, and the efficiency of resource sharing is further improved.
611. The first terminal sends the combined first media resource and the play time stamp of the current moment to the second terminal.
It should be noted that, steps 609 to 611 are steps of the first terminal executing the resource acquisition, the resource combination and the resource transmission after receiving the resource acquisition request. In another possible implementation manner, the first terminal performs the step of acquiring the resource first, and performs the steps of merging the resource and transmitting the resource after receiving the resource acquisition request. In another possible implementation manner, the first terminal performs the steps of acquiring the resources and combining the resources, and performs the step of transmitting the resources after receiving the resource acquisition request. The execution order of the acquisition resources, the merging resources and the sending resources is not limited in the embodiment of the application.
612. And the second terminal receives the combined first media resource and the play time stamp of the current moment.
It should be noted that, in the above embodiment, the first media resource and the second media resource are combined and then transmitted to other user terminals in a local audio stream manner, so as to realize resource sharing. In the process, the time delay is very small, and the experience of the user can be ensured.
613. The second terminal plays the combined first media resources based on the play time stamp of the current moment.
In step 611 to step 613, the synchronization of the playing of the media resources of the first terminal and the second terminal can be ensured by sending the playing time stamp at the current moment, so as to further improve the song listening experience of the user.
In a specific example, the server includes a library server and a verification server. Fig. 7 is a flowchart of a method for sharing resources provided in an embodiment of the present application, referring to fig. 7, a first terminal pulls a first media resource from a library server. The first terminal sends a share request to the second terminal, which may be an listen-together link as shown in fig. 7, which carries a terminal identification (token). After receiving the request for listening together, the second terminal sends an approval message to the server, where the approval message may be a request shown in fig. 7, and the request carries a terminal identifier of the second terminal. The server responds to the second terminal to send the consent message to check the second terminal, and if the second terminal passes the check, the server sends the terminal information of the first terminal to the second terminal, wherein the terminal information can be the p2p key shown in fig. 7. And the second terminal pulls the first media resource from the first terminal through a p2p transmission mode based on the p2p secret key, so that the sharing of the first media resource is realized.
According to the technical scheme provided by the embodiment of the application, when the first terminal and the second terminal share the first media resource, the first media resource and the second media resource are combined to obtain the combined first media resource, and then the combined first media resource is sent to the second terminal.
The above-described processes for realizing resource sharing based on the p2p transmission scheme are described with reference to fig. 5 to 7. In another possible implementation manner, the process of resource sharing can also be implemented based on interaction between the terminal and the server, and fig. 8 is a flowchart of a resource sharing method provided in an embodiment of the present application, and referring to fig. 8, this embodiment includes:
801. and if the first terminal detects the resource sharing operation based on the first media resource, sending a sharing request to the server, wherein the sharing request is used for requesting to share the first media resource with the second terminal.
802. The server receives a sharing request sent by the first terminal.
803. The server sends the sharing request to the second terminal.
804. The second terminal receives the sharing request sent by the server.
805. And if the second terminal detects the approval operation of the sharing request, sending an approval message to the server, wherein the approval message is used for indicating the second terminal to approve the sharing request.
The contents of steps 801 to 805 refer to steps 501 to 505, and are not described in detail.
806. The server receives the agreement message sent by the second terminal, and sends the first media resource and the playing time stamp of the current moment to the second terminal.
807. The second terminal receives the first media asset and the play time stamp of the current time.
808. The second terminal plays the first media asset based on the play time stamp of the current moment.
It should be noted that the embodiment shown in fig. 8 is applicable to media resources.
According to the technical scheme provided by the embodiment of the application, the sharing of the media resources can be realized through the interaction among the first terminal, the second terminal and the server, so that the song listening experience of a user is improved.
Fig. 5 to 8 are all the above-mentioned scenes in which the audio link or the video link is not opened, and in another possible implementation, the resource sharing method can also be applied to the scenes in which the audio link or the video link is opened, and other implementations are also possible. Referring to fig. 9, fig. 9 is a flowchart of a resource sharing method provided in an embodiment of the present application.
901. And if the first terminal detects the resource sharing operation based on the first media resource, sending a sharing request to the server, wherein the sharing request is used for requesting to share the first media resource with the second terminal.
902. The server receives a sharing request sent by the first terminal.
903. The server sends the sharing request to the second terminal.
904. The second terminal receives the sharing request sent by the server.
905. And if the second terminal detects the approval operation of the sharing request, sending an approval message to the server, wherein the approval message is used for indicating the second terminal to approve the sharing request.
The contents of step 901 to step 905 refer to step 501 to step 505, and will not be described in detail. It should be appreciated that the first terminal and the second terminal have been successfully wired to step 905.
906. The server receives an agreement message sent by the second terminal based on the sharing request and sends the agreement message to the first terminal.
907. And the first terminal responds to the second terminal agreeing to the sharing request to acquire the first media resource.
908. The method comprises the steps that a first terminal obtains audio data of an account number registered by the first terminal.
In one possible implementation manner, if the first terminal detects that the first terminal logs in the account number input voice, the audio data of the first terminal logs in the account number is obtained.
909. The first terminal sends the audio data and the first media asset to the server.
910. The server receives the audio data of the account number logged in by the first terminal and the first media resource.
911. And the server combines the audio data and the first media resource to obtain a combined first media resource.
In one possible implementation, after receiving the audio data and the first media resource, the server merges the audio data and the first media resource to obtain a merged first media resource.
912. And the server sends the combined first media resource and the play time stamp of the current moment to the second terminal.
913. The second terminal receives the combined first media resource and the play time stamp of the current moment, which are sent by the server based on the combination of the audio data of the login account of the first terminal and the first media resource.
914. The second terminal plays the combined first media resources based on the play time stamp of the current moment.
Optionally, if the second terminal detects that the second terminal logs in the account number input voice, the audio data of the second terminal logs in the account number is obtained, the audio data is sent to the server, and after receiving the audio data of the first terminal logs in the account number, the server sends the audio data to the first terminal.
In a specific example, the server includes a library server and a merge server. Fig. 10 is a flowchart of a resource sharing method provided in the embodiment of the present application, referring to fig. 10, a first terminal pulls a first media resource from a library server. The first terminal sends a sharing request to the second terminal, which may be an listen-together link as shown in fig. 10, where the listen-together link carries the terminal identification. If the first user inputs voice, the first terminal acquires the input audio data, and sends the acquired audio data and the first media resource to the merging server, and the process is that the first terminal reports the data as shown in fig. 10. And after receiving the audio data and the first media resource, the merging server merges the audio data and the first media resource and sends the merged data stream to the second terminal. If the second user inputs voice, the second terminal acquires the input audio data, and sends the acquired audio data to the merging server, and the process is that the second terminal reports the data as shown in fig. 10. The merging server receives the audio data and then transmits the audio data to the first terminal. Through the process, the audio connection of the first terminal and the second terminal can be realized while resources are shared.
It should be noted that, the resource sharing method provided in the embodiment of the present application may also be applicable to a live broadcast room connection, and fig. 11 is a schematic diagram of a live broadcast connection provided in the embodiment of the present application, referring to fig. 11, if a major anchor wants to connect with a minor anchor, such as an audio connection or a video connection, a major anchor terminal obtains major anchor data, sends the major anchor data to a server, and meanwhile, a minor anchor terminal obtains minor anchor data, and sends the minor anchor data to the server. If the server receives the big anchor data, the big anchor data is sent to the small anchor terminal, and if the server receives the small anchor data, the small anchor data is sent to the big anchor terminal. Thus, the large anchor terminal and the small anchor terminal can realize audio connection or video connection, namely, the large anchor terminal plays the audio data or the live broadcast picture of the small anchor, and the small anchor terminal plays the audio data or the live broadcast picture of the large anchor. The server also merges the big anchor data and the small anchor data and distributes the merged live broadcast data to a plurality of audience terminals in the live broadcast room. Optionally, after receiving the audio data and the first media resource sent by the first terminal and the audio data sent by the second terminal, the server merges the audio data of the first terminal, the audio data of the first media resource and the audio data of the second terminal to obtain merged live broadcast data, distributes the merged live broadcast data to a plurality of audience terminals in the live broadcast room, and then the plurality of audience terminals receive the merged live broadcast data, and plays the audio data of the first terminal, the audio data of the first media resource and the audio data of the second terminal on the corresponding audience terminals, thereby realizing resource sharing based on the live broadcast room.
According to the technical scheme provided by the embodiment of the application, under the scene of the audio connection or the video connection, the first media resources and the audio data of the first terminal are combined through the server, so that the combined media resources can be obtained, the server sends the combined media resources to the second terminal, sharing of the media resources can be achieved, and as the virtually sent media resources are new resources obtained based on combination of the media resources to be shared, sharing of the media resources can be achieved, and user experience is improved.
Fig. 12 is a schematic structural diagram of a resource sharing device provided in an embodiment of the present application, where the device is provided as a first terminal, and referring to fig. 12, the device includes:
a sending module 1201, configured to send a sharing request to a server if a resource sharing operation based on a first media resource is detected, where the sharing request is used to request sharing of the first media resource with a second terminal;
an obtaining module 1202, configured to obtain the first media resource in response to the second terminal agreeing to the sharing request;
the sending module 1201 is further configured to send the first media asset and a play timestamp of the current time to the second terminal, where the play timestamp is used to trigger the second terminal to play the first media asset based on the play timestamp.
In a possible implementation manner, the sharing request is used to trigger the second terminal to send an agreement message to the server, where the agreement message is used to trigger the server to check the second terminal, and if the check is passed, send terminal information of the first terminal to the second terminal, where the terminal information is used to trigger the second terminal to acquire the first media resource from the first terminal, and the sending module 1201 is configured to:
and receiving a resource acquisition request sent by the second terminal based on the terminal information, and executing the step of acquiring the first media resource.
In a possible implementation manner, the obtaining module 1202 is further configured to obtain a second media resource, and combine the first media resource and the second media resource to obtain a combined first media resource;
the sending module 1201 is further configured to send the combined first media resource to the second terminal.
In one possible implementation, the second media asset is background audio or accompaniment audio.
In one possible implementation, the obtaining module 1202 is further configured to obtain an associated media resource of the first media resource, where the associated media resource is a media resource of a different type and the same content as the first media resource;
The sending module 1201 is further configured to send the associated media resource to the second terminal.
In one possible implementation, the acquiring module 1202 includes:
a sending sub-module, configured to send an associated resource acquisition request to the server, where the associated resource acquisition request carries resource information of the first media resource;
and the receiving sub-module is used for receiving the associated media resource returned by the server based on the resource information.
In a possible implementation manner, the obtaining module 1202 is further configured to obtain audio data of an account number logged in by the first terminal;
the sending module 1201 is further configured to send the audio data and the first media resource to the server, where the audio data and the first media resource are used to trigger the server to combine the audio data and the first media resource to obtain a combined first media resource, and send the combined first media resource and the play timestamp of the current moment to the second terminal.
In one possible implementation, the sharing request carries a resource link of the first media resource.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
It should be noted that: in the resource sharing device provided in the above embodiment, when sharing resources, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the resource sharing device and the resource sharing method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the resource sharing device and the resource sharing method are detailed in the method embodiments, which are not described herein again.
Fig. 13 is a schematic structural diagram of a resource sharing device provided in an embodiment of the present application, where the device is provided as a server, and referring to fig. 13, the device includes:
a receiving module 1301, configured to receive a sharing request sent by a first terminal, where the sharing request is used to request sharing of a first media resource with a second terminal;
a sending module 1302, configured to send the sharing request to the second terminal;
the receiving module 1301 is further configured to receive an approval message sent by the second terminal based on the sharing request, send the approval message to the first terminal, where the approval message is used to instruct the second terminal to approve the sharing request, the approval message is used to trigger the first terminal to send the first media resource and a play timestamp of the current moment to the second terminal, and the play timestamp is used to trigger the second terminal to play the first media resource based on the play timestamp.
In one possible implementation, the apparatus further includes:
and the verification module is used for verifying the second terminal, and if the second terminal passes the verification, the verification module sends the terminal information of the first terminal to the second terminal, wherein the terminal information is used for triggering the second terminal to acquire the first media resource and the playing time stamp of the current moment from the first terminal.
In one possible implementation, the verification module is configured to:
and if the terminal identification of the second terminal is the same as the terminal identification of the second terminal carried in the sharing request, determining that the second terminal passes the verification.
In a possible implementation manner, the receiving module 1301 is further configured to receive an associated resource obtaining request sent by the first terminal, where the associated resource obtaining request carries resource information of the first media resource, and the associated media resource is a media resource with a different type and a same content as the first media resource;
the device also comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining the associated media resource corresponding to the resource information of the first media resource based on the resource information of the first media resource and the corresponding relation between the resource information and the associated media resource;
The sending module 1302 is further configured to send the associated media resource to the first terminal.
In a possible implementation manner, the receiving module 1301 is further configured to receive audio data of the account number registered by the first terminal and the first media resource;
the device also comprises a merging module, a merging module and a merging module, wherein the merging module is used for merging the audio data and the first media resource to obtain a merged first media resource;
the sending module 1302 is further configured to send the combined first media resource to the second terminal.
In a possible implementation, the sending module 1302 is further configured to send the first media resource and the play timestamp of the current time to the second terminal.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
It should be noted that: in the resource sharing device provided in the above embodiment, when sharing resources, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the resource sharing device and the resource sharing method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the resource sharing device and the resource sharing method are detailed in the method embodiments, which are not described herein again.
Fig. 14 is a schematic structural diagram of a resource sharing device provided in an embodiment of the present application, where the device is provided as a second terminal, and referring to fig. 14, the device includes:
a receiving module 1401, configured to receive a sharing request sent by a server, where the sharing request is used to request to share a first media resource with the second terminal;
a sending module 1402, configured to send, if an approval operation for the sharing request is detected, an approval message to the server, where the approval message is used to instruct the second terminal to approve the sharing request;
the receiving module 1401 is configured to receive the first media resource and a play timestamp of the current time sent by the first terminal based on the grant message;
a playing module 1403 is configured to play the first media asset based on the playing timestamp.
In one possible implementation, the apparatus further includes:
the receiving module 1401 is further configured to receive the terminal information returned by the second terminal after the second terminal passes the verification, where the server performs the verification based on the agreement message;
the sending module 1402 is further configured to send a resource acquisition request to the first terminal based on the terminal information.
In one possible implementation, the apparatus further includes:
The receiving module 1401 is further configured to receive a play timestamp of the current time and the combined first media resource sent by the first terminal based on combining the first media resource and the second media resource;
the playing module 1403 is further configured to play the combined first media asset based on the playing timestamp of the current time.
In one possible implementation, the apparatus further includes:
the receiving module 1401 is further configured to receive a play timestamp of the current time and the combined first media resource that is sent by the server based on combining the audio data of the account number registered by the first terminal and the first media resource;
the playing module 1403 is further configured to play the combined first media asset based on the playing timestamp of the current time.
According to the technical scheme, when the first terminal and the second terminal share the first media resource, the first terminal sends the first media resource to the second terminal, the sharing of the media resource can be achieved through the end-to-end transmission mode, user experience is improved, and playing synchronization of the media resource between the first terminal and the second terminal can be ensured by sending the playing time stamp of the current moment while sending the first media resource.
It should be noted that: in the resource sharing device provided in the above embodiment, when sharing resources, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the resource sharing device and the resource sharing method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the resource sharing device and the resource sharing method are detailed in the method embodiments, which are not described herein again.
Fig. 15 shows a block diagram of a terminal 1500 according to an exemplary embodiment of the present application. The terminal 1500 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 1500 can also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, and the like.
In general, the terminal 1500 includes: a processor 1501 and a memory 1502.
The processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1501 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit, image processor) for taking care of rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 1501 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1502 may include one or more computer-readable storage media, which may be non-transitory. Memory 1502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1502 is used to store at least one program code for execution by processor 1501 to implement the resource sharing method provided by the method embodiments herein.
In some embodiments, the terminal 1500 may further optionally include: a peripheral interface 1503 and at least one peripheral device. The processor 1501, memory 1502 and peripheral interface 1503 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 1503 via a bus, signal lines, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1504, a display screen 1505, a camera assembly 1506, audio circuitry 1507, a positioning assembly 1508, and a power supply 1509.
A peripheral interface 1503 may be used to connect I/O (Input/Output) related at least one peripheral device to the processor 1501 and the memory 1502. In some embodiments, processor 1501, memory 1502, and peripheral interface 1503 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1501, the memory 1502, and the peripheral interface 1503 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 1504 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1504 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1504 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuit 1504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuit 1504 may also include NFC (Near Field Communication, short range wireless communication) related circuits, which are not limited in this application.
Display 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When display screen 1505 is a touch display screen, display screen 1505 also has the ability to collect touch signals at or above the surface of display screen 1505. The touch signal may be input to the processor 1501 as a control signal for processing. At this point, display 1505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1505 may be one, disposed on the front panel of the terminal 1500; in other embodiments, the display 1505 may be at least two, respectively disposed on different surfaces of the terminal 1500 or in a folded design; in other embodiments, display 1505 may be a flexible display disposed on a curved surface or a folded surface of terminal 1500. Even more, the display 1505 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display screen 1505 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1506 is used to capture images or video. Optionally, the camera assembly 1506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuitry 1507 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, inputting the electric signals to the processor 1501 for processing, or inputting the electric signals to the radio frequency circuit 1504 for voice communication. For purposes of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 1500. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 1507 may also include a headphone jack.
The positioning component 1508 is for positioning a current geographic location of the terminal 1500 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 1508 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
The power supply 1509 is used to power the various components in the terminal 1500. The power supply 1509 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1509 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 1500 also includes one or more sensors 1510. The one or more sensors 1510 include, but are not limited to: acceleration sensor 1511, gyroscope sensor 1512, pressure sensor 1515, fingerprint sensor 1514, optical sensor 1515, and proximity sensor 1516.
The acceleration sensor 1511 may detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1500. For example, the acceleration sensor 1511 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1501 may control the display screen 1505 to display the user interface in a landscape view or a portrait view based on the gravitational acceleration signal acquired by the acceleration sensor 1511. The acceleration sensor 1511 may also be used for the acquisition of motion data of a game or user.
The gyro sensor 1512 may detect a body direction and a rotation angle of the terminal 1500, and the gyro sensor 1512 may collect 3D motion of the terminal 1500 by a user in cooperation with the acceleration sensor 1511. The processor 1501, based on the data collected by the gyro sensor 1512, may implement the following functions: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 1513 may be disposed on a side frame of the terminal 1500 and/or under the display 1505. When the pressure sensor 1513 is disposed at the side frame of the terminal 1300, a grip signal of the user to the terminal 1500 may be detected, and the processor 1501 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 1513. When the pressure sensor 1513 is disposed at the lower layer of the display screen 1505, the processor 1501 realizes control of the operability control on the UI interface according to the pressure operation of the user on the display screen 1505. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1514 is used for collecting the fingerprint of the user, and the processor 1501 recognizes the identity of the user according to the collected fingerprint of the fingerprint sensor 1514, or the fingerprint sensor 1514 recognizes the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 1501 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 1514 may be disposed on the front, back, or side of the terminal 1500. When a physical key or vendor Logo is provided on the terminal 1500, the fingerprint sensor 1514 may be integrated with the physical key or vendor Logo.
The optical sensor 1515 is used to collect the ambient light intensity. In one embodiment, processor 1501 may control the display brightness of display screen 1505 based on the intensity of ambient light collected by optical sensor 1515. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1505 is turned up; when the ambient light intensity is low, the display luminance of the display screen 1505 is turned down. In another embodiment, the processor 1501 may also dynamically adjust the shooting parameters of the camera assembly 1506 based on the ambient light intensity collected by the optical sensor 1515.
A proximity sensor 1516, also referred to as a distance sensor, is typically provided on the front panel of the terminal 1500. The proximity sensor 1516 is used to collect the distance between the user and the front of the terminal 1500. In one embodiment, when the proximity sensor 1516 detects a gradual decrease in the distance between the user and the front of the terminal 1500, the processor 1501 controls the display 1505 to switch from the on-screen state to the off-screen state; when the proximity sensor 1516 detects that the distance between the user and the front surface of the terminal 1500 gradually increases, the processor 1501 controls the display screen 1505 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 15 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
The computer device provided by the embodiment of the application can be provided as a server. Fig. 16 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 1600 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 1601 and one or more memories 1602, where at least one program code is stored in the memories 1002 and is loaded and executed by the processors 1601 to implement the resource sharing method provided in the above-mentioned method embodiments. Of course, the server may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
In an exemplary embodiment, a computer readable storage medium, for example, a memory including a program code executable by a processor in a terminal or a server to perform the resource sharing method in the above embodiment is also provided. For example, the computer readable storage medium may be read-only memory (ROM), random-access memory (random access memory), RAM), compact-disk-read-only memory (cd-ROM), magnetic tape, floppy disk, optical data storage device, etc.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the above-described embodiments may be implemented by hardware, or may be implemented by program code to instruct the relevant hardware, where the program code may be stored in a computer readable storage medium, where the storage medium may be a read only memory, a magnetic disk or optical disk, etc.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.

Claims (10)

1. A method for sharing resources, applied to a first terminal, the method comprising:
if a resource sharing operation based on a first media resource is detected, sending a sharing request to a server, wherein the sharing request is used for requesting to share the first media resource with a second terminal, the sharing request is used for triggering the second terminal to send an agreement message to the server, the agreement message is used for triggering the server to check the second terminal, and if the verification is passed, sending terminal information of the first terminal to the second terminal, and the terminal information is used for triggering the second terminal to acquire the first media resource and a playing time stamp of the current moment from the first terminal;
Responding to a resource acquisition request sent by the second terminal based on the terminal information, and acquiring the first media resource;
the first media resource and a playing time stamp of the current moment are sent to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp;
the sharing request carries a terminal identifier of the second terminal and an account identifier of a second user corresponding to an account, wherein the second user is an operation user of the second terminal, and the account identifier of the second user is an account identifier corresponding to a target application program when the second user is shared by the target application program;
the server checks the second terminal, including:
acquiring a terminal identifier of the second terminal carried by the consent message, if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, determining that the second terminal passes the verification, otherwise, determining that the second terminal fails the verification, and sending verification failure information to the second terminal, wherein the verification failure information is used for prompting that shared media resources cannot be acquired;
Acquiring the account number identification of the second user carried in the consent message, if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, determining that the second terminal passes the verification, and when determining that the account number of the second user is in a login state according to the account number identification of the second user, determining that the second terminal passes the login verification;
the method further comprises the steps of:
acquiring audio data of an account number registered by the first terminal;
the audio data and the first media resource are sent to the server, the audio data and the first media resource are used for triggering the server to combine the audio data and the first media resource to obtain a combined first media resource, and the server is further used for sending the combined first media resource and the playing time stamp of the current moment to the second terminal.
2. The method of claim 1, wherein the sharing request carries a resource link of the first media resource.
3. A method for sharing resources, applied to a server, the method comprising:
Receiving a sharing request sent by a first terminal, wherein the sharing request is used for requesting sharing of a first media resource with a second terminal;
sending the sharing request to the second terminal;
receiving an agreement message sent by the second terminal based on the sharing request;
checking the second terminal, if the second terminal passes the check, sending terminal information of the first terminal to the second terminal, wherein the terminal information is used for triggering the second terminal to acquire a first media resource and a playing time stamp at the current moment from the first terminal, and the second terminal also sends a resource acquisition request to the first terminal based on the terminal information;
sending the consent message to the first terminal, wherein the consent message is used for indicating the second terminal to consent to the sharing request, the consent message is used for triggering the first terminal to send the first media resource and a playing time stamp of the current moment to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp;
the sharing request carries a terminal identifier of the second terminal and an account identifier of a second user corresponding to an account, wherein the second user is an operation user of the second terminal, and the account identifier of the second user is an account identifier corresponding to a target application program when the second user is shared by the target application program;
The server checks the second terminal, including:
acquiring a terminal identifier of the second terminal carried by the consent message, if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, determining that the second terminal passes the verification, otherwise, determining that the second terminal fails the verification, and sending verification failure information to the second terminal, wherein the verification failure information is used for prompting that shared media resources cannot be acquired;
acquiring the account number identification of the second user carried in the consent message, if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, determining that the second terminal passes the verification, and when determining that the account number of the second user is in a login state according to the account number identification of the second user, determining that the second terminal passes the login verification;
the method further comprises the steps of:
receiving audio data of an account number registered by the first terminal and the first media resource;
combining the audio data and the first media resource to obtain a combined first media resource;
And sending the combined first media resource and the play time stamp of the current moment to the second terminal.
4. A method for sharing resources, applied to a second terminal, the method comprising:
receiving a sharing request sent by a server, wherein the sharing request is used for requesting to share a first media resource with the second terminal, the sharing request is used for triggering the second terminal to send an agreement message to the server, the agreement message is used for triggering the server to check the second terminal, and if the check is passed, terminal information of a first terminal is sent to the second terminal, and the terminal information is used for triggering the second terminal to acquire the first media resource and a playing time stamp of the current moment from the first terminal;
if the consent operation of the sharing request is detected, sending the consent message to the server, wherein the consent message is used for indicating the second terminal to consent to the sharing request;
receiving the terminal information returned by the second terminal after the second terminal passes the verification, wherein the server performs verification based on the agreement message;
based on the terminal information, sending a resource acquisition request to the first terminal, and acquiring a first media resource by the first terminal in response to the resource acquisition request;
Receiving the first media resource and a playing time stamp of the current moment sent by the first terminal;
playing the first media resource based on the playing time stamp;
the sharing request carries a terminal identifier of the second terminal and an account identifier of a second user corresponding to an account, wherein the second user is an operation user of the second terminal, and the account identifier of the second user is an account identifier corresponding to a target application program when the second user is shared by the target application program;
the server checks the second terminal, including:
acquiring a terminal identifier of the second terminal carried by the consent message, if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, determining that the second terminal passes the verification, otherwise, determining that the second terminal fails the verification, and sending verification failure information to the second terminal, wherein the verification failure information is used for prompting that shared media resources cannot be acquired;
acquiring the account number identification of the second user carried in the consent message, if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, determining that the second terminal passes the verification, and when determining that the account number of the second user is in a login state according to the account number identification of the second user, determining that the second terminal passes the login verification;
The method further comprises the steps of:
receiving a play time stamp of the combined first media resource and the current moment, which are sent by the server based on the combination of the audio data of the login account of the first terminal and the first media resource;
and playing the combined first media resources based on the playing time stamp of the current moment.
5. A resource sharing apparatus, the apparatus comprising:
a sending module, configured to send a sharing request to a server if a resource sharing operation based on a first media resource is detected, where the sharing request is used to request sharing of the first media resource with a second terminal, the sharing request is used to trigger the second terminal to send an agreement message to the server, the agreement message is used to trigger the server to check the second terminal, and if the check is passed, send terminal information of the first terminal to the second terminal, where the terminal information is used to trigger the second terminal to obtain a play timestamp of the first media resource and a current time from the first terminal;
the acquisition module is used for responding to a resource acquisition request sent by the second terminal based on the terminal information and acquiring the first media resource;
The sending module is used for sending the first media resource and a playing time stamp of the current moment to the second terminal, and the playing time stamp is used for triggering the second terminal to play the first media resource based on the playing time stamp;
the sharing request carries a terminal identifier of the second terminal and an account identifier of a second user corresponding to an account, wherein the second user is an operation user of the second terminal, and the account identifier of the second user is an account identifier corresponding to a target application program when the second user is shared by the target application program;
the server checks the second terminal, including:
acquiring a terminal identifier of the second terminal carried by the consent message, if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, determining that the second terminal passes the verification, otherwise, determining that the second terminal fails the verification, and sending verification failure information to the second terminal, wherein the verification failure information is used for prompting that shared media resources cannot be acquired;
acquiring the account number identification of the second user carried in the consent message, if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, determining that the second terminal passes the verification, and when determining that the account number of the second user is in a login state according to the account number identification of the second user, determining that the second terminal passes the login verification;
The acquisition module is further used for acquiring audio data of the account registered by the first terminal;
the sending module is further configured to send the audio data and the first media resource to the server, where the audio data and the first media resource are used to trigger the server to combine the audio data and the first media resource to obtain a combined first media resource, and the server is further configured to send the combined first media resource and the play timestamp of the current moment to the second terminal.
6. A resource sharing apparatus, the apparatus comprising:
the receiving module is used for receiving a sharing request sent by the first terminal, wherein the sharing request is used for requesting to share the first media resource with the second terminal;
a sending module, configured to send the sharing request to the second terminal;
the receiving module is used for receiving an agreement message sent by the second terminal based on the sharing request;
the sending module is further configured to verify the second terminal, if the second terminal passes the verification, send terminal information of the first terminal to the second terminal, where the terminal information is used to trigger the second terminal to obtain a first media resource and a play timestamp of a current time from the first terminal, and the second terminal further sends a resource obtaining request to the first terminal based on the terminal information;
The receiving module is configured to send the consent message to the first terminal, where the consent message is used to instruct the second terminal to consent to the sharing request, the consent message is used to trigger the first terminal to send the first media resource and a play timestamp of the current time to the second terminal, and the play timestamp is used to trigger the second terminal to play the first media resource based on the play timestamp;
the sharing request carries a terminal identifier of the second terminal and an account identifier of a second user corresponding to an account, wherein the second user is an operation user of the second terminal, and the account identifier of the second user is an account identifier corresponding to a target application program when the second user is shared by the target application program;
the verifying the second terminal includes:
acquiring a terminal identifier of the second terminal carried by the consent message, if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, determining that the second terminal passes the verification, otherwise, determining that the second terminal fails the verification, and sending verification failure information to the second terminal, wherein the verification failure information is used for prompting that shared media resources cannot be acquired;
Acquiring the account number identification of the second user carried in the consent message, if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, determining that the second terminal passes the verification, and when determining that the account number of the second user is in a login state according to the account number identification of the second user, determining that the second terminal passes the login verification;
the receiving module is further configured to receive audio data of the account number registered by the first terminal and the first media resource;
the sending module is further configured to combine the audio data and the first media resource to obtain a combined first media resource; and sending the combined first media resource and the play time stamp of the current moment to the second terminal.
7. A resource sharing apparatus, the apparatus comprising:
the receiving module is used for receiving a sharing request sent by a server, wherein the sharing request is used for requesting to share a first media resource with a second terminal, the sharing request is used for triggering the second terminal to send an agreement message to the server, the agreement message is used for triggering the server to check the second terminal, and if the second terminal passes the check, terminal information of a first terminal is sent to the second terminal, and the terminal information is used for triggering the second terminal to acquire the first media resource and a playing time stamp of the current moment from the first terminal;
The sending module is used for sending the consent message to the server if the consent operation of the sharing request is detected, wherein the consent message is used for indicating the second terminal to consent the sharing request;
the receiving module is used for receiving the terminal information returned by the second terminal after the second terminal passes the verification, wherein the server performs the verification based on the agreement message;
the sending module is used for sending a resource acquisition request to the first terminal based on the terminal information, and the first terminal responds to the resource acquisition request to acquire a first media resource;
the receiving module is used for receiving the first media resource and the playing time stamp of the current moment sent by the first terminal;
the playing module is used for playing the first media resource based on the playing time stamp;
the sharing request carries a terminal identifier of the second terminal and an account identifier of a second user corresponding to an account, wherein the second user is an operation user of the second terminal, and the account identifier of the second user is an account identifier corresponding to a target application program when the second user is shared by the target application program;
The server checks the second terminal, including:
acquiring a terminal identifier of the second terminal carried by the consent message, if the terminal identifier of the second terminal is the same as the terminal identifier of the second terminal carried in the sharing request, determining that the second terminal passes the verification, otherwise, determining that the second terminal fails the verification, and sending verification failure information to the second terminal, wherein the verification failure information is used for prompting that shared media resources cannot be acquired;
acquiring the account number identification of the second user carried in the consent message, if the account number identification of the second user is the same as the account number identification of the second user carried in the sharing request, determining that the second terminal passes the verification, and when determining that the account number of the second user is in a login state according to the account number identification of the second user, determining that the second terminal passes the login verification;
the receiving module is further configured to receive a play timestamp of the current time and the combined first media resource, where the play timestamp is sent by the server based on combining the audio data of the account number logged in by the first terminal and the first media resource;
The playing module is further configured to play the combined first media resource based on the playing timestamp of the current time.
8. A terminal comprising a processor and a memory, wherein the memory has stored therein at least one program code that is loaded and executed by the processor to implement the resource sharing method of any one of claims 1 to 2 or claim 4.
9. A server comprising a processor and a memory, the memory having stored therein at least one program code that is loaded and executed by the processor to implement the resource sharing method of claim 3.
10. A computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement the resource sharing method of any one of claims 1 to 4.
CN202011412093.0A 2020-12-04 2020-12-04 Resource sharing method, device, terminal, server and storage medium Active CN112583806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011412093.0A CN112583806B (en) 2020-12-04 2020-12-04 Resource sharing method, device, terminal, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011412093.0A CN112583806B (en) 2020-12-04 2020-12-04 Resource sharing method, device, terminal, server and storage medium

Publications (2)

Publication Number Publication Date
CN112583806A CN112583806A (en) 2021-03-30
CN112583806B true CN112583806B (en) 2024-03-22

Family

ID=75127343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011412093.0A Active CN112583806B (en) 2020-12-04 2020-12-04 Resource sharing method, device, terminal, server and storage medium

Country Status (1)

Country Link
CN (1) CN112583806B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113301135A (en) * 2021-05-14 2021-08-24 涂哲 Data sharing method
CN113411652A (en) * 2021-07-02 2021-09-17 广州酷狗计算机科技有限公司 Media resource playing method and device, storage medium and electronic equipment
CN114237840A (en) * 2021-11-29 2022-03-25 Oppo广东移动通信有限公司 Resource interaction method, device, terminal and storage medium
WO2023213275A1 (en) * 2022-05-05 2023-11-09 维沃移动通信有限公司 Communication method and apparatus, terminal, network side device and medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030040297A (en) * 2003-04-17 2003-05-22 주식회사 네오에이지 Peer to peer file sharing service with fee
KR20060024456A (en) * 2006-02-26 2006-03-16 정우준 Business model about user interaction based music streaming sharing service
CN101202902A (en) * 2007-12-11 2008-06-18 西安交通大学 Method for designing P2P stream medium network transferring structure with number copyright management
CN103686420A (en) * 2013-12-13 2014-03-26 广州华多网络科技有限公司 Method, terminal, server and system for inviting friend to watch video
EP3073703A1 (en) * 2015-03-23 2016-09-28 Laboratories Thomson Ltd. Method and system for sharing music and other audio content among mobile devices
CN106790018A (en) * 2016-12-14 2017-05-31 合网络技术(北京)有限公司 Resource-sharing player method and device
CN106960333A (en) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 The method and system of shared resource
CN107635152A (en) * 2017-09-28 2018-01-26 深圳晶恒数码科技有限公司 A kind of method and device of shared VR videos
CN107659834A (en) * 2017-03-22 2018-02-02 腾讯科技(深圳)有限公司 The sharing method and device of media resource
CN109194572A (en) * 2018-10-18 2019-01-11 腾讯音乐娱乐科技(深圳)有限公司 Audio file play method, device, terminal and storage medium
CN109842819A (en) * 2017-11-28 2019-06-04 腾讯数码(天津)有限公司 A kind of video playing interactive approach, device, system, user terminal and medium
CN110336810A (en) * 2019-06-28 2019-10-15 华为技术有限公司 Information sharing method, platform and calculating equipment
CN110536028A (en) * 2019-08-15 2019-12-03 咪咕文化科技有限公司 Implementation method, color ring platform and the terminal of video frequency color ring
CN111614759A (en) * 2020-05-20 2020-09-01 北京字节跳动网络技术有限公司 Resource sharing method and device, electronic equipment and computer readable medium
CN111880874A (en) * 2020-07-13 2020-11-03 腾讯科技(深圳)有限公司 Media file sharing method, device and equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11601477B2 (en) * 2010-01-25 2023-03-07 Kwingle Inc. Data communication system and method
US9560050B2 (en) * 2014-09-08 2017-01-31 At&T Intellectual Property I, L.P System and method to share a resource or a capability of a device

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030040297A (en) * 2003-04-17 2003-05-22 주식회사 네오에이지 Peer to peer file sharing service with fee
KR20060024456A (en) * 2006-02-26 2006-03-16 정우준 Business model about user interaction based music streaming sharing service
CN101202902A (en) * 2007-12-11 2008-06-18 西安交通大学 Method for designing P2P stream medium network transferring structure with number copyright management
CN103686420A (en) * 2013-12-13 2014-03-26 广州华多网络科技有限公司 Method, terminal, server and system for inviting friend to watch video
EP3073703A1 (en) * 2015-03-23 2016-09-28 Laboratories Thomson Ltd. Method and system for sharing music and other audio content among mobile devices
CN106960333A (en) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 The method and system of shared resource
CN106790018A (en) * 2016-12-14 2017-05-31 合网络技术(北京)有限公司 Resource-sharing player method and device
CN107659834A (en) * 2017-03-22 2018-02-02 腾讯科技(深圳)有限公司 The sharing method and device of media resource
CN107635152A (en) * 2017-09-28 2018-01-26 深圳晶恒数码科技有限公司 A kind of method and device of shared VR videos
CN109842819A (en) * 2017-11-28 2019-06-04 腾讯数码(天津)有限公司 A kind of video playing interactive approach, device, system, user terminal and medium
CN109194572A (en) * 2018-10-18 2019-01-11 腾讯音乐娱乐科技(深圳)有限公司 Audio file play method, device, terminal and storage medium
CN110336810A (en) * 2019-06-28 2019-10-15 华为技术有限公司 Information sharing method, platform and calculating equipment
CN110536028A (en) * 2019-08-15 2019-12-03 咪咕文化科技有限公司 Implementation method, color ring platform and the terminal of video frequency color ring
CN111614759A (en) * 2020-05-20 2020-09-01 北京字节跳动网络技术有限公司 Resource sharing method and device, electronic equipment and computer readable medium
CN111880874A (en) * 2020-07-13 2020-11-03 腾讯科技(深圳)有限公司 Media file sharing method, device and equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112583806A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112583806B (en) Resource sharing method, device, terminal, server and storage medium
CN110278464B (en) Method and device for displaying list
CN112118477B (en) Virtual gift display method, device, equipment and storage medium
CN109327608B (en) Song sharing method, terminal, server and system
CN110061900B (en) Message display method, device, terminal and computer readable storage medium
CN111918086B (en) Video connection method, device, terminal, server and readable storage medium
CN112492339B (en) Live broadcast method, device, server, terminal and storage medium
CN111159562B (en) Method, device, system, equipment and storage medium for recommending specific live broadcast
CN110102063B (en) Identification binding method, device, terminal, server and storage medium
CN111628925B (en) Song interaction method, device, terminal and storage medium
CN113490010B (en) Interaction method, device and equipment based on live video and storage medium
CN113271470B (en) Live broadcast wheat connecting method, device, terminal, server and storage medium
CN111045945B (en) Method, device, terminal, storage medium and program product for simulating live broadcast
CN108579075B (en) Operation request response method, device, storage medium and system
CN113204671A (en) Resource display method, device, terminal, server, medium and product
CN111402844B (en) Song chorus method, device and system
WO2020244516A1 (en) Online interaction method and device
CN114040219B (en) Game live broadcast method, device, system, equipment and computer readable storage medium
CN113095046B (en) Lyric processing method, device, terminal, server and readable storage medium
CN112040267A (en) Chorus video generation method, chorus method, apparatus, device and storage medium
CN113141538B (en) Media resource playing method, device, terminal, server and storage medium
CN111314205B (en) Instant messaging matching method, device, system, equipment and storage medium
CN110944214B (en) Method, device, equipment, system and storage medium for intercepting high-tide video segments of songs
CN110808985B (en) Song on-demand method, device, terminal, server and storage medium
CN112468838A (en) Live broadcast room management method, system, device, equipment and storage medium

Legal Events

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