WO2018001063A1 - 文件的发送方法、装置及系统 - Google Patents

文件的发送方法、装置及系统 Download PDF

Info

Publication number
WO2018001063A1
WO2018001063A1 PCT/CN2017/087569 CN2017087569W WO2018001063A1 WO 2018001063 A1 WO2018001063 A1 WO 2018001063A1 CN 2017087569 W CN2017087569 W CN 2017087569W WO 2018001063 A1 WO2018001063 A1 WO 2018001063A1
Authority
WO
WIPO (PCT)
Prior art keywords
client device
file
server
preset
group
Prior art date
Application number
PCT/CN2017/087569
Other languages
English (en)
French (fr)
Inventor
许静静
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018001063A1 publication Critical patent/WO2018001063A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast

Definitions

  • the present invention relates to the field of communications, and in particular to a method, device and system for transmitting a file.
  • the client device application needs to download files to the server at the same time due to the requirements of the business function.
  • the server bandwidth limitation cannot load a large number of file downloads from the client device in a short time. request.
  • the file is transmitted in multicast mode, and the multicast "one-to-many" communication advantage is utilized to select the client device as the multicast source to transmit the file, which solves the problem that the server requests the concurrent bandwidth limitation, so that the client is in the effective time period.
  • the device can get the file normally.
  • packet loss often occurs during multicast files, causing the client device to fail to receive files normally within the required time.
  • the packet loss phenomenon there are two general solutions: (1) The packet loss client device requests downloading from the server separately.
  • the server bandwidth limitation problem occurs.
  • the file size is large, the client device download time is very long, and it is not guaranteed to receive the file within the valid time.
  • the multicast source cannot know immediately which client devices are losing packets and packet loss, and the packet loss may be improved after retransmission, but the transmission delay Longer, it is possible to miss the file valid time of the client device.
  • the multicast source may have poor performance and insufficient storage space because the performance of the client device itself and the network communication between the client devices cannot be known in advance.
  • the multicast source and other client devices have poor communication status. There are still many client devices that cannot receive files within the valid time, or the reception is incomplete.
  • the embodiment of the invention provides a method, a device and a system for sending a file, so as to solve at least the problem that the server pushes a file to the client device in the related art.
  • a method for sending a file including: a server selecting a specified client device from a preset group, and using the specified client device as a multicast source, wherein the preset grouping Include a plurality of client devices; send the file that the server needs to deliver to the multicast source, and multicast the file to the target client device in the preset packet by using the multicast source.
  • the server selects the specified client device from the preset group, the server includes: determining, by the server, one or more target client devices that receive the file, and pre-parting at the one or more target client devices Let the specified client device be selected in the group.
  • the method further includes: the server Collecting a location relationship between the client devices, and dividing the client device into different groups according to the location relationship.
  • the method further includes: the server collecting one of the following information: a unique identifier of the target client device, performance data of the target client device, uniqueness of a neighboring partner of the target client device Identification and performance data.
  • the preset packet is determined by: the server collecting a location relationship between the client devices, determining a neighboring partner of the target client device, using the target client device and the neighboring partner Divided into the same group, wherein the target client device multicast message receives the response information of the neighboring partner within a predetermined time.
  • the method further includes: performing the fragment sending of the file when the file size is greater than a preset threshold.
  • the method further includes: receiving the missing first fragmentation information of the target client device, and using the first fragment corresponding to the missing first fragmentation information The slice is sent to the target client device, wherein the missing first fragmentation information is used to identify that the target client device does not receive the first fragment.
  • the selecting, by the server, the specified client device from the preset group includes: the server selecting a client device with the best performance among the preset packets as the designated client device.
  • the server selects, as the specified client device, the client device with the highest performance of the preset packet, and the client device that selects the highest CPU core in the preset packet is the designated device.
  • a client device where the number of CPU cores of the client device in the preset group is the same, selecting a client device with the largest memory in the preset packet as the specified client device; If the number of CPU cores of the client device in the group is the same, and the memory is the same, the client device with the largest disk space in the preset packet is selected as the designated client device.
  • the preset packet is determined by: the server grouping, by using a preset rule, multiple client devices to obtain the preset packet, where the preset packet is used between the multiple client devices When the parameter value reflecting the communication quality is greater than the preset value, the plurality of client devices are divided into the same group.
  • a method for sending a file including: a multicast source receiving a file sent by a server, wherein the multicast source is a designated by the server according to a predetermined rule in a preset packet. a client device, wherein the preset packet includes a plurality of client devices; the multicast source will multicast the file to a target client device in the preset packet.
  • the multiple client devices report at least one of the following information to the server: a unique identifier of the target client device, and performance of the target client device Data, unique identification and performance data of neighboring partners of the target client device.
  • a file sending apparatus which is applied to a server, comprising: a selecting module, configured to select a specified client device from a preset group, and use the specified client device as a multicast a source, wherein the preset packet includes a plurality of client devices, and the sending module is configured to send, to the multicast source, a file that is to be delivered by the server, and to the preset by using the multicast source.
  • the target client device within the packet multicasts the file.
  • the preset packet is determined by: the server collecting a location relationship between the client devices, determining a neighboring partner of the target client device, using the target client device and the neighboring partner Divided into the same group, wherein the target client device multicast message receives the response information of the neighboring partner within a predetermined time.
  • the sending module is further configured to slice the file when the file size is greater than a preset threshold. send.
  • the sending module is further configured to: after the fragment is sent by the file, receive the missing first fragmentation information of the target client device, and the first corresponding to the missing first fragmentation information A fragment is sent to the target client device, wherein the missing first fragmentation information is used to identify that the target client device does not receive the first fragment.
  • a file sending apparatus which is applied to a client device as a multicast source, and includes: a receiving module, configured to receive a file sent by a server, wherein the multicast source is The specified client device selected by the server according to a predetermined rule in the preset packet, wherein the preset packet includes multiple client devices; and the forwarding module is configured to target the client device in the preset packet Multicast the file.
  • a transmitting file system comprising: a server, a plurality of client devices, the server being configured to select a specified client device from a preset group, and to specify the client device
  • the device is configured as a multicast source, where the preset packet includes multiple client devices, and sends the multicast source of the file to be sent by the server to the multicast source, for the preset The target client device within the packet multicasts the file.
  • the system further includes: when the server determines that the file size is greater than a preset threshold; the server sends the file to be fragmented; and the multicast source receives the file sent by the fragment And multicasting the file to the target client device.
  • a storage medium is also provided.
  • the storage medium is configured to store program code for performing the following steps: the server selects a specified client device from the preset group, and uses the specified client device as a multicast source, wherein the preset packet includes multiple And the client device sends the file to be sent by the server to the multicast source, and multicasts the file to the target client device in the preset packet by using the multicast source.
  • the storage medium is further configured to execute the following steps: the multicast source receives a file sent by the server, where the multicast source is a specified client device selected by the server according to a predetermined rule in a preset group, where The preset packet includes a plurality of client devices; the multicast source will multicast the file to a target client device in the preset packet.
  • the server performs grouping in a plurality of client devices, and selects a multicast source in each packet, and the server delivers the file to be sent to the target client device to the multicast source, which is The file is multicast to the target client device.
  • the problem that the server pushes the file to the client device in the related art is inefficient, and the efficiency of the file sent by the server is greatly improved.
  • FIG. 1 is a flowchart of a method for transmitting a file according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for transmitting a file according to an embodiment of the present invention
  • FIG. 3 is a flow chart of server multicast automatic grouping according to an alternative embodiment of the present invention.
  • FIG. 4 is a schematic diagram 1 of a grouping according to an alternative embodiment of the present invention.
  • FIG. 5 is a schematic diagram 2 of a grouping according to an alternative embodiment of the present invention.
  • FIG. 6 is a structural block diagram 1 of a file sending apparatus according to an embodiment of the present invention.
  • FIG. 7 is a block diagram 2 of a structure of a file transmitting apparatus according to an embodiment of the present invention.
  • the embodiment of the present application can be run on a computer device.
  • the application scenario is that the server sends a file to the target client device.
  • FIG. 1 is a flowchart of a method for sending a file according to an embodiment of the present invention. As shown in FIG. 1, the process includes The following steps:
  • Step S102 The server selects a specified client device from the preset group, and uses the specified client device as a multicast source, where the preset packet includes multiple client devices;
  • Step S104 Send the file that the server needs to deliver to the multicast source, and multicast the file to the target client device in the preset packet by using the multicast source.
  • the server selects the specified client device as the multicast source from the preset group, and sends the file to the multicast source, and the multicast source forwards the file to the target client device.
  • the problem that the server pushes the file to the client device in the related art is inefficient, and the efficiency of the file sent by the server is greatly improved.
  • the server determines one or more target client devices that receive the file, and selects the designated client device among the preset packets to which the one or more target client devices belong.
  • the server determines one or more target client devices that receive the file, and selects the designated client device among the preset packets to which the one or more target client devices belong.
  • the files that need to be delivered this time correspond to some client devices, that is, target client devices.
  • the server collects the location relationship between the client devices, and divides the client device into different groups according to the location relationship.
  • the location relationship in the application file is not a distance relationship in a physical sense, but refers to the speed of transmitting information between the client devices in the network, and the information transmitted between the client devices is fast, and they are in the network.
  • the location relationship is close, that is, in this embodiment, the packets are grouped according to the speed of the information transmitted between the client devices.
  • the servers are grouped according to the location relationship between the client devices.
  • the server collects one of the following information: a unique identifier of the target client device, performance data of the target client device, unique identification and performance data of a neighboring partner of the target client device.
  • the unique identifier of the client device is used to identify the client device.
  • the performance data is mainly used when the server selects the multicast source.
  • the performance data includes the storage space of the client device, and the related data of the neighboring partner of the target client device.
  • the reason is that the server is used when dividing the group, and the neighboring partner is the device that transmits information with the client device, not It is a distance relationship in the physical sense.
  • a client device multicast message is a neighboring partner that can receive a response from the client device at a preset time.
  • the preset packet is determined by: the server collecting a location relationship between the client devices, determining a neighboring partner of the target client device, and dividing the target client device and the neighboring partner The same group, wherein the target client device multicast message receives the response information of the neighboring partner within a predetermined time.
  • the manner of grouping is described. It should be noted that each time the server receives the report information of the client device, the server performs a grouping, or the server performs a grouping every time the information needs to be sent, to ensure that the packet is ensured.
  • the grouping divided by the server is optimal in timeliness.
  • the client device can be set in advance, and the information is reported in the following cases: a new client device, a change of the old client device, a restart of the client device, and the like are added.
  • the file when the file size is greater than a preset threshold, the file is sliced and sent.
  • the server sends the file fragmentation when the file is delivered, and the target client device automatically combines the fragments when receiving the fragment.
  • the first fragment information of the target client device is received, and the first fragment corresponding to the missing first fragment information is sent to the target client device.
  • the missing first fragment information is used to identify that the target client device does not receive the first fragment.
  • the first slice does not have a sequential definition meaning, and does not refer to the first slice after the information is divided into several slices.
  • the target file is divided into 100 fragments, if the target client device lacks 3 Fragmentation, the target client device separately requests the server to obtain the three fragments.
  • the target client device does not receive a fragment, it does not go through the multicast source and directly obtains the missing fragment from the server, which improves the transmission efficiency of the fragment.
  • the selecting, by the server, the specified client device from the preset group includes: the server selecting the best performing client device in the preset group as the designated client device.
  • the optimal performance is a comprehensive consideration of the client device. For example, the CPU of the client device is a single-core dual-core? What model is the processor? The storage space is larger than the preset value and so on.
  • the server selects the client device with the best performance in the preset group as the designated client device, and selects the client device with the best performance to compare the CPU core, the memory size, and the hard disk size of the client device.
  • the end device is the designated client device; if the CPU core of the client device in the preset packet is the same and the memory is the same, the client device with the largest disk space in the preset packet is selected as the designated client device. .
  • the client device is determined to be optimal in performance if the one or more parameters of the reactive terminal performance are greater than a predetermined value, the client device is determined to be the best performing client device.
  • the preset packet is determined by: the server grouping the multiple client devices according to the preset rule to obtain the preset packet, where the communication quality is reflected between the multiple client devices
  • the multiple client devices are divided into the same group.
  • as many client devices as possible are grouped together.
  • FIG. 2 is a flowchart of a method for sending a file according to an embodiment of the present invention. As shown in FIG. 2, the steps are as follows:
  • the multicast source receives the file sent by the server, where the multicast source is a specified client device selected by the server according to a predetermined rule in the preset packet, where the preset packet includes multiple client devices;
  • the multicast source will multicast the file to the target client device in the preset packet.
  • the multiple client devices report at least one of the following information to the server: a unique identifier of the target client device, performance data of the target client device, the target Unique identification and performance data for neighboring partners of the client device.
  • the server automatically completes the grouping of the client device members by collecting the neighboring partner member information reported by the client device.
  • the server needs to deliver the target file to multiple target client devices, first query the grouping relationship table, find the grouping information of the target client device, and then select the best performing client device as the multicast source in each group. After the client device acting as the multicast source obtains the target file, multicast the file. Other target client devices obtain the target file through multicast push. When the multicast file is too large, the fragment is sent. The client device automatically combines the fragments. When the fragment is lost, the fragment is obtained separately from the server.
  • the message is reported to the server, and the message includes: its own unique identifier, its own performance data, unique identifiers of neighboring partners, and performance data.
  • Client device A collects the reported data process:
  • Client device A sends a multicast message GET_INFO.
  • the client device B, C, D, etc. listen to this message, obtain the respective performance data information INFO, and send the INFO information together with the identity as a message multicast.
  • the client device A listens to the INFO messages of B, C, D, etc., and reports the data information of the local machine and the data information of B, C, and D to the server side.
  • the server After receiving the neighbor partner member information reported by the client device, the server automatically groups, saves the group information and the client device performance data, and updates the group relationship table.
  • the server After receiving the LIST information of the neighboring partner member information list, the server obtains the genre group of each member through the locally saved grouping relationship table, and the member that does not belong to the group information corresponds to the temporary group.
  • the group information acquired in the step (1) the group including the largest number of LIST members is obtained. If the optimal group is a temporary group, a new group is generated as the optimal group.
  • the server obtains the group information of the target client device, and selects the best performing client device in each group as the multicast source to perform the multicast file. When the group file is large, fragment multicast is performed.
  • a multicast source requests a download file from a server, it multicasts and multicasts while downloading.
  • the client device groups the received fragments, and the missing fragments can be obtained separately from the server.
  • the server pushes the file to the client device
  • the packet loss phenomenon is improved, the transmission delay is reduced, and the client device obtains the file more efficiently, thereby ensuring the effective receiving time of the file.
  • For large file push Send improve the receiving efficiency of the client device.
  • the message is reported to the server, and the message includes: a unique identifier of the user, its own performance data, a unique identifier of the neighboring partners, and performance data.
  • FIG. 3 is a flow chart of server multicast automatic grouping according to an alternative embodiment of the present invention, as shown in FIG. 3, the steps are as follows;
  • Step S301 the server receives the neighboring partner member information list information LIST reported by the client device.
  • Step S302 traversing the LIST, and searching for the locally saved grouping relationship table group_relation.
  • Step S303 Acquire a group of each partner member.
  • the list of new members that are not yet a group is recorded as list_new, corresponding to the temporary group group_0.
  • step S304 an optimal group is found.
  • the group including the largest number of LIST members is obtained as the optimal group group_best.
  • Step S305 if the optimal group is group_0, the new group is generated as the optimal group group_best.
  • step S306 if the optimization is not group_0, the current optimal group is recorded as group_best.
  • Step S307 traversing the member MEMBER in the LIST. If the MEMBER is a new member that has not been grouped, a record is added in the table group_relation, and the MEMBER corresponds to the group group_best. If the MEMBER is not a new member, step S308 is performed.
  • step S308 it is determined whether the MEMBER group is group_best, if the MEMBER group is not group_best, the update group is group_best; if the MEMBER group is group_best, it does not change.
  • LIST represents a list of buddy members
  • List_new represents a list of members having no genre group information in the LIST in step 1
  • Group_best represents an optimal group
  • Group_relation represents a grouping relationship table.
  • Table 1 is the relationship table of the first grouping, as shown in Table 1:
  • FIG. 4 is a schematic diagram 1 of a grouping according to an alternative embodiment of the present invention. As shown in FIG. 4, the grouping after the N-1th packet is shown. Table 2 shows the client device member corresponding to the Nth report. The group information table, as shown in Table 2:
  • the list of neighboring partner members reported by the client device for the Nth time is C, E, F, H, and X.
  • the traversal member obtains the genre group information corresponding to the member that is reported this time.
  • Table 3 is a statistical table of the number of corresponding members of the genus group reported in the Nth time. As shown in Table 3, the members that have not been grouped correspond to the temporary group 0.
  • the information of the members C and F in the group 1 is unchanged, and the information of the group of E and H in the updated group relationship table is 1, and one record X is added to the group 1.
  • FIG. 5 is a schematic diagram 2 of a grouping according to an alternative embodiment of the present invention. As shown in FIG. 5, the grouping situation after the Nth grouping is shown.
  • the server obtains the group information of the target client device, and selects the best performing client device in each group as the multicast source to perform the multicast file.
  • the server obtains the group of the target client device through the group relationship table.
  • the multicast source downloads the file to the server, it is sent through multicast. For large file multicast, select fragmented multicast, and after downloading a fragment, you can multicast it.
  • the target client device receives the multicast file. For sharded files, automatically combined. Missing shards can be downloaded to the server separately.
  • the server automatically groups the client device, saves the group information, sets the multicast source and the multicast file in a grouping manner, and improves the packet loss phenomenon.
  • the server automatically groups the client device, saves the group information, sets the multicast source and the multicast file in a grouping manner, and improves the packet loss phenomenon.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of various embodiments of the present invention.
  • a file sending device is further provided, which is applied to a server, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 6 is a structural block diagram 1 of a device for sending a file according to an embodiment of the present invention.
  • the device is applied to a server.
  • the device includes:
  • the selecting module 62 is configured to select a specified client device from the preset group, and use the specified client device as a multicast source, where the preset packet includes multiple client devices;
  • the sending module 64 is connected to the selecting module 62, and is configured to send the file that the server needs to deliver to the multicast source, and multicast the file to the target client device in the preset packet by using the multicast source.
  • the preset packet is determined by: the server collecting a location relationship between the client devices, determining a neighboring partner of the target client device, and dividing the target client device and the neighboring partner into the same group.
  • the target client device multicast message receives the response information of the neighboring partner within a predetermined time.
  • the selecting module 62 is further configured to determine one or more target client devices that receive the file, and select the designated client device in a preset group to which the one or more target client devices belong.
  • the selecting module 62 is further configured to collect a location relationship between the client devices before selecting the specified client device from the preset group, and divide the client device into different groups according to the location relationship.
  • the server collects one of the following information: a unique identifier of the target client device, performance data of the target client device, unique identification and performance data of a neighboring partner of the target client device.
  • the sending module 64 is further configured to send the file to be sliced when the file size is greater than a preset threshold.
  • the sending module 64 is further configured to: after the file is sent by the fragment, receive the missing first fragment information of the target client device, and use the first fragment corresponding to the missing first fragment information. Sending to the target client device, where the missing first fragmentation information is used to identify that the target client device does not receive the first fragment.
  • the selecting module 62 is further configured to select a client device with the best performance in the preset group as the designated client device.
  • the preset packet is determined by: the server grouping the multiple client devices according to the preset rule to obtain the preset packet, where the communication quality is reflected between the multiple client devices When the parameter value is greater than the preset value, the multiple client devices are divided into the same group.
  • FIG. 7 is a structural block diagram 2 of a file transmitting apparatus according to an embodiment of the present invention, which is applied as a multicast source.
  • the client device as shown in FIG. 7, the device includes:
  • the receiving module 72 is configured to receive a file sent by the server, where the multicast source is a specified client device that is selected by the server according to a predetermined rule in the preset packet, where the preset packet includes multiple client devices;
  • the forwarding module 74 is connected to the receiving module 72 for multicasting the file to the target client device in the preset packet.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • a file system including: a server, a plurality of client devices,
  • the server is configured to select a specified client device from the preset group, and the specified client device is used as a multicast source, where the preset packet includes multiple client devices, and the device is sent to the multicast source.
  • the file that the server needs to deliver is configured to select a specified client device from the preset group, and the specified client device is used as a multicast source, where the preset packet includes multiple client devices, and the device is sent to the multicast source.
  • the multicast source is configured to multicast the file to a target client device in the preset packet.
  • system further comprises:
  • the server sends the file to the slice
  • the multicast source receives the file sent by the fragment and multicasts the file to the target client device.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the server selects a specified client device from the preset group, and uses the specified client device as a multicast source, where the preset packet includes multiple client devices;
  • S2 Send the file that the server needs to deliver to the multicast source, and multicast the file to the target client device in the preset packet by using the multicast source.
  • the storage medium is further arranged to store program code for performing the following steps:
  • the multicast source receives the file sent by the server, where the multicast source is a specified client device selected by the server according to a predetermined rule in the preset packet, where the preset packet includes multiple client devices;
  • the multicast source will multicast the file to the target client device in the preset packet.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor executes the method steps described in the foregoing embodiments according to the stored program code in the storage medium.
  • the various modules or steps of the present invention described above can be used with general calculations.
  • the devices are implemented, they may be centralized on a single computing device, or distributed over a network of multiple computing devices, optionally they may be implemented in program code executable by the computing device, such that they may be stored Executed by the computing device in a storage device, and in some cases, the steps shown or described may be performed in an order different than that herein, or separately fabricated into individual integrated circuit modules, or Multiple modules or steps are made into a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the disclosure is applicable to the field of communication, and solves the problem that the server pushes files to the client device in the related art is inefficient, and greatly improves the efficiency of the file sent by the server.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供了一种文件的发送方法、装置及系统,其中,该方法包括:服务器从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,该预设分组内包括多个客户端设备;向该组播源发送该服务器需要下发的文件,并通过该组播源向该预设分组内的目标客户端设备组播该文件。采用上述技术方案,解决了相关技术中服务器向客户端设备推送文件效率差的问题,大幅提高了服务器下发文件的效率。

