Embodiment
In order that technical problems, technical solutions and advantages to be solved are clearer, clear, tie below
Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
To explain the present invention, it is not intended to limit the present invention.
In order that EPG server is controlled to the service request received in the present invention, improve Consumer's Experience there is provided
A kind of processing method and processing device of set top box STB service requests.With reference to Figure of description, the present invention is carried out specifically
It is bright.
A kind of processing procedure schematic diagram for set top box STB service requests that Fig. 1 provides for the present invention, the processing procedure includes
Following steps:
S101:EPG server receives the service request that user sends.
Wherein, the service request be user with HTTP (HyperText Transfer Protocol,
HTTP) the service request of transmission.
S102:EPG server judges whether currently processed service request quantity reaches setting according to the service request
Threshold value, when result of determination when being, to carry out step S103, otherwise, carries out step S104.
Wherein, the threshold value of the setting in the present invention is according to the manageable service request of EPG server synchronization
Maximum quantity is determined, after the threshold value is set, is saved it in EPG server.
S103:The EPG server refusal processing service request, and hurried to the user's return system for sending the service request
Status information.
In the present invention, when the service request quantity that EPG server determination is presently processing, the threshold of setting has been reached
During value, refusal handles the service request, and in order to improve the experience of user, the EPG server can also be asked to the business is sent
The status information that the user's return system asked is hurried, so that user can reattempt to.
S104:EPG server is handled the service request, and adds one by currently processed service request quantity.
Because EPG server in the present invention is by judging the quantity of itself currently processed service request, so that it is determined that
Whether the service request that receives is handled, realize the control to service request, and when the processing of EPG server refusal
During the service request, to the status information that the user's return system for sending the service request is busy, user is set to attempt other
Method, so as to improve the experience of user.
In addition, in the present invention in order to improve the stability of system, EPG server according to handle each type of business please
Ask consumption own resource situation, take situation and comprising data volume size, it is determined that consumption own resource it is more, take
The larger several service request types of longer and data volume, rule base create-rule is saved in by the service request type of determination
Information.When receiving service request, first according to the type of the service request preserved in Rule Information, judge whether to receiving
To service request handled, when the type of the service request received belongs to the service request class preserved in the Rule Information
During type, refusal handles the service request, when the type of the service request received is not belonging to the industry that is preserved in the Rule Information
During business request type, judge whether currently processed service request quantity reaches the threshold value of setting, and enter according to the result of judgement
Row subsequent treatment.
While the present invention is in order to ensure the stability of a system, the friendly of system is improved, EPG server is except in rule
Outside the type that service request is then preserved in information, prompt message corresponding with each type of service request is also preserved, or
A kind of prompt message of service request correspondence of person's several types, or can also be that all types of service request correspondences are a kind of
Prompt message.When EPG server receives the service request, according to the type of the service request preserved in Rule Information, sentence
The type for the service request of breaking and the type of a certain service request that is preserved in Rule Information to it is corresponding when the refusal processing business
Request, and according to preservation prompt message corresponding with the service request of type in this, the prompt message is sent into transmission should
The user of service request.
The detailed process of a kind of set top box STB service requests that Fig. 2 provides for the present invention, the processing procedure include with
Under several steps:
S201:EPG server receives the service request that user sends.
S202:EPG server judges whether to the service request according to the type of the service request preserved in Rule Information
Handled, when result of determination when being, to carry out step S203, otherwise, refusal handles the service request.
When it is determined that refusal handles the service request, EPG server is according to the service request class preserved in Rule Information
The corresponding prompt message of type, the prompt message is returned to the user for sending the service request.
S203:Judge whether currently processed service request quantity reaches the threshold value of setting, when result of determination is to be, enter
Row step S204, otherwise, carries out step S205.
S204:The EPG server refusal processing service request, and hurried to the user's return system for sending the service request
Status information.
Wherein, in order to ensure the friendly of system, be sent to user system busy status information can for " system busy,
Please later in examination ".
S205:EPG server is handled the service request, and adds one by currently processed service request quantity.
Because EPG server in the present invention is by judging the quantity of itself currently processed service request, so that it is determined that
Whether the service request that receives is handled, realize the control to service request, and when the processing of EPG server refusal
During the service request, to the status information that the user's return system for sending the service request is busy, user is set to attempt other
Method, so as to improve the experience of user.
In addition, in the present invention in order to further improve the friendly of system, when EPG server is by currently processed business
After number of requests adds one, judge whether the service request quantity has reached the amount threshold of setting after plus one, when it is determined that current place
The service request quantity of reason has reached the amount threshold of the setting after adding one when, EPG server is sent to load-balanced server
System busy prompt message, notification payload equalization server deletes the identification information of itself from available server list.
Or, the EPG server can also be currently processed according to itself when receiving service request in the present invention
Whether the quantity of service request reaches the threshold value of setting, to determine whether that load-balanced server sends system busy prompting letter
Breath, so that notification payload equalization server deletes the identification information of itself from available server list.
During due to carrying out information exchange between EPG server and load-balanced server, there is time delay, work as EPG server
When determining that the quantity of the service request of current time itself processing is not up to given threshold, the service request is handled, and
The quantity of itself currently processed service request is added one.And after adding one when the quantity of service request, judge the service request
Quantity reaches the threshold value of setting after adding one when, system busy prompt message, notification payload equilibrium clothes are sent to load-balanced server
Business deletes the identification information of the EPG server from available service list.But, send the system busy in the EPG server
During prompt message, load-balanced server also have sent service request to the EPG server simultaneously, therefore when the EPG server
When receiving the service request, when judging that itself currently processed service request quantity reaches the threshold value of setting, in order that EPG takes
Business device reaches the purpose accurately controlled, and improves the reliability of information transfer between load-balanced server and EPG server,
The EPG server again to load-balanced server send system busy prompt message, notification payload equalization server by itself
Identification information is deleted from available server list.
When load-balanced server is according to the prompt message for receiving EPG server transmission, judge that the prompt message is
No is system busy prompt message, when it is determined that the prompt message that EPG server is sent is system busy prompt message, by the EPG
The identification information of server is deleted from available server list.
In addition, in the present invention for the available server list in real-time update load-balanced server, it is sufficiently sharp
With system resource, the one service request processing of EPG server each pair terminates, and EPG server is by currently processed service request number
Amount subtracts one.Meanwhile, the EPG server judges whether be in system busy condition in last moment itself;When it is determined that with one
When moment is in system busy condition, the idle prompt message of system is sent to load-balanced server, notifies the load balancing to take
The identification information of itself is added to available server by business device.
Wherein, the EPG server judges whether be in system busy condition in last moment itself, can be according on this one
Whether the quantity of the service request of moment EPG server processing reaches that the threshold value of setting is judged, or can also basis
Whether itself last moment returns the status information of system busy to user, then either can also itself last moment be
The no prompt message that system busy is have sent to load-balanced server, using any one above-mentioned method, EPG server can
Determine whether last moment itself is in system busy condition.
Due to when EPG server receives service request in the present invention, as long as determining that the business of itself current processing please
The quantity asked has reached the threshold value of setting, i.e., refusal handles the service request, and the quantity of only currently processed service request is not
When reaching the threshold value of setting, just the service request is handled.Therefore the currently processed service request quantity that EPG is recorded
Maximum is the threshold value of setting, and at the end of the EPG server is to the processing of a certain service request, the currently processed business please
After the quantity asked subtracts one, certain threshold value for being less than setting, therefore now the EPG server is necessarily in idle condition.
When load-balanced server is according to the prompt message for receiving EPG server transmission, judge that the prompt message is
No is the idle prompt message of system, will be described when it is determined that the prompt message that EPG server is sent is system free time prompt message
The identification information of EPG server is added in available server list, and when receiving service request, according to the available service
Device list, and each loading condition of EPG server, the EPG that the service request is distributed in the available server list take
Business device.
A kind of set top box STB service requests by taking the service request for the user that newly reaches the standard grade as an example that Fig. 3 provides for the present invention
Detailed process, the process includes following steps:
S301:User sends STB service requests to load-balanced server.
S302:The service request is distributed to this and can use by load-balanced server according to the available server list of preservation
EPG server in server list is handled.
S303:EPG server is received after the service request, according to the type of the service request preserved in Rule Information,
Judge whether to handle the service request received, when result of determination is to be, step S304 is carried out, otherwise, at refusal
Manage the service request.
When it is determined that refusal handles the service request, EPG server is according to the service request class preserved in Rule Information
The corresponding prompt message of type, the prompt message is returned to the user for sending the service request.
S304:Judge whether currently processed service request quantity reaches the threshold value of setting, when result of determination is to be, enter
Row step S305, otherwise, carries out step S306.
S305:The EPG server refusal processing service request, and hurried to the user's return system for sending the service request
Status information, while to load-balanced server send system busy prompt message, when load-balanced server receives system
After busy prompt message, the identification information of the EPG server is deleted from available server list.
S306:EPG server is handled the service request, and adds one by currently processed service request quantity.
After this step, EPG server can also judge whether the service request quantity has reached the number of setting after plus one
Measure threshold value, when it is determined that currently processed service request quantity add one after reached the amount threshold of the setting when, EPG server to
Load-balanced server sends system busy prompt message, and notification payload equalization server is by the identification information of itself from available service
Deleted in device list.
S307:EPG server is determined after terminating to the service request processing, and currently processed service request quantity is subtracted
One.
S308:EPG server judges whether be in system busy condition in last moment itself, when result of determination is to be,
Step S309 is carried out, otherwise, without operation.
S309:EPG server sends the idle prompt message of system to load-balanced server, when load-balanced server connects
It is that the identification information of the EPG is added in available server list to receive the idle prompt message of the system.
Specifically, in the present invention in order to ensure the friendly of system, when EPG server is in the service ability upper limit,
EPG server can return to friendly prompting to user immediately, such as:" system busy, please wait a moment tries again!", likewise, when user sends
Service request type it is identical with the service request type preserved in Rule Information when, EPG server can be returned to user immediately
Friendly prompting is returned, such as:" service is paused, please reselect!”.
When the user newly reached the standard grade is to when carrying equalization server transmission STB service requests, load-balanced server is according to preservation
Available server list, determine whether that available EPG server is handled the STB service requests of the user, when sentencing
Result is determined for when being, the STB service requests of the user are sent to EPG server and handled by load-balanced server;Otherwise,
Refusal handles the STB service requests of the user, and " system busy, please wait a moment tries again to user's return prompt message!”.
EPG server please according to the STB service requests of the user received, and the business preserved in itself Rule Information
The type asked, judges whether to handle the STB service requests of the user, when it is determined that the STB service requests of the user is not
During the type handled, refusal handles the service request, and returns to that " service is paused, please reselect to user!”.
When EPG server determines that the STB service requests of the user can be handled, judge that itself is currently processed
Whether service request quantity reaches the threshold value of setting, when result of determination for when being, EPG server refusal handles the service request,
And send system busy prompt message to load-balanced server.Load-balanced server judges according to the prompt message received
Whether the type of the prompt message is system busy prompt message, when it is determined that the prompt message that the EPG server is sent is system busy
During prompt message, the identification information of the EPG server is deleted from available server list, and prompting letter is returned to user
" system busy, please wait a moment tries breath again!”.
When EPG server determines that currently processed service request quantity is not up to the threshold value of setting, extracting the business please
The characteristic information asked is registered, and the service request is handled, and adds one by currently processed service request quantity.
After EPG server determines to terminate the service request processing, the characteristic information of service request registration is deleted,
And currently processed service request quantity is subtracted one, judge last moment itself whether be in system busy condition, when it is determined that itself
When last moment is in system busy condition, EPG server sends the idle prompt message of system to load-balanced server.Load is equal
Server weigh according to the prompt message received, whether the type for judging the prompt message is the idle prompt message of system, when true
When the prompt message that the fixed EPG server is sent is system free time prompt message, the identification information of the EPG server is added
Into available server list.
The available server list preserved in the present invention by load-balanced server, is that system has formulated a service
The redundancy index of ability, when EPG server reaches the service ability upper limit, EPG server can make corresponding response rapidly,
Allow users to obtain stable service, on the basis of system resource is made full use of, it is ensured that the stability of system.Together
When, when EPG server and load-balanced server can not handle the service request of user in time, it can be returned immediately to user
Close friend's prompting, so as to improve the friendly of system.
A kind of structural representation of the processing unit for set top box STB service requests that Fig. 4 provides for the present invention, described device
Including:
Judge module 41, for according to the service request received, judging whether currently processed service request quantity reaches
To the threshold value of setting;
First processing module 42, for when it is determined that currently processed service request quantity reaches the threshold value of setting, refusing
Handle the service request, and the status information done to the user's return system for sending the service request;
Second processing module 43 is right for when it is determined that currently processed service request quantity is not up to the threshold value of setting
The service request is handled, and adds one by currently processed service request quantity.
Described device also includes:
Rule judgment module 44, for the type according to the service request preserved in Rule Information, judges whether to such
The service request of type is handled;When the type for judging to receive the service request is not belonging to the industry preserved in the Rule Information
During business request type, the service request is sent to judge module and handled, otherwise, refusal handles the service request.
The Second processing module 43, is additionally operable to judge whether the service request quantity has reached setting quantity after plus one
Threshold value;When it is determined that currently processed service request quantity add one after reached the amount threshold of the setting when, taken to load balancing
Business device sends system busy prompt message, and notification payload equalization server deletes the identification information of itself from available server list
Remove.
The first processing module 42, is additionally operable to when the currently processed service request quantity of determination reaches the threshold value of setting
When, system busy prompt message is sent to load-balanced server, notification payload equalization server is by the identification information of itself from can
Deleted with server list.
Described device also includes:
Notification module 45, for after determining to terminate the service request processing, by currently processed service request quantity
Subtract one, and judge whether be in system busy condition in last moment itself;When it is determined that itself last moment be in system busy condition
When, the idle prompt message of system is sent to load-balanced server, notifies the load-balanced server to believe the mark of itself
Breath is added in available server list;Otherwise, without operation.
Specifically, when user sends service request to load-balanced server, load-balanced server is according to preservation
Available server list, determines whether that available EPG server is handled the service request of the user, works as result of determination
During to be, the service request of the user is sent to EPG server and handled by load-balanced server.
Rule judgment module 44 in EPG server is according to the service request of the user received, and itself rule letter
The type of the service request preserved in breath, judges whether to handle the service request of the user, when it is determined that the industry of the user
When being engaged in request type for without the type of processing, refusal handles the service request of the user, when it is determined that to the business of the user
When request is handled, the service request is sent to judge module 41.
Judge module 41 judges whether currently processed service request quantity reaches setting according to the service request received
Threshold value, when result of determination for be when, the service request received is sent to first processing module 42, when result of determination is no
When, the service request received is sent to Second processing module 43.
When it is determined that currently processed service request quantity reaches the threshold value of setting, the processing of the refusal of first processing module 42 connects
The service request received, and system busy prompt message is sent to load-balanced server, notification payload equalization server will be described
The identification information of EPG server is deleted from available server list, and " system busy, please wait a moment to user's return prompt message
Try again!”.
When it is determined that currently processed service request quantity is not up to the threshold value of setting, Second processing module 43 extracts the industry
The characteristic information of business request is registered, and the service request is handled, and currently processed service request quantity is added
One.After it is determined that terminating to the service request processing, currently processed service request quantity is subtracted one by notification module 45, and is judged
Whether last moment is in system busy condition, and when result of determination, when being, to be sent to load-balanced server, system is idle to be pointed out
The identification information of EPG server is added in available server list by information, notification payload equalization server, otherwise, does not enter
Row operation.
The invention provides a kind of processing method and processing device of set top box STB service requests, in the method, EPG services
Device judges whether currently processed service request quantity reaches the threshold value of setting according to the service request received;When it is determined that working as
When the service request quantity of pre-treatment is not up to the threshold value of setting, the service request is handled, and will be currently processed
Service request quantity adds one;Otherwise, refusal is handled.Because EPG server in the present invention is by judging that itself is currently processed
The quantity of service request, determines whether to handle the service request received, realizes the control to service request,
And when EPG server refusal handles the service request, to the state that the user's return system for sending the service request is busy
Information, allows user to attempt other methods, so as to improve the experience of user.
A preferred embodiment of the present invention has shown and described in described above, but as previously described, it should be understood that the present invention
Be not limited to form disclosed herein, be not to be taken as the exclusion to other embodiment, and available for various other combinations,
Modification and environment, and above-mentioned teaching or the technology or knowledge of association area can be passed through in invention contemplated scope described herein
It is modified., then all should be in this hair and the change and change that those skilled in the art are carried out do not depart from the spirit and scope of the present invention
In the protection domain of bright appended claims.