The present invention relates to the field of communications technologies, and in particular, to a software download method and apparatus.
As a service activation standard of an open mobile architecture (Open Mobile Architecture, called OMA for short in the following), a software component management object (Software Component Management Object, called SCOMO for short in the following) allows a corresponding management authority to remotely send and manage software, such as an application and a library, on each connected device. The software can be delivered to a terminal through a device management (Device Management, called DM for short in the following) download mode and a non-DM download mode. The DM download mode is that a server directly delivers a software package to a data (Date) node for saving, by using a replace (Replace) command. The non-DM download mode is that, after a server triggers a download operation in an operation (Operation) sub-tree, the terminal directly utilizes an address indicated by a download address (PkgURL) to download the software. Definitely, the software described in the present invention also includes an ordinary software component.
After a terminal becomes a member of a terminal list managed by a gateway, a DM session needs to be relayed by the gateway, and a fanout (Fanout) mechanism needs to be used when a device fanout command is sent to multiple terminals simultaneously, where a Fanout management object (Management Object, called MO for short in the following) is saved in the gateway. When the multiple terminals use the same software, the gateway can provide a local storage function, where the server delivers data to the gateway first to enable the terminal to acquire the data from the gateway.
During implementation of the present invention, the inventor finds that the prior art at least has the following technical problems: when a terminal acquires the data from a gateway, the gateway in the prior art does not parse a DM command in a fanout command (FanoutCommands) saved locally, but only places the DM command into a new DM message and sends the new DM message to the terminal, so that the terminal is unable to directly acquire the data saved in the gateway, according to a software identifier (ImageID) or a software download address (ImageURL) in the fanout command, and the terminal still needs to download the data from a remote server, thereby wasting the bandwidth and reducing the efficiency. Especially, in some scenarios, the terminal does not have a capability of connecting to an external network, and is unable to download the data from the remote server, so that the objective of managing a device cannot be achieved.
Embodiments of the present invention provide a software download method and apparatus, so as to prevent a terminal from directly downloading software from a remote server, ensure that a terminal incapable of connecting to an external network can be managed, and improve the efficiency.
In order to achieve the objective, an embodiment of the present invention provides a software download method, which includes:
acquiring a fanout command and a replacement instruction that are delivered by a device management server, and replacing, according to the replacement instruction, a software identifier in the fanout command with a software local download address generated for software; and
delivering the converted fanout command to each corresponding terminal, so that each terminal downloads the software according to the software local download address.
An embodiment of the present invention provides another software download method, which includes:
acquiring a fanout command delivered by a device management server, where the fanout command carries a software local download address generated for software; and
delivering the fanout command to each corresponding terminal, so that each terminal downloads the software according to the software local download address.
An embodiment of the present invention provides a software download apparatus, which includes:
a conversion module, configured to acquire a fanout command and a replacement instruction that are delivered by a device management server, and replace, according to the replacement instruction, a software identifier in the fanout command with a software local download address generated for software; and
a first download module, configured to deliver the converted fanout command to each corresponding terminal, so that each terminal downloads the software according to the software local download address.
An embodiment of the present invention provides another software download apparatus, which includes:
an acquisition module, configured to acquire a fanout command delivered by a device management server, where the fanout command carries a software local download address generated for software; and
a second download module, configured to deliver the fanout command to each corresponding terminal, so that each terminal downloads the software according to the software local download address.
In the software download method and apparatus provided by the embodiments of the present invention, a new software local download address is allocated to the software, so that each terminal can download data of the software from a local network according to the software local download address, so as to efficiently prevent multiple terminals from directly retrieving data externally, and utilize a local storage function provided by a device management gateway to directly acquire download data of the software from the local network, thereby significantly improving the efficiency. Particularly, in a situation that some internal network terminals are unable to access an external network, successful management on terminal devices can also be ensured.
To illustrate the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description show some embodiments of the present invention, and persons of ordinary skill in the art can derive other drawings from these accompanying drawings without creative efforts.
To make the objectives, technical solutions, and advantages of the present invention more comprehensible, the following clearly and completely describes the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the embodiments in the following description are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
Step 101: A device management gateway acquires a fanout command and a replacement instruction that are delivered by a device management server, and replaces, according to the replacement instruction, a software identifier in the fanout command with a software local download address generated for software.
In this embodiment, in addition to the fanout command, the device management server DM Server also delivers the replacement instruction to the device management gateway (DM Gateway). The replacement instruction can be delivered to a fanout management sub-tree of the device management gateway and the fanout command can be delivered to a fanout management sub-tree of the device management gateway in the same manner, where the acquired fanout command carries the software identifier. After the device management gateway receives, from the management server, a request of executing the fanout command, the device management gateway performs conversion processing on the fanout command according to the replacement instruction, that is, replaces the software identifier in the fanout command with the software local download address (LocalImageURL), where the software local download address is an actual download address that is in a local network of the device management gateway and is allocated to the software by the device management gateway according to the software identifier. The software in this embodiment may be any data that can be downloaded, such as firmware, an application, a library file and an image file. In this embodiment, the software local download address generated for the software may be a local storage address of the device management gateway, and may also be an address of another storage server in the local network of the device management gateway.
In each embodiment of the present invention, the device management server may also deliver a target terminal group identifier or a target terminal list used to indicate each terminal corresponding to the fanout command, where the target terminal group identifier or the target terminal list may be delivered through the fanout command, and may also be delivered alone by the DM server.
Step 102: The device management gateway delivers the converted fanout command to each corresponding terminal, so that each terminal downloads the software according to the software local download address.
After performing the conversion processing on the acquired fanout command, the device management gateway delivers the converted fanout command to each corresponding terminal, so that each terminal can download the software according to the software local download address carried in the converted fanout command without directly accessing the device management server in a network.
With the software download method provided by this embodiment, the replacement instruction is carried in the fanout command delivered by the device management server and the software identifier in the fanout command is replaced with the software local download address, so that each terminal can download data of the software by using a local storage function provided by the device management gateway, so as to effectively prevent multiple terminals from directly retrieving the data externally, thereby significantly improving the efficiency. Particularly, in the situation that some internal network terminals are unable to access an external network, successful management on devices can be ensured.
Step 201: A device management server creates a sub-tree in a software directory management sub-tree and delivers software to a device management gateway.
Step 202: The device management gateway generates an software identifier for corresponding to the software.
After acquiring the software from the software remote download address and caching the software, the device management gateway allocates the software identifier to the software that is locally cached. In this case, the device management gateway may also allocate a local download address to the cached software and save the cached software locally, that is, allocate a storage space on the device management gateway or another storage server in a local network of the device management gateway to the software.
Step 203: The device management gateway returns the software identifier to the device management server.
The device management gateway returns the generated software identifier of the software to the device management server, for the device management server to create a sub-tree in a fanout management sub-tree in the subsequent step 204.
Step 204: The device management server creates a sub-tree in the fanout management sub-tree, and configures a fanout command, a target terminal group identifier or a target terminal list, and a replacement instruction.
The device management server creates the sub-tree in the fanout management sub-tree and configures the fanout command, the target terminal group identifier, and the replacement instruction. Here, the configuration operation may be a creation or update operation. When the sub-tree exists, content of the sub-tree is directly updated; when the sub-tree does not exist, the sub-tree needs to be created.
Step 205: The device management server delivers a request of executing a fanout operation to the device management gateway.
The device management server can deliver the request of executing the fanout operation to the device management gateway, so as to request the device management gateway to execute a fanout operation. Specifically, the device management server delivers an execution command to a fanout operation start node (Start) in a fanout command sub-tree, so as to request the device management gateway to execute the fanout operation.
Step 206: The device management gateway acquires each corresponding terminal according to the target terminal identifier or the target terminal list.
The device management gateway obtains, according to the acquired target terminal identifier, a terminal list corresponding to the target terminal identifier, where the terminal list is a list of terminals that need to download the software; and acquires each corresponding terminal through the terminal list. Alternatively, the device management gateway directly acquires each corresponding terminal according to the target terminal list.
Step 207: The device management gateway sends a DM notification to each terminal in the terminal list, so as to establish a DM session with each terminal.
After obtaining the corresponding terminal list, the device management gateway sends the DM notification to each terminal in the terminal list, and wakes the terminal up according to the DM notification, so as to establish a DM management session between the device management gateway and each terminal.
Step 208: The device management gateway generates a software local download address for the software.
The device management gateway acquires, according to the acquired fanout command, the software identifier carried in the fanout command, and generates the software local download address for the software in the local network of the device management gateway according to the software identifier, that is, allocates a storage space on the device management gateway or another storage server in the local network of the device management gateway to the software, and generates the corresponding local download address. Alternatively, in this embodiment, the software local download address may also be generated in step 202, and in this case, step 208 may be omitted.
Step 209: The device management gateway replaces the software identifier in the fanout command with the software local download address according to the replacement instruction.
According to the acquired replacement instruction, the device management gateway performs conversion processing on the acquired fanout command, replaces the software identifier carried in the acquired fanout command with the generated software local download address, and generates a converted fanout command.
Step 210: The device management gateway delivers the converted fanout command to each terminal.
The device management gateway delivers the converted fanout command to each terminal, and the fanout command carries the software local download address.
Step 211: Each terminal downloads the software according to the software local download address.
Specifically, this embodiment may be implemented through the following program:
With the software download method provided by this embodiment, the replacement instruction is carried in the fanout command delivered by the device management server and the software identifier in the fanout command is replaced with the software local download address, so that each terminal can download data of the software by using the local storage function provided by the device management gateway, so as to effectively prevent multiple terminals from directly retrieving the data externally, thereby significantly improving the efficiency. Particularly, in the situation that some internal network terminals are unable to access an external network, successful management on devices can be ensured.
Step 501: A device management gateway acquires a fanout command delivered by a device management server, where the fanout command carries a software local download address generated for software.
In this embodiment, the device management gateway acquires the fanout command from the device management server, where the fanout command carries the software local download address, and the software local download address is generated for the software by the device management gateway. In this embodiment, the software local download address generated for the software may be a local storage address of the device management gateway, and may also be an address of another storage server in a local network of the device management gateway. A main difference between this embodiment and Embodiment 1 is that, the device management gateway generates the software local download address first and returns the software local download address to the device management server, and the device management server directly carries the software local download address in the fanout command for delivery.
Step 502: The device management gateway delivers the fanout command to each corresponding terminal, so that each terminal downloads the software according to the software local download address.
After acquiring the fanout command delivered by the device management server, the device management gateway does not need to parse the fanout command, and directly forwards the fanout command to each corresponding terminal. Each terminal can download the software from the local network of the device management gateway according to the software local download address carried in the fanout command, and does not need to access a remote file server.
With the software download method provided by this embodiment, the software local download address generated for the software by the device management gateway is directly carried in the fanout command delivered by the device management server, so that each terminal can utilize a local storage function provided by the device management gateway to directly acquire download data of the software from the local network of the device management gateway, so as to effectively prevent multiple terminals from directly retrieving the data externally, thereby significantly improving the efficiency. Particularly, in the situation that some internal network terminals are unable to access an external network, successful management on devices can be ensured.
Step 601: A device management server creates a sub-tree in a software directory management sub-tree, delivers software to a device management gateway and caches the software. This step may be similar to step 201, and details are not described here again.
Step 602: The device management gateway generates a corresponding software local download address for the software.
The device management gateway allocates a local download address to the cached software and saves the cached software locally, that is, allocates a storage space on the device management gateway or another storage server in a local network of the device management gateway to the software.
Step 603: The device management gateway returns the software local download address to the device management server.
Step 604: The device management server creates a sub-tree in a fanout management sub-tree, and configures a fanout command and a target terminal group identifier or a target terminal list, where the fanout command carries the software local download address.
The device management server creates the sub-tree in the fanout management sub-tree and configures the fanout command and the target terminal group identifier. Here, the configuration operation may be a creation or update operation. When the sub-tree exists, content of the sub-tree is directly updated; when the sub-tree does not exist, the sub-tree needs to be created. The fanout command carries the generated software local download address. The target terminal group identifier or the target terminal list is acquired locally by the device management server according to a specific situation. Multiple target terminal groups are already saved on the device management server, and the target terminal group identifier or the target terminal list may be directly acquired by the device management server according to requirements.
Step 605: The device management server delivers a request of executing a fanout operation to the device management gateway. This step may be similar to step 205 and details are not described here again.
Step 606: The device management gateway acquires each corresponding terminal according to the target terminal group identifier or the target terminal list. This step may be similar to step 206 and details are not described here again.
Step 607: The device management gateway sends a DM notification to each terminal in the terminal list, so as to establish a DM session with each terminal. This step may be similar to step 205 and details are not described here again.
Step 608: The device management gateway delivers the fanout command to each corresponding terminal, where the fanout command carries the software local download address.
Step 609: Each terminal downloads the software according to the software local download address.
Specifically, this embodiment may be implemented through the following program:
With the software download method provided by this embodiment, the software local download address generated for the software by the device management gateway is directly carried in the fanout command delivered by the device management server, so that each terminal can utilize a local storage function provided by the device management gateway to directly acquire download data of the software from the local network of the device management gateway, so as to effectively prevent multiple terminals from directly retrieving the data externally, thereby significantly improving the efficiency. Particularly, in the situation that some internal network terminals are unable to access an external network, successful management on devices can be ensured.
Persons of ordinary skill in the art may understand that all or part of the steps of the method embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program runs, the above steps of the method embodiments are performed. The storage medium may be any medium capable of storing program codes, such as ROM, RAM, magnetic disk, or optical disk.
Furthermore, the software download apparatus provided by this embodiment may further include a second receiving module 905. The second receiving module 905 is configured to receive a request of executing a fanout operation, where the request is delivered by the device management server. The device management server configures a node corresponding to the fanout command, a node corresponding to a target terminal group identifier or a target terminal list, and a node corresponding to the replacement instruction in a fanout management sub-tree.
Furthermore, the first download module 902 in this embodiment may specifically include a first query unit 912 and a first download unit 922. The first query unit 912 is configured to acquire each corresponding terminal according to the target terminal group identifier or the target terminal list and send a device management notification to each terminal, so as to establish a device management session with each terminal. The first download unit 922 is configured to deliver the converted fanout command to each terminal through the established device management session.
With the software download apparatus provided by this embodiment, the replacement instruction is carried in the fanout command delivered by the device management server and the software identifier in the fanout command is replaced with the software local download address, so that each terminal can download data of the software by using a local storage function provided by the device management gateway, so as to effectively prevent multiple terminals from directly retrieving the data externally, thereby significantly improving the efficiency. Particularly, in the situation that some internal network terminals are unable to access an external network, successful management on devices can be ensured.
Furthermore, the software download apparatus provided by this embodiment may further include a fourth receiving module 1105. The fourth receiving module 1105 is configured to receive a request of executing a fanout operation, where the request is delivered by the device management server. The device management server configures a node corresponding to the fanout command and a node corresponding to a target terminal group identifier or a target terminal list in a fanout management sub-tree.
Specifically, the second download module 1102 in this embodiment may specifically include a second query unit 1112 and a second download unit 1122. The second query unit 1112 is configured to acquire each corresponding terminal according to the target terminal group identifier or the target terminal list and send a device management notification to each terminal, so as to establish a device management session with each terminal. The second download unit 1122 is configured to deliver the converted fanout command to each terminal through the established device management session.
With the software download apparatus provided by this embodiment, the software local download address generated for the software by the device management gateway is directly carried in the fanout command delivered by the device management server, so that each terminal can utilize a local storage function provided by the device management gateway to directly acquire download data of the software from the local network of the device management gateway, so as to effectively prevent multiple terminals from directly retrieving the data externally, thereby significantly improving the efficiency. Particularly, in the situation that some internal network terminals are unable to access an external network, successful management on devices can be ensured.
For the specific processes of implementing the method embodiments of the present invention by the relevant apparatuses of the embodiments of the present invention, reference may be made to relevant description of the method embodiments of the present invention, and details are not described here again.
Finally, it should be noted that the above embodiments are merely intended for describing the technical solutions of the present invention, but not intended to limit the present invention. Although the present invention is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments or equivalent substitutions can still be made to some technical features thereof, and such modifications or substitutions cannot make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
201010620634.9 | Dec 2010 | CN | national |
This application is a continuation of International Application No. PCT/CN2011/085134, filed on Dec. 31, 2011, which claims priority to Chinese Patent Application No. 201010620634.9, filed on Dec. 31, 2010, both of which are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2011/085134 | Dec 2011 | US |
Child | 13928599 | US |