Description

文件的发送方法、装置及系统 技术领域
本发明涉及通信领域,具体而言,涉及一种文件的发送方法、装置及系统。
背景技术
在很多业务应用场景中,客户端设备应用程序,因业务功能需求,在某个时间段内需要同时向服务器下载文件,然而服务器带宽限制,无法承载短时间内大量的来自客户端设备的文件下载请求。采用组播方式传送文件,利用组播“一对多”的通信优势,选取客户端设备作为组播源传送文件,解决了服务器的请求并发带宽受限问题,使得在有效时间段内,客户端设备能够正常获取到文件。在现实应用中,组播文件时经常发生丢包情况,导致客户端设备无法在要求的时间内正常接收文件。对于丢包现象,一般解决方式有两种:(1)丢包客户端设备单独向服务器请求下载,当丢包客户端设备较多、文件较大时,又会出现服务器带宽限制问题。当文件较大时,客户端设备下载时间很长,无法保证在有效时间内接收完文件。(2)采用组播重传时,组播源本次组播结束后,无法立刻知道哪些客户端设备丢包,以及丢包情况,并且重传后可能会改善丢包现象,但传输时延较长,有可能错过了客户端设备的文件有效时间。
在服务器选择多个客户端设备作为组播源时,由于无法预先知晓客户端设备本身的性能情况和客户端设备之间的网络通讯情况,组播源可能存在本身性能差、存储空间不足等问题,组播源和其他客户端设备通讯状态差情况,仍然存在很多客户端设备在有效时间内接收不到文件,或接收不完整。
针对相关技术中服务器向客户端设备推送文件效率差的问题,目前还没有有效的解决方案。
发明内容
本发明实施例提供了一种文件的发送方法、装置及系统,以至少解决相关技术中服务器向客户端设备推送文件不合理的问题。
根据本发明的一个实施例,提供了一种文件的发送方法,包括:服务器从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,所述预设分组内包括多个客户端设备;向所述组播源发送所述服务器需要下发的文件,并通过所述组播源向所述预设分组内的目标客户端设备组播所述文件。
可选地,服务器从预设分组内选择指定客户端设备包括:所述服务器确定接收所述文件的一个或多个目标客户端设备,并在所述一个或多个目标客户端设备所属的预设分组中选择所述指定客户端设备。
可选地,服务器从预设分组内选择指定客户端设备之前,所述方法还包括:所述服务器 收集客户端设备之间的位置关系,依据所述位置关系将所述客户端设备划分为不同分组。
可选地,所述方法还包括:所述服务器收集以下信息之一:所述目标客户端设备的唯一标识,所述目标客户端设备的性能数据,所述目标客户端设备的邻近伙伴的唯一标识和性能数据。
可选地,所述预设分组通过以下方式确定:所述服务器收集客户端设备之间的位置关系,确定所述目标客户端设备的邻近伙伴,将所述目标客户端设备和所述邻近伙伴划分为同一组,其中,所述目标客户端设备组播消息,在预定时间内接收到所述邻近伙伴的应答信息。
可选地,所述方法还包括:在所述文件大小大于预设阈值时,将所述文件进行分片发送。
可选地,将所述文件进行分片发送之后,所述方法还包括:接收所述目标客户端设备的缺失第一分片信息,将与所述缺失第一分片信息对应的第一分片发送给所述目标客户端设备,其中,所述缺失第一分片信息用于标识所述目标客户端设备没有接收到所述第一分片。
可选地,所述服务器从预设分组内选择指定客户端设备包括:所述服务器选择所述预设分组中性能最优的客户端设备作为所述指定客户端设备。
可选地,所述服务器选择所述预设分组中性能最优的客户端设备作为所述指定客户端设备,包括:选择所述预设分组中CPU核数最高的客户端设备为所述指定客户端设备;在所述预设分组中的客户端设备的CPU核数相同的情况下,选择所述预设分组中内存最大的客户端设备为所述指定客户端设备;在所述预设分组中的客户端设备的CPU核数相同,内存相同的情况下,选择所述预设分组中磁盘空间最大的客户端设备为所述指定客户端设备。
可选地,所述预设分组通过以下方式确定:所述服务器依据预设规则对多个客户端设备进行分组,得到所述预设分组,其中,在所述多个客户端设备之间用于反映通信质量的参数值大于预设值时,将所述多个客户端设备分为同一组。
根据本发明的一个实施例,提供了一种文件的发送方法,包括:组播源接收服务器发送的文件,其中,所述组播源是所述服务器在预设分组内按照预定规则选择的指定客户端设备,其中,所述预设分组内包括多个客户端设备;所述组播源将向所述预设分组内的目标客户端设备组播所述文件。
可选地,组播源接收服务器发送的文件之前,所述多个客户端设备将以下信息至少之一上报所述服务器:所述目标客户端设备的唯一标识,所述目标客户端设备的性能数据,所述目标客户端设备的邻近伙伴的唯一标识和性能数据。
根据本发明的另一个实施例,提供了一种文件的发送装置,应用于服务器,包括:选取模块,设置为从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,所述预设分组内包括多个客户端设备;发送模块,设置为向所述组播源发送所述服务器需要下发的文件,并通过所述组播源向所述预设分组内的目标客户端设备组播所述文件。
可选地,所述预设分组通过以下方式确定:所述服务器收集客户端设备之间的位置关系,确定所述目标客户端设备的邻近伙伴,将所述目标客户端设备和所述邻近伙伴划分为同一组,其中,所述目标客户端设备组播消息,在预定时间内接收到所述邻近伙伴的应答信息。
可选地,所述发送模块还设置为在所述文件大小大于预设阈值时,将所述文件进行分片 发送。
可选地,所述发送模块还设置为在将所述文件进行分片发送之后,接收所述目标客户端设备的缺失第一分片信息,将与所述缺失第一分片信息对应的第一分片发送给所述目标客户端设备,其中,所述缺失第一分片信息用于标识所述目标客户端设备没有接收到所述第一分片。
根据本发明的另一个实施例,提供了一种文件的发送装置,应用于作为组播源的客户端设备,包括:接收模块,设置为接收服务器发送的文件,其中,所述组播源是所述服务器在预设分组内按照预定规则选择的指定客户端设备,其中,所述预设分组内包括多个客户端设备;转发模块,设置为向所述预设分组内的目标客户端设备组播所述文件。
根据本发明的另一个实施例,还提供了一种发送文件系统,包括:服务器,多个客户端设备,所述服务器设置为从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,所述预设分组内包括多个客户端设备,并向所述组播源发送所述服务器需要下发的文件所述组播源,用于向所述预设分组内的目标客户端设备组播所述文件。
可选地,所述系统还包括:在所述服务器确定所述文件大小大于预设阈值时;所述服务器将所述文件进行分片发送;所述组播源接收所述分片发送的文件,并将所述文件组播到所述目标客户端设备。
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:服务器从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,所述预设分组内包括多个客户端设备;向所述组播源发送所述服务器需要下发的文件,并通过所述组播源向所述预设分组内的目标客户端设备组播所述文件。
该存储介质还用于执行以下步骤的程序代码:组播源接收服务器发送的文件,其中,所述组播源是所述服务器在预设分组内按照预定规则选择的指定客户端设备,其中,所述预设分组内包括多个客户端设备;所述组播源将向所述预设分组内的目标客户端设备组播所述文件。
通过本发明,服务器在多个客户端设备中进行分组,在每个分组内选择一个组播源,服务器将待发送到目标客户端设备的文件下发到组播源,由组播源将该文件组播到目标客户端设备。解决了相关技术中服务器向客户端设备推送文件效率差的问题,大幅提高了服务器下发文件的效率。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的一种文件的发送方法的流程图;
图2是根据本发明实施例的一种文件的发送方法流程图;
图3是根据本发明可选实施例服务器组播自动分组流程图;
图4是根据本发明可选实施例的一种分组示意图一;
图5是根据本发明可选实施例的一种分组示意图二;
图6是根据本发明实施例的文件的发送装置的结构框图一;
图7是根据本发明实施例的文件的发送装置的结构框图二。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
实施例1
本申请记载的实施例可以运行在计算机设备上,应用场景是服务器向目标客户端设备下发文件。
在本实施例中提供了一种运行于计算机设备上的一种文件的发送方法,图1是根据本发明实施例的一种文件的发送方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,服务器从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,该预设分组内包括多个客户端设备;
步骤S104,向该组播源发送该服务器需要下发的文件,并通过该组播源向该预设分组内的目标客户端设备组播该文件。
通过上述步骤,服务器从预设分组内选择指定客户端设备作为组播源,向组播源下发文件,组播源将文件转发到目标客户端设备。解决了相关技术中服务器向客户端设备推送文件效率差的问题,大幅提高了服务器下发文件的效率。
可选地,该服务器确定接收该文件的一个或多个目标客户端设备,并在该一个或多个目标客户端设备所属的预设分组中选择该指定客户端设备。在服务器的管辖范围内,有多个客户端设备,在客户端设备可以通信的情况下,尽可能多的将客户端设备划分为一个组。在众多的客户端设备中,本次需要下发的文件对应的是部分客户端设备,即目标客户端设备。
可选地,服务器从预设分组内选择指定客户端设备之前,该服务器收集客户端设备之间的位置关系,依据该位置关系将该客户端设备划分为不同分组。需要说明的是,该申请文件中的位置关系不是物理意义上的距离关系,而是指在客户端设备之间在网络中传输信息快慢,客户端设备之间传输信息快,他们在网络中的位置关系近,即在该实施例中是依据客户端设备之间的传输信息快慢,进行分组。在上一个可选实施例中,服务器进行分组,分组依据的是客户端设备之间的位置关系。可选地,该服务器收集以下信息之一:该目标客户端设备的唯一标识,该目标客户端设备的性能数据,该目标客户端设备的邻近伙伴的唯一标识和性能数据。客户端设备的唯一标识用于标识客户端设备,性能数据主要是在服务器选取组播源时起作用,该性能数据包括客户端设备的存储空间等,至于目标客户端设备的邻近伙伴的相关数据则是为了服务器在划分组时使用,邻近伙伴是与客户端设备传输信息快的设备,不 是物理意义上的距离关系,客户端设备组播消息,在预设时间可以接收到客户端设备消息应答的即为邻近伙伴。
在一个可选实施例中,该预设分组通过以下方式确定:该服务器收集客户端设备之间的位置关系,确定该目标客户端设备的邻近伙伴,将该目标客户端设备和该邻近伙伴划分为同一组,其中,该目标客户端设备组播消息,在预定时间内接收到该邻近伙伴的应答信息。在上述实施例中记载了分组的方式,需要说明的是,服务器每收到一次客户端设备的上报信息就会进行一次分组,或者,服务器每需要下发一次信息就会进行一次分组,以确保在服务器划分的分组在时效性的最优。相应的,可以预先设置客户端设备,在以下情况下上报信息:增加了新客户端设备,老客户端设备的变动,客户端设备重启等。
可选地,在该文件大小大于预设阈值时,将该文件进行分片发送。在下发文件过于大时,为了避免丢失以及考虑到组播源的性能等问题,服务器在下发文件时,将文件分片发送,目标客户端设备在接收到分片时自动将分片组合。可选地,将该文件进行分片发送之后,接收该目标客户端设备的缺失第一分片信息,将与该缺失第一分片信息对应的第一分片发送给该目标客户端设备,其中,该缺失第一分片信息用于标识该目标客户端设备没有接收到该第一分片。需要说明的是,该第一分片不具有先后顺序限定含义,并不是指将信息分成若干片之后的第一片。在一个可选实施例中,组播可能存在多个丢包,目标客户端设备缺少的所有分片都会向服务器单独获取,例如,目标文件被分成100分片,如果目标客户端设备缺少3个分片,则该目标客户端设备单独向服务器请求获取这3个分片。在目标客户端设备没有接收到一个分片时,不经过组播源,直接向服务器获取缺失的分片,提升了分片的传输效率。
可选地,该服务器从预设分组内选择指定客户端设备包括:该服务器选择该预设分组中性能最优的客户端设备作为该指定客户端设备。在该申请文件的背景技术中,记载了一段关于组播源性能的描述,在本实施例中,性能最优是综合考量客户端设备,例如客户端设备的CPU是单核双核?处理器是什么型号?存储空间是大于预设值等等。
可选地,该服务器选择该预设分组中性能最优的客户端设备作为该指定客户端设备,选取性能最优的客户端设备逐次比较客户端设备的CPU核数,内存大小,硬盘大小。选择该预设分组中CPU核数最高的客户端设备为该指定客户端设备;在该预设分组中的客户端设备的CPU核数相同的情况下,选择该预设分组中内存最大的客户端设备为该指定客户端设备;在该预设分组中的客户端设备的CPU核数相同,内存相同的情况下,选择该预设分组中磁盘空间最大的客户端设备为该指定客户端设备。
可选地,在以下情况下确定该客户端设备为性能最优:在反应终端性能的一个或多个参数大于预定值的情况下,确定该客户端设备为性能最优的客户端设备。
可选地,该预设分组通过以下方式确定:该服务器依据预设规则对多个客户端设备进行分组,得到该预设分组,其中,在该多个客户端设备之间用于反映通信质量的参数值大于预设值时,将该多个客户端设备分为同一组。结合上述实施例记载的分配小组方法,尽可能多的将客户端设备分在一组。
图2是根据本发明实施例的一种文件的发送方法流程图,如图2所示,步骤如下:
S202,组播源接收服务器发送的文件,其中,该组播源是该服务器在预设分组内按照预定规则选择的指定客户端设备,其中,该预设分组内包括多个客户端设备;
S204,该组播源将向该预设分组内的目标客户端设备组播该文件。
可选地,组播源接收服务器发送的文件之前,该多个客户端设备将以下信息至少之一上报该服务器:该目标客户端设备的唯一标识,该目标客户端设备的性能数据,该目标客户端设备的邻近伙伴的唯一标识和性能数据。
在本发明的一个可选实施例中,服务器通过收集客户端设备上报的邻近伙伴成员信息,自动完成客户端设备成员的分组。当服务器需要下发目标文件给多个目标客户端设备时,首先查询分组关系表,找到目标客户端设备所在的分组信息,然后在各个分组中选出性能最优的客户端设备作为组播源,充当组播源的客户端设备获取目标文件后,组播此文件。其他目标客户端设备通过组播推送,获取目标文件。当组播文件过大时,进行分片发送,客户端设备自动组合分片,分片丢包时,单独向服务器获取此分片。
具体步骤如下:
1.客户端设备程序启动后上报消息给服务器,消息包括:自身的唯一标识、自身的性能数据、邻近伙伴们的唯一标识和性能数据。
客户端设备A收集上报数据过程:
(1)客户端设备A发送组播消息GET_INFO。
(2)客户端设备B、C、D等监听到此消息,获取各自性能数据信息INFO,并将INFO信息连同自身标识作为消息组播发送出去。
(3)客户端设备A监听到B、C、D等的INFO消息,整理后将本机数据信息及B、C、D的数据信息上报到服务器侧。
2.服务器收到客户端设备上报的邻近伙伴成员信息后,自动分组,保存分组信息和客户端设备性能数据,更新分组关系表。
流程说明:
(1)服务器收到邻近伙伴成员信息列表LIST信息后,通过本地保存的分组关系表,获取各个成员的属组,没有属组信息的成员对应临时组。
(2)选择最优分组。在步骤(1)获取的分组信息中,获取包含LIST成员个数最多的组。若最优组为临时组,则生成新的组为最优组。
(3)更新分组关系表。分组关系表中已存在的LIST中的成员属组更新为最优组,不在分组关系表中的成员加入表中,属组对应为最优组。
3.组播下发文件。服务器获取目标客户端设备所在的分组信息,选择各分组中性能最好的客户端设备作为组播源进行组播文件。当组文件比较大时,进行分片组播。组播源向服务器请求下载文件时,分片组播,边下载边组播。客户端设备对收到的分片进行组片,遇到缺失的分片即可单独向服务器获取即可。
采用上述实施例记载的方法,服务器向客户端设备推送文件时,改善了丢包现象,减少了传输时延,客户端设备更高效地获取到文件,保证了文件的有效接收时间。对于大文件推 送,提升了客户端设备接收效率。
在执行上述实施例记载的方法之前,存在预置条件:客户端设备处于组播监听的状态。
以下是本发明可选实施例的具体实施方式
一,客户端设备程序启动后上报消息给服务器,消息包括:自身的唯一标识、自身的性能数据、邻近伙伴们的唯一标识和性能数据。
二,服务器收到客户端设备上报的邻近伙伴成员信息后,自动分组,保存分组信息和客户端设备性能数据。图3是根据本发明可选实施例服务器组播自动分组流程图,如图3所示,步骤如下;
步骤S301,服务器收到客户端设备上报的邻近伙伴成员信息列表信息LIST。
步骤S302,遍历LIST,查找本地保存的分组关系表group_relation。
步骤S303,获取每个伙伴成员的属组。尚无属组的新成员列表记为list_new,对应临时组group_0。
步骤S304,找出最优分组。在S303中获取的分组信息中,获取包含LIST成员个数最多的组即为最优组group_best。
步骤S305,若最优组为group_0,产生新的组为最优组group_best。
步骤S306,若最优化不是group_0,当前最优组记为group_best。
步骤S307,遍历LIST中的成员MEMBER,若MEMBER是尚未分组的新成员,则在表group_relation中增加一条记录,MEMBER对应属组group_best。若MEMBER不是新成员,执行步骤S308。
步骤S308,判断MEMBER的属组是否为group_best,若MEMBER属组不是group_best,更新属组为group_best;若MEMBER属组是group_best,不改变。
在图3中,LIST表示伙伴成员列表;List_new表示步骤1中LIST中无属组信息的成员列表;Group_best表示最优组;以及Group_relation表示分组关系表。
下面举例说明上述分组流程:
(1)第一次分组:此时服务器尚无成员分组信息。
收到第一个客户端设备机上报的组播内成员数据信息,假设成员为A、B、C。成员无分组信息,对应临时分组group_0。此时产生新的组记做组1,成员A、B、C加入组1,表1是第一次分组的关系表,如表1所示:
表1
客户端设备 属组
A 1
B 1
C 1
(2)第N(N>2)次分组。
假设前N-1次分组后,形成图4,图4是根据本发明可选实施例的一种分组示意图一,如图4所示,展示了第N-1次分组后的分组情况。表2是第N次上报的客户端设备成员对应 的属组信息表,如表2所示:
表2
客户端设备 属组
C 1
E 5
F 1
H 4
X 0
第N次收到客户端设备上报的邻近伙伴成员列表为C、E、F、H、X。
遍历成员,获取此次上报的成员对应的属组信息,表3是第N次上报的属组对应成员个数的统计表,如表3所示,尚未分组的成员对应临时组0。
表3
属组 伙伴成员个数
1 2
4 1
5 1
0 1
计算属组中的伙伴成员个数,见表3,最佳分组为组1。
组1内的成员C、F组信息不变,更新分组关系表中E、H的属组信息为1,增加一条记录X对应组1。
更新后的分组关系见图5,图5是根据本发明可选实施例的一种分组示意图二,如图5所示,展示了第N次分组后的分组情况。
三,组播下发文件。服务器获取目标客户端设备所在的分组信息,选择各分组中性能最好的客户端设备作为组播源进行组播文件。
组播下发文件的详细过程如下,
(1)服务器通过分组关系表获取目标客户端设备所在的属组。
(2)获取各属组下的成员客户端设备,根据成员客户端设备的性能数据获取最佳的客户端设备作为组播源,并通知组播源。
(3)组播源向服务器下载文件后,通过组播发出。对于大文件组播,选择分片组播,下载完一个分片后即可组播出去。
(4)目标客户端设备收到组播文件。对于分片文件,自动组合。缺少的分片,单独向服务器下载即可。
本申请实施例中服务器对客户端设备进行自动分组,并保存分组信息,通过分组方式设置组播源,组播文件,改善丢包现象。当组播文件过大时,采用分片发送,客户端设备丢失的小分片单独向服务器获取,客户端设备自动完成组片,提高了发送接收效率。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例该的方法。
实施例2
在本实施例中还提供了一种文件的发送装置,应用于服务器,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图6是根据本发明实施例的文件的发送装置的结构框图一,该装置应用于服务器,如图6所示,该装置包括:
选取模块62,用于从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,该预设分组内包括多个客户端设备;
发送模块64,与选取模块62连接,用于向该组播源发送该服务器需要下发的文件,并通过该组播源向该预设分组内的目标客户端设备组播该文件。
可选地,该预设分组通过以下方式确定:该服务器收集客户端设备之间的位置关系,确定该目标客户端设备的邻近伙伴,将该目标客户端设备和该邻近伙伴划分为同一组,其中,该目标客户端设备组播消息,在预定时间内接收到该邻近伙伴的应答信息。
可选地,该选取模块62还用于确定接收该文件的一个或多个目标客户端设备,并在该一个或多个目标客户端设备所属的预设分组中选择该指定客户端设备。
可选地,该选取模块62还用于从预设分组内选择指定客户端设备之前,收集客户端设备之间的位置关系,依据该位置关系将该客户端设备划分为不同分组。
可选地,该服务器收集以下信息之一:该目标客户端设备的唯一标识,该目标客户端设备的性能数据,该目标客户端设备的邻近伙伴的唯一标识和性能数据。
可选地,该发送模块64还用于在该文件大小大于预设阈值时,将该文件进行分片发送。
可选地,该发送模块64还用于在将该文件进行分片发送之后,接收该目标客户端设备的缺失第一分片信息,将与该缺失第一分片信息对应的第一分片发送给该目标客户端设备,其中,该缺失第一分片信息用于标识该目标客户端设备没有接收到该第一分片。
可选地,该选取模块62还用于选择该预设分组中性能最优的客户端设备作为该指定客户端设备。
可选地,该预设分组通过以下方式确定:该服务器依据预设规则对多个客户端设备进行分组,得到该预设分组,其中,在该多个客户端设备之间用于反映通信质量的参数值大于预设值时,将该多个客户端设备分为同一组。
图7是根据本发明实施例的文件的发送装置的结构框图二,该装置应用于作为组播源的 客户端设备,如图7所示,该装置包括:
接收模块72,用于接收服务器发送的文件,其中,该组播源是该服务器在预设分组内按照预定规则选择的指定客户端设备,其中,该预设分组内包括多个客户端设备;
转发模块74,与接收模块72连接,用于向该预设分组内的目标客户端设备组播该文件。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
实施例3
根据本发明的另一个实施例,还提供了一种发送文件系统,包括:服务器,多个客户端设备,
该服务器,用于从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,该预设分组内包括多个客户端设备,并向该组播源发送该服务器需要下发的文件
该组播源,用于向该预设分组内的目标客户端设备组播该文件。
可选地,该系统还包括:
在该服务器确定该文件大小大于预设阈值时;
该服务器将该文件进行分片发送;
该组播源接收该分片发送的文件,并将该文件组播到该目标客户端设备。
实施例4
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,服务器从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,该预设分组内包括多个客户端设备;
S2,向该组播源发送该服务器需要下发的文件,并通过该组播源向该预设分组内的目标客户端设备组播该文件。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:
S3,组播源接收服务器发送的文件,其中,该组播源是该服务器在预设分组内按照预定规则选择的指定客户端设备,其中,该预设分组内包括多个客户端设备;
S4,该组播源将向该预设分组内的目标客户端设备组播该文件。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例中记载的方法步骤。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算 装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
本公开适用于通信领域,用以解决相关技术中服务器向客户端设备推送文件效率差的问题,并大幅提高服务器下发文件的效率。

