A download service layered distribution method and device, electronic equipment, and storage medium
By identifying and starting a temporary distribution service node in the parent application distribution server, the complexity and security issues of the internal network of large enterprises are resolved, efficient software updates are achieved within the local area network, and download failures caused by insufficient broadband resources are avoided.
Patent Information
- Application Number
- CN202411689366.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The internal networks of large enterprises are complex and have strict security requirements, which makes it impossible for P2P technology to communicate between different institutions, resulting in slow or failed software updates. In particular, insufficient broadband resources affect the timely update of software when multiple terminals are downloading at the same time.
The mother application distribution server determines whether there is a temporary distribution service node in the network segment to which the target terminal belongs. If not, the temporary distribution service is started on the target terminal to make it a temporary distribution service node. If so, it is redirected to the temporary distribution service node for downloading, avoiding the mother application distribution server from processing too many terminal requests and using the high bandwidth in the local area network for rapid updates.
It improves the software update efficiency of all terminals within the enterprise, reduces the load on the parent application distribution server, ensures that download speeds are not limited by broadband resources, and achieves fast and stable application updates.
Smart Images

Figure CN119583642B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the application update technical field, in particular to a download service layered distribution method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the information age, the stability, security and functionality of enterprise software systems are crucial to enterprise operations. Ensuring that application software is effectively updated in a timely manner is crucial to building a robust operation system, improving internal management efficiency, achieving sustainable growth and maintaining a competitive advantage.
[0003] In order to update the version of the enterprise application software in a timely manner, one current method is to apply P2P technology to the enterprise application store. Since P2P technology allows each node in the network to be both a service requester and a service provider, this feature allows any node to download parts of the software from multiple nodes that have already updated the software version, thereby achieving timely updating of the software on itself and also providing services as a service provider after updating to download the software for other nodes.
[0004] However, many large enterprise internal networks are complex and have strict security requirements, so the networks between most institutions of the enterprise cannot directly interoperate, and therefore the nodes of different institutions cannot provide services to each other, and this method cannot be used. The number of nodes within an institution is limited and cannot take advantage of P2P technology, and may also cause file download success rate to decrease due to resource competition, delaying timely software version updates. Moreover, even if the networks of different institutions can directly interoperate, the broadband configuration of different institutions is much lower than that of the local area network within the institution, so the file download speed from multiple nodes of different institutions is slow, especially when multiple terminals simultaneously initiate download requests, the limited broadband resources will greatly reduce the download speed, and even cause download failure, thereby seriously affecting the timely updating of the software. SUMMARY
[0005] Based on the deficiencies of the prior art, the present application provides a download service layered distribution method and device, electronic equipment and storage medium to solve the problem of the prior art that cannot update software in a timely manner.
[0006] In order to achieve the above purpose, the present application provides the following technical solutions:
[0007] The first aspect of the present application provides a download service layered distribution method applied to a parent application distribution server, the download service layered distribution method comprising:
[0008] Receive a download request for a target application sent by any target terminal; wherein the target terminal is a terminal in each network segment of the lower layer managed by the parent application distribution server;
[0009] Determine whether there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs; wherein a temporary distribution service node for the target application corresponding to the network segment is a terminal that belongs to the network segment and has downloaded the target application and provides temporary distribution services;
[0010] If it is determined that there is currently no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, providing a download service to the target terminal and transmitting an update package of the target application;
[0011] Starting a temporary distribution service on the target terminal, making it a temporary distribution service node for the target application corresponding to the network segment to which it belongs;
[0012] If it is determined that there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the download request for the target application sent by the target terminal is redirected to the temporary distribution service node, so that the temporary distribution service node provides a temporary download service to the target terminal through a temporary distribution service and transmits the update package of the target application.
[0013] Optionally, in the above-mentioned download service hierarchical distribution method, before determining whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the method further includes:
[0014] Determine whether the IP address of the target terminal is within a pre-configured downloadable network segment; if it is determined that the IP address of the target terminal is within the pre-configured downloadable network segment, then determine whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0015] Optionally, in the above-mentioned download service hierarchical distribution method, before determining whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the method further includes:
[0016] Determine whether there is a terminal in the network segment to which the target terminal belongs, and download the target application from the parent application distribution server;
[0017] If it is determined that a terminal in the network segment to which the target terminal belongs currently exists and downloads the target application from the parent application distribution server, the download request for the target application sent by the target terminal is added to a queue for waiting until no terminal in the network segment to which the target terminal belongs currently exists and downloads the target application from the parent application distribution server and a temporary distribution service is started, and then the determination of whether a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs currently exists is executed;
[0018] If it is determined that there is no terminal in the network segment to which the target terminal belongs, the target application is downloaded from the parent application distribution server, and then the determination of whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs is executed.
[0019] Optionally, in the above-mentioned download service hierarchical distribution method, the determining whether there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs includes:
[0020] Determine whether there is a currently valid IP address of a temporary distribution service node of the target application in the network segment to which the target terminal belongs;
[0021] If it is determined that the IP address of the temporary distribution service node of the target application in the network segment to which the target terminal belongs is recorded, it is determined that there is currently a temporary distribution service node of the target application corresponding to the network segment to which the target terminal belongs.
[0022] Optionally, in the above-mentioned download service hierarchical distribution method, after starting the temporary distribution service on the target terminal to make it a temporary distribution service node of the target application in the corresponding network segment, the method further includes:
[0023] According to the network segment to which the target terminal belongs, the address of the temporary distribution service of the target terminal is configured and maintained.
[0024] Optionally, in the above-mentioned download service hierarchical distribution method, before providing the download service to the target terminal and transmitting the update package of the target application, the method further includes:
[0025] Determine whether the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit;
[0026] If it is determined that the number of terminals currently downloading the target application from the parent application distribution server has reached the preset upper limit, the download request of the target application sent by the target terminal is added to the queue and waited until the number of terminals currently downloading the target application from the parent application distribution server does not reach the preset upper limit, and the download service is provided to the target terminal, and the update package of the target application is transmitted.
[0027] A second aspect of the present application provides a download service layered distribution device, the download service layered distribution device being a parent application distribution server, and the download service layered distribution device comprising:
[0028] A request receiving unit, configured to receive a download request for a target application sent by any target terminal; wherein the target terminal is a terminal in each network segment of the lower layer managed by the parent application distribution server;
[0029] A first determining unit is configured to determine whether there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs; wherein a temporary distribution service node for the target application corresponding to the network segment is a terminal that belongs to the network segment and has downloaded the target application and provides temporary distribution services;
[0030] a first downloading unit, configured to provide a download service to the target terminal and transmit an update package of the target application when it is determined that there is no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs;
[0031] A starting unit, configured to start a temporary distribution service on the target terminal, so that the target terminal becomes a temporary distribution service node of the target application corresponding to the network segment to which it belongs;
[0032] The second downloading unit is used to redirect the download request of the target application sent by the target terminal to the temporary distribution service node when it is determined that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, so that the temporary distribution service node provides a temporary download service to the target terminal through a temporary distribution service and transmits the update package of the target application.
[0033] Optionally, the above-mentioned download service layered distribution device further includes:
[0034] The second judgment unit is used to judge whether the IP address of the target terminal is within a pre-configured downloadable network segment; wherein, if it is judged that the IP address of the target terminal is within the pre-configured downloadable network segment, the first judgment unit executes the judgment whether there is a temporary distribution service node of the target application corresponding to the network segment to which the target terminal belongs.
[0035] Optionally, the above-mentioned download service layered distribution device further includes:
[0036] A third determining unit is configured to determine whether there is currently a terminal in the network segment to which the target terminal belongs, and download the target application from the parent application distribution server;
[0037] a first queuing unit configured to, upon determining that a terminal in the network segment to which the target terminal belongs currently downloads the target application from the parent application distribution server, add the target application download request sent by the target terminal to a queue for waiting, until no terminal in the network segment to which the target terminal belongs currently downloads the target application from the parent application distribution server and a temporary distribution service is started, at which point the first determining unit determines whether a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs currently exists;
[0038] If it is determined that there is currently no terminal in the network segment to which the target terminal belongs, the target application is downloaded from the parent application distribution server, and the first judgment unit executes the judgment whether there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0039] Optionally, in the above-mentioned download service layered distribution device, the first judgment unit includes:
[0040] a fourth determining unit, configured to determine whether a currently valid IP address of a temporary distribution service node of the target application in the network segment to which the target terminal belongs is recorded;
[0041] The determining unit is configured to determine that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs when it is determined that the IP address of the temporary distribution service node for the target application to which the target terminal belongs is currently valid is recorded.
[0042] Optionally, the above-mentioned download service layered distribution device further includes:
[0043] A configuration unit is used to configure and maintain the address of the temporary distribution service of the target terminal according to the network segment to which the target terminal belongs.
[0044] Optionally, in the above-mentioned download service layered distribution device, the device further includes:
[0045] A fifth determining unit, configured to determine whether the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit;
[0046] A second queuing unit is configured to add the download request of the target application sent by the target terminal into a queue for waiting until the number of terminals currently downloading the target application from the parent application distribution server does not reach the preset online number, and the first download unit is configured to provide the download service to the target terminal and transmit the update package of the target application.
[0047] The third aspect of the present application provides an electronic device, comprising:
[0048] a memory and a processor;
[0049] The memory is configured to store a program.
[0050] The processor is configured to execute the program, and the program is configured to implement the download service layered distribution method according to any one of the preceding aspects.
[0051] The fourth aspect of the present application provides a computer storage medium for storing a computer program, and the computer program is configured to be executed by a processor to implement the download service layered distribution method according to any one of the preceding aspects.
[0052] The present application provides a download service hierarchical distribution method, which is applied to a mother application distribution server. In the specific distribution process, a download request for a target application sent by any target terminal is first received, wherein the target terminal is a terminal in each network segment of the lower layer managed by the mother application distribution server, so that each mother application distribution server is responsible for the terminals in a limited network segment, avoiding being responsible for the download of too many terminals and affecting the download speed. Then, it is determined whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs. Among them, the temporary distribution service node for the target application corresponding to a network segment is a terminal that belongs to the network segment, has downloaded the target application, and provides temporary distribution services. If it is determined that there is no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, a download service is provided to the target terminal, and the update package of the target application is transmitted, and a temporary distribution service is started on the target terminal, making it a temporary distribution service node for the target application corresponding to the network segment to which it belongs. If it is determined that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the download request for the target application sent by the target terminal will be redirected to the temporary distribution service node, so that the temporary distribution service node can provide the target terminal with a temporary download service through the temporary distribution service and transmit the update package of the target application. Therefore, only when there is no temporary distribution service node, it will be downloaded from the parent application distribution server. As a result, only a small number of terminal download requests are processed by the parent application distribution server, while most of the terminal download requests are processed by the temporary distribution service node in the same network segment. The terminals in the same network segment belong to the same local area network and have a faster download speed. Therefore, effective updates of all terminals in the entire enterprise can be efficiently achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0054] Figure 1 A flowchart of a method for layered distribution of download services provided in an embodiment of the present application;
[0055] Figure 2 A schematic diagram of an example of network segment division provided in an embodiment of the present application;
[0056] Figure 3 A schematic diagram of the architecture of a download service layered distribution device provided in an embodiment of the present application;
[0057] Figure 4 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0059] In this application, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0060] The embodiment of the present application provides a download service layered distribution method, which is applied to the parent application distribution server. Figure 1 As shown, the download service layered distribution method provided in the embodiment of the present application includes the following steps:
[0061] S101: Receive a download request for a target application sent by any target terminal.
[0062] The target terminals are those in the various network segments of the lower layer managed by the parent application distribution server. Therefore, the parent application distribution server is a server in the upper layer, and multiple terminals in the lower layer are connected to it. In other words, the parent application distribution server and the terminals it manages are interconnected. However, the terminals in the lower layer may belong to different organizations, so there may be terminals in different network segments.
[0063] Therefore, in order to determine the parent application distribution server, the terminals managed by the parent application distribution service, and the network segments to which each terminal belongs, etc., it is optional to first determine the internal network architecture and terminal distribution information of the enterprise, so as to facilitate the sorting out of relevant information such as the location and IP address range of different organizations and different terminals within the enterprise. Specifically, it may include but is not limited to the network segment information of each organization, such as the starting address of the network segment, the number of terminal IPs that can be allocated, the number of terminals currently in use, etc., as well as actual information such as the intercommunication status between different network segments.
[0064] Based on the information collated above, software distribution rules can be set, including but not limited to network access rules, data transmission control rules between network segments, and the download protocol used. For example, only HTTP data transmission between terminals within a specific network segment is allowed, and the corresponding policy control methods are used to implement layered distribution of application services. In addition, a parent application distribution server can be set up, network segments can be divided, etc. Among them, the parent application distribution server is the source application distribution server, and its role is to provide a source download file task list and its corresponding software, and provide download service capabilities. Based on the software distribution rules set above, the relevant configuration control is specifically implemented to achieve software distribution.
[0065] Therefore, for each target terminal of a parent application distribution server, when it needs to download an application for update, it needs to send a download request for the application to the parent application distribution server. Optionally, for a target terminal, it can periodically initiate a request to download the update package to the parent application distribution server after the operating system is started, or a user can actively trigger the request to download the current update package to the parent application distribution server. At this time, the parent application distribution server receives the download request for the target application sent by the target terminal.
[0066] S102: Determine whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0067] The temporary distribution service node of the target application corresponding to a network segment is a terminal that belongs to the network segment and has downloaded the target application and started the temporary distribution service.
[0068] It should be noted that each network segment is pre-divided based on the network segment information of each terminal, and each terminal in the same network segment belongs to the same regional network. Figure 2 As shown in the figure, under the parent application distribution server S (59.184.1.1.112), the network segment can be divided into County Company A and County Company B. County Company A's network segment is: 59.168.1.0 / 25 and County Company B's network segment is: 59.138.1.128 / 25. Terminals A1 (59.168.1.2) and A2 (59.168.1.3) under County Company A both belong to County Company A's network segment (59.168.1.0 / 25).
[0069] Since the regional network has a relatively high broadband configuration, that is, the terminals in the same regional network have a relatively high data transmission speed. Therefore, in the embodiment of the present application, a temporary distribution service is started in the terminal that has downloaded the target application in each network segment, so that the terminal is used as a temporary distribution service node for the target application corresponding to the network segment, that is, relative to the fixed application distribution node of the parent application distribution server, it is used as a temporary distribution node, so that the terminal can distribute the target application to other terminals in the network segment through the temporary distribution service, and then can achieve rapid application updates with the help of the relatively high broadband configuration in the network segment. Optionally, the temporary distribution service node for the target application corresponding to a network segment can include only one or more.
[0070] Optionally, for a temporary distribution service node, it may become invalid after the application has been further updated, or after the validity period has expired, or after a specific event, such as the terminal has been restarted or all terminals in the network segment have been updated, that is, it will no longer serve as a temporary distribution service node to provide temporary distribution services for the target application.
[0071] Optionally, in order to avoid the temporary distribution service corresponding to a network segment needing to distribute applications to a large number of terminals, the enlarged network segment, that is, the network segment containing a larger number of terminals, can be split into multiple network segments. For example, for the 59.168.2.0 / 24 network segment, it can be split into: 56.168.2.0 / 25 and 56.168.2.128 / 25, thereby reducing the number of terminals included in a network segment and correspondingly increasing the number of sub-download points, that is, the number of temporary distribution service nodes. Therefore, the stability of the network can be guaranteed, and the needs of multi-point distribution can be flexibly realized, thereby providing overall download efficiency.
[0072] Therefore, for a target terminal, the download speed from the temporary distribution service node corresponding to the network segment to which it belongs is much faster than the download speed from the parent application distribution server. In addition, since the parent application distribution server manages more terminals, in order to avoid too many terminals downloading from the parent application distribution server, increasing the load of the parent application distribution server and causing broadband congestion, affecting the download speed of the temporary distribution service node, when a target terminal needs to download an application, the parent application distribution server will give priority to it to download from the corresponding temporary distribution service node. Therefore, at this time, it will be determined whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0073] If it is determined that there is no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, that is, the target terminal is the first terminal in the network segment to request downloading the target application, or the temporary distribution service node in the network segment has expired, then downloading can only be done from the parent application distribution server, so step S103 is executed. If it is determined that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, step S105 can be executed.
[0074] Optionally, in another embodiment of the present application, a specific implementation of step S102 includes:
[0075] It is determined whether a currently valid IP address of a temporary distribution service node of a target application in a network segment to which the target terminal belongs is recorded.
[0076] In order to facilitate forwarding the request to the temporary distribution service node, the IP address of the temporary distribution service node of the target application will be recorded. Therefore, if it is determined that the IP address of the temporary distribution service node of the target application of the network segment to which the currently valid target terminal belongs is recorded, it is determined that there is a temporary distribution service node of the target application corresponding to the network segment to which the target terminal belongs.
[0077] Specifically, in order to determine the status of the temporary distribution service of each temporary distribution service node in a timely manner, it is necessary to continuously monitor the download service status of each network segment to ensure the normal operation of the service and to handle possible failures or abnormal situations in a timely manner.
[0078] Optionally, in another embodiment of the present application, before executing step S102, the process further includes:
[0079] Determine whether the IP address of the target terminal is within the pre-configured downloadable network segment.
[0080] To ensure that the parent application distribution server only handles download requests from terminals within the corresponding network segment, thereby preventing it from handling too many terminals' download traffic, the parent application distribution server's downloadable network segment is preconfigured. Therefore, it is necessary to determine whether the target terminal's IP address is within the preconfigured downloadable network segment. If the target terminal's IP address is within the preconfigured downloadable network segment, step S102 is performed.
[0081] Optionally, considering that a terminal in the network segment to which the target terminal belongs is already downloading the target application and the temporary distribution service has not yet been started, a temporary distribution service node can then provide the application distribution service. In order to avoid too many terminals downloading from the parent application distribution server, thereby affecting the download speed, in another embodiment of the present application, before executing step S102, the following steps are further performed:
[0082] Determine whether there is a terminal in the network segment to which the target terminal belongs, and download the target application from the parent application distribution server.
[0083] If it is determined that there is a terminal in the network segment to which the target terminal belongs, and the target application is downloaded from the parent application distribution server, the download request of the target application sent by the target terminal is added to the queue and waited until there is no terminal in the network segment to which the target terminal belongs, the target application is downloaded from the parent application distribution server, and the temporary distribution service is started, and then step S102 is executed.
[0084] If it is determined that there is no terminal in the network segment to which the target terminal belongs, the target application is downloaded from the parent application distribution server, and step S102 is directly executed.
[0085] S103: Provide download service to the target terminal and transmit the update package of the target application.
[0086] Since there is no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, it can only be downloaded from the parent application distribution server. Therefore, the parent application distribution server responds to the download request of the target terminal and transmits the update package of the target application to the target terminal through the download server. For example, Figure 2 As shown, after terminal A1 sends a download request to the parent application distribution server S, if there is no corresponding temporary distribution service node in the field of County A Company, the parent application distribution server S directly provides download service to terminal A1 and transmits the update package of the target application.
[0087] Optionally, in order to avoid too many applications being downloaded from the parent application distribution server at the same time, which would affect the download rate, in another embodiment of the present application, before executing step S103, the following steps may be further included:
[0088] Determine whether the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit.
[0089] If it is determined that the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit, the download request for the target application sent by the target terminal is added to a queue for waiting until the number of terminals currently downloading the target application from the parent application distribution server does not reach the preset upper limit, and then step S103 is executed. If it is determined that the number of terminals currently downloading the target application from the parent application distribution server does not reach the preset upper limit, step S103 is executed.
[0090] S104: Start a temporary distribution service on the target terminal, making it a temporary distribution service node of the target application corresponding to the network segment.
[0091] Since there's no temporary distribution service node for the target application corresponding to the target terminal's network segment at this point, it's necessary to activate the temporary distribution service on the target terminal, making it the temporary distribution service node for the target application corresponding to its network segment, allowing it to distribute applications to other terminals in the same network segment. Optionally, the parent application distribution server can trigger the target terminal to activate the temporary distribution service, or the target terminal can automatically activate the temporary distribution service after downloading the target application's update package.
[0092] Specifically, after the temporary service environment, including the network environment and file storage, is ready, the temporary service is immediately started and its availability is continuously monitored so as to be able to respond to download requests from other terminals in the same network segment in a timely manner.
[0093] Optionally, in another embodiment of the present application, after executing step S104, the following steps are further included:
[0094] Configure and maintain the temporary distribution service address of the target terminal based on the network segment to which the target terminal belongs.
[0095] It should be noted that in order to ensure that the temporary distribution service address of the target terminal is accessible in the local area network of the network segment to which it belongs, it is necessary to configure and maintain the temporary distribution service address of the target terminal based on the network segment to which the target terminal belongs. Figure 2 The URL of the temporary distribution service configuration of terminal A1 is "http: / / 59.168.1.2".
[0096] S105: redirect the download request of the target application sent by the target terminal to the temporary distribution service node, so that the temporary distribution service node provides a temporary download service to the target terminal through the temporary distribution service and transmits the update package of the target application.
[0097] Since a temporary distribution service node already exists at this time, the temporary distribution service node can provide download services, so the download request is redirected to the temporary distribution service address of the temporary distribution service node, so that the temporary distribution service node can provide temporary download services to the target terminal through the temporary distribution service and transmit the update package of the target application. Figure 2 As shown, when terminal A2 in the same network segment as terminal A1 initiates a download request, the parent application distribution server redirects the download request of terminal A2 to the URL of A1's temporary distribution service (http: / / 59.168.1.2).
[0098] Optionally, a temporary distribution service may be started on the target terminal at this time, so that the target terminal also becomes a temporary distribution service node of the network segment to which it belongs.
[0099] An embodiment of the present application provides a hierarchical distribution method for download services, which is applied to a mother application distribution server. In a specific distribution process, a download request for a target application sent by any target terminal is first received, wherein the target terminal is a terminal within each network segment of the lower layer managed by the mother application distribution server, so that each mother application distribution server is responsible for the terminals within a limited network segment, avoiding being responsible for the download of too many terminals and affecting the download speed. Then, it is determined whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs. Among them, the temporary distribution service node for the target application corresponding to a network segment is a terminal that belongs to the network segment, has downloaded the target application, and provides temporary distribution services. If it is determined that there is no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, a download service is provided to the target terminal, and the update package of the target application is transmitted, and a temporary distribution service is started on the target terminal, making it a temporary distribution service node for the target application corresponding to the network segment to which it belongs. If it is determined that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the download request for the target application sent by the target terminal will be redirected to the temporary distribution service node, so that the temporary distribution service node can provide the target terminal with a temporary download service through the temporary distribution service and transmit the update package of the target application. Therefore, only when there is no temporary distribution service node, it will be downloaded from the parent application distribution server. As a result, only a small number of terminal download requests are processed by the parent application distribution server, while most of the terminal download requests are processed by the temporary distribution service node in the same network segment. The terminals in the same network segment belong to the same local area network and have a faster download speed. Therefore, effective updates of all terminals in the entire enterprise can be efficiently achieved.
[0100] Another embodiment of the present application provides a download service layered distribution device, which is a parent application distribution server. Figure 3 As shown, the download service layer distribution device includes:
[0101] The request receiving unit 301 is configured to receive a download request for a target application sent by any target terminal.
[0102] The target terminals are terminals in each network segment of the lower layer managed by the parent application distribution server.
[0103] The first determining unit 302 is configured to determine whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs. A temporary distribution service node for the target application corresponding to a network segment is a terminal that belongs to the network segment and has downloaded the target application and provides temporary distribution services.
[0104] The first downloading unit 303 is configured to provide a download service to the target terminal and transmit an update package of the target application when it is determined that there is no temporary distribution service node of the target application corresponding to the network segment to which the target terminal belongs.
[0105] The starting unit 304 is configured to start a temporary distribution service on the target terminal, so that the target terminal becomes a temporary distribution service node of the target application corresponding to the network segment.
[0106] The second downloading unit 305 is used to redirect the download request of the target application sent by the target terminal to the temporary distribution service node when it is determined that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, so that the temporary distribution service node can provide a temporary download service to the target terminal through the temporary distribution service and transmit the update package of the target application.
[0107] Optionally, in the download service layered distribution device provided in another embodiment of the present application, the device further includes:
[0108] The second judgment unit is configured to judge whether the IP address of the target terminal is within a pre-configured downloadable network segment. If the IP address of the target terminal is within the pre-configured downloadable network segment, the first judgment unit determines whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0109] Optionally, in the download service layered distribution device provided in another embodiment of the present application, the device further includes:
[0110] The third judgment unit is used to judge whether there is a terminal in the network segment to which the target terminal belongs, and download the target application from the parent application distribution server.
[0111] The first queuing unit is used to add the target application download request sent by the target terminal to the queue for waiting when it is determined that there is a terminal in the network segment to which the target terminal belongs, downloading the target application from the parent application distribution server, until there is no terminal in the network segment to which the target terminal belongs, downloading the target application from the parent application distribution server, and starting the temporary distribution service. The first judgment unit then executes to determine whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0112] If it is determined that there is no terminal in the network segment to which the target terminal belongs, the target application is downloaded from the parent application distribution server, and the first determination unit determines whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
[0113] Optionally, in the download service layered distribution device provided in another embodiment of the present application, the first judgment unit includes:
[0114] The fourth determining unit is configured to determine whether the IP address of the temporary distribution service node of the target application in the network segment to which the target terminal belongs that is currently valid is recorded.
[0115] The determining unit is configured to determine the temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs when determining that the IP address of the temporary distribution service node for the target application for the network segment to which the target terminal belongs is currently recorded.
[0116] Optionally, in the download service layered distribution device provided in another embodiment of the present application, the device further includes:
[0117] The configuration unit is used to configure and maintain the address of the temporary distribution service of the target terminal according to the network segment to which the target terminal belongs.
[0118] Optionally, in another embodiment of the present application, the download service layered distribution device further includes:
[0119] The fifth determining unit is configured to determine whether the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit.
[0120] The second queuing unit is used to add the download request of the target application sent by the target terminal to the queue for waiting when it is determined that the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit, until the number of terminals currently downloading the target application from the parent application distribution server does not reach the preset upper limit, and the first downloading unit executes to provide download services to the target terminal and transmit the update package of the target application.
[0121] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the implementation process of the corresponding steps in the above method embodiments, and will not be repeated here.
[0122] Another embodiment of the present application provides an electronic device, such as Figure 4 Shown, including:
[0123] Memory 401 and processor 402 .
[0124] The memory 401 is used to store programs.
[0125] The processor 402 is used to execute the program stored in the memory 401. When the program is executed, it is specifically used to implement the download service layered distribution method provided by any one of the above embodiments.
[0126] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed by a processor, it is used to implement the download service layered distribution method provided in any of the above embodiments.
[0127] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0128] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0129] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A download service layered distribution method, characterized in that: Applied to a parent application distribution server, the download service hierarchical distribution method includes: Receive a download request for a target application sent by any target terminal; wherein the target terminal is a terminal in each network segment of the lower layer managed by the parent application distribution server; Determine whether there is a terminal in the network segment to which the target terminal belongs, and download the target application from the parent application distribution server; If it is determined that there is currently a terminal in the network segment to which the target terminal belongs, downloading the target application from the parent application distribution server, then adding the target application download request sent by the target terminal to a queue for waiting until there is currently no terminal in the network segment to which the target terminal belongs, downloading the target application from the parent application distribution server, and starting a temporary distribution service; If it is determined that no terminal currently exists in the network segment to which the target terminal belongs, the target application is downloaded from the parent application distribution server, or after the temporary distribution service is started, it is determined whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs; wherein a temporary distribution service node for the target application corresponding to the network segment is a terminal that belongs to the network segment and has downloaded the target application and provides temporary distribution service; If it is determined that there is currently no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, providing a download service to the target terminal and transmitting an update package of the target application; Starting a temporary distribution service on the target terminal, making it a temporary distribution service node for the target application corresponding to the network segment to which it belongs; If it is determined that there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the download request for the target application sent by the target terminal is redirected to the temporary distribution service node, so that the temporary distribution service node provides a temporary download service to the target terminal through a temporary distribution service and transmits the update package of the target application.
2. The method according to claim 1, characterized in that Before determining whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, the method further includes: Determine whether the IP address of the target terminal is within a pre-configured downloadable network segment; if it is determined that the IP address of the target terminal is within the pre-configured downloadable network segment, then determine whether there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs.
3. The method according to claim 1, characterized in that The determining whether there is currently a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs includes: Determine whether there is a currently valid IP address of a temporary distribution service node of the target application in the network segment to which the target terminal belongs; If it is determined that the IP address of the temporary distribution service node of the target application in the network segment to which the target terminal belongs is recorded, it is determined that there is currently a temporary distribution service node of the target application corresponding to the network segment to which the target terminal belongs.
4. The method according to claim 1, wherein After the temporary distribution service is started on the target terminal so that the target terminal becomes a temporary distribution service node of the target application in the corresponding network segment, the method further includes: According to the network segment to which the target terminal belongs, the address of the temporary distribution service of the target terminal is configured and maintained.
5. The method according to claim 1, wherein Before providing the download service to the target terminal and transmitting the update package of the target application, the method further includes: Determining whether the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit; If it is determined that the number of terminals currently downloading the target application from the parent application distribution server has reached a preset upper limit, the download request of the target application sent by the target terminal is added to a queue for waiting until the number of terminals currently downloading the target application from the parent application distribution server does not reach the preset upper limit, and the download service is provided to the target terminal, and the update package of the target application is transmitted.
6. A download service layered distribution device, characterized in that: The download service layered distribution device is a parent application distribution server, and the download service layered distribution device includes: A request receiving unit, configured to receive a download request for a target application sent by any target terminal; wherein the target terminal is a terminal in each network segment of the lower layer managed by the parent application distribution server; A third determining unit is configured to determine whether there is currently a terminal in the network segment to which the target terminal belongs, and download the target application from the parent application distribution server; a first queuing unit configured to, upon determining that a terminal in the network segment to which the target terminal belongs currently downloads the target application from the parent application distribution server, add the target application download request sent by the target terminal to a queue for waiting until no terminal in the network segment to which the target terminal belongs currently exists, download the target application from the parent application distribution server, and initiate a temporary distribution service; A first determining unit is configured to, upon determining that no terminal currently exists within the network segment to which the target terminal belongs, determine whether a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs currently exists when downloading the target application from the parent application distribution server or after initiating a temporary distribution service; wherein a temporary distribution service node for the target application corresponding to a network segment is a terminal that belongs to the network segment and has downloaded the target application and provides a temporary distribution service; a first downloading unit, configured to provide a download service to the target terminal and transmit an update package of the target application when it is determined that there is no temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs; A starting unit, configured to start a temporary distribution service on the target terminal, so that the target terminal becomes a temporary distribution service node of the target application corresponding to the network segment to which it belongs; The second downloading unit is used to redirect the download request of the target application sent by the target terminal to the temporary distribution service node when it is determined that there is a temporary distribution service node for the target application corresponding to the network segment to which the target terminal belongs, so that the temporary distribution service node provides a temporary download service to the target terminal through a temporary distribution service and transmits the update package of the target application.
7. The device according to claim 6, characterized in that Also includes: The second judgment unit is used to judge whether the IP address of the target terminal is within a pre-configured downloadable network segment; wherein, if it is judged that the IP address of the target terminal is within the pre-configured downloadable network segment, the first judgment unit executes the judgment whether there is a temporary distribution service node of the target application corresponding to the network segment to which the target terminal belongs.
8. An electronic device, characterized in that: include: memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the download service layered distribution method according to any one of claims 1 to 5.
9. A computer storage medium, characterized in that Used to store a computer program, which, when executed by a processor, is used to implement the download service layered distribution method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Terminal system version downloading method, device and system based on peer-to-peer network thought
CN110602232A
P2p terminal and content distribution system
JP2012073664A