Summary of the invention
One of them object of the application is that another object of the application is to provide a kind of communication apparatus adopting above-mentioned TR069 long-distance monitoring method in order to solve the problem and to provide a kind of TR069 long-distance monitoring method and system.
The TR069 long-distance monitoring method that the application provides, comprising: TR069 agent process periodically obtains the state information of TR069 service processes; Judge whether described TR069 service processes is in idle condition and maintains scheduled duration according to described state information; If described TR069 maintains described preset duration in idle condition, described TR069 agent process notifies that described TR069 service processes exits, and enables TR069 agency service function.
As the one improvement of the TR069 long-distance monitoring method that the application provides, it also comprises: the monitoring information of Automatic Configuration Server is supplied to described TR069 agent process by described TR069 service processes before exiting, and returns the account information of described Automatic Configuration Server authentication check to described TR069 agent process.
As the one improvement of the TR069 long-distance monitoring method that the application provides, it also comprises: after enabling described TR069 agency service function, and described TR069 agent process detects the provisioning message whether receiving described Automatic Configuration Server; If receive described provisioning message, described TR069 agent process acts on behalf of the authentication check of Automatic Configuration Server described in the process of described TR069 service processes; At described authentication check by afterwards, described TR069 agent process restarts described TR069 service processes.
As the one improvement of the TR069 long-distance monitoring method that the application provides, it also comprises: when described TR069 service processes restarts, described TR069 agent process, according to the state parameters of described Automatic Configuration Server authentication check, notifies that described TR069 service processes upgrades corresponding state machine after rebooting.
As the one improvement of the TR069 long-distance monitoring method that the application provides, it also comprises: if described TR069 service processes is in busy state, the provisioning message of described TR069 service processes process Automatic Configuration Server, and provide treatment state message to described TR069 agent process; According to described treatment state message, described TR069 agent process judges whether described TR069 service processes occurs abnormal state; If there is abnormal state, described TR069 agent process initiatively TR069 service processes described in positive closing and enable described TR069 agency service function.
The communication apparatus that the application provides, comprising: TR069 service processes, for performing TR069 remote monitoring function time in working order, analyzes and the configuration needs of processing remote Automatic Configuration Server; TR069 agent process, for periodically obtaining the status message of described TR069 service processes, and when judging that described TR069 service processes is in idle condition and maintains scheduled duration, notify that described TR069 service processes exits and enables TR069 agency service function.
As the one improvement of the communication apparatus that the application provides, described TR069 service processes also for before exiting the monitoring information of described Automatic Configuration Server being supplied to described TR069 agent process, and returns the account information of described Automatic Configuration Server authentication check to described TR069 agent process.
As the one improvement of the communication apparatus that the application provides, described TR069 agent process also for detecting the provisioning message whether receiving described Automatic Configuration Server after enabling described TR069 agency service function, and act on behalf of the authentication check of Automatic Configuration Server described in the process of described TR069 service processes when receiving described provisioning message, and at described authentication check by restarting described TR069 service processes afterwards.
As the one improvement of the communication apparatus that the application provides, described TR069 service processes also for processing the provisioning message of Automatic Configuration Server when being in busy state, and provides treatment state message to described TR069 agent process; Described TR069 agent process also for judging whether described TR069 service processes occurs abnormal state according to described treatment state message, and when there is abnormal state initiatively TR069 service processes described in positive closing and enable described TR069 agency service function.
The TR069 long distance control system that the application provides, comprise Automatic Configuration Server and communication apparatus, described Automatic Configuration Server is used for providing provisioning message to described communication apparatus and carrying out remote monitoring to described communication apparatus, and described communication apparatus is communication apparatus as above.
Compared to prior art, TR069 long-distance monitoring method, system and communication apparatus that the application provides enable the agency service function of TR069 agent process when TR069 service processes is in idle condition, discharge the system resource that described TR069 service processes takies, because described TR069 agent process only needs to take few system resource, therefore can effectively reduce system resource load; On the other hand, TR069 long-distance monitoring method provided by the invention, system and communication apparatus can also described TR069 service processes TR069 service processes described in positive closing and enable the agency service function of described TR069 agent process when there is abnormal state, avoid causing due to the abnormal state of TR069 service processes TR069 remote monitoring function to occur paralysis, realize the timely recovery of TR069 function.
Embodiment
The technical problem solved to make the application, technical scheme and beneficial effect are clearly understood, below in conjunction with drawings and Examples, are further elaborated to the application.Should be appreciated that specific embodiment described herein only in order to explain the application, and be not used in restriction the application.
Refer to Fig. 1, it is the structural representation of network system (the application is called TR069 long distance control system) a kind of embodiment that TR069 long-distance monitoring method provided by the invention can be suitable for.Described TR069 long distance control system 100 comprises Automatic Configuration Server (Auto-ConfigurationServer, ACS) 110, gateway (Gateway) equipment 120 and multiple local area network (LAN) (LocalAreaNetwork, LAN) equipment 130.
Described lan device 130 for be connected to described gateway device 120 by local area network (LAN), and can be connected to described Automatic Configuration Server 110 by described gateway device 120 further.Wherein, described multiple lan device 130 can comprise in the subscriber equipmenies such as Set Top Box, router or switch one or more, and it can be formed home network in the mode of local area network (LAN) by described gateway device 120, described gateway device 120 and described lan device 130 can be referred to as customer premises equipment, CPE (CustomerPremiseEquipment, CPE), it supports TR069 protocol function respectively.Described Automatic Configuration Server 110 can configure described customer premises equipment, CPE voluntarily automatically according to TR069 agreement, to realize remotely carrying out remote centralized management to the communication apparatus of home network.
The TR069 long-distance monitoring method that the application provides can be applied in described customer premises equipment, CPE (comprising described gateway device 120 and described lan device 130), below in conjunction with the flow chart shown in Fig. 2, how the TR069 long-distance monitoring method that introducing the application in detail provides realizes the remote monitoring for described customer premises equipment, CPE.Refer to Fig. 2, the TR069 long-distance monitoring method that the application provides comprises:
Step S1, TR069 agent process periodically obtains the state information of TR069 service processes;
Specifically, after the system starts, for supporting TR069 remote monitoring function, communication apparatus generally can enable TR069 service processes, and in the present embodiment, TR069 agent process also can be enabled simultaneously; Described TR069 service processes can occupy many system resource in its course of work, and the system resource that described TR069 agent process takies is considerably less.Described TR069 server processes are after enabling, can act on behalf of with described TR069 termly and carry out Inter-Process Communication (Inter-ProcessCommunication, IPC), and by TR069 filec descriptor (TR069FileDescriptor, TR069Fd) its state information is supplied to described TR069 agent process, therefore, described TR069 agent process periodically can get the state information of described TR069 service processes by described TR069 filec descriptor.
Step S2, described TR069 agent process judges that described TR069 service processes is in idle condition, if so, enters step S3; Otherwise, enter step S8;
Particularly, generally described TR069 service processes is after completing information reporting work, and described in actual use TR069 service processes is in idle condition substantially; Therefore, the state information of the described TR069 service processes that described TR069 agent process periodically gets according to it, can judge that described TR069 service processes is in idle condition or is in busy state, if described TR069 service processes is in idle condition, then this method can go to step S3; On the contrary, if now described TR069 service processes is in busy state, namely now described TR069 service processes still needs to process the provisioning message from Automatic Configuration Server, then this method can go to step S8.
Step S3, described TR069 agent process judges whether the idle condition of described TR069 service processes maintains scheduled duration, if so, enters step S4;
After described TR069 agent process judges that described TR069 service processes is in idle condition, it can judge whether the duration of the idle condition of described TR069 reaches scheduled duration further, described scheduled duration can be decided according to the actual requirements, such as, in one embodiment, described scheduled duration can be chosen to be 5 minutes; Therefore, described TR069 agent process can judge whether described TR069 service processes maintains more than 5 minutes after entering idle condition, and if so, then this method goes to step S4 in this step.
Step S4, described TR069 agent process notifies that described TR069 service processes exits and enables agency service function;
Described TR069 agent process is after judging the idle condition that described TR069 service processes maintained more than 5 minutes, in order to avoid described TR069 service processes occupies more system resource for a long time, it can notify that described TR069 service processes exits, to discharge occupied system resource.
Particularly, described TR069 agent process can send TR069 by described TR069 filec descriptor and exit request (such as message TR069QUIT_BACKACSINFO) to described TR069 service processes; Described TR069 service processes is after detecting that described TR069 exits request, the monitoring information of described Automatic Configuration Server (ACS) can be supplied to described TR069 agent process, to upgrade the value of Automatic Configuration Server filec descriptor (ACSFd), be namely remote monitoring Socket; Meanwhile, described TR069 service processes can also return the account information of ACS certification to described TR069 agent process, to upgrade ACS authentication proxy information (proxymsg).After completing and exiting the response of request for described TR069, described TR069 service processes can exit, thus discharges originally by system resource that described TR069 service processes takies.After described TR069 service processes exits, described TR069 agent process just can act on behalf of described TR069 service processes, the agency service function of process TR069 remote monitoring.
It should be noted that, when described TR069 service processes occurs serious problems and can not respond the TR069QUIT_BACKACSINFO message of described TR069 agent process transmission, described TR069 agent process needs initiatively TR069 service processes described in positive closing.
Step S5, described TR069 agent process detects the access request whether receiving Automatic Configuration Server, if so, enters step S6;
In the process of the described TR069 service processes of agency, if current not from the access request of described Automatic Configuration Server, then described TR069 service processes can replace by the few TR069 agent process of occupied system resource.Further, in the process, described TR069 agent process can detect the access request whether received from described Automatic Configuration Server, if above-mentioned access request detected, then the present invention can go to step S6.
Step S6, described TR069 agent process acts on behalf of described TR069 service processes process Automatic Configuration Server authentication check, if certification is passed through, enters step S7;
After the access request from described Automatic Configuration Server being detected, described TR069 agency detects ACS authentication proxy information (proxymsg) that can extract described TR069 service processes and return before exiting, and adopt the account information of described ACS certification, replace the authentication check of Automatic Configuration Server described in the process of described TR069 service processes.If the authentication check of described Automatic Configuration Server passes through, then this method can go to step S7.
Step S7, described TR069 agent process restarts described TR069 service processes;
Pass through afterwards at the authentication check of described Automatic Configuration Server, described TR069 agent process can restart described TR069 service processes further by process initiation parameter optArgs.Further, when described TR069 service processes reactivates, described TR069 agent process according to the state parameters of described Automatic Configuration Server authentication check, can also inform that described TR069 service processes needs to upgrade corresponding state machine upon actuation.On the other hand, described TR069 service processes after rebooting, can also upgrade described TR069 filec descriptor with described TR069 agent process alternately, so that the later stage between described TR069 service processes and described TR069 agent process links up.
After described TR069 service processes restarts, described TR069 service processes just can respond the remote monitoring activities of described Automatic Configuration Server, realizes the TR069 remote monitoring function of communication apparatus.After this, described TR069 agent process can return step S1, continues the monitoring state to described TR069 service processes.
Step S8, described TR069 service processes process provisioning message, and to described TR069 agent process transmission processing status message;
If detect that described TR069 service processes is in busy state in step s 2, then now described TR069 service processes can continue to maintain its remote monitoring function, and process is from the provisioning message of described Automatic Configuration Server.Further, in the processing procedure of described provisioning message, described TR069 service processes can also send corresponding treatment state message to described TR069 agent process.
Step S9, described TR069 agent process judges whether described TR069 service processes occurs abnormal state, and if so, TR069 service processes described in positive closing also enables agency service function;
Described TR069 agent process according to the treatment state message of described TR069 service processes side, can judge whether described TR069 service processes occurs abnormal state; Such as, if TR069 service processes occur stuck and described treatment state message cannot be sent to described TR069 agent process time, described TR069 agent process can send repeatedly TR069 status confirmation message (such as TR069ISRIGHT) from TR069 service processes described in trend within one minute, if (such as three times) all do not receive the reply of described TR069 service processes several times continuously, then can judge that abnormal state appears in described TR069 service processes.
If described TR069 agent process judges that abnormal state appears in described TR069 service processes, then TR069 service processes described in described positive closing enable agency service function, causes the TR069 remote monitoring function of described communication apparatus to paralyse to avoid due to the abnormal state of described TR069 service processes.In a particular embodiment, after judging that abnormal state appears in described TR069 service processes, S4 can be gone to step, send TR069 to described TR069 service processes and exit request (such as message TR069QUIT_BACKACSINFO) with TR069 service processes described in active positive closing, and the agency service function of the described TR069 agent process enabled, specific implementation can with reference to the associated description of step S4.
Compared to prior art, the TR069 long-distance monitoring method that the application provides and system enable the agency service function of TR069 agent process when TR069 service processes is in idle condition, discharge the system resource that described TR069 service processes takies, because described TR069 agent process only needs to take few system resource, therefore can effectively reduce system resource load; On the other hand, TR069 long-distance monitoring method provided by the invention and system can also described TR069 service processes TR069 service processes described in positive closing and enable the agency service function of described TR069 agent process when there is abnormal state, avoid causing due to the abnormal state of TR069 service processes TR069 remote monitoring function to occur paralysis, realize the timely recovery of TR069 function.
Based on above-mentioned TR069 long-distance monitoring method and system, the application also provides a kind of communication apparatus that can adopt above-mentioned TR069 long-distance monitoring method further, described communication apparatus can be the customer premises equipment, CPE of described TR069 long distance control system, such as gateway device, Set Top Box, router or switch etc.Particularly, described communication apparatus can comprise:
TR069 service processes, for performing TR069 remote monitoring function, analyzes and the configuration needs of processing remote Automatic Configuration Server;
TR069 agent process, for periodically obtaining the status message of described TR069 service processes, and when judging that described TR069 service processes is in idle condition and maintains scheduled duration, notify that described TR069 service processes exits and enables TR069 agency service function.
In a particular embodiment, described TR069 service processes can also be used for before exiting the monitoring information of Automatic Configuration Server being supplied to described TR069 agent process, and returns the account information of described Automatic Configuration Server authentication check to described TR069 agent process.
In a particular embodiment, described TR069 agent process also for detecting the provisioning message whether receiving described Automatic Configuration Server after enabling described TR069 agency service function, and act on behalf of the authentication check of Automatic Configuration Server described in the process of described TR069 service processes when receiving described provisioning message, and at described authentication check by restarting described TR069 service processes afterwards.
In a particular embodiment, described TR069 service processes also for processing the provisioning message of Automatic Configuration Server when being in busy state, and provides treatment state message to described TR069 agent process; Described TR069 agent process also for judging whether described TR069 service processes occurs abnormal state according to described treatment state message, and when there is abnormal state initiatively TR069 service processes described in positive closing and enable described TR069 agency service function.
Should be appreciated that above-mentioned TR069 service processes and TR069 agent process can be the functional module of software module or software and hardware combining, it can be performed by processor and realize function as above.Further, described TR069 service processes and described TR069 agent process can also have other concrete functions when performing the TR069 remote monitoring that the application provides, and specifically can consult the corresponding description of embodiment of the method, repeat no more herein.
In addition, person of ordinary skill in the field is understood that all or part of step realizing said method embodiment can have been come by the hardware that program command is relevant, aforesaid program can be stored in computer read/write memory medium, and performed by the processor of communication apparatus inside, aforesaid program processor when being performed can perform all or part of step comprising said method embodiment.Wherein, described processor can be implemented as one or more processor chips, or can be a part for one or more application-specific integrated circuit (ASIC) (ApplicationSpecificIntegratedCircuit, ASIC); And aforesaid storage medium can include but not limited to the storage medium with Types Below: flash memory (FlashMemory), read-only memory (Read-OnlyMemory, ROM), random access memory (RandomAccessMemory, RAM), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.