Claims (20)

  1. 一种文件的发送方法,包括:
    服务器从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,所述预设分组内包括多个客户端设备;
    向所述组播源发送所述服务器需要下发的文件,并通过所述组播源向所述预设分组内的目标客户端设备组播所述文件。
  2. 根据权利要求1所述的方法,其中,服务器从预设分组内选择指定客户端设备包括:
    所述服务器确定接收所述文件的一个或多个目标客户端设备,并在所述一个或多个目标客户端设备所属的预设分组中选择所述指定客户端设备。
  3. 根据权利要求1所述的方法,其中,服务器从预设分组内选择指定客户端设备之前,所述方法还包括:
    所述服务器收集客户端设备之间的位置关系,依据所述位置关系将所述客户端设备划分为不同分组。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:
    所述服务器收集以下信息之一:所述目标客户端设备的唯一标识,所述目标客户端设备的性能数据,所述目标客户端设备的邻近伙伴的唯一标识和性能数据。
  5. 根据权利要求4所述的方法,其中,所述预设分组通过以下方式确定:
    所述服务器收集客户端设备之间的位置关系,确定所述目标客户端设备的邻近伙伴,将所述目标客户端设备和所述邻近伙伴划分为同一组,其中,所述目标客户端设备组播消息,在预定时间内接收到所述邻近伙伴的应答信息。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    在所述文件大小大于预设阈值时,将所述文件进行分片发送。
  7. 根据权利要求6所述的方法,其中,将所述文件进行分片发送之后,所述方法还包括:
    接收所述目标客户端设备的缺失第一分片信息,将与所述缺失第一分片信息对应的第一分片发送给所述目标客户端设备,其中,所述缺失第一分片信息用于标识所述目标客户端设备没有接收到所述第一分片。
  8. 根据权利要求1所述的方法,其中,所述服务器从预设分组内选择指定客户端设备包括:
    所述服务器选择所述预设分组中性能最优的客户端设备作为所述指定客户端设备。
  9. 根据权利要求8所述的方法,其中,所述服务器选择所述预设分组中性能最优的客户端设备作为所述指定客户端设备,包括:
    选择所述预设分组中CPU核数最高的客户端设备为所述指定客户端设备;
    在所述预设分组中的客户端设备的CPU核数相同的情况下,选择所述预设分组中内存最大的客户端设备为所述指定客户端设备;
    在所述预设分组中的客户端设备的CPU核数相同,内存相同的情况下,选择所述预设分组中磁盘空间最大的客户端设备为所述指定客户端设备。
  10. 根据权利要求1至9中任一项所述的方法,其中,所述预设分组通过以下方式确定:所述服务器依据预设规则对多个客户端设备进行分组,得到所述预设分组,其中,在所述多个客户端设备之间用于反映通信质量的参数值大于预设值时,将所述多个客户端设备分为同一组。
  11. 一种文件的发送方法,包括:
    组播源接收服务器发送的文件,其中,所述组播源是所述服务器在预设分组内按照预定规则选择的指定客户端设备,其中,所述预设分组内包括多个客户端设备;
    所述组播源将向所述预设分组内的目标客户端设备组播所述文件。
  12. 根据权利要求11所述的方法,其中,组播源接收服务器发送的文件之前,所述多个客户端设备将以下信息至少之一上报所述服务器:
    所述目标客户端设备的唯一标识,所述目标客户端设备的性能数据,所述目标客户端设备的邻近伙伴的唯一标识和性能数据。
  13. 一种文件的发送装置,应用于服务器,包括:
    选取模块,设置为从预设分组内选择指定客户端设备,并将该指定客户端设备作为组播源,其中,所述预设分组内包括多个客户端设备;
    发送模块,设置为向所述组播源发送所述服务器需要下发的文件,并通过所述组播源向所述预设分组内的目标客户端设备组播所述文件。
  14. 根据权利要求13所述的装置,其中,所述预设分组通过以下方式确定:
    所述服务器收集客户端设备之间的位置关系,确定所述目标客户端设备的邻近伙伴,将所述目标客户端设备和所述邻近伙伴划分为同一组,其中,所述目标客户端设备组播消息,在预定时间内接收到所述邻近伙伴的应答信息。
  15. 根据权利要求13所述的装置,其中,所述发送模块还设置为在所述文件大小大于预设阈值时,将所述文件进行分片发送。
  16. 根据权利要求15所述的装置,其中,所述发送模块还设置为在将所述文件进行分片发送之后,接收所述目标客户端设备的缺失第一分片信息,将与所述缺失第一分片信息对应的第一分片发送给所述目标客户端设备,其中,所述缺失第一分片信息用于标识所述目标客户端设备没有接收到所述第一分片。
  17. 一种文件的发送装置,应用于作为组播源的客户端设备,包括:
    接收模块,设置为接收服务器发送的文件,其中,所述组播源是所述服务器在预设分组内按照预定规则选择的指定客户端设备,其中,所述预设分组内包括多个客户端设备;
    转发模块,设置为向所述预设分组内的目标客户端设备组播所述文件。
  18. 一种发送文件系统,包括:服务器,多个客户端设备,
    所述服务器,设置为从预设分组内选择指定客户端设备,并将该指定客户端设备作为 组播源,其中,所述预设分组内包括所述多个客户端设备,并向所述组播源发送所述服务器需要下发的文件
    所述组播源,设置为向所述预设分组内的目标客户端设备组播所述文件。
  19. 根据权利要求18所述的系统,其中,所述系统还包括:
    在所述服务器确定所述文件大小大于预设阈值时;
    所述服务器将所述文件进行分片发送;
    所述组播源接收所述分片发送的文件,并将所述文件组播到所述目标客户端设备。
  20. 一种计算机存储介质,所述计算机存储介质存储有执行指令,所述执行指令用于执行权利要求1至10中任一项所述的方法。
