Not applicable.
Not applicable.
Embodiments of the present invention relate to the field of communications technologies, and in particular, to a service provisioning method, device and system.
The Broadband Forum (BBF) defines a remote management protocol in its technical report TR-069. According to the protocol, an auto-configuration server (ACS) performs service provisioning for a customer premises equipment (CPE).
In the service provisioning process, multiple times of command exchange is required between the ACS and the CPE. For example, when the ACS adds a PortMapping instance on the CPE, the ACS needs to perform multiple times of query operations to determine which node the PortMapping instance needs to be added under, and then the ACS can add the PortMapping instance and set a parameter value of the PortMapping instance. The whole process includes multiple times of Remote Procedure Call Protocol (RPC) command exchange operations, and the procedure is as follows:
The process of multiple times of command exchange increases network burden, and multiple times of message exchange also causes a long service provisioning time, affecting user experience.
Embodiments of the present invention provide a service provisioning method.
In one aspect, an auto-configuration server delivers a script file to a customer premises equipment, where the script file includes at least two commands among commands required by the auto-configuration server for delivering a service to the customer premises equipment; and the auto-configuration server receives a script file execution result reported by the customer premises equipment and generated after the script file is executed.
In another aspect, a customer premises equipment acquires a script file, where the script file includes at least two commands among commands required by an auto-configuration server for delivering a service to the customer premises equipment; the customer premises equipment executes the script file and generates a script file execution result; and the customer premises equipment reports the script file execution result.
Meanwhile, an embodiment of the present invention further provides an auto-configuration server, including: a script file delivering unit configured to deliver a script file to a customer premises equipment, where the script file includes at least two commands among commands required by the auto-configuration server for delivering a service to the customer premises equipment; and a script file execution result upload command sending unit configured to send a script file execution result upload command to the customer premises equipment; or a script file execution result receiving unit configured to receive a script file execution result generated and reported by the customer premises equipment after the script file is executed.
Meanwhile, an embodiment of the present invention further provides a customer premises equipment, including: a script file receiving unit configured to receive a script file; a script file executing unit configured to execute the script file and generate a script file execution result; and a script file execution result reporting unit configured to report the script file execution result.
Meanwhile, the present invention further provides a service provisioning system, including an auto-configuration server and a customer premises equipment, where the auto-configuration server delivers a script file to the customer premises equipment, where the script file includes at least two commands among commands required by the auto-configuration server for delivering a service to the customer premises equipment; the customer premises equipment executes the script file and generates a script file execution result; and the customer premises equipment reports the script file execution result.
Through the technical solutions provided in the embodiments of the present invention, message exchange between the auto-configuration server and the customer premises equipment can be reduced, and time required for service provisioning can be reduced.
To illustrate the technical solutions according to the embodiments of the present invention more clearly, the accompanying drawings for describing the embodiments are introduced briefly in the following. The accompanying drawings in the following description are only some embodiments of the present invention, and persons of ordinary skill in the art can derive other drawings from the accompanying drawings without creative efforts.
In order to make the objectives, technical solutions, and advantages of the present invention more comprehensible, specific embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Step 101: Generate a script file. Content of the script file is at least two commands among commands required by an ACS for delivering a service to a CPE. Optionally, the script file may be automatically generated by the ACS, or manually written. Further optionally, after generation, the script file may be stored in the ACS for consequent use, or stored in a third-party device. Further optionally, at least two commands among the commands required by the ACS for delivering a service to the CPE may be RPC commands.
Step 102: The ACS delivers the script file to the CPE.
Step 103: The CPE executes the script file, and generates a script file execution result.
Step 104: The CPE reports an execution result file to the ACS.
The following describes Embodiment 2 of the present invention with reference to
Step 201: Generate a script file. Content of the script file is at least two commands among commands required by an ACS for delivering a service to CPE. Optionally, the script file may be automatically generated by the ACS, or manually written. Further optionally, after generation, the script file may be stored in the ACS for consequent use, or stored in a third-party device. Further optionally, at least two commands among the commands required by the ACS for delivering a service to the CPE may be RPC commands.
Step 202: The ACS delivers the script file to the CPE. Optionally, the delivering may be implemented through the following steps: The ACS sends a script file download command to the CPE, where the script file download command includes a specified position from which the CPE downloads the script file; after receiving the command, the CPE sends a response message to the ACS, and sends a script file download request command to the specified position according to the script file download command; and the CPE receives the script file sent from the specified position. The script file download command needs to be extended, where an enumerated value that is used for indicating the script file is added in its file type parameter.
Optionally, the script file download command may be a Download( ) RPC command, the script file download request command may be a Hypertext Transfer Protocol (HTTP) GET command, and the extension may be implemented by adding one enumerated value, indicating the script file, in a file type parameter Filetype of the Download( ) RPC command.
Step 203: The CPE executes a command in the script file, and generates a script file execution result, where the script file execution result includes a response record of execution of the command in the script file.
Step 204: The CPE determines whether a session exists currently, and if a session exists, executes step 205; if no session exists, executes step 211.
Step 211: The CPE establishes a new session, and then executes step 205. Optionally, the establishing a new session may be implemented through an Inform( ) RPC command.
Step 205: The CPE sends a script file execution complete notification message to the ACS by using the current session or the newly-established session, to notify the ACS that the script file has been executed completely, and generates the script file execution result. Optionally, the sending a script file execution complete notification message may be implemented through a TransferComplete( ) RPC command.
Step 206: The ACS determines whether a download command corresponding to the script file execution complete notification message is the extended script file download command in step 202, and if yes, executes step 207. Optionally, the determining may be implemented by determining whether a parameter value of a Command Key in the script file execution complete notification message TransferComplete( ) RPC is the same as a parameter value of a Command Key in the download command Download( ) RPC. Specifically, if the two parameter values are the same, it indicates the two correspond to each other, and step 207 is executed.
Step 207: The ACS triggers the CPE to upload the script file execution result. Optionally, the triggering may be implemented through the following step: the ACS sends a script file execution result upload command to the CPE, where the script file execution result upload command includes a specified position to which the CPE uploads the script file execution result. The script file execution result upload command needs to be extended, where an enumerated value that is used for indicating the script file is added in its file type parameter. Optionally, the script file execution result upload command may be an Upload( ) RPC command, and the extending may be implemented by adding one enumerated value, indicating the script file, in a Filetype parameter of the command.
Step 208: The CPE uploads the script file execution result according to the specified position. Optionally, after receiving the script file execution result upload command, the CPE sends a response message to the ACS, and uploads the script file execution result according to the specified position, and the procedure ends.
In the prior art, the ACS needs to perform multiple times of RPC exchange so as to deliver the service to the CPE, and the number of times of RPC command exchange between the ACS and the CPE depends on the complexity of the service. Different from the prior art, in this embodiment, the ACS can transfer, through the script file, all services, which need to be delivered, to the CPE with a fixed number of times of RPC command exchange, thereby effectively reducing message exchange between the auto-configuration server and the customer premises equipment, and reducing the time required for service provisioning.
The following describes an implementation manner of Embodiment 3 of the present invention with reference to
Step 301: Extend a data model of a CPE, and add parameter nodes related to storage and execution of a script file. Optionally, the following parameter nodes may be added:
(0 indicates that execution is in process, 1 indicates that execution is completed, and 2 indicates that a result is reported)
Step 302: Generate a script file. Content of the script file is at least two commands among commands required by an ACS for delivering a service to CPE. Optionally, the script file may be automatically generated by the ACS, or manually written. Further optionally, after generated, the script file may be stored in the ACS for consequent use, or stored in a third-party device. Further optionally, the at least two commands among the commands required by the ACS for delivering a service to the CPE may be RPC commands.
Step 303: The ACS delivers the script file to the data model of the CPE. The delivering is implemented as follows: the ACS sets a parameter node which is in the data model of the CPE and indicates the script file, that is, the ACS writes the script file in the parameter node, and sets the parameter node, which is in the data model of the CPE and is used for indicating a script execution status, to “execution is in progress”. Optionally, for an optional solution provided in step 301, the script file delivering process is to write the script file in the parameter node InternetGatewayDevice.Script.{i}.Script, and set a value of the parameter node InternetGatewayDevice.Script.{i}.Status to 0, indicating that for the script file, “execution is in progress.” Further optionally, the delivering may be implemented as follows: the ACS sends a SetParameterValues( ) RPC command to the CPE.
Step 304: The CPE pre-executes the script file, and determines whether execution of the script file can be completed immediately. Optionally, the determining may be implemented by inferring an execution time of the script file according to the number of commands in the script file; the execution time is compared with a preset threshold, and if the execution time is smaller than or equal to the threshold, it is determined that the execution of the script file can be completed immediately, and step 305 is executed; if the execution time is greater than the threshold, it is determined that the execution of the script file cannot be completed immediately, and step 311 is executed.
Step 305: The CPE executes a command in the script file, and generates a script file execution result, where the script file execution result includes a response record of the execution of the command in the script file; and writes the script file execution result in a parameter node which is in the data model of the CPE and used for storing the script file execution result, and sets a parameter node, which is in the data model of the CPE and is used for indicating a script execution status, to “execution is completed”. Optionally, for an optional solution provided in step 301, it is required to write the script file execution result in the parameter node InternetGatewayDevice.Script.{i}.ScriptResult, and set a value of the parameter node InternetGatewayDevice.Script.{i}.Status to 1, indicating that for the script file, “execution is completed.”
Step 306: The CPE returns an execution complete response message to the ACS, to notify the ACS that the execution of the script file is completed. Optionally, the response message may be a SetParameterValues Response, where status=0, indicating that the execution of the script file is completed.
Step 307: The ACS sends a script file execution result claiming command to the CPE. Optionally, the script file execution result claiming command may be a GetParameterValues( ) RPC command.
Step 308: After receiving the execution result claiming command, the CPE returns a response message to the ACS, and reports the script file execution result, and then the procedure ends. Optionally, the response message may be a Get ParameterValues Response. Further optionally, the sending the execution result may be implemented by sending, together with the response message to the ACS, a value of a parameter node which is stored in the data model of the CPE and stores the script file execution result. For the solution provided in step 301, the CPE sends, together with the GetParameterValues Response and to the ACS, an execution result stored in InternetGatewayDevice.Script.{i}.ScriptResult.
Step 311: The CPE returns an execution uncompleted response message to the ACS, to notify the ACS that the execution of the script file is not completed yet. Optionally, the response message may be a SetParameterValues Response, where status=1, indicating that the execution of the script file is not completed yet.
Step 312: The CPE executes a command in the script file, generates a script file execution result, writes the script file execution result in a parameter node which is in the data model of the CPE and is used for storing the script file execution result, and sets a parameter node, which is in the data model of the CPE and is used for indicating the script execution status, to “execution is completed”. Optionally, for an optional solution provided in step 301, it is required to write the script file execution result in the parameter InternetGatewayDevice.Script.{i}.ScriptResult, and set a value of the parameter InternetGatewayDevice.Script.{i}.Status to 1, indicating that for the script file, “execution is completed.”
Step 313: The CPE determines whether a session exists currently, and if a session exists, the CPE cannot report the script file execution result through an Inform( ) RPC command, and needs to execute step 314; if no session exists, executes step 321.
Step 314: The CPE reports the script file execution result through a user datagram protocol (UDP) event, and the procedure ends.
Step 321: The CPE reports the execution result to the ACS through a Value Change event in the Inform( ) RPC command, and the procedure ends.
Optionally, this embodiment further includes other implementation manners, that is, the process that the CPE pre-executes the script file in step 304 may not be executed, but the script file is directly executed and the script file execution result is reported.
Further optionally, as a different implementation manner, the CPE may execute step 305 first, that is, execute the script file, then execute step 306, that is, return the execution complete response message to the ACS, and report the script file execution result in the manner described in steps 307 to 308; or the CPE may execute step 311 first, that is, return the execution uncompleted response message to the ACS, then execute step 312, that is, execute the script file, and report the script file execution result in the manner described in steps 313 to 314 and step 321.
In the prior art, the ACS needs to perform multiple times of RPC exchange so as to deliver the service to the CPE, and the number of times of RPC command exchange between the ACS and the CPE depends on the complexity of the service. Different from the prior art, in this embodiment, the ACS can transfer, through the script file, all services, which need to be delivered, to the CPE with a fixed number of times of RPC command exchange, thereby effectively reducing message exchange between the auto-configuration server and the customer premises equipment, and reducing the time required for service provisioning.
It should be noted that, the script file download command sending unit 501, the script file download request command receiving unit 502, and the script file sending unit 503 may execute functions of the script file delivering unit 401 in Embodiment 4.
A data model unit 901, where different from a data model of a CPE in the prior art, a data model in Embodiment 9 of the present invention is an extended data model, where parameter nodes related to storage and execution of a script file are added; and optionally, the data model unit includes the following parameter nodes:
(0 indicates that execution is in process, 1 indicates that execution is completed, and 2 indicates that a result is reported)
A script file receiving unit 902 configured to receive content of a script file delivered by an ACS, and write the content of the script file in a corresponding parameter node of the data model, where optionally, for an optional solution provided in the data model unit 901, the receiving content of a script file delivered by an ACS is to write the content of the script file in the parameter node InternetGatewayDevice.Script.{i}.Script, and set a value of the parameter node InternetGatewayDevice.Script.{i}.Status to 0, indicating that for the script file, “execution is in progress”.
A script file executing unit 903 configured to execute the script file, where the script file executing unit includes optional units: a pre-execution unit 9031, a first response message sending unit 9032, a second response message sending unit 9033, and a command executing unit 9034, where specifically: optionally, the pre-execution unit 9031 may be included configured to pre-execute the script file, and determine whether execution of the script file can be completed immediately, where the pre-execution unit 9031 may include: an execution time determining unit configured to determine, according to the number of commands in the script file, an execution time required for executing the script file; and a comparison and determination unit configured to compare the execution time with a preset threshold, and if the execution time is smaller than or equal to the threshold, determine that the execution of the script file can be completed immediately; and if the execution time is greater than the threshold, determine that the execution of the script file cannot be completed immediately.
The first response message sending unit 9032 is configured to: when the execution of the script file is not completed yet, return an execution uncompleted response message to the auto-configuration server, and send an execution command to the command executing unit 9034, where optionally, the response message may be a SetParameterValues Response, where status=1, indicating that the execution of the script is not completed yet.
The first response message sending unit 9032, in a case that the script file executing unit includes the pre-execution unit 9031, receives an execution command sent by the pre-execution unit; and in a case that the script file executing unit does not include the pre-execution unit 9031, receives an execution command sent by the script file receiving unit.
The second response message sending unit 9033 is configured to: when the execution of the script file is completed, return an execution complete response message to the auto-configuration server, where optionally, the response message may be a SetParameterValues Response, where status=0, indicating that the execution of the script file is completed; and the second response message sending unit 9033, in the case that the script file executing unit includes the pre-execution unit 9031, receives an execution command sent by the pre-execution unit; and in the case that the script file executing unit does not include the pre-execution unit 9031, receives an execution command sent by the command executing unit.
The command executing unit 9034 is configured to execute a command in the script file according to the execution command sent by the first response message sending unit 9032 or the pre-execution unit 9031, to generate a script file execution result, and write the script file execution result in a corresponding parameter node of the data model unit 901, where optionally, for an optional solution provided in the data model unit 901, it is to write the script file execution result in InternetGatewayDevice.Script.{i}.ScriptResult, and set a value of the parameter node InternetGatewayDevice.Script.{i}.Status to 1, indicating that for the script file, “execution is completed”.
A script file execution result writing unit 904 configured to write the script file execution result in a corresponding node which is in the data model unit 901 of the CPE and is used for indicating the script file execution result, where the script file execution result includes a response record of execution of the command in the script file.
A script file execution result reporting unit 905 configured to report the script file execution result to the ACS, where the script file execution result reporting unit includes a script file execution result claiming command receiving unit 9051, a first sending unit 9052, a current session status determining unit 9053, a second sending unit 9054, and a third sending unit 9055, where specifically: the script file execution result claiming command receiving unit 9051 is configured to receive a script file execution result claiming command sent by the ACS; the first sending unit 9052 is configured to send the script file execution result to the auto-configuration server according to the script file execution result claiming command; the current session status determining unit 9053 is configured to: after the first sending unit sends the script file execution uncompleted response message, and the command executing unit completes executing the script file, determine whether a session exists currently; the second sending unit 9054 is configured to: when the current session status determining unit determines that no session exists currently, send the script file execution result to the auto-configuration server by establishing a new session; and the third sending unit 9055 is configured to: when the current session status determining unit determines that a session exists currently, send the script file execution result to the auto-configuration server through a UDP event.
The CPE 1002 includes a script file receiving unit, a script file executing unit, a script file execution result generating unit, and a script file execution result sending unit, where the script file receiving unit is configured to receive the script file; the script file executing unit is configured to execute the script file; the script file execution result generating unit is configured to generate a script file execution result; and the script file execution result sending unit is configured to report the script file execution result.
The above embodiments are merely provided for describing the technical solutions of the present invention, but not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, persons of ordinary skill in the art should understand that modifications still can be made to the technical solutions described in the embodiments, or equivalent replacements still can be made to some technical features in the technical solutions; and such modifications or replacements do not make essence of corresponding technical solutions depart from the spirit and scope of the present invention.
It should be noted that, persons of ordinary skill in the art should understand that all or part of the steps of the method embodiments can be completed through hardware or by a program instructing relevant hardware. The program can be stored in a readable storage medium of a computer, and the storage medium may be a read-only memory, a flash memory, a magnetic disk, an optical disk, a hard disk or the like. When the program runs, the following steps are included: in one aspect, an auto-configuration server delivers a script file to a customer premises equipment, where the script file includes at least two commands required by the auto-configuration server for delivering a service to the customer premises equipment; and the auto-configuration server receives a script file execution result reported by the customer premises equipment and generated after the script file is executed.
In another aspect, a customer premises equipment acquires a script file, where the script file includes at least two commands required by an auto-configuration server for delivering a service to the customer premises equipment; the customer premises equipment executes the script file and generates a script file execution result; and the customer premises equipment reports the script file execution result.
Number | Date | Country | Kind |
---|---|---|---|
201110320321.6 | Oct 2011 | CN | national |
This application is a continuation of International Application No. PCT/CN2012/083050, filed on Oct. 17, 2012, which claims priority to CHINESE Patent Application No. CN201110320321.6, filed on Oct. 19, 2011, both of which are hereby incorporated by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2012/083050 | Oct 2012 | US |
Child | 14143124 | US |