The content of the invention
The present invention provides a kind of link switch-over method and device, to receive the link switching request of equipment transmission
When, link switching configuration file corresponding with link switching request can be automatically generated, and then match somebody with somebody according to the link switching
File is put, equipment Target Link as corresponding to current ink automatically switches to the link switching request is controlled, so as to real
The automatic switchover of existing link, had both avoided manual switching link, and had improved link switching efficiency again.
The present invention provides a kind of link switch-over method, including:
When receiving the link switching request of equipment transmission, automatically generate and the corresponding link of link switching request
Handover configurations file;
According to the link switching configuration file, the equipment is controlled to automatically switch to the link switching by current ink
Target Link corresponding to request.
In one embodiment, it is described when receiving the link switching request of equipment transmission, automatically generate and the chain
The corresponding link switching configuration file of road handover request, including:
When receiving the link switching request, the link switching request is parsed, obtains the chain of the current ink
The link identification of line and the Target Link;
According to the link identification of the current ink and the link identification of the Target Link, generate the link switching and match somebody with somebody
Put file.
In one embodiment, the link switching configuration file includes at least one of following information:
Host address corresponding to the link identification of the Target Link, the Target Link, switch to the Target Link
When need the service restarted.
In one embodiment, need to restart when the link switching configuration file includes switching to the Target Link
Service when, it is described to automatically generate link switching configuration file corresponding with link switching request, including:
Determine the current service being currently running on the current ink;
It is determined that be pre-configured with link switching when need the preset service type restarted;
When being defined as switching to the Target Link by the service for meeting the preset service type in the current service
Need the service restarted.
In one embodiment, it is described according to the link switching configuration file, control the equipment by current ink from
Move and switch to Target Link corresponding to the link switching request, including:
The link switching configuration file is sent to main frame corresponding to the host address, to control the main frame to pass through
The Target Link provides service for the equipment, and restarts the service for needing to restart.
The present invention also provides a kind of link switching device, including:
Generation module, for when receiving the link switching request of equipment transmission, automatically generating and the link switching
Ask corresponding link switching configuration file;
Control module, for according to the link switching configuration file, controlling the equipment to be automatically switched by current ink
To Target Link corresponding to link switching request.
In one embodiment, the generation module includes:
Analyzing sub-module, for when receiving the link switching request, parsing the link switching request, obtaining institute
State the link identification of current ink and the link identification of the Target Link;
Submodule is generated, it is raw for the link identification according to the current ink and the link identification of the Target Link
Into the link switching configuration file.
In one embodiment, the link switching configuration file includes at least one of following information:
Host address corresponding to the link identification of the Target Link, the Target Link, switch to the Target Link
When need the service restarted.
In one embodiment, the generation module includes:
First determination sub-module, for being needed when the link switching configuration file includes and switches to the Target Link
During the service restarted, the current service being currently running on the current ink is determined;
Second determination sub-module, for determine to be pre-configured with link switching when need the preset service type restarted;
3rd determination sub-module, for the service for meeting the preset service type in the current service to be defined as cutting
The service restarted is needed when shifting to the Target Link.
In one embodiment, the control module includes:
Sending submodule, for the link switching configuration file to be sent to main frame corresponding to the host address, with
Control the main frame to provide service by the Target Link for the equipment, and restart the service for needing to restart.
The technical scheme provided by this disclosed embodiment can include the following benefits:
When receiving the link switching request of equipment transmission, by automatically generating and the corresponding link of link switching request
Handover configurations file, and then according to link switching configuration file, control device automatically switches to link switching by current ink please
Corresponding Target Link is sought, can be achieved to make equipment automatic switchover link, so, both avoided manual switching link, and improved again
Link switching efficiency.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write
Specifically noted structure is realized and obtained in book, claims and accompanying drawing.
Below by drawings and examples, technical scheme is described in further detail.
Embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that described herein preferred real
Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
In order to solve the above-mentioned technical problem, the embodiment of the present disclosure provides a kind of link switch-over method, and this method is applied to
In link switching program, system or device, its executive agent can be O&M server etc., as shown in figure 1, step S101 and step
Rapid S102, wherein:
In step S101, when receiving the link switching request of equipment transmission, automatically generate and asked with link switching
Corresponding link switching configuration file;
The equipment can be the terminals such as mobile phone or a server.
In step s 102, link is automatically switched to by current ink and cut according to link switching configuration file, control device
Change Target Link corresponding to request.
When receiving the link switching request of equipment transmission, by automatically generating and the corresponding link of link switching request
Handover configurations file, and then according to link switching configuration file, control device automatically switches to link switching by current ink please
Corresponding Target Link is sought, can be achieved to make equipment automatic switchover link, so, both avoided manual switching link, and improved again
Link switching efficiency.
As shown in Fig. 2 in one embodiment, the step S101 shown in above-mentioned Fig. 1, that is, receiving the chain of equipment transmission
During the handover request of road, link switching configuration file corresponding with link switching request is automatically generated, including:
In step s 201, when receiving link switching request, link handover request is parsed, obtains the chain of current ink
The link identification of line and Target Link;
In step S202, according to the link identification of current ink and the link identification of Target Link, link switching is generated
Configuration file.
When generating link switching configuration file, link handover request can be parsed automatically, to obtain the link of current ink
The link identification of mark and Target Link, and then according to the link identification of current ink and the link identification of Target Link, generation
Link switching configuration file, so as to realize the automatic switchover to link by way of automatically generating link switching configuration file.
In one embodiment, link switching configuration file includes at least one of following information:
Host address corresponding to the link identification of Target Link, Target Link, need what is restarted when switching to Target Link
Service.
Link switching configuration file includes but is not limited to above- mentioned information, for example, it is also possible to the service restarted including needs
Most short startup time, boot sequence etc.;
The link identification of Target Link is for the unique mark Target Link, and the link identification of current ink is also used for only
One identifies the current ink;
Host address corresponding to Target Link can be one or more, and when host address corresponding to Target Link includes
When multiple, any one host address may be selected, either one host address of stability highest or frequency of use highest.
In one embodiment, the service restarted is needed when link switching configuration file includes switching to Target Link
When, link switching configuration file corresponding with link switching request is automatically generated, including:
Determine the current service being currently running on current ink;
It is determined that be pre-configured with link switching when need the preset service type restarted;
The clothes that needs are restarted when being defined as switching to Target Link by the service for meeting preset service type in current service
Business.
When it is determined that needing the service restarted, it may be determined that the current service being currently running on current ink, and then determine pre-
The preset service type restarted is needed during the link switching first configured, in order to which preset service type will be met in current service
Service automatically determines the service that needs are restarted during to switch to Target Link, so after Target Link is switched to, it is only necessary to weight
The service that these needs are restarted is opened, and other service holdings can and need not restart.
In one embodiment, link is automatically switched to by current ink according to link switching configuration file, control device
Target Link corresponding to handover request, including:
Link switching configuration file is sent to main frame corresponding to host address, using control main frame by Target Link to set
Standby offer service, and restart the service for needing to restart.
When controlling the equipment to switch to Target Link, the link switching configuration file can be automatically sent to host address
Corresponding main frame, service is provided as equipment by Target Link using control main frame, and restart the service for needing to restart, so as to automatic
The switching of link is realized, improves link switching efficiency.
As shown in figure 3, the present invention also provides a kind of link switching device, including:
Generation module 301, it is configured as, when receiving the link switching request of equipment transmission, automatically generating and cutting with link
Change the corresponding link switching configuration file of request;
Control module 302, it is configured as being automatically switched to by current ink according to link switching configuration file, control device
Target Link corresponding to link switching request.
As shown in figure 4, in one embodiment, generation module 301 can include:
Analyzing sub-module 3011, it is configured as, when receiving link switching request, parsing link handover request, being worked as
The link identification of preceding link and the link identification of Target Link;
Submodule 3012 is generated, is configured as the link identification of the link identification and Target Link according to current ink, it is raw
Into link handover configurations file.
In one embodiment, link switching configuration file includes at least one of following information:
Host address corresponding to the link identification of Target Link, Target Link, need what is restarted when switching to Target Link
Service.
In one embodiment, generation module includes:
First determination sub-module, it is configured as needing to restart when link switching configuration file includes switching to Target Link
Service when, determine the current service being currently running on current ink;
Second determination sub-module, it is configured to determine that the preset service class that needs are restarted during the link switching being pre-configured with
Type;
3rd determination sub-module, it is configured as being defined as switching to by the service for meeting preset service type in current service
The service restarted is needed during Target Link.
In one embodiment, control module includes:
Sending submodule, it is configured as sending link switching configuration file to main frame corresponding to host address, with control
Main frame provides service by Target Link for equipment, and restarts the service for needing to restart.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Finally, the link switching device in the present invention is applied to equipment equipment.For example, it may be mobile phone, computer,
Digital broadcast equipment, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant
Deng.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The shape for the computer program product that usable storage medium is implemented on (including but is not limited to magnetic disk storage and optical memory etc.)
Formula.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.