PCT/CN2017/087569 2016-06-30 2017-06-08 文件的发送方法、装置及系统 WO2018001063A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610510292.2A CN107566321B (zh) 2016-06-30 2016-06-30 文件的发送方法、装置及系统
CN201610510292.2 2016-06-30

Publications (1)

Publication Number Publication Date
WO2018001063A1 true WO2018001063A1 (zh) 2018-01-04

Family

ID=60785912

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087569 WO2018001063A1 (zh) 2016-06-30 2017-06-08 文件的发送方法、装置及系统

Country Status (2)

Country Link
CN (1) CN107566321B (zh)
WO (1) WO2018001063A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111092741A (zh) * 2018-10-24 2020-05-01 玲珑视界科技(北京)有限公司 一种通过组播通道进行文件分发系统及方法
CN113099259A (zh) * 2021-04-19 2021-07-09 北京沃东天骏信息技术有限公司 流媒体的组播发送方法、装置、组播服务器以及介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969458A (zh) * 2018-09-29 2020-04-07 武汉斗鱼网络科技有限公司 一种客户端集群的积分方法、客户端及系统
CN110430480B (zh) * 2019-08-09 2022-02-18 深圳市迈岭信息技术有限公司 一种流媒体云存储同步的系统和方法
CN110491386A (zh) * 2019-08-16 2019-11-22 北京云中融信网络科技有限公司 一种生成会议纪要的方法、装置和计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004114619A1 (fr) * 2003-06-26 2004-12-29 Huawei Technologies Co., Ltd Procede et systeme pour commander une source de diffusion selective
CN102118254A (zh) * 2010-01-05 2011-07-06 上海贝尔股份有限公司 一种上行组播控制方法及其装置
CN102802094A (zh) * 2012-09-12 2012-11-28 上海斐讯数据通信技术有限公司 一种epon系统中缩短组播业务流下发延时的改进方法
CN104506330A (zh) * 2014-11-28 2015-04-08 北京奇艺世纪科技有限公司 一种消息同步方法和系统
CN104540120A (zh) * 2014-12-24 2015-04-22 中国科学院计算技术研究所 一种PMIPv6支持移动组播的路由优化方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499914B (zh) * 2008-01-28 2012-07-04 华为技术有限公司 一种组播系统的父节点选择方法、系统及节点
US8803888B2 (en) * 2010-06-02 2014-08-12 Microsoft Corporation Recognition system for sharing information
CN104980482B (zh) * 2014-12-24 2019-09-13 深圳市腾讯计算机系统有限公司 文件发送方法及装置、文件接收方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004114619A1 (fr) * 2003-06-26 2004-12-29 Huawei Technologies Co., Ltd Procede et systeme pour commander une source de diffusion selective
CN102118254A (zh) * 2010-01-05 2011-07-06 上海贝尔股份有限公司 一种上行组播控制方法及其装置
CN102802094A (zh) * 2012-09-12 2012-11-28 上海斐讯数据通信技术有限公司 一种epon系统中缩短组播业务流下发延时的改进方法
CN104506330A (zh) * 2014-11-28 2015-04-08 北京奇艺世纪科技有限公司 一种消息同步方法和系统
CN104540120A (zh) * 2014-12-24 2015-04-22 中国科学院计算技术研究所 一种PMIPv6支持移动组播的路由优化方法及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111092741A (zh) * 2018-10-24 2020-05-01 玲珑视界科技(北京)有限公司 一种通过组播通道进行文件分发系统及方法
CN113099259A (zh) * 2021-04-19 2021-07-09 北京沃东天骏信息技术有限公司 流媒体的组播发送方法、装置、组播服务器以及介质

