Summary of the invention
In view of above content, the processor resource managing and control system that is necessary to provide a kind of customer terminal equipment, comprising: package detecting module, the package receiving for detecting customer terminal equipment, and the package detecting is resolved, to determine whether to receive user's speech communication request; Utilance acquisition module, during for speech communication request receiving user, obtains the current resource utilization U of the processor of customer terminal equipment, and this current resource utilization U and one first preset threshold value M is compared; And Executive Module, for when U<M, directly for user sets up speech communication, or when M≤U, set up one first tunnel and one second tunnel, by the first tunnel, set up speech communication for user, and be that the first tunnel distributes first network frequency range for the speech data package of transferring voice communication, and be that the second tunnel distributes second network frequency range for transmitting the package of other type.
Also be necessary to provide a kind of processor resource management-control method of customer terminal equipment, comprise: package package detecting step, the package that detecting customer terminal equipment receives, and the package detecting is resolved, to determine whether to receive user's speech communication request; Utilance obtaining step, when the speech communication request that receives user, obtains the current resource utilization U of the processor resource of customer terminal equipment, and this current resource utilization and one first preset threshold value M is compared; And execution step, when U<M, directly for user sets up speech communication, or when M≤U, set up one first tunnel and one second tunnel, by the first tunnel, set up speech communication for user, and be that the first tunnel distributes first network frequency range for the speech data package of transferring voice communication, and be that the second tunnel distributes second network frequency range for transmitting the package of other type.
Compared to prior art, processor resource managing and control system and the method for customer terminal equipment of the present invention, while receiving user's speech communication request in the situation that processor resource utilance is higher, by setting up two tunnels, the network bandwidth of customer terminal equipment is shunted, thereby limit entering other package of customer terminal equipment, to reserve enough processor resources, process the speech data in this speech communication, thereby guarantee the quality of speech communication.
Embodiment
As shown in Figure 1, be the running environment schematic diagram of customer terminal equipment provided by the invention.This customer terminal equipment 200 is connected with communication apparatus (as the computer 101 in Fig. 1 or mobile phone 102), for realizing the interconnection between this communication apparatus and network 300, makes this communication apparatus can use various network services.This communication apparatus connects to network after 300, also can set up speech communication with external communications equipment by this network 300, as VoIP speech communication.
In the present embodiment, described customer terminal equipment 200 can connect by the modes such as cable, bluetooth or infrared connection and described communication apparatus.This customer terminal equipment 200 may be, but not limited to,, gateway, router, switch etc.Described network 300 may be, but not limited to,, WIFI
?network, WiMAX(Worldwide Interoperability for Microwave Access, global microwave interconnection access) network etc.
As shown in Figure 2, be the functional module framework figure of described customer terminal equipment 200.This customer terminal equipment 200 comprises processor resource managing and control system 210, memory device 201, processor 202.This processor resource managing and control system 210 comprises package detecting module 211, utilance acquisition module 212 and Executive Module 213.In the present embodiment, each functional module of above-mentioned 211-213 can software program section or the form of firmware (firmware) be stored in described memory device 201, and by described processor 202, controlled the execution of each functional modules.
Described package detecting module 211 is for detecting the received package of customer terminal equipment 200, and the package detecting is resolved, to determine whether to receive user's speech communication request.For example, when this package detecting module 211 receives a package, by judging whether this package is SIP(Session Initiation Protocol, session initiation protocol) Invite(invite) package, be confirmed whether that user sends speech communication request.If Invite package, represents to receive user's speech communication request.If not Invite package represents not receive user's speech communication request.This speech communication request can be the request that the communication apparatus that is connected with this customer terminal equipment 200 sends, and can be also the request that the extraneous communication apparatus that receives by network 300 sends.
Described utilance acquisition module 212 is during for speech communication request receiving user, obtain the current resource utilization U of the processor 202 of customer terminal equipment 200, and by this current resource utilization U and one first preset threshold value M(as 50%) and the second preset threshold value H(as 80%) compare.Wherein, M<H.Described the first preset threshold value M and the second preset threshold value H are respectively used to define residing two varying levels of utilance of processor 202 resources, for example, M is used for defining the utilization of resources of processor 202 and in a medium level, H defines the resource utilization of processor 202 in a higher level.
Described Executive Module 213 is for processing user's speech communication request according to above-mentioned comparative result.In the present embodiment, if U<M, this Executive Module 213 by network 300 directly for user sets up speech communication.
If M≤U<H, this Executive Module 213 is set up one first tunnel and one second tunnel, by the first tunnel, set up speech communication for user, and be that the first tunnel distributes first network frequency range for the speech data package (as RTP package) of transferring voice communication, and be that the second tunnel distributes second network frequency range for transmitting the package (as ftp package and http package) of other type.In the present embodiment, described first tunnel the second tunnel is two different function assemblies, for the network bandwidth of customer terminal equipment 200 being divided into two parts, is respectively used to transmit different data or signal.
If U≤H, this Executive Module 213 is set up one the 3rd tunnel and one the 4th tunnel, by the 3rd tunnel, set up speech communication for user, and be that the 3rd tunnel distributes the 3rd network bandwidth for the speech data package of transferring voice communication, and be that the 4th tunnel distributes the 4th network bandwidth for transmitting the package of other type.Wherein, described first network frequency range and second network frequency range sum and the 3rd network bandwidth and the 4th network bandwidth sum are equal to the overall network frequency range of customer terminal equipment 200.
Described first, second, third and the numerical value of the 4th network bandwidth by user, preset.Particularly, user can be according to actual conditions, the second and the 4th network bandwidth is arranged on to a suitable level, thereby the data packet that limits other type enters the quantity of customer terminal equipment 200, and then the resource of the processor 202 that takies of the data packet that limits other type, for the resource of the reserved enough processors 202 of speech communication is to guarantee speech quality.It should be noted that, when U≤H, illustrates that the current utilization rate of processor 202 has reached quite high level, therefore need further limit the quantity that other data packet enters customer terminal equipment 200, with the processor resource that guarantees that speech communication is required as far as possible.In order further to limit other data packet that enters customer terminal equipment 200, need to increase the 3rd network bandwidth of described the 3rd tunnel the 4th network bandwidth of limit the 4th tunnel.Therefore,, in the present embodiment, described the 3rd network bandwidth need be greater than first network frequency range.
In addition, when U≤H, for example, if described Executive Module 213 use the 3rd tunnel and the 3rd network bandwidth also cannot obtain the resource of enough processors 202 while processing this speech communication (when customer terminal equipment 200 has been set up a plurality of speech communication), this Executive Module 213 is directly abandoned the current speech communication request receiving.
As shown in Figure 3, be that the present invention carries out the flow chart of the method for management and control to the resource utilization of the processor 202 of customer terminal equipment 200.
Step S01, described package detecting module 211 is for detecting the received package of customer terminal equipment 200, and the package detecting is resolved, to determine whether to receive user's speech communication request.
Step S02, when receiving user's speech communication request, described utilance acquisition module 212 obtains the current resource utilization U of the processor 202 of customer terminal equipment 200.
Step S03, described utilance acquisition module 212 compares the current resource utilization U of processor 202 and one first preset threshold value M, judges whether this current resource utilization U is less than this first preset threshold value M.If U<M, execution step S04.If U≤M, execution step S05.
Step S04, described Executive Module 213 is direct for user sets up speech communication by network 300, process ends.
Step S05, described utilance acquisition module 212 compares the current resource utilization U of processor 202 and one second preset threshold value M, judges whether this current resource utilization U is less than this second preset threshold value H.If U<H, execution step S06.If U≤H, execution step S07.
Step S06, described Executive Module 213 is set up one first tunnel and one second tunnel, by the first tunnel, set up speech communication for user, and be that the first tunnel distributes first network frequency range for the speech data package of transferring voice communication, and be that the second tunnel distributes second network frequency range for transmitting the package of other type, process ends.
Step S07, described Executive Module 213 is set up one the 3rd tunnel and one the 4th tunnel, by the 3rd tunnel, set up speech communication for user, and be that the 3rd tunnel distributes the 3rd network bandwidth for the speech data package of transferring voice communication, and be that the 4th tunnel distributes the 4th network bandwidth for transmitting the package of other type.Wherein, described first network frequency range and second network frequency range sum and the 3rd network bandwidth and the 4th network bandwidth sum are equal to the overall network frequency range of customer terminal equipment 200, and described the 3rd network bandwidth is greater than first network frequency range.
Above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can modify or be equal to replacement technical scheme of the present invention, and not depart from the spirit and scope of technical solution of the present invention.