Summary of the invention
For overcoming problem present in correlation technique, the present invention provides a kind of upgrade control method and device.
First aspect according to embodiments of the present invention, it is provided that a kind of upgrade control method, is applied to first terminal, including:
When receiving the upgrade command that the second terminal sends, generate and switched by USB main equipment pattern for control the second terminal
To USB from the pattern switching command of equipment mode and to described second terminal transmission;
When reading the pattern identification of described second terminal, determine that described second terminal pattern has switched;
Send AKU to described second terminal and obtain request, exist so that described second terminal obtains request according to described packet
Preset memory locations obtains AKU;
When receiving the AKU that described second terminal sends, described AKU is utilized to upgrade.
Alternatively, described method also includes:
After upgrading completes, generate the mould being switched to USB main equipment pattern for controlling the second terminal by USB from equipment mode
Formula reduction instruction also sends to described second terminal;
Detect whether to read the pattern identification of described second terminal;
When the pattern identification of described second terminal cannot be read, determine that described second terminal has been reduced.
Alternatively, described method also includes:
Generation mode mark obtains instruction and is sent to the second terminal;
Detect whether to receive the pattern identification that described second terminal sends;
When receiving the pattern identification that described second terminal sends, it is judged that described pattern identification whether with preset from device identification
Identical;
When described pattern identification with preset when device identification is identical, determine the pattern identification reading described second terminal.
In another embodiment of the present invention, it is provided that a kind of upgrade control method, it is applied to the second terminal, including:
When receiving the pattern switching command that first terminal sends, whether detection current operation mode is USB main equipment pattern;
When current operation mode is USB main equipment pattern, USB main equipment pattern switch to USB from setting mode of operation
Standby pattern;
After mode of operation has switched, identify to described first terminal sending mode;
When receiving the AKU acquisition request that described first terminal sends, obtain and described AKU at preset memory locations
Obtain AKU corresponding to request and send to described first terminal.
Alternatively, described method also includes:
Detect whether to receive and be switched to the pattern of USB main equipment pattern also by USB from equipment mode for controlling the second terminal
Former instruction;
When receiving described reduction instruction, mode of operation is reduced to USB main equipment pattern by USB from equipment mode.
The third aspect according to embodiments of the present invention, it is provided that a kind of upgrading controls device, is applied to first terminal, including:
First generation module, for when receive second terminal send upgrade command time, generate for control the second terminal by
USB main equipment pattern is switched to the USB pattern switching command from equipment mode and sends to described second terminal;
Determine module, for when reading the pattern identification of described second terminal, determine that described second terminal pattern has switched
Become;
First sending module, obtains request, so that described second terminal is according to institute for sending AKU to described second terminal
State packet and obtain request at preset memory locations acquisition AKU;
Upgraded module, for when receiving the AKU that described second terminal sends, utilizing described AKU to upgrade.
Alternatively, described device also includes:
Second generation module, for after upgrading completes, generates and is switched to from equipment mode by USB for control the second terminal
The pattern reduction of USB main equipment pattern instructs and sends to described second terminal;
First detection module, for detecting whether the pattern identification of described second terminal cannot be read;
First determines module, for when reading the pattern identification of described second terminal, determines described second terminal also
Former complete.
Alternatively, described device also includes:
3rd generation module, obtains instruction for generation mode mark and is sent to the second terminal;
Second detection module, for detecting whether receive the pattern identification that described second terminal sends;
Judge module, for when receiving the pattern identification that described second terminal sends, it is judged that described pattern identification whether with
Preset identical from device identification;
Second determines module, for when described pattern identification with default when device identification is identical, determine and read described second
The pattern identification of terminal.
Fourth aspect according to embodiments of the present invention, it is provided that a kind of upgrading controls device, is applied to the second terminal, including:
3rd detection module, for when receiving the pattern switching command that first terminal sends, detection current operation mode is
No for USB main equipment pattern;
Handover module, for when current operation mode is USB main equipment pattern, by mode of operation by USB main equipment pattern
Switch to USB from equipment mode;
Second sending module, for after mode of operation has switched, identifies to described first terminal sending mode;
Acquisition module, for when receiving the AKU acquisition request that described first terminal sends, obtaining at preset memory locations
Take and obtain AKU corresponding to request with described AKU and send to described first terminal.
Alternatively, described device also includes:
4th detection module, is switched to USB by USB from equipment mode for detecting whether receive for controlling the second terminal
The pattern reduction instruction of main equipment pattern;
Recovery module, for when receiving described reduction instruction, being reduced to USB by USB from equipment mode by mode of operation
Main equipment pattern.
The technical scheme that embodiments of the invention provide can include following beneficial effect:
The present invention is by when receiving the upgrade command that the second terminal sends, firstly generating for controlling the second terminal by USB
Main equipment pattern is switched to the USB pattern switching command from equipment mode and sends to described second terminal, described when reading
During the pattern identification of the second terminal, it may be determined that described second terminal pattern has switched, then send to described second terminal
AKU obtains request, when receiving the AKU that described second terminal sends, it is possible to use described AKU is upgraded.
The present invention provide the method, it is possible to the second terminal is switched to USB after equipment mode, utilize the second terminal from
Preset memory locations obtains AKU, and data transmission is more stable, and data transmission bauds is fast, and first terminal is when needs are upgraded etc.
Treat that the time is short.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, can not limit
The present invention processed.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to accompanying drawing
Time, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.In following exemplary embodiment
Described embodiment does not represent all embodiments consistent with the present invention.On the contrary, they are only and the most appended power
The example of the apparatus and method that some aspects that described in detail in profit claim, the present invention are consistent.
As it is shown in figure 1, in one embodiment of the invention, it is provided that a kind of upgrade control method, it is applied to first terminal,
In embodiments of the present invention, first terminal can refer to the display screen end of intelligent television, and display screen end can with the second terminal in advance
Setting up communication connection, the second terminal can refer to that the main control chip of television, the second terminal can pre-set USB OTG function,
I.e. there are two mode of operations: USB main equipment pattern and USB, from equipment mode, said method comprising the steps of.
In step S101, when receiving the upgrade command that the second terminal sends, generate for controlling the second terminal by USB
Main equipment pattern is switched to the USB pattern switching command from equipment mode and sends to described second terminal.
In embodiments of the present invention, the second terminal is under USB main equipment pattern, and the second terminal can identify discovery first terminal,
But first terminal None-identified finds the second terminal, and at this moment, the second terminal can control first terminal, and the second terminal is at USB
From equipment mode, first terminal can identify and find the second terminal, the second terminal None-identified discovery first terminal, at this moment,
First terminal can use USB mode transmit data to control the second terminal and first terminal, such data transmission bauds faster,
And it is more stable.
Upgrade command can refer to instruction that the second terminal sends, need upgrading for the software notifying in first terminal, pattern
Switching command can be first terminal and the instruction of the second terminal agreement, after the second terminal receives pattern switching command, and can
Automatically to carry out pattern switching, i.e. it is switched to USB from equipment mode by USB main equipment pattern.
In this step, can first detect whether to receive the upgrade command that the second terminal sends, when receiving upgrade command
Time, generation mode switching command, then pattern switching command is sent to the second terminal.
By step S101, it is simple to mode of operation, according to pattern switching command, is switched by the second terminal by USB main equipment pattern
To USB from equipment mode.
In step s 102, when reading the pattern identification of described second terminal, determine that described second terminal pattern has switched
Become.
In embodiments of the present invention, the second terminal is when switching to USB from equipment mode, and its pattern identification also can be carried out accordingly
Switching, such as: pattern identification is switched to slave etc. by the host before switching.
In this step, can first detect whether to read the pattern identification of the second terminal, owing to the second terminal is being cut
Being changed to USB after equipment mode, the second terminal can be controlled by first terminal, so at this moment first terminal can pass through
The modes such as instruction are obtained to the second terminal sending mode mark, to get the pattern identification of the second terminal, further, since the
Two terminals can be found by first terminal identification, so the pattern identification of discovery the second terminal that first terminal can also be autonomous,
When reading the pattern identification of the second terminal, it may be determined that the pattern of the second terminal has switched.
In step s 103, send AKU to described second terminal and obtain request.
By step S103, described second terminal can be made to obtain request according to described packet and to obtain liter at preset memory locations
Level bag.
In embodiments of the present invention, AKU acquisition request can refer to control the second terminal and removes preset memory locations acquisition liter
The request of level bag, preset memory locations can refer to preset FLASH memory area etc..
In step S104, when receiving the AKU that described second terminal sends, described AKU is utilized to upgrade.
The present invention is by when receiving the upgrade command that the second terminal sends, firstly generating for controlling the second terminal by USB
Main equipment pattern is switched to the USB pattern switching command from equipment mode and sends to described second terminal, described when reading
During the pattern identification of the second terminal, it may be determined that described second terminal pattern has switched, then send to described second terminal
AKU obtains request, when receiving the AKU that described second terminal sends, it is possible to use described AKU is upgraded.
The method that the embodiment of the present invention provides, it is possible to switching to USB after equipment mode the second terminal, utilizing second
Terminal obtains AKU from preset memory locations, and data transmission is more stable, and data transmission bauds is fast, and first terminal rises at needs
During level, the waiting time is short.
In another embodiment of the present invention, described method is further comprising the steps of.
In step s 201, after upgrading completes, generate and be switched to USB by USB from equipment mode for control the second terminal
The pattern reduction of main equipment pattern instructs and sends to described second terminal.
In embodiments of the present invention, reduction instruction can refer to the instruction that first terminal and the second terminal are made an appointment, second eventually
After termination receives reduction instruction, can automatically carry out pattern reduction, be i.e. switched to USB main equipment mould by USB from equipment mode
Formula.
In this step, can first detect whether to have utilized AKU upgrading complete, concrete detection mode can be inspection
Survey whether flag of having upgraded is switched to " 1 " by " 0 " when not upgrading complete, rise whether level logs terminates etc., work as liter
After level completes, can be with generation mode reduction instruction, instruction of then pattern being reduced is sent to the second terminal.
In step S202, detect whether to read the pattern identification of described second terminal.
In embodiments of the present invention, due to the second terminal by USB after equipment mode is reduced to USB main equipment pattern, it is impossible to
Being found by first terminal and identify, also cannot be controlled by first terminal, so at this moment, first terminal cannot read second eventually
The pattern identification of end.
When the pattern identification of described second terminal cannot be read, in step U203, determine that described second terminal has been reduced
Become.
The present invention by after upgrading completes, can generate and is switched to USB by USB from equipment mode for controlling the second terminal
The pattern reduction of main equipment pattern instructs and sends to described second terminal, then detects whether to read described second eventually
The pattern identification of end, when reading the pattern identification of described second terminal, it may be determined that described second terminal has been reduced
Become.
The method that the embodiment of the present invention provides, it is possible to automatically control the second terminal and carry out pattern reduction, i.e. by USB from equipment
Pattern is reduced to USB main equipment pattern, and after pattern is reduced, it is possible to determine second eventually by device identification cannot be read
The pattern reduction of end is complete.
In another embodiment of the present invention, described method is further comprising the steps of.
In step S301, generation mode mark obtains instruction and is sent to the second terminal.
In embodiments of the present invention, pattern identification reads instruction and may be used for controlling the second terminal and read receiving pattern identification
After instruction, the pattern identification of the second terminal current operation mode is sent to first terminal.
In step s 302, detect whether to receive the pattern identification that described second terminal sends.
When receiving the pattern identification that described second terminal sends, in step S303, it is judged that described pattern identification whether with
Preset identical from device identification.
In embodiments of the present invention, first terminal and the second terminal the second terminal of can making an appointment is switched to when equipment make
From device identification, in order to first terminal can be verified.
When described pattern identification with preset when device identification is identical, in step s 304, determine and read described second terminal
Pattern identification.
The present invention reads instruction by firstly generating pattern identification and is sent to the second terminal, then detects whether to read described
The pattern identification of the second terminal, when reading the pattern identification of described second terminal, then judge described pattern identification whether with
Preset identical from device identification, when described pattern identification with default when device identification is identical, it may be determined that read described the
The pattern identification of two terminals.
The method that the embodiment of the present invention provides, it is possible to automatically by the pattern identification of the second terminal received and the second terminal
Preset and contrast from device identification, in order to determine that the second terminal has switched to USB from equipment mode.
As in figure 2 it is shown, in another embodiment of the present invention, it is provided that a kind of upgrade control method, it is applied to the second terminal,
Comprise the following steps.
In step S401, when receiving the pattern switching command that first terminal sends, whether detection current operation mode is
USB main equipment pattern.
In embodiments of the present invention, the mode of operation for the second terminal is that USB main equipment pattern or USB are from equipment mode
Time, it should the mode of operation that default corresponding pattern identification bit-identify the second terminal is presently in, so, in this step,
Can get whether the mode of operation that the second terminal is presently in is USB main equipment pattern by detecting this pattern identification position.
When current operation mode is USB main equipment pattern, in step S402, by mode of operation by USB main equipment pattern
Switch to USB from equipment mode.
In this step, mode of operation having USB main equipment pattern switch to USB from equipment mode, accordingly, USB master sets
The data transfer mode of each interface corresponding to standby pattern, interface connected mode etc. also will switch to USB from equipment mould accordingly
The data transfer mode of each interface, interface connected mode etc. in formula, and, that presets is used for mark the second current institute of terminal
The pattern identification position of the mode of operation at place should also be as switching accordingly, and such as the state of USB main equipment pattern is by " ON "
Switching to " OFF ", USB is switched to " ON " by " OFF " from the state of equipment mode, or, the shape of USB main equipment pattern
State is switched to " 0 " by " 1 ", and USB is switched to " 1 " etc. from the state of equipment mode by " 0 ".
In step S403, after mode of operation has switched, identify to described first terminal sending mode.
In step s 404, when receiving the AKU acquisition request that described first terminal sends, obtain at preset memory locations
Take and obtain AKU corresponding to request with described AKU and send to described first terminal.
In this step, can be after receiving the AKU acquisition request that first terminal sends, access preset storage position,
And from preset memory locations, obtaining the AKU corresponding with AKU acquisition request, correspondence here can refer to obtain with AKU
Take the AKU identical for AKU ID in request, then AKU is sent to first terminal.
The present invention is by when receiving the pattern switching command that first terminal sends, and whether first detection current operation mode is
USB main equipment pattern, when current operation mode is USB main equipment pattern, can be by mode of operation by USB main equipment pattern
Switch to USB from equipment mode, after mode of operation has switched, can identify to described first terminal sending mode, when
When receiving the AKU acquisition request that described first terminal sends, can obtain at preset memory locations and obtain with described AKU
Take AKU corresponding to request and send to described first terminal.
The method that the embodiment of the present invention provides, it is possible to automatically according to the pattern switching command of first terminal by USB main equipment mould
Formula switch to USB from equipment mode, after switching completes, can be automatically according to the control of first terminal, from default memory block
Territory obtains AKU, and is sent to first terminal, it is simple to first terminal utilizes AKU to upgrade, and the waiting time is short, and
Data transmission is stable, and speed is fast.
In another embodiment of the present invention, described method is further comprising the steps of.
In step S501, detect whether to receive and be switched to USB master by USB from equipment mode and set for controlling the second terminal
The pattern reduction instruction of standby pattern.
In embodiments of the present invention, reduction instruction can refer to the instruction that first terminal and the second terminal are made an appointment, second eventually
After termination receives reduction instruction, can automatically carry out pattern reduction, be i.e. switched to USB main equipment mould by USB from equipment mode
Formula.
When receiving described reduction instruction, in step S502, mode of operation is reduced to USB by USB from equipment mode
Main equipment pattern.
In embodiments of the present invention, due to the second terminal by USB after equipment mode is reduced to USB main equipment pattern, it is impossible to
Being found by first terminal and identify, also cannot be controlled by first terminal, so at this moment, first terminal will be unable to read second
The pattern identification of terminal.
The present invention is switched to USB master by USB from equipment mode by first detecting whether to receive and sets for controlling the second terminal
The pattern reduction instruction of standby pattern, when receiving described reduction instruction, can be cut mode of operation from equipment mode by USB
It is changed to USB main equipment pattern.
The method that the embodiment of the present invention provides, it is possible to according to the control of first terminal, have USB to revert to USB from equipment mode
Main equipment pattern, to complete this upgrading control.
As it is shown on figure 3, in another embodiment of the present invention, it is provided that a kind of upgrading controls device, is applied to first terminal,
Including: the first generation module 11, determine module the 12, first sending module 13 and upgraded module 14.
First generation module 11, for when receiving the upgrade command that the second terminal sends, generates for controlling the second terminal
It is switched to the USB pattern switching command from equipment mode by USB main equipment pattern and sends to described second terminal.
Determine module 12, for when reading the pattern identification of described second terminal, determine described second terminal pattern switching
Complete.
First sending module 13, for described second terminal send AKU obtain request so that described second terminal according to
Described packet obtains request and obtains AKU at preset memory locations.
Upgraded module 14, for when receiving the AKU that described second terminal sends, utilizing described AKU to upgrade.
In another embodiment of the present invention, described device also includes: the second generation module, first detection module and first are true
Cover half block.
Second generation module, for after upgrading completes, generates and is switched to from equipment mode by USB for control the second terminal
The pattern reduction of USB main equipment pattern instructs and sends to described second terminal.
First detection module, for detecting whether the pattern identification of described second terminal cannot be read.
First determines module, for when reading the pattern identification of described second terminal, determines described second terminal also
Former complete.
In another embodiment of the present invention, described device also includes: the 3rd generation module, the second detection module, judge mould
Block and second determines module.
3rd generation module, obtains instruction for generation mode mark and is sent to the second terminal.
Second detection module, for detecting whether receive the pattern identification that described second terminal sends.
Judge module, for when receiving the pattern identification that described second terminal sends, it is judged that described pattern identification whether with
Preset identical from device identification.
Second determines module, for when described pattern identification with default when device identification is identical, determine and read described second
The pattern identification of terminal.
As shown in Figure 4, in another embodiment of the present invention, it is provided that a kind of upgrading controls device, is applied to the second terminal,
Including: the 3rd detection module 21, handover module the 22, second sending module 23 and acquisition module 24.
3rd detection module 21, for when receiving the pattern switching command that first terminal sends, detects current operation mode
Whether it is USB main equipment pattern.
Handover module 22, for when current operation mode is USB main equipment pattern, by mode of operation by USB main equipment mould
Formula switches to USB from equipment mode.
Second sending module 23, for after mode of operation has switched, identifies to described first terminal sending mode.
Acquisition module 24, for when receiving the AKU acquisition request that described first terminal sends, at preset memory locations
Obtain and obtain AKU corresponding to request with described AKU and send to described first terminal.
In another embodiment of the present invention, described device also includes: the 4th detection module and recovery module.
4th detection module, is switched to USB by USB from equipment mode for detecting whether receive for controlling the second terminal
The pattern reduction instruction of main equipment pattern.
Recovery module, for when receiving described reduction instruction, being reduced to USB by USB from equipment mode by mode of operation
Main equipment pattern.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other reality of the present invention
Execute scheme.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes or
Adaptations is followed the general principle of the present invention and includes the undocumented common knowledge or used in the art of the present invention
Use technological means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are by appended right
Requirement is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and can
To carry out various modifications and changes without departing from the scope.The scope of the present invention is only limited by appended claim.