Also Published As

Publication number Publication date
CN107566321A (zh) 2018-01-09
CN107566321B (zh) 2021-06-15

Similar Documents

Publication Publication Date Title
WO2018001063A1 (zh) 文件的发送方法、装置及系统
US10681127B2 (en) File upload method and system
CN107332876B (zh) 区块链状态的同步方法及装置
US9392081B2 (en) Method and device for sending requests
CN110855792B (zh) 一种消息推送方法、装置、设备及介质
WO2008025297A1 (fr) Procédé de téléchargement de fichiers selon la technique p2p (pair à pair) et système de téléchargement p2p
CN102802227B (zh) 基于基站直通架构的数据处理方法、设备和系统
JP6849795B2 (ja) 通信方法および装置
WO2017215646A1 (zh) 数据传输方法和装置
US9591069B2 (en) Peer-to-peer assist for live media streaming
US20180069751A1 (en) Systems and methods of providing an edge cloud storage and caching system operating over a local area network
WO2015010197A1 (en) Method and apparatus for providing redundant data access
US10693967B2 (en) Data connection establishment method, server, and mobile terminal
CN103259866A (zh) 一种多点传输dns区文件的方法和系统
US8984100B2 (en) Data downloading method, terminal, server, and system
WO2017220021A1 (zh) 短信息处理方法及装置
US20220166842A1 (en) Data distribution method and electronic device
WO2016070566A1 (zh) 云终端升级方法、系统、网管服务器及代理服务器
EP2518950A1 (en) Network location recognition system and terminal location recognition device
CN105656978A (zh) 一种资源共享方法及装置
US10268532B2 (en) Application message processing system, method, and application device
Belblidia et al. Epics: Fair opportunistic multi-content dissemination
CN112788135B (zh) 资源调度方法、设备及存储介质
CN106209666B (zh) 一种基于负载均衡器的链路复用方法及系统
CN110109933B (zh) 信息维护方法、配置管理数据库系统及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17819060

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17819060

Country of ref document: EP

Kind code of ref document: A1