技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种文件分享方法及装置。The present invention relates to the field of computer technology, in particular to a file sharing method and device.
背景技术Background technique
随着用户日益提升的音乐需求,音乐分享功能成为用户频繁使用的功能体验之一。目前的媒体播放设备,如智能无线音箱、蓝光碟机等,可以通过无线网络等技术,和移动终端进行连接,移动终端的应用程序便可以通过无线网络和媒体播放设备进行网络通信和数据传输。例如,用户可以通过移动终端发送控制命令把局域网内或者互联网服务器中的音乐推送到媒体播放设备播放,并可以把当前音箱播放的音乐分享到指定的社交网络。但由于本地音乐资源只有局域网内能访问播放,所以目前普遍只能分享该音乐的信息,比如歌曲名称和歌手专辑信息等等,由于局域网外部的用户不能访问,所以点击该分享的信息并不能直接播放,想要分享该首歌曲,不得不重新去搜索寻找互联网资源,因此该共享方式有不方便之处。With the increasing demands of users for music, the music sharing function has become one of the frequently used functional experiences of users. Current media playback devices, such as smart wireless speakers, Blu-ray disc players, etc., can be connected to mobile terminals through technologies such as wireless networks, and mobile terminal applications can perform network communication and data transmission through wireless networks and media playback devices. For example, the user can send control commands through the mobile terminal to push the music in the local area network or the Internet server to the media playback device for playback, and can share the music played by the current speaker to the designated social network. However, since local music resources can only be accessed and played within the LAN, it is generally only possible to share information about the music, such as song titles and artist album information, etc. Since users outside the LAN cannot access it, clicking on the shared information cannot directly If you want to share the song, you have to search for Internet resources again, so this sharing method is inconvenient.
发明内容Contents of the invention
本发明实施例所要解决的技术问题在于,提供一种文件分享方法及装置,能通过将本地音乐与互联网中的资源作匹配并生成分享文件的可播放的分享信息,解决了现有技术中不能将本地音乐文件进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。The technical problem to be solved by the embodiments of the present invention is to provide a file sharing method and device that can match local music with resources on the Internet and generate playable sharing information for shared files, solving problems that cannot be solved in the prior art. The technical problem of playing and sharing local music files is convenient for users to play and share music, and improves the efficiency of file sharing.
第一方面,本发明实施例提供了一种文件分享方法,包括:In the first aspect, the embodiment of the present invention provides a file sharing method, including:
当第一终端接收到第一文件分享请求时,获取所述第一文件的第一属性信息,所述第一文件为所述第一终端的本地文件;When the first terminal receives a first file sharing request, acquire first attribute information of the first file, where the first file is a local file of the first terminal;
根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息;collecting a second file with a high degree of matching with the first file according to the first attribute information of the first file, and generating sharing information of the second file according to the collected second file;
将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。Sharing the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
结合第一方面,在第一种可能的实现方式中,所述第一文件包括音乐文件或多媒体文件。With reference to the first aspect, in a first possible implementation manner, the first file includes a music file or a multimedia file.
结合第一方面,在第二种可能的实现方式中,所述当接收到第一文件分享请求时之后,还包括:With reference to the first aspect, in a second possible implementation manner, after receiving the first file sharing request, the method further includes:
获取所述第一文件的第二属性信息;Acquiring second attribute information of the first file;
根据所述第二属性信息,生成所述第一文件的分享描述信息;generating sharing description information of the first file according to the second attribute information;
将所述第一文件的分享描述信息分享给第二终端。Sharing the sharing description information of the first file to the second terminal.
结合第一方面,在第三种可能的实现方式中,所述第一属性信息,包括:文件类型、文件打开方式、文件名称、文件作者、文件时长或文件占用空间中的至少一个属性信息。With reference to the first aspect, in a third possible implementation manner, the first attribute information includes: at least one attribute information of file type, file opening method, file name, file author, file duration, or file occupied space.
结合第一方面的第一种可能的实现方式,在第四种可能的实现方式中,所述音乐文件的第一属性信息,包括:音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息。With reference to the first possible implementation of the first aspect, in a fourth possible implementation, the first attribute information of the music file includes: the file name of the music file, the author, the name of the album to which it belongs, and the release year , duration, bit rate or at least one attribute information of audio storage space size.
结合第一方面,在第五种可能的实现方式中,所述当接收到第一文件分享请求时,获取所述第一文件的第一属性信息,包括:With reference to the first aspect, in a fifth possible implementation manner, the acquiring the first attribute information of the first file when receiving the first file sharing request includes:
监听终端的请求指令;Monitor the request command of the terminal;
当解析到所述请求指令为分享请求指令时,获取所述终端的第一文件的分享请求;When it is analyzed that the request instruction is a sharing request instruction, obtaining a sharing request of the first file of the terminal;
获取所述第一文件的第一属性信息。Obtain first attribute information of the first file.
结合第一方面,在第六种可能的实现方式中,所述根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息,包括:With reference to the first aspect, in a sixth possible implementation manner, the second file with a high degree of matching with the first file is collected according to the first attribute information of the first file, and according to the collected first attribute information The second file generates the sharing information of the second file, including:
根据所述第一文件的第一属性信息,通过建立了连接的服务器,根据预设的匹配度的计算公式和匹配度阈值,计算所述服务器数据库中的文件与所述第一文件的匹配度,所述匹配度表示服务器数据库中的文件的属性信息与所述第一文件的第一属性信息之间的相似度;According to the first attribute information of the first file, calculate the matching degree between the file in the server database and the first file according to the preset matching degree calculation formula and the matching degree threshold through the server that has established a connection , the matching degree represents the similarity between the attribute information of the file in the server database and the first attribute information of the first file;
采集所述匹配度达到预设匹配度阈值对应的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息。Collecting the second file corresponding to the matching degree reaching the preset matching degree threshold, and generating the sharing information of the second file according to the collected second file.
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中,所述根据所述采集的第二文件生成所述第二文件的分享信息,包括:With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, the generating the sharing information of the second file according to the collected second file includes:
当采集的第二文件为多个时,根据所述采集的多个第二文件以列表的形式生成多个第二文件的分享信息。When there are multiple second files collected, the sharing information of the multiple second files is generated in the form of a list according to the multiple collected second files.
结合第一方面的第六种可能的实现方式,在第八种可能的实现方式中,所述根据所述采集的第二文件生成所述第二文件的分享信息,还包括:With reference to the sixth possible implementation manner of the first aspect, in an eighth possible implementation manner, the generating the sharing information of the second file according to the collected second file further includes:
当采集的第二文件为多个时,选择匹配度最高的第二文件;When there are multiple second files collected, select the second file with the highest matching degree;
根据所述选择的第二文件生成所述第二文件的分享信息。generating sharing information of the second file according to the selected second file.
第二方面,本发明实施例提供了一种文件分享装置,包括:In a second aspect, an embodiment of the present invention provides a file sharing device, including:
第一信息获取模块,用于当第一终端接收到第一文件分享请求时,获取所述第一文件的第一属性信息,所述第一文件为所述第一终端的本地文件;A first information acquiring module, configured to acquire first attribute information of the first file when the first terminal receives a first file sharing request, where the first file is a local file of the first terminal;
信息匹配模块,用于根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息;An information matching module, configured to collect a second file with a high matching degree with the first file according to the first attribute information of the first file, and generate sharing information of the second file according to the collected second file ;
文件分享模块,用于将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。A file sharing module, configured to share the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
结合第二方面,在第一种可能的实现方式中,所述第一文件包括音乐文件或多媒体文件。With reference to the second aspect, in a first possible implementation manner, the first file includes a music file or a multimedia file.
结合第二方面,在第二种可能的实现方式中,所述文件分享装置,还包括:With reference to the second aspect, in a second possible implementation manner, the file sharing device further includes:
第二信息获取模块,用于获取所述第一文件的第二属性信息;a second information acquiring module, configured to acquire second attribute information of the first file;
信息生成模块,用于根据所述第二属性信息,生成所述第一文件的分享描述信息;An information generating module, configured to generate sharing description information of the first file according to the second attribute information;
信息分享模块,用于将所述第一文件的分享描述信息分享给第二终端。An information sharing module, configured to share the sharing description information of the first file with the second terminal.
结合第二方面,在第三种可能的实现方式中,所述第一属性信息,包括:文件类型、文件打开方式、文件名称、文件作者、文件时长或文件占用空间中的至少一个属性信息。With reference to the second aspect, in a third possible implementation manner, the first attribute information includes: at least one attribute information of file type, file opening method, file name, file author, file duration, or file occupied space.
结合第二方面的第一种可能的实现方式,在第四种可能的实现方式中,所述音乐文件的第一属性信息,包括:音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息。With reference to the first possible implementation of the second aspect, in a fourth possible implementation, the first attribute information of the music file includes: the file name of the music file, the author, the name of the album to which it belongs, and the release year , duration, bit rate or at least one attribute information of audio storage space size.
结合第二方面,在第五种可能的实现方式中,所述第一信息获取模块,包括:With reference to the second aspect, in a fifth possible implementation manner, the first information acquisition module includes:
指令监听单元,用于监听终端的请求指令;an instruction monitoring unit, configured to monitor the request instruction of the terminal;
请求获取单元,用于当解析到所述请求指令为分享请求指令时,获取所述终端的第一文件的分享请求;a request obtaining unit, configured to obtain a sharing request of the first file of the terminal when the request instruction is analyzed to be a sharing request instruction;
信息获取单元,用于获取所述第一文件的第一属性信息。An information acquiring unit, configured to acquire first attribute information of the first file.
结合第二方面,在第六种可能的实现方式中,所述信息匹配模块,包括:With reference to the second aspect, in a sixth possible implementation manner, the information matching module includes:
匹配计算单元,用于根据所述第一文件的第一属性信息,通过建立了连接的服务器,根据预设的匹配度的计算公式和匹配度阈值,计算所述服务器数据库中的文件与所述第一文件的匹配度,所述匹配度表示服务器数据库中的文件的属性信息与所述第一文件的第一属性信息之间的相似度;The matching calculation unit is configured to calculate the relationship between the file in the server database and the matching degree threshold based on the first attribute information of the first file, through the server that has established a connection, and according to a preset calculation formula of matching degree and a matching degree threshold. The matching degree of the first file, the matching degree representing the similarity between the attribute information of the file in the server database and the first attribute information of the first file;
信息匹配单元,用于采集所述匹配度达到预设匹配度阈值对应的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息。The information matching unit is configured to collect a second file whose matching degree reaches a preset matching degree threshold, and generate sharing information of the second file according to the collected second file.
结合第二方面的第六种可能的实现方式,在第七种可能的实现方式中,所述信息匹配单元,具体用于:With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner, the information matching unit is specifically configured to:
当采集的第二文件为多个时,根据所述采集的多个第二文件以列表的形式生成多个第二文件的分享信息。When there are multiple second files collected, the sharing information of the multiple second files is generated in the form of a list according to the multiple collected second files.
结合第二方面的第六种可能的实现方式,在第八种可能的实现方式中,所述信息匹配单元,还具体用于:With reference to the sixth possible implementation manner of the second aspect, in an eighth possible implementation manner, the information matching unit is further specifically configured to:
当采集的第二文件为多个时,选择匹配度最高的第二文件;When there are multiple second files collected, select the second file with the highest matching degree;
根据所述选择的第二文件生成所述第二文件的分享信息。generating sharing information of the second file according to the selected second file.
实施本发明实施例,具有如下有益效果:Implementing the embodiment of the present invention has the following beneficial effects:
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明实施例中的文件分享方法及装置的其中一种智能手机分享音乐的具体应用场景的示意图;Fig. 1 is a schematic diagram of a specific application scenario of sharing music with a smart phone of the file sharing method and device in the embodiment of the present invention;
图2是本发明实施例中的一种文件分享方法的流程示意图;FIG. 2 is a schematic flowchart of a file sharing method in an embodiment of the present invention;
图3是本发明实施例中的另一种文件分享方法的流程示意图;FIG. 3 is a schematic flowchart of another file sharing method in an embodiment of the present invention;
图4是本发明实施例中的又一种文件分享方法的流程示意图;FIG. 4 is a schematic flowchart of another file sharing method in an embodiment of the present invention;
图5是本发明实施例中的又一种文件分享方法的流程示意图;FIG. 5 is a schematic flowchart of another file sharing method in an embodiment of the present invention;
图6是本发明实施例中的一种文件分享装置的结构示意图;FIG. 6 is a schematic structural diagram of a file sharing device in an embodiment of the present invention;
图7是本发明实施例中的另一种文件分享装置的结构示意图;FIG. 7 is a schematic structural diagram of another file sharing device in an embodiment of the present invention;
图8是本发明实施例中的又一种文件分享装置的结构示意图;FIG. 8 is a schematic structural diagram of another file sharing device in an embodiment of the present invention;
图9是本发明实施例中的又一种文件分享装置的信息匹配模块的信息匹配单元的结构示意图。Fig. 9 is a schematic structural diagram of an information matching unit of an information matching module of another file sharing device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
需要说明的是,在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。It should be noted that the terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. As used in the embodiments of the present invention and the appended claims, the singular forms "a", "said" and "the" are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
还需要说明的是,本发明实施例中的终端包括但不限于智能手机、平板电脑、媒体播放器、智能电视、智能手环、智能穿戴设备、MP3播放器(Moving PictureExperts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(MovingPicture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、个人数字助理(Personal Digital Assistant,PDA)膝上型便携计算机和台式计算机等用户设备。It should also be noted that the terminals in the embodiments of the present invention include but are not limited to smart phones, tablet computers, media players, smart TVs, smart bracelets, smart wearable devices, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic Image expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture expert compression standard audio layer 3) player, personal digital assistant (Personal Digital Assistant, PDA) laptop portable computer and desktop computer and other users equipment.
进一步需要说明的是,本发明可以应用于音乐分享应用软件、音乐分享网站或音乐分享装置设备等应用场景。本发明实施例主要以智能手机进行本地音乐的文件分享来举例说明。如图1所示,图1是本发明实施例中的文件分享方法及装置的其中一种智能手机分享音乐的具体应用场景的示意图,在图1的应用场景中分享用户通过智能手机对本地的音乐文件进行分享,通过互联网将匹配好的音乐分享文件的播放链接地址发送给被分享的用户,而被分享的用户则可通过该分享链接进行音乐分享文件的播放。It should be further noted that the present invention can be applied to application scenarios such as music sharing application software, music sharing websites, or music sharing devices. The embodiment of the present invention is mainly illustrated by taking a smartphone to share local music files as an example. As shown in Figure 1, Figure 1 is a schematic diagram of a specific application scenario of a smartphone sharing music in the file sharing method and device in the embodiment of the present invention. The music file is shared, and the playback link address of the matched music sharing file is sent to the shared user through the Internet, and the shared user can play the music sharing file through the sharing link.
图2是本发明实施例中的文件分享方法的流程示意图,下面将结合附图2对本发明实施例中的一种文件分享方法进行详细介绍,如图2所示,本实施例中的文件分享方法可以包括以下步骤S201-步骤S203。Fig. 2 is a schematic flow chart of the file sharing method in the embodiment of the present invention. A file sharing method in the embodiment of the present invention will be introduced in detail below in conjunction with the accompanying drawing 2. As shown in Fig. 2, the file sharing in this embodiment The method may include the following steps S201-S203.
步骤S201:当第一终端接收到第一文件分享请求时,获取所述第一文件的第一属性信息。Step S201: When the first terminal receives a first file sharing request, acquire first attribute information of the first file.
具体地,所述第一文件为所述第一终端的本地文件。以智能手机分享音乐文件为例,当智能手机接收到用户的第一音乐文件的分享请求时,其中该音乐文件为该智能手机的本地音乐,获取该第一音乐文件的第一属性信息。进一步地,第一属性信息可以包括该音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息,或者其它可以查找比对该第一文件的属性信息。Specifically, the first file is a local file of the first terminal. Taking the sharing of music files by a smart phone as an example, when the smart phone receives a sharing request of a user's first music file, where the music file is local music of the smart phone, first attribute information of the first music file is obtained. Further, the first attribute information may include at least one attribute information of the music file's file name, author, album name, release year, duration, bit rate or audio storage space size, or other attributes that can be searched and compared to the first attribute information. attribute information of a file.
步骤S202:根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息。Step S202: collect a second file with a high matching degree with the first file according to the first attribute information of the first file, and generate sharing information of the second file according to the collected second file.
具体地,根据步骤S201中获取的第一音乐文件的属性信息采集与该属性信息相似的音乐文件,例如优先采集,音乐文件名称相同的文件,演唱者相同、时长相同的文件。具体地,通过设置文件之间的相似匹配度的计算公式和阈值范围,计算查找匹配度达到阈值的第二文件,采集该第二音乐文件的并根据该第二音乐文件生成该音乐文件的分享信息,其中分享信息可包括该音乐文件的播放链接地址,也可以是音乐文件的名称作者等描述分享信息,还可以是音乐文件的下载或收藏地址等,本发明不做具体限定。Specifically, according to the attribute information of the first music file obtained in step S201, music files similar to the attribute information are collected, for example, files with the same music file name, files with the same singer and the same duration are preferentially collected. Specifically, by setting the calculation formula and the threshold range of the similarity matching degree between files, calculate and find the second file whose matching degree reaches the threshold value, collect the second music file and generate the music file sharing according to the second music file Information, wherein the sharing information may include the playback link address of the music file, or the name and author of the music file to describe the sharing information, or the download or collection address of the music file, etc., which are not specifically limited in the present invention.
步骤S203:将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。Step S203: Share the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
具体地,用户可将步骤S202中获取的匹配度高的第二音乐文件的分享信息分享给第二终端,分享形式则可以根据用户自己的判断选择匹配度最高的第二文件分享给第二终端,或者将匹配度高的音乐文件以列表的形式发送给第二终端供接收分享的用户选择进行自主选择试听,以供被分享用户通过分享的信息播放或获取第二音乐文件。Specifically, the user can share the sharing information of the second music file with the highest matching degree obtained in step S202 with the second terminal, and the sharing form can be based on the user's own judgment to select the second file with the highest matching degree to share with the second terminal , or send the music files with a high matching degree to the second terminal in the form of a list for the user receiving the sharing to choose to listen to independently, so that the shared user can play or obtain the second music file through the shared information.
需要说明的是,本实施例中主要以智能手机分享音乐文件为例进行说明,并不代表本发明只针对音乐文件的分享,本发明中的分享文件也包括多媒体文件、图片文件、视频文件等,分享的终端也不限于智能手机,还可包括智能手表、平板电脑等所有可连接互联网的智能设备。而其中的第一、第二等用来描述文件或终端仅仅用于区分彼此,并不具体限定于该特定的名称。It should be noted that in this embodiment, the sharing of music files by smart phones is mainly used as an example for illustration, which does not mean that the present invention is only for the sharing of music files, and the shared files in the present invention also include multimedia files, picture files, video files, etc. , The shared terminals are not limited to smartphones, but also include all smart devices that can connect to the Internet, such as smart watches and tablet computers. The first, second, etc. are used to describe files or terminals only to distinguish each other, and are not specifically limited to the specific names.
进一步地,图2所述的实施例还可以包括图3中的方法流程步骤S301-步骤S303,图3是本发明实施例中的另一种文件分享方法的流程示意图,如图3所示,在优选的实施例中文件分享方法还可以包括以下步骤S301-步骤S303。Further, the embodiment described in FIG. 2 may also include the method flow step S301-step S303 in FIG. 3 , and FIG. 3 is a schematic flowchart of another file sharing method in the embodiment of the present invention, as shown in FIG. 3 , In a preferred embodiment, the file sharing method may further include the following steps S301-S303.
步骤S301:当第一终端接收到第一文件分享请求时,获取所述第一文件的第二属性信息。Step S301: When the first terminal receives a first file sharing request, acquire second attribute information of the first file.
具体地,当第一终端接收到第一文件分享请求时,获取需要进行分享的第一文件的第二属性信息。其中第二属性信息可包括:文件类型、文件打开方式、文件名称、文件作者、文件时长或文件占用空间中的至少一个属性信息。当第一文件为音乐文件时,则其属性信息可包括:音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息。需要说明的是,第一属性信息与第二属性信息可以相同也可以不同。优选地,第二属性信息主要可包括第一文件的描述信息以便于接收分享的用户根据该描述信息进行查找,而第一属性信息主要可包括第一文件的详细属性信息,便于服务器进行第二文件的查找比对和匹配度的计算。Specifically, when the first terminal receives the first file sharing request, it acquires the second attribute information of the first file to be shared. The second attribute information may include: at least one attribute information of file type, file opening method, file name, file author, file duration, or file occupied space. When the first file is a music file, its attribute information may include: at least one attribute information of the music file's file name, author, album name, release year, duration, bit rate or audio storage space size. It should be noted that the first attribute information and the second attribute information may be the same or different. Preferably, the second attribute information mainly includes the descriptive information of the first file so that the users who receive the sharing can search according to the description information, and the first attribute information mainly includes the detailed attribute information of the first file, which is convenient for the server to perform the second file. File search comparison and calculation of matching degree.
步骤S302:根据所述第二属性信息,生成所述第一文件的分享描述信息。Step S302: Generate sharing description information of the first file according to the second attribute information.
具体地,根据步骤S301中获取的第二属性信息,生成所述第一文件的分享描述信息,例如直接从第一终端的本地获取第一音乐文件的描述信息,歌名、词曲作者、表演者等信息。Specifically, according to the second attribute information obtained in step S301, the shared description information of the first file is generated, for example, the description information of the first music file is directly obtained locally from the first terminal, such as song title, songwriter, performer, etc. and other information.
步骤S303:将所述第一文件的分享描述信息分享给第二终端。Step S303: Share the sharing description information of the first file with the second terminal.
具体地,将步骤S302中获取的第一文件的分享描述信息分享给第二终端,第二终端的用户可以根据该分享描述信息自行在互联网的资源中进行搜索查找,并获取该第一文件的相同或相似文件。Specifically, the sharing description information of the first file obtained in step S302 is shared with the second terminal, and the user of the second terminal can search and search Internet resources according to the sharing description information, and obtain the first file sharing description information. the same or similar files.
需要说明的是,步骤S201-步骤S203和步骤S301-步骤S303可以是分别选择进行的关系也可以是同时并列进行的关系,可根据实际情况应用相应的方法步骤流程完成用户的文件分享需求,本发明不作具体限定。It should be noted that step S201-step S203 and step S301-step S303 can be performed separately or in parallel, and the corresponding method steps can be applied according to the actual situation to complete the user's file sharing needs. The invention is not specifically limited.
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
图4是本发明实施例中的另一种文件分享方法的流程示意图,下面将结合附图4对本发明实施例中的另一种文件分享方法进行详细介绍,如图4所示,本发明实施例中的文件分享方法可以包括以下步骤S401-步骤S407。Fig. 4 is a schematic flow chart of another file sharing method in the embodiment of the present invention. The following will introduce in detail another file sharing method in the embodiment of the present invention in conjunction with Fig. 4 , as shown in Fig. 4 , the implementation of the present invention The file sharing method in the example may include the following steps S401-step S407.
步骤S401:当第一终端接收到第一文件分享请求时。Step S401: when the first terminal receives a first file sharing request.
具体地,用户的智能终端监听终端的请求的指令,例如音乐的播放指令、暂停指令、切换指令等,当监听到用户发出的指令为音乐分享指令时,则判断并接收用户需要进行分享的第一文件的分享请求。Specifically, the user's smart terminal monitors the instructions requested by the terminal, such as music play instructions, pause instructions, and switching instructions. A file sharing request.
步骤S402:根据用户的选择进行文件分享的选择,当选择智能分享模式时,获取所述第一文件的第一属性信息。Step S402: choose file sharing according to the user's selection, and acquire the first attribute information of the first file when the smart sharing mode is selected.
具体地,根据用户的选择进行文件分享的选择,当选择智能分享模式时,获取需要进行分享的第一文件的第一属性信息。其中第一属性信息可包括:文件类型、文件打开方式、文件名称、文件作者、文件时长或文件占用空间中的至少一个属性信息。当第一文件为音乐文件时,则其第一属性信息可包括:音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息。Specifically, file sharing is selected according to the user's selection, and when the smart sharing mode is selected, the first attribute information of the first file to be shared is acquired. The first attribute information may include: at least one attribute information of file type, file opening method, file name, file author, file duration, or file occupied space. When the first file is a music file, its first attribute information may include: at least one attribute information of the music file's file name, author, album name, release year, duration, bit rate or audio storage space size.
步骤S403:根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息。Step S403: collect a second file with a high matching degree with the first file according to the first attribute information of the first file, and generate sharing information of the second file according to the collected second file.
具体地,根据步骤S402中获取的第一文件的属性信息,从与该终端已经建立了连接的服务器中采集与第一文件匹配度高的第二文件。其中服务器可以是互联网的文件资源服务器,也可以是某个特定机构构建的专用文件服务器,根据不同的应用场景,选择不同的服务器资源进行计算匹配。根据预先设置的匹配度计算公式和匹配度阈值,例如音乐文件,可以根据,音乐名称、演唱者、作词作曲者、专辑名称等,进行匹配度计算公式的设定和匹配度阈值的设定,并计算服务器数据库中的文件与第一文件的匹配度。本发明对匹配度具体的计算方式不作具体限定,只要能计算出所述服务器中文件与第一文件的相似匹配度的方法均属于本发明所涵盖保护的范围。Specifically, according to the attribute information of the first file acquired in step S402, a second file with a high degree of matching with the first file is collected from a server that has established a connection with the terminal. The server can be a file resource server on the Internet, or a dedicated file server built by a specific organization. According to different application scenarios, different server resources are selected for calculation and matching. According to the preset matching degree calculation formula and matching degree threshold value, for example, music files can be set according to the music name, singer, lyricist, album name, etc., to set the matching degree calculation formula and the matching degree threshold value, And calculate the matching degree between the files in the server database and the first file. The present invention does not specifically limit the specific calculation method of the matching degree, as long as the method that can calculate the similar matching degree between the file in the server and the first file belongs to the scope of protection covered by the present invention.
步骤S404:将所述第二文件的分享信息分享给第二终端。Step S404: Share the sharing information of the second file with the second terminal.
具体地,用户通过第一终端将步骤S403中采集生成的第二文件的分享信息分享给第二终端,以供接收分享的用户通过第二终端进行第二文件的获取。Specifically, the user shares the sharing information of the second file collected and generated in step S403 with the second terminal through the first terminal, so that the user who receives the sharing can obtain the second file through the second terminal.
步骤S405:根据用户的选择进行文件分享的选择,当选择普通分享模式时,获取所述第一文件的第二属性信息。Step S405: Select the file sharing according to the user's selection, and acquire the second attribute information of the first file when the normal sharing mode is selected.
具体地,根据用户的选择进行文件分享的选择,当选择普通分享模式时,获取需要进行分享的第一文件的第二属性信息。其中第二属性信息可包括:文件类型、文件打开方式、文件名称、文件作者、文件时长或文件占用空间中的至少一个属性信息。当第一文件为音乐文件时,则其属性信息可包括:音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息。需要说明的是,第一属性信息与第二属性信息可以相同也可以不同。优选地,第二属性信息主要可包括第一文件的描述信息便于接收分享的用户根据该描述信息进行查找,而第一属性信息主要可包括第一文件的详细属性信息,便于服务器进行第二文件的查找比对和匹配度的计算。Specifically, file sharing is selected according to the user's selection, and when the normal sharing mode is selected, the second attribute information of the first file to be shared is acquired. The second attribute information may include: at least one attribute information of file type, file opening method, file name, file author, file duration, or file occupied space. When the first file is a music file, its attribute information may include: at least one attribute information of the music file's file name, author, album name, release year, duration, bit rate or audio storage space size. It should be noted that the first attribute information and the second attribute information may be the same or different. Preferably, the second attribute information mainly includes the descriptive information of the first file, which is convenient for users who receive and share to search according to the descriptive information, and the first attribute information mainly includes detailed attribute information of the first file, which is convenient for the server to search for the second file. The calculation of search comparison and matching degree.
步骤S406:根据所述第二属性信息,生成所述第一文件的分享描述信息。Step S406: Generate sharing description information of the first file according to the second attribute information.
具体地,根据步骤S405中获取的第二属性信息,生成所述第一文件的分享描述信息,例如直接从第一终端的本地获取第一音乐文件的描述信息,歌名、词曲作者、表演者等。Specifically, according to the second attribute information obtained in step S405, the shared description information of the first file is generated, for example, the description information of the first music file is directly obtained locally from the first terminal, such as song title, songwriter, performer, etc. wait.
步骤S407:将所述第一文件的分享描述信息分享给第二终端。Step S407: Share the sharing description information of the first file with the second terminal.
具体地,将步骤S406中获取的第一文件的分享描述信息分享给第二终端,第二终端的用户可以根据该分享描述信息自行在互联网的资源中进行搜索查找,并获取该第一文件的相同或相似文件。Specifically, the sharing description information of the first file obtained in step S406 is shared with the second terminal, and the user of the second terminal can search and search Internet resources according to the sharing description information, and obtain the first file sharing description information. the same or similar files.
进一步地,上述实施例中的步骤S403中的根据所述采集的第二文件生成所述第二文件的分享信息,还可以通过以下具体的实施方式中的任意一种实现。Further, generating the sharing information of the second file according to the collected second file in step S403 in the above embodiment can also be realized by any one of the following specific implementation manners.
实施方式一:当采集的第二文件为多个时,根据所述采集的多个第二文件以列表的形式生成多个第二文件的分享信息。Embodiment 1: When there are multiple second files collected, the sharing information of the multiple second files is generated in the form of a list according to the multiple collected second files.
具体地,当匹配出来的音乐文件有多个时,可以将多个第二音乐文件以列表的形式生成第二音乐文件的分享信息,例如以列表形式生成第二音乐文件的播放链接信息,以供接收分享的用户进行自主选择和播放列表中的音乐文件。Specifically, when there are multiple matched music files, multiple second music files can be generated in the form of a list to share information of the second music file, for example, the play link information of the second music file can be generated in the form of a list to It is for the user who receives the sharing to independently select and play the music files in the list.
实施方式二:当采集的第二文件为多个时,选择匹配度最高的第二文件,根据所述选择的第二文件生成所述第二文件的分享信息。Embodiment 2: When there are multiple second files collected, the second file with the highest matching degree is selected, and the sharing information of the second file is generated according to the selected second file.
具体地,当匹配出来的音乐文件有多个时,分享用户也可以根据自己的判断选择匹配度最高的第二文件,第一终端根据选择的匹配度最高的第二文件生成所述第二文件的分享信息,例如生成匹配度最高的第二音乐文件的播放链接信息,以供接收分享的用户直接点击播放试听。Specifically, when there are multiple matched music files, the sharing user can also select the second file with the highest matching degree according to his own judgment, and the first terminal generates the second file according to the selected second file with the highest matching degree. sharing information, such as generating the playback link information of the second music file with the highest matching degree, so that the user who receives the sharing can directly click to play and listen to it.
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
图5是本发明实施例中的另一种文件分享方法的流程示意图,下面将结合附图5对本发明实施例中的另一种文件分享方法进行详细介绍,如图5所示,本发明实施例中的文件分享方法可以包括以下步骤S501-步骤S506。Fig. 5 is a schematic flow chart of another file sharing method in the embodiment of the present invention. The following will introduce in detail another file sharing method in the embodiment of the present invention in conjunction with Fig. 5 , as shown in Fig. 5 , the implementation of the present invention The file sharing method in this example may include the following steps S501-S506.
步骤S501:监听终端的请求指令。Step S501: Monitor the request instruction of the terminal.
具体地,用户的智能终端监听终端的请求的指令,例如音乐的播放指令、暂停指令、切换指令等。Specifically, the user's smart terminal monitors the instruction requested by the terminal, such as a music play instruction, a pause instruction, a switching instruction, and the like.
步骤S502:当解析到所述请求指令为分享请求指令时,获取所述终端的第一文件的分享请求。Step S502: When it is analyzed that the request instruction is a sharing request instruction, obtain a sharing request of the first file of the terminal.
具体地,当监听并解析到请求指令为分享请求指令时,则获取需要进行文件分享的第一文件的分享请求。Specifically, when the request instruction is monitored and analyzed to be a sharing request instruction, the sharing request of the first file that needs to be shared is obtained.
步骤S503:获取所述第一文件的第一属性信息。Step S503: Obtain the first attribute information of the first file.
具体地,可以对应参考图4实施例中方法步骤S402,在此不再赘述。Specifically, reference may be made to the method step S402 in the embodiment of FIG. 4 correspondingly, and details are not repeated here.
步骤S504:根据所述第一文件的第一属性信息,通过建立了连接的服务器,根据预设的匹配度的计算公式和匹配度阈值,计算所述服务器数据库中的文件与所述第一文件的匹配度。Step S504: According to the first attribute information of the first file, through the server that has established a connection, according to the preset calculation formula of matching degree and the matching degree threshold, calculate the relationship between the file in the server database and the first file. match degree.
具体地,根据步骤S503中获取的第一文件的属性信息,通过建立了连接的服务器,采集与第一文件匹配度高的第二文件。其中服务器可以是互联网的文件资源服务器,也可以是某个特定机构构建的专用文件服务器,根据不同的应用场景,选择不同的服务器资源进行计算匹配。根据预先设置的匹配度计算公式和匹配度阈值,例如音乐文件,可以根据,音乐名称、演唱者、作词作曲者、专辑名称等,进行匹配度计算公式的设定和匹配度阈值的设定,并计算服务器数据库中的文件与第一文件的匹配度。本发明对匹配度具体的计算方式不作具体限定,只要能计算出所述服务器中文件与第一文件的相似匹配度的方法均属于本发明所涵盖保护的范围。Specifically, according to the attribute information of the first file acquired in step S503, the second file with a high degree of matching with the first file is collected through the server to which the connection has been established. The server can be a file resource server on the Internet, or a dedicated file server built by a specific organization. According to different application scenarios, different server resources are selected for calculation and matching. According to the preset matching degree calculation formula and matching degree threshold value, for example, music files can be set according to the music name, singer, lyricist, album name, etc., to set the matching degree calculation formula and the matching degree threshold value, And calculate the matching degree between the files in the server database and the first file. The present invention does not specifically limit the specific calculation method of the matching degree, as long as the method that can calculate the similar matching degree between the file in the server and the first file belongs to the scope of protection covered by the present invention.
步骤S505:采集所述匹配度达到预设匹配度阈值对应的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息。Step S505: collect the second file corresponding to the matching degree reaching the preset matching degree threshold, and generate the sharing information of the second file according to the collected second file.
具体地,根据步骤S504中的匹配度值的计算结果,采集匹配度达到预设匹配度阈值对应的第二文件,此第二文件即为用户可以参考分享的文件。由于服务器中文件日益增多,可通过设置匹配度阈值的范围来控制采集的第二文件的数量和第二文件与第一文件的之间的匹配度高低。根据所述采集的第二文件生成所述第二文件的分享信息的具体过程则可以对应参考图4实施例中方法步骤S403,在此不再赘述。Specifically, according to the calculation result of the matching degree value in step S504, the second file corresponding to the matching degree reaching the preset matching degree threshold is collected, and the second file is a file that the user can refer to and share. Due to the increasing number of files in the server, the number of collected second files and the matching degree between the second file and the first file can be controlled by setting the range of the matching degree threshold. For a specific process of generating the sharing information of the second file based on the collected second file, reference may be made to step S403 in the method in the embodiment of FIG. 4 , which will not be repeated here.
步骤S506:将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。Step S506: Share the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
具体地,可以对应参考图4实施例中方法步骤S404,在此不再赘述。Specifically, reference may be made to the method step S404 in the embodiment in FIG. 4 correspondingly, and details are not repeated here.
需要说明的是,本实施例中同时还包含了图4的实施例中的步骤S401和步骤S405到步骤S407的方法流程,由用户进行分享模式的自主选择,即不仅包含智能分享模式也包含了普通分享模式,在此不再赘述。It should be noted that this embodiment also includes the method flow of step S401 and step S405 to step S407 in the embodiment of FIG. The common sharing mode will not be repeated here.
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
图6是本发明实施例中的一种文件分享装置的结构示意图,用以执行上述图2所示实施例中的一种文件分享方法的流程。FIG. 6 is a schematic structural diagram of a file sharing device in an embodiment of the present invention, which is used to execute the flow of a file sharing method in the embodiment shown in FIG. 2 above.
下面将结合附图6,对本发明实施例中的一种文件分享装置的结构进行详细介绍。该装置10可包括:第一信息获取模块101、信息匹配模块102和文件分享模块103。The structure of a file sharing device in an embodiment of the present invention will be described in detail below with reference to FIG. 6 . The device 10 may include: a first information obtaining module 101 , an information matching module 102 and a file sharing module 103 .
第一信息获取模块101,用于当第一终端接收到第一文件分享请求时,获取所述第一文件的第一属性信息,所述第一文件为所述第一终端的本地文件;The first information acquiring module 101 is configured to acquire first attribute information of the first file when the first terminal receives a first file sharing request, where the first file is a local file of the first terminal;
具体地,所述第一文件为所述第一终端的本地文件。以智能手机分享音乐文件为例,当智能手机接收到用户的第一音乐文件的分享请求时,其中该音乐文件为该智能手机的本地音乐,获取该第一音乐文件的第一属性信息。进一步地,第一属性信息可以包括该音乐文件的文件名、作者、所属的专辑名称、发行年份、时长、比特率或音存储空间大小中的至少一个属性信息,或者其它可以查找比对该第一文件的属性信息。Specifically, the first file is a local file of the first terminal. Taking the sharing of music files by a smart phone as an example, when the smart phone receives a sharing request of a user's first music file, where the music file is local music of the smart phone, first attribute information of the first music file is obtained. Further, the first attribute information may include at least one attribute information of the music file's file name, author, album name, release year, duration, bit rate or audio storage space size, or other attributes that can be searched and compared to the first attribute information. attribute information of a file.
信息匹配模块102,用于根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息;An information matching module 102, configured to collect a second file with a high degree of matching with the first file according to the first attribute information of the first file, and generate a share of the second file according to the collected second file information;
具体地,根据第一信息获取模块101中获取的第一音乐文件的属性信息采集与该属性信息相似的音乐文件,例如优先采集,音乐文件名称相同的文件,演唱者相同、时长相同的文件。具体地,通过设置文件之间的相似匹配度的计算公式和阈值范围,计算查找匹配度达到阈值的第二文件,采集该第二音乐文件的并根据该第二音乐文件生成该音乐文件的分享信息,其中分享信息可包括该音乐文件的播放链接地址,也可以是音乐文件的名称作者等描述分享信息,还可以是音乐文件的下载或收藏地址等,本发明不做具体限定。Specifically, according to the attribute information of the first music file acquired in the first information acquisition module 101, music files similar to the attribute information are collected, for example, files with the same music file name, files with the same singer and the same duration are preferentially collected. Specifically, by setting the calculation formula and the threshold range of the similarity matching degree between files, calculate and find the second file whose matching degree reaches the threshold value, collect the second music file and generate the music file sharing according to the second music file Information, wherein the sharing information may include the playback link address of the music file, or the name and author of the music file to describe the sharing information, or the download or collection address of the music file, etc., which are not specifically limited in the present invention.
文件分享模块103,用于将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。The file sharing module 103 is configured to share the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
具体地,用户可将信息匹配模块102中获取的匹配度高的第二音乐文件的分享信息分享给第二终端,分享形式则可以根据用户自己的判断选择匹配度最高的第二文件分享给第二终端,或者将匹配度高的音乐文件以列表的形式发送给第二终端供接收分享的用户选择进行自主选择试听,以供被分享用户通过分享的信息播放或获取第二音乐文件。Specifically, the user can share the sharing information of the second music file with the highest matching degree obtained in the information matching module 102 with the second terminal, and the sharing form can be based on the user's own judgment to select the second file with the highest matching degree to share with the second terminal. The second terminal, or send the music files with high matching degree to the second terminal in the form of a list for the user who receives the sharing to choose to listen to it independently, so that the shared user can play or obtain the second music file through the shared information.
需要说明的是,本实施例中主要以智能手机分享音乐文件为例进行说明,并不代表本发明只针对音乐文件的分享,本发明中的分享文件也包括多媒体文件、图片文件、视频文件等,分享的终端也不限于智能手机,还可包括智能手表、平板电脑等所有可连接互联网的智能设备。而其中的第一、第二等用来描述文件或终端仅仅用于区分彼此,并不具体限定于该特定的名称。It should be noted that in this embodiment, the sharing of music files by smart phones is mainly used as an example for illustration, which does not mean that the present invention is only for the sharing of music files, and the shared files in the present invention also include multimedia files, picture files, video files, etc. , The shared terminals are not limited to smartphones, but also include all smart devices that can connect to the Internet, such as smart watches and tablet computers. The first, second, etc. are used to describe files or terminals only to distinguish each other, and are not specifically limited to the specific names.
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
图7是本发明实施例中的另一种文件分享装置的结构示意图,用以执行上述图4所示实施例中的另一种文件分享方法的流程。FIG. 7 is a schematic structural diagram of another file sharing device in an embodiment of the present invention, which is used to execute the flow of another file sharing method in the embodiment shown in FIG. 4 above.
下面将结合附图7,对本发明实施例中的另一种文件分享装置的结构进行详细介绍。该装置20可包括:第一信息获取模块201、信息匹配模块202、文件分享模块203、第二信息获取模块204、信息生成模205和信息分享模块206。The structure of another file sharing device in the embodiment of the present invention will be described in detail below with reference to FIG. 7 . The device 20 may include: a first information acquisition module 201 , an information matching module 202 , a file sharing module 203 , a second information acquisition module 204 , an information generation module 205 and an information sharing module 206 .
第一信息获取模块201,用于当第一终端接收到第一文件分享请求时,获取所述第一文件的第一属性信息,所述第一文件为所述第一终端的本地文件。The first information acquiring module 201 is configured to acquire first attribute information of the first file when the first terminal receives a first file sharing request, and the first file is a local file of the first terminal.
其中装置中的第一信息获取模块201可以执行并完成方法步骤S401和S402中的所有方法和流程,在此不再赘述。The first information acquisition module 201 in the device can execute and complete all the methods and processes in the method steps S401 and S402, and details will not be repeated here.
信息匹配模块202,用于根据所述第一文件的第一属性信息采集与所述第一文件匹配度高的第二文件,并根据所述采集的第二文件生成所述第二文件的分享信息。The information matching module 202 is configured to collect a second file with a high degree of matching with the first file according to the first attribute information of the first file, and generate a share of the second file according to the collected second file information.
其中装置中的信息匹配模块202可以执行并完成方法步骤S403中的所有方法和流程,在此不再赘述。The information matching module 202 in the device can execute and complete all the methods and processes in step S403 of the method, which will not be repeated here.
文件分享模块203,用于将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。The file sharing module 203 is configured to share the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
其中装置中的文件分享模块203可以执行并完成方法步骤S404中的所有方法和流程,在此不再赘述。The file sharing module 203 in the device can execute and complete all the methods and procedures in the method step S404, which will not be repeated here.
第二信息获取模块204,用于当第一终端接收到第一文件分享请求时,获取所述第一文件的第二属性信息。The second information obtaining module 204 is configured to obtain the second attribute information of the first file when the first terminal receives the first file sharing request.
其中装置中的第二信息获取模块204可以执行并完成方法步骤S401和S405中的所有方法和流程,在此不再赘述。The second information acquisition module 204 in the device can execute and complete all the methods and processes in the method steps S401 and S405, which will not be repeated here.
信息生成模块205,用于根据所述第二属性信息,生成所述第一文件的分享描述信息。The information generating module 205 is configured to generate sharing description information of the first file according to the second attribute information.
其中装置中的信息生成模块205可以执行并完成方法步骤S406中的所有方法和流程,在此不再赘述。The information generation module 205 in the device can execute and complete all the methods and processes in the method step S406, and details are not repeated here.
信息分享模块206,用于将所述第一文件的分享描述信息分享给第二终端。The information sharing module 206 is configured to share the sharing description information of the first file with the second terminal.
其中装置中的信息分享模块206可以执行并完成方法步骤S407中的所有方法和流程,在此不再赘述。The information sharing module 206 in the device can execute and complete all the methods and processes in the method step S407, which will not be repeated here.
需要说明的是,本实施例中的文件分享装置中的模块201、202和203及模块204、205和206可以是并行模块,即同时工作,可以参照方法步骤的S201-S203和方法步骤的S301-303;也可以是选择关系,即通过用户选择模块进行指令触发,从而选择性工作,即参照方法步骤中的S401-S407,本发明对此不作具体限定。It should be noted that the modules 201, 202, and 203 and the modules 204, 205, and 206 in the file sharing device in this embodiment may be parallel modules, that is, work at the same time, and refer to S201-S203 of the method steps and S301 of the method steps -303; it can also be a selection relationship, that is, the user selects a module to trigger an instruction, so as to selectively work, that is, refer to S401-S407 in the method steps, which is not specifically limited in the present invention.
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
图8是本发明实施例中的又一种文件分享装置的结构示意图,用以执行上述图5所示实施例中的又一种文件分享方法的流程。FIG. 8 is a schematic structural diagram of another file sharing device in an embodiment of the present invention, which is used to execute the flow of another file sharing method in the embodiment shown in FIG. 5 above.
下面将结合附图8,对本发明实施例中的又一种文件分享装置的结构进行详细介绍。该装置30可包括:第一信息获取模块301、信息匹配模块302、文件分享模块303、第二信息获取模块304、信息生成模305和信息分享模块306。所述第一信息获取模块301可包括:指令监听单元3011、请求获取单元3012和信息获取单元3013;所述信息匹配模块302可包括:匹配计算单元3021和信息匹配单元3022。The structure of another file sharing device in the embodiment of the present invention will be described in detail below with reference to FIG. 8 . The device 30 may include: a first information acquisition module 301 , an information matching module 302 , a file sharing module 303 , a second information acquisition module 304 , an information generation module 305 and an information sharing module 306 . The first information acquisition module 301 may include: an instruction monitoring unit 3011 , a request acquisition unit 3012 and an information acquisition unit 3013 ; the information matching module 302 may include: a matching calculation unit 3021 and an information matching unit 3022 .
第一信息获取模块301可包括:指令监听单元3011、请求获取单元3012和信息获取单元3013。The first information obtaining module 301 may include: an instruction monitoring unit 3011 , a request obtaining unit 3012 and an information obtaining unit 3013 .
指令监听单元3011,用于监听终端的请求指令。The command monitoring unit 3011 is configured to monitor the request command of the terminal.
请求获取单元3012,用于当解析到所述请求指令为分享请求指令时,获取所述终端的第一文件的分享请求。The request obtaining unit 3012 is configured to obtain a sharing request of the first file of the terminal when it is analyzed that the request instruction is a sharing request instruction.
信息获取单元3013,用于获取所述第一文件的第一属性信息。An information obtaining unit 3013, configured to obtain the first attribute information of the first file.
其中装置中的第一信息获取模块301包含的3011到3013单元可以执行并完成方法步骤S501到S503中的所有方法和流程,在此不再赘述。The units 3011 to 3013 contained in the first information acquisition module 301 in the device can execute and complete all the methods and processes in the method steps S501 to S503, and details are not repeated here.
信息匹配模块302可包括:匹配计算单元3021和信息匹配单元3022。The information matching module 302 may include: a matching calculation unit 3021 and an information matching unit 3022 .
匹配计算单元3021,用于根据所述第一文件的第一属性信息,通过建立了连接的服务器,根据预设的匹配度的计算公式和匹配度阈值,计算所述服务器数据库中的文件与所述第一文件的匹配度,所述匹配度表示服务器数据库中的文件的属性信息与所述第一文件的第一属性信息之间的相似度。The matching calculation unit 3021 is configured to calculate, according to the first attribute information of the first file, the relationship between the file in the server database and the first file in the server database through the server with which the connection is established, and according to a preset calculation formula of matching degree and a matching degree threshold. The matching degree of the first file, the matching degree represents the similarity between the attribute information of the file in the server database and the first attribute information of the first file.
图9是本发明实施例中的又一种文件分享装置的信息匹配模块的信息匹配单元的结构示意图。Fig. 9 is a schematic structural diagram of an information matching unit of an information matching module of another file sharing device according to an embodiment of the present invention.
信息匹配单元3022可包括:匹配选择子单元3022a和信息匹配子单元3022b。The information matching unit 3022 may include: a matching selection subunit 3022a and an information matching subunit 3022b.
匹配选择子单元3022a,用于当采集的第二文件为多个时,选择匹配度最高的第二文件。The matching selection subunit 3022a is configured to select the second file with the highest matching degree when there are multiple second files collected.
信息匹配子单元3022b,用于根据所述选择的第二文件生成所述第二文件的分享信息。The information matching subunit 3022b is configured to generate the sharing information of the second file according to the selected second file.
其中装置中的信息匹配模块302包含的3021到2022单元可以执行并完成方法步骤S504到S505中的所有方法和流程,在此不再赘述。The units 3021 to 2022 included in the information matching module 302 in the device can execute and complete all the methods and processes in the method steps S504 to S505, and details will not be repeated here.
文件分享模块303,用于将所述第二文件的分享信息分享给第二终端,以供所述第二终端通过所述分享信息获取所述第二文件。The file sharing module 303 is configured to share the sharing information of the second file with the second terminal, so that the second terminal can obtain the second file through the sharing information.
其中装置中的文件分享模块303可以执行并完成方法步骤S506中的所有方法和流程,在此不再赘述。The file sharing module 303 in the device can execute and complete all the methods and processes in the method step S506, which will not be repeated here.
第二信息获取模块304,用于获取所述第一文件的第二属性信息。The second information obtaining module 304 is configured to obtain the second attribute information of the first file.
其中装置中的第二信息获取模块304可以执行并完成方法步骤S401和S405中的所有方法和流程,在此不再赘述。The second information acquisition module 304 in the device can execute and complete all the methods and processes in the method steps S401 and S405, and details will not be repeated here.
信息生成模块305,用于根据所述第二属性信息,生成所述第一文件的分享描述信息。The information generation module 305 is configured to generate sharing description information of the first file according to the second attribute information.
其中装置中的信息生成模块305可以执行并完成方法步骤S406中的所有方法和流程,在此不再赘述。The information generating module 305 in the device can execute and complete all the methods and procedures in the method step S406, and details will not be repeated here.
信息分享模块306,用于将所述第一文件的分享描述信息分享给第二终端。An information sharing module 306, configured to share the sharing description information of the first file with the second terminal.
其中装置中的信息分享模块306可以执行并完成方法步骤S407中的所有方法和流程,在此不再赘述。The information sharing module 306 in the device can execute and complete all the methods and processes in the method step S407, which will not be repeated here.
本发明实施例,通过在文件分享方法中,通过第一终端在接收到第一文件分享请求时,根据第一文件的第一属性信息采集与第一文件匹配度高的第二文件,并根据采集的第二文件生成第二文件的分享信息,再将第二文件的分享信息分享给第二终端以供第二终端通过分享信息获取第二文件。例如当用户利用第一终端分享本地的音乐文件时,根据该本地音乐文件的属性信息与可建立连接的互联网音乐资源库中的音乐文件做匹配,生成匹配度最高的若干首歌曲的分享信息,第二终端的用户则可以根据分享信息通过互联网访问播放分享文件,解决了现有技术中不能将本地音乐进行播放分享的技术问题,方便用户进行音乐的播放分享操作,提高了文件分享效率。In the embodiment of the present invention, in the file sharing method, when the first terminal receives the first file sharing request, it collects the second file with a high degree of matching with the first file according to the first attribute information of the first file, and according to The collected second file generates sharing information of the second file, and then shares the sharing information of the second file with the second terminal so that the second terminal can obtain the second file through the sharing information. For example, when the user utilizes the first terminal to share a local music file, the attribute information of the local music file is matched with the music file in the Internet music resource library that can establish a connection, and the sharing information of several songs with the highest matching degree is generated. Users of the second terminal can access and play shared files through the Internet according to the shared information, which solves the technical problem that local music cannot be played and shared in the prior art, facilitates users to play and share music, and improves file sharing efficiency.
应当理解的是,本文中虽然使用术语第一、第二等描述终端、文件、方法或单元,但是这些终端、文件、方法或单元应该不受这些术语的限制,这些术语仅被用于彼此区分。还应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”(“a”、“an”、和“the”)旨在也包括复数形式。还应该理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。It should be understood that although the terms first, second, etc. are used herein to describe terminals, files, methods or units, these terminals, files, methods or units should not be limited by these terms, and these terms are only used to distinguish each other . It should also be understood that, as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。What is disclosed above is only a preferred embodiment of the present invention, and of course it cannot limit the scope of rights of the present invention. Those of ordinary skill in the art can understand all or part of the process of realizing the above embodiments, and according to the rights of the present invention The equivalent changes required still belong to the scope covered by the invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510114715.4ACN104794156B (en) | 2015-03-16 | 2015-03-16 | File sharing method and device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510114715.4ACN104794156B (en) | 2015-03-16 | 2015-03-16 | File sharing method and device |
| Publication Number | Publication Date |
|---|---|
| CN104794156Atrue CN104794156A (en) | 2015-07-22 |
| CN104794156B CN104794156B (en) | 2018-12-07 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510114715.4AActiveCN104794156B (en) | 2015-03-16 | 2015-03-16 | File sharing method and device |
| Country | Link |
|---|---|
| CN (1) | CN104794156B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105760061A (en)* | 2016-02-05 | 2016-07-13 | 腾讯科技(深圳)有限公司 | Information interaction method and device |
| CN107566862A (en)* | 2016-06-30 | 2018-01-09 | 上海博泰悦臻网络技术服务有限公司 | For sharing the method and system of music between multimedia communication terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040087326A1 (en)* | 2002-10-30 | 2004-05-06 | Dunko Gregory A. | Method and apparatus for sharing content with a remote device using a wireless network |
| CN103440873A (en)* | 2013-08-27 | 2013-12-11 | 大连理工大学 | A Music Recommendation Method Based on Similarity |
| CN103475731A (en)* | 2013-09-23 | 2013-12-25 | 网易(杭州)网络有限公司 | Media information matching and processing method and device |
| CN104090898A (en)* | 2013-12-21 | 2014-10-08 | 腾讯科技(深圳)有限公司 | Method and device for matching local music and music in database |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040087326A1 (en)* | 2002-10-30 | 2004-05-06 | Dunko Gregory A. | Method and apparatus for sharing content with a remote device using a wireless network |
| CN103440873A (en)* | 2013-08-27 | 2013-12-11 | 大连理工大学 | A Music Recommendation Method Based on Similarity |
| CN103475731A (en)* | 2013-09-23 | 2013-12-25 | 网易(杭州)网络有限公司 | Media information matching and processing method and device |
| CN104090898A (en)* | 2013-12-21 | 2014-10-08 | 腾讯科技(深圳)有限公司 | Method and device for matching local music and music in database |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105760061A (en)* | 2016-02-05 | 2016-07-13 | 腾讯科技(深圳)有限公司 | Information interaction method and device |
| CN107566862A (en)* | 2016-06-30 | 2018-01-09 | 上海博泰悦臻网络技术服务有限公司 | For sharing the method and system of music between multimedia communication terminal |
| Publication number | Publication date |
|---|---|
| CN104794156B (en) | 2018-12-07 |
| Publication | Publication Date | Title |
|---|---|---|
| KR101564415B1 (en) | Method and apparatus for content playback through integrated channel management | |
| US9055193B2 (en) | System and method of a remote conference | |
| US20140280589A1 (en) | Method and system for music collaboration | |
| CN105072146B (en) | Method and device for sharing music information | |
| US11799931B2 (en) | Providing related content using a proxy media content item | |
| EP3651421B1 (en) | Multimedia display method, apparatus, and device | |
| CN103053157B (en) | Method and apparatus for determining and equalizing one or more segments of a media track | |
| CN103716339A (en) | Multimedia sharing method, system and device | |
| WO2014039127A1 (en) | Dynamic bit rate encoding | |
| CN104636448A (en) | A music recommendation method and device | |
| WO2018095219A1 (en) | Media information processing method and device | |
| CN105740393A (en) | Method and device for playing music | |
| US10375454B1 (en) | Audio data and image data integration | |
| CN108337556A (en) | Method and apparatus for playing audio/video file | |
| CN107241511A (en) | A music playing method, device, storage medium and terminal | |
| CN110047497A (en) | Background audio signals filtering method, device and storage medium | |
| US10013232B2 (en) | Wireless speaker connection management | |
| CN105824895A (en) | KTV song selection method and system | |
| WO2016155363A1 (en) | Method and device for maintaining playlist of multimedia file player | |
| JP2007527575A (en) | Method and apparatus for synchronizing and identifying content | |
| CN104794156B (en) | File sharing method and device | |
| US20180262582A1 (en) | Post-engagement metadata generation | |
| CN103648021B (en) | The method that network video file is played from USB storage device | |
| TW201429232A (en) | Multimedia playback apparatus and multimedia file prefetching method | |
| CN106254908B (en) | Multimedia resource playing method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| EXSB | Decision made by sipo to initiate substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| CP01 | Change in the name or title of a patent holder |