WO2023087748A1 - Terminal upgrading method and system, and terminal, upgrading device and usb bus - Google Patents

Terminal upgrading method and system, and terminal, upgrading device and usb bus Download PDF

Info

Publication number
WO2023087748A1
WO2023087748A1 PCT/CN2022/105136 CN2022105136W WO2023087748A1 WO 2023087748 A1 WO2023087748 A1 WO 2023087748A1 CN 2022105136 W CN2022105136 W CN 2022105136W WO 2023087748 A1 WO2023087748 A1 WO 2023087748A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
state
pin
upgrade
enter
Prior art date
Application number
PCT/CN2022/105136
Other languages
French (fr)
Chinese (zh)
Inventor
郭时特
Original Assignee
深圳市广和通无线通信软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市广和通无线通信软件有限公司 filed Critical 深圳市广和通无线通信软件有限公司
Publication of WO2023087748A1 publication Critical patent/WO2023087748A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Definitions

  • the present application relates to the technical field of intelligent terminals, in particular to a terminal upgrading method, system, terminal, upgrading equipment and USB bus (Universal Serial Bus, Universal Serial Bus).
  • the commonly used terminal upgrade scheme needs to press and hold a special button, for example, press and hold the force boot (Boot Settings Configuration) button to force the terminal to enter the upgrade mode, so as to upgrade in the upgrade mode.
  • a special button for example, press and hold the force boot (Boot Settings Configuration) button to force the terminal to enter the upgrade mode, so as to upgrade in the upgrade mode.
  • a terminal upgrading method, system, terminal, upgrading device and USB bus are provided, which can improve the convenience of terminal upgrading.
  • the pin state includes DM pin state and/or DP pin state
  • identifying whether the terminal needs to enter the upgrade mode according to the pin state includes:
  • the preset DM pin state is that the DM pin is at a high level
  • the preset DP pin state is that the DP pin is at a low level
  • the method also includes:
  • the detecting whether the USB interface is connected to the USB bus includes:
  • the method also includes:
  • the detecting whether the charging type of the battery of the terminal is normal includes:
  • the charging type is an SDP charging type, a CDP charging type or a DCP charging type
  • the charging type is the SDP charging type, the CDP charging type or the DCP charging type, it is determined that the charging type of the battery is normal.
  • a method for upgrading a terminal which is applied to an upgrading device, and the upgrading device is used to connect to a USB interface of a terminal through a USB bus, and the method includes:
  • the upgrade device When the upgrade device is connected to the USB interface through a USB bus, adjust the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode, so as to instruct the terminal to enter the upgrade mode, and in the Upgrade in the above upgrade mode.
  • the bus state includes a DM data line state and/or a DP data line state
  • adjusting the bus state of the USB bus to a state that triggers the terminal to enter an upgrade mode includes:
  • the preset DM data line state is that the DM data line state is at high level
  • the preset DP data line state is that the DP data line state is at low level
  • a terminal upgrading device applied to a terminal, the terminal includes a USB interface, the USB interface is used to connect with a matching USB bus, and the device includes:
  • a detection module configured to detect the pin state of the USB interface
  • An identification module configured to identify whether the terminal needs to enter an upgrade mode according to the state of the pin
  • the upgrade module is configured to enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
  • a terminal upgrading device which is applied to upgrading equipment, and the upgrading equipment is used to connect to a USB interface of a terminal through a USB bus, and the device includes:
  • An adjustment module configured to adjust the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode when the upgrade device is connected to the USB interface through the USB bus, so as to instruct the terminal to enter the upgrade mode mode, and perform the upgrade in said upgrade mode.
  • a terminal includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is made to execute the steps of the above method.
  • An upgrade device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method.
  • a USB bus the bus state of the USB bus is configured to trigger the terminal to enter the state of the upgrade mode, and the USB bus is used to connect with the USB interface of the terminal to instruct the terminal to enter the upgrade mode, and in the Upgrade in the above upgrade mode.
  • a terminal upgrade system comprising:
  • USB bus the bus state of the USB bus is configured to trigger the terminal to enter the state of the upgrade mode
  • the terminal includes a USB interface, the USB interface is used to connect with a matching USB bus, the terminal is used to detect the pin state of the USB interface, and identify whether the terminal needs to enter the upgrade mode according to the pin state , in response to the identification result that the pin state indicates that the terminal needs to enter the upgrade mode, enter the upgrade mode, and perform upgrade in the upgrade mode.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are realized.
  • Fig. 1 is a schematic diagram of an application environment of a terminal upgrading method in an embodiment
  • Fig. 2 is a schematic flow chart of a terminal upgrading method in an embodiment
  • Fig. 3 is a schematic flow chart of a terminal upgrading method in another embodiment
  • Fig. 4 is a schematic flow chart of a terminal upgrading method in another embodiment
  • Fig. 5 is a schematic flow chart of a terminal upgrading method in another embodiment
  • Fig. 6 is a schematic flow chart of a terminal upgrading method in another embodiment
  • Fig. 7 is a schematic structural diagram of a terminal upgrading device in an embodiment
  • Fig. 8 is a schematic diagram of an internal structure of a terminal in an embodiment
  • Fig. 9 is a schematic diagram of the internal structure of an upgrading device in an embodiment.
  • FIG. 1 is a schematic diagram of an application environment of a method for upgrading a terminal in an embodiment.
  • the application environment includes a USB bus 110 , a terminal 120 and an upgrade device 130 .
  • the bus status of the USB bus 110 is configured as a status that triggers the terminal 120 to enter the upgrade mode.
  • the terminal 120 includes a USB interface, and the USB interface is used to connect with the corresponding USB bus 110.
  • the terminal 120 is used to determine whether to enter the upgrade mode according to the pin state of the USB interface, so as to upgrade in the upgrade mode.
  • the upgrading device 130 is used to connect with the USB interface of the terminal 120 through the USB bus 110 .
  • the upgrade device 130 when the terminal 120 needs to be upgraded, the upgrade device 130 is connected to the USB interface of the terminal 120 through the USB bus 110, because the bus status of the USB bus 110 is configured to trigger the terminal 120 to enter the upgrade mode, and The USB interface is connected to the USB bus 110 , so the pin state of the corresponding USB interface will also change, so the terminal 120 can determine whether to enter the upgrade mode according to the pin state of the USB interface.
  • the upgrade device 130 can be a device that supplies power to the USB bus 110, and the bus state of the USB bus 110 is configured to trigger the state that the terminal 120 enters the upgrade mode, because the bus state of the USB bus 110 is configured to trigger
  • the terminal 120 can confirm whether to enter the upgrade mode according to the pin state of the USB interface.
  • the upgrade device 130 is connected to the USB interface through the USB bus 110, and the bus state of the USB bus 110 is not configured as a state that triggers the terminal 120 to enter the upgrade mode.
  • the bus status is configured to trigger the terminal 120 to enter the upgrade mode, so that the terminal 120 can confirm whether to enter the upgrade mode according to the pin status of the USB interface.
  • the following embodiments illustrate how to improve the convenience of terminal upgrade.
  • FIG. 2 is a schematic flowchart of a method for upgrading a terminal in an embodiment.
  • the terminal upgrade method in this embodiment is described by taking the terminal running on the terminal in FIG. 1 as an example.
  • the terminal upgrading method includes step 210 to step 230 .
  • Step 210 detecting the state of the pins of the USB interface.
  • the USB interface refers to an interface on the terminal.
  • the USB interface includes but is not limited to a USB-A interface, a USB-B interface, and a USB-C interface, which are not limited here.
  • the pin status refers to the status of the pins on the USB interface.
  • the pin state in this embodiment includes but not limited to at least one of the VCC pin state, the DP pin state, the DM pin state, and the GND pin state, which is not limited in this embodiment.
  • the trigger mode for the terminal to detect the state of the pins of the USB interface may be triggered when the terminal is turned on, that is, during the booting process of the terminal, the terminal detects the state of the pins of the USB interface.
  • the terminal there is no specific limitation on how to trigger the terminal to detect the state of the pins of the USB interface.
  • Step 220 identifying whether the terminal needs to enter the upgrade mode according to the state of the pin.
  • the upgrade mode refers to a mode in which the terminal enters an upgrade state.
  • the terminal identifies whether it needs to enter the upgrade mode according to the state of the pin.
  • Step 230 Enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
  • the way to upgrade the terminal in the upgrade mode is that the upgrade package needs to be obtained first, and the upgrade is performed by installing the upgrade package.
  • the way to obtain the upgrade package may be that the terminal downloads the installation package through the cellular network technology, or the terminal receives the installation package sent by the upgrade device through the USB bus, which is not limited in this embodiment.
  • the bus state of the USB bus needs to be configured to not trigger the terminal to enter the upgrade mode.
  • the terminal when the terminal recognizes that the pin state indicates that the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode, so as to perform upgrade in the upgrade mode.
  • the terminal by detecting the pin state of the USB interface, and identifying whether the terminal needs to enter the upgrade mode according to the pin state, when the pin state indicates that the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode, thereby upgrading Upgrade in mode, because the terminal can judge whether to enter the upgrade mode according to the pin state of the USB interface, that is, the entry of the upgrade mode of the terminal is triggered by the pin state of the USB interface on the terminal, so when it is necessary to update the terminal When upgrading, you only need to connect the USB bus to the USB interface, and configure the USB bus to trigger the terminal to enter the upgrade mode.
  • the pin status of the USB interface of the terminal will also change, indicating that the terminal needs to enter
  • the state of the upgrade mode when the terminal determines that the pin status indicates that the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode to upgrade.
  • the terminal determines that the pin status indicates that the terminal needs to enter the upgrade mode
  • the terminal enters the upgrade mode to upgrade.
  • it is not necessary to press and hold the special button to make the terminal enter the upgrade mode. achieving the technical effect of improving the convenience of terminal upgrades.
  • the terminal upgrade method can be triggered at the earliest stage of terminal startup, such as the BootLoader (boot loading) stage of the Android (Android) platform.
  • the terminal upgrade method of the above embodiment when the pin status does not indicate that the terminal needs to enter the upgrade mode, the terminal starts up normally and enters the main interface.
  • the pin status includes DM pin status and/or DP pin status.
  • the pin state includes the DM pin state and/or the DP pin state, that is, the terminal can determine whether to enter the upgrade mode according to the DM pin state, or the terminal can determine whether it needs to enter the upgrade mode according to the DP pin state. Entering the upgrade mode may also be that the terminal determines whether to enter the upgrade mode according to the state of the DM pin and the state of the DP pin.
  • identifying whether the terminal needs to enter the upgrade mode according to the pin status includes:
  • the terminal when the pin state includes the DM pin state, when the DM pin state is consistent with the preset DM pin state, the terminal enters the upgrade mode; when the pin state includes the DP pin state, then when the DP pin state When it is consistent with the preset DP pin state, the terminal enters the upgrade mode; when the pin state includes DM pin state and DP pin state, then when the DM pin state is consistent with the preset DM pin state, and the DP pin state When the state of the preset DP pin is consistent, the terminal enters the upgrade mode.
  • the terminal can only identify whether it needs to perform an upgrade mode through at least one of the DM pin state and the DP pin state, and the DM pin state and the DP pin state will not affect the security of the USB interface. It brings hidden dangers, so it can improve the security when the terminal is upgraded.
  • the bus state of the USB bus can be adjusted to make the DM pin state of the USB interface consistent with the preset DM pin state, and/or make the DP pin state of the USB interface consistent with the preset DP pin state , thus triggering the upgrade of the terminal.
  • the DP data line state of the USB bus is adjusted to be consistent with the preset DP data line state.
  • the preset DP data line state refers to when the USB bus is connected to the USB interface. , which can make the state of the DP pin of the USB interface consistent with the state of the preset DP pin.
  • the preset DM data line state means that when the USB bus is connected to the USB interface, it can make The DM pin state of the USB interface is consistent with the preset DM pin state.
  • the terminal recognizes whether it needs to enter the upgrade mode through the DP pin status and the DM pin status, instead of simply relying on the DM pin status Or DP pin state, can eliminate the problem of DM pin state or DP pin state change caused by normal operation, which leads to the misidentification of the upgrade mode, and improves the accuracy of entering the upgrade mode.
  • the preset state of the DM pin is that the DM pin is at a high level
  • the preset state of the DP pin is that the DP pin is at a low level
  • the logic level the minimum input high level allowed when the input of the logic gate is guaranteed to be high.
  • the input level is considered to be high.
  • Low level (Vil) refers to the maximum input low level allowed when the input of the logic gate is guaranteed to be low level.
  • the input level is lower than Vil, the input level is considered to be low level.
  • the low level is 0V, that is, short circuit; the high level is 1.8V.
  • the DP data line and DM data line of the USB bus can be left out of the interface respectively, and the DP data line is grounded and short-circuited when in use, and the DM data line is connected to a high level (usually 1.8V).
  • the preset state of the DM pin is that the DM pin is at a high level, and correspondingly, the state of the DM data line of the USB bus is at a high level.
  • the default state of the DP pin is that the state of the DP pin is at a low level, and correspondingly, the state of the DP data line of the USB bus is at a low level.
  • the pin state of the USB interface indicates that the terminal needs to enter the upgrade mode, not necessarily because the USB bus is configured as a state that triggers the terminal to enter the upgrade mode, and the USB interface is connected to the USB bus, it may be because the terminal environment, or some abnormality occurs in the terminal itself, which causes the pin state of the USB interface to jump to a state indicating that the terminal needs to enter the upgrade mode, but in this case, according to the terminal upgrade method of the above-mentioned embodiment, the terminal still It will enter the upgrade mode, but in this case, it is not necessary for the terminal to enter the upgrade mode. When the terminal enters the upgrade mode, it will cause damage to the terminal. Therefore, it is necessary to improve the recognition accuracy of the terminal entering the upgrade mode.
  • the following embodiments describe how to improve the recognition accuracy of the terminal entering the upgrade mode on the basis of any of the above embodiments.
  • FIG. 3 is a schematic flowchart of a method for upgrading a terminal in another embodiment.
  • the terminal upgrading method includes step 310 to step 340 .
  • Step 310 detecting whether the USB interface is connected to a USB bus.
  • the terminal detects whether the USB interface is connected to the USB bus.
  • Step 320 in response to the detection result that the USB interface is connected to the USB bus, detect the state of the pins of the USB interface.
  • the terminal detects that the USB interface is connected to the USB bus, it detects the pin status of the USB interface.
  • the terminal detects that the USB interface is connected to the USB bus, it detects the pin status of the USB interface.
  • the terminal detects that the USB interface is connected to the USB bus.
  • Step 330 identifying whether the terminal needs to enter the upgrade mode according to the state of the pin.
  • the terminal when the terminal detects that the USB interface is connected to the USB bus, it can be considered that in the current situation, the terminal may need to be upgraded, it may be charging, or other circumstances. However, if the pin status also indicates that the terminal needs to enter the upgrade mode, it can be basically determined that the terminal needs to enter the upgrade mode, and it is not a misjudgment caused by the environment of the terminal or some abnormality of the terminal itself.
  • Step 340 Enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
  • the pin state of the USB interface is detected, so as to identify whether it is necessary to enter the USB interface according to the pin state of the USB interface.
  • Upgrade mode when it is detected that the USB interface is connected to the USB bus, it can be considered that in the current situation, the terminal may need to be upgraded, it may be charging, or other situations.
  • the pin status also indicates that the terminal needs to enter the upgrade mode, it can be basically determined that the terminal needs to enter the upgrade mode, not because of the environment in which the terminal is located, or a misjudgment caused by some abnormalities in the terminal itself. In order to improve the identification accuracy of the terminal entering the upgrade mode, the security of the terminal is also improved correspondingly.
  • detecting whether the USB interface is connected to a USB bus includes:
  • the VBUS pin refers to a pin used for receiving power supply in the USB interface.
  • the VBUS pin is valid, it means that there is a USB bus to supply power to the USB interface, and at this time it can be considered that the USB interface is connected to the USB bus.
  • the USB bus is powered by the VBUS line to the VBUS pin of the USB interface.
  • the VBUS line is the power line for the HOST/HUB to supply power to the USB device, that is, the +5V of the normal USB device.
  • the terminal detects whether the VBUS pin of the USB interface is valid, and when it is valid, the terminal determines that the USB interface is connected to the USB bus, and can determine whether the USB interface is connected to the USB bus through the validity detection of the VBUS pin , the detection method is simple and easy. It should be noted that, generally, the validity detection of the VBUS pin can be realized by reading the presence detection of the battery.
  • FIG. 4 is a schematic flowchart of a method for upgrading a terminal in another embodiment.
  • the terminal upgrading method includes step 410 to step 440 .
  • Step 410 detecting whether the charging type of the battery of the terminal is normal.
  • the charging type refers to the charging type of the battery, which is related to the charging protocol.
  • the charging type in this embodiment includes, but is not limited to, the SDP charging type, the CDP charging type, and the DCP charging type, etc., which are not limited here.
  • the SDP charging type When the SDP charging type is suspended, the maximum load current is 2.5mA; when it is connected and not suspended, it is 100mA, and the current can be configured to be 500mA (maximum).
  • the device can use hardware to identify SDP, and the USB data lines D+ and D- are respectively grounded through 15k ⁇ , but they still need to be enumerated to comply with the USB specification.
  • the CDP charging type can provide up to 1.5A, which is different from USB 2.0 because the current can be provided before enumeration.
  • a device plugged into a CDP can identify the CDP using hardware handshaking by manipulating and monitoring the D+, D- lines. Perform a hardware test before converting the data line to USB, so that the CDP can be detected (and start charging) before enumeration.
  • the DCP charging type can deliver up to 1.5A and is identified by shorting D+ and D-, enabling the design of a DCP "wall adapter power supply" with a USB mini or mini-jack instead of a round plug or a fixed installation of a homemade connector Wire. Such an adapter can be charged with any USB cable (equipped with the correct plug).
  • Step 420 in response to the detection result that the charging type is normal, detect the pin status of the USB interface.
  • the terminal when the terminal detects that the charging type is normal, it detects the pin state of the USB interface.
  • the terminal for the step of detecting the state of the pins of the USB interface, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
  • Step 430 identifying whether the terminal needs to enter the upgrade mode according to the state of the pin.
  • Step 440 Enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
  • the terminal first detects whether the charging type of the battery of the terminal is normal, and when the charging type is normal, the terminal detects the pin state of the USB interface, thereby identifying whether it needs to enter the upgrade mode according to the pin state of the USB interface , when the terminal detects that the charging type of the battery is normal, it can be considered that in the current situation, the terminal may need to be upgraded, or it may be charging, or other circumstances.
  • the pin status also indicates that the terminal needs to enter the upgrade mode
  • the security of the terminal is also improved correspondingly.
  • the battery charging type of the terminal when the battery charging type of the terminal is normal, it can avoid the loss caused by charging to the machine when the charging type detection is abnormal, and can also protect the battery of the terminal, and at the same time avoid the problem of abnormal charging failure and upgrade failure, ensuring the terminal safety.
  • detecting whether the charging type of the battery of the terminal is normal includes: identifying whether the charging type is an SDP charging type, a CDP charging type or a DCP charging type; when the charging type is an SDP charging type, a CDP charging type or a DCP charging type , it is determined that the charging type of the battery is normal.
  • the charging type is SDP charging type, CDP charging type or DCP charging type
  • the charging type is SDP charging type, CDP charging type or DCP charging type
  • it is determined that the charging type of the battery is normal then It can ensure that the terminal is charged with a better charging method, ensuring the security of the terminal upgrade.
  • the terminal can identify the charging type of the battery by detecting the change of the charging signal, which is not specifically limited in this embodiment.
  • the terminal before the terminal detects the pin state of the USB interface, it can also detect whether the USB interface is connected to the USB bus, and detect whether the charging type of the battery of the terminal is normal. When it is detected that the USB interface is connected to the USB bus, And when it is detected that the charging type of the battery of the terminal is normal, the pin state of the USB interface is detected.
  • FIG. 5 is a schematic flowchart of a method for upgrading a terminal in another embodiment.
  • the terminal upgrade method is triggered during the boot process as an example for illustration.
  • the terminal upgrading method includes step 510 to step 580 .
  • Step 510 start booting.
  • Step 520 detecting whether the USB interface is connected to the USB bus.
  • step 530 when the terminal detects that the USB interface is connected to the USB bus, step 530 is executed.
  • step 580 is executed.
  • Step 530 detecting whether the charging type of the battery of the terminal is normal.
  • step 540 when the terminal detects that the charging type of the battery of the terminal is normal, step 540 is performed.
  • step 580 is executed.
  • Step 540 detecting the state of the DP pin and the state of the DM pin of the USB interface.
  • Step 550 judging whether the state of the DP pin is at low level.
  • step 560 when the state of the DP pin is at low level, step 560 is executed. If not, go to step 580 .
  • Step 560 judging whether the state of the DM pin is at a high level.
  • step 570 when the state of the DM pin is at a high level, step 570 is performed. If not, go to step 580 .
  • Step 570 enter the upgrade mode, and perform the upgrade in the upgrade mode.
  • Step 580 start up normally.
  • steps 550 and 560 can be reversed.
  • the terminal can judge whether it needs to enter the upgrade mode according to the pin state of the USB interface, that is, the entry of the upgrade mode of the terminal is triggered by the pin state of the USB interface on the terminal, so when needed When upgrading the terminal, you only need to connect the USB bus to the USB interface, and configure the USB bus to trigger the terminal to enter the upgrade mode. At this time, the pin status of the USB interface of the terminal will also change and become a representative terminal.
  • the terminal When the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode to upgrade when the pin status is determined to indicate that the terminal needs to enter the upgrade mode.
  • the terminal can also enter the terminal without pressing a special button for a long time.
  • the upgrade mode achieves the technical effect of improving the convenience of terminal upgrade.
  • FIG. 6 is a schematic flowchart of a method for upgrading a terminal in another embodiment.
  • the terminal upgrade method in this embodiment is described by taking the terminal and the upgrade device running on the terminal and the upgrade device in FIG. 1 as an example.
  • the method of this embodiment includes step 610 to step 640 .
  • Step 610 the upgrade device adjusts the bus status of the USB bus to a status that triggers the terminal to enter the upgrade mode.
  • this step is performed when the upgrading device is connected to the USB interface through the USB bus.
  • the bus status refers to the status of each line on the USB bus.
  • the bus state in this embodiment includes, but is not limited to, the state of the VCC power supply line, the state of the DP data line, the state of the DM data line, and the state of the GND ground line.
  • the upgrade device adjusts the bus state of the USB bus to the state that triggers the terminal to enter the upgrade mode. Since the USB bus is connected to the USB interface, the corresponding pin status of the USB interface will also indicate that the terminal needs to enter the upgrade mode. status.
  • Step 620 the terminal detects the pin state of the USB interface.
  • Step 630 the terminal identifies whether the terminal needs to enter the upgrade mode according to the pin state.
  • Step 640 The terminal enters the upgrade mode in response to the identification result that the pin state indicates that the terminal needs to enter the upgrade mode, and performs upgrade in the upgrade mode.
  • the upgrade device when the upgrade device is connected to the USB interface through the USB bus, the upgrade device can adjust the bus state of the USB bus to trigger the terminal to enter the upgrade mode, and then the terminal can detect the pins of the USB interface state, and identify whether the terminal needs to enter the upgrade mode according to the pin state, so as to respond to the identification result of the pin state indicating that the terminal needs to enter the upgrade mode, enter the upgrade mode, and upgrade in the upgrade mode, the terminal upgrade method is simple and easy , which improves the convenience of terminal upgrade.
  • the bus state includes the DM data line state and/or the DP data line state
  • the bus state may include the DM data line state
  • the bus state may include the DP data line state
  • the bus state may include the DP data line state.
  • Data line status and DM data line status When the bus state includes the DM data line state, the upgrade device can adjust the DM data line state to trigger the terminal to enter the upgrade mode; when the bus state includes the DP data line state, the upgrade device can adjust the DP data line state to trigger the terminal to enter the upgrade mode; When the bus state includes the DM data line state and the DP data line state, the upgrade device can adjust the DM data line state and the DP data line state to trigger the terminal to enter the upgrade mode.
  • adjusting the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode includes:
  • the upgrade device can adjust the DM data line state to be consistent with the preset DM data line state, thereby triggering the terminal to enter the upgrade mode; when the bus state includes the DP data line state, the upgrade device The state of the DP data line can be adjusted to be consistent with the preset state of the DP data line, thereby triggering the terminal to enter the upgrade mode; when the bus state includes the state of the DM data line and the state of the DP data line, the upgrade device can adjust the state of the DM data line to be consistent with the preset state The state of the DM data line is consistent, and the state of the DP data line is adjusted to be consistent with the state of the preset DP data line, thereby triggering the terminal to enter the upgrade mode.
  • the upgrade device can only trigger the terminal to enter the upgrade mode through the state of the DM data line and the state of the DP data line, which can improve the security of the terminal during upgrade.
  • the preset DM data line state is that the DM data line state is at high level
  • the preset DP data line state is that the DP data line state is at low level
  • the way the terminal is upgraded in the upgrade mode is that the upgrade package needs to be obtained first, and then the upgrade is performed by installing the upgrade package.
  • the way for the terminal to obtain the upgrade package may be that the upgrade device sends the sending package to the terminal through the USB bus.
  • the terminal after the terminal enters the upgrade mode, it sends an upgrade instruction to the upgrade device, and the upgrade device transmits the bus state data of the USB bus according to the upgrade instruction, and sends the upgrade package through the USB bus in the data transmission state. to the terminal.
  • the upgrade device when the trigger terminal enters the upgrade mode, the upgrade device adjusts the bus state of the USB bus to the state that triggers the terminal to enter the upgrade mode, and after the terminal enters the upgrade mode, the upgrade device adjusts the bus state of the USB bus to the state of data transmission, so that the upgrade package is sent to the terminal through the USB bus in the data transmission state. Since the USB bus that triggers the terminal to enter the upgrade mode is the same bus as the USB bus that sends the upgrade package, the need for terminal upgrades is reduced. The unique USB bus reduces the number of components required for terminal upgrades and reduces the cost of terminal upgrades.
  • steps in the flow diagrams of FIGS. 2-6 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in Figures 2-6 may include a plurality of sub-steps or stages, these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • FIG. 7 is a schematic structural diagram of a terminal upgrading device in an embodiment.
  • the terminal upgrading device in this embodiment is described by taking the terminal running on the terminal shown in FIG. 1 as an example.
  • the terminal upgrading device includes a detection module 710 , an identification module 720 and an upgrading module 730 . in:
  • the detection module 710 is used to detect the pin status of the USB interface; the identification module 720 is used to identify whether the terminal needs to enter the upgrade mode according to the pin status; the upgrade module 730 is used to respond to the identification result that the pin status indicates that the terminal needs to enter the upgrade mode, Enter upgrade mode and perform upgrades in upgrade mode.
  • the pin state includes a DM pin state and/or a DP pin state
  • the identification module 720 is specifically configured to when the DM pin state is consistent with a preset DM pin state, and/or the DP pin state is consistent with If the preset DP pin status is consistent, it is determined that the terminal needs to enter the upgrade mode.
  • the preset state of the DM pin is that the DM pin is at a high level
  • the preset state of the DP pin is that the DP pin is at a low level
  • the detection module 710 is also used to detect whether the USB interface is connected to the USB bus; in response to the detection result that the USB interface is connected to the USB bus, detect the pin status of the USB interface.
  • the detection module 710 is specifically configured to detect whether the VBUS pin of the USB interface is valid; when the VBUS pin of the USB interface is valid, it is determined that the USB interface is connected to a USB bus.
  • the detection module 710 is also used to detect whether the charging type of the battery of the terminal is normal; in response to the detection result of the normal charging type, detect the pin state of the USB interface.
  • the detection module 710 is specifically used to identify whether the charging type is an SDP charging type, a CDP charging type or a DCP charging type; when the charging type is an SDP charging type, a CDP charging type or a DCP charging type, then determine the battery Charging type is normal.
  • a schematic structural diagram of a terminal upgrading device in another embodiment is provided.
  • the terminal upgrade device in this embodiment is described by taking the upgrade device running on the upgrade device in FIG. 1 as an example.
  • the terminal upgrade device includes an adjustment module, wherein:
  • the adjustment module is used to adjust the bus state of the USB bus to the state that triggers the terminal to enter the upgrade mode when the upgrade device is connected to the USB interface through the USB bus, to instruct the terminal to enter the upgrade mode, and to upgrade in the upgrade mode.
  • the bus state includes a DM data line state and/or a DP data line state
  • the adjustment module is specifically configured to adjust the DM data line state to be consistent with a preset DM data line state, and/or adjust the DP data line state to Consistent with the preset DP data line status.
  • the preset state of the DM data line is that the state of the DM data line is at a high level
  • the preset state of the DP data line is that the state of the DP data line is at a low level.
  • each module in the above-mentioned terminal upgrading device is only for illustration. In other embodiments, the terminal upgrading device can be divided into different modules according to needs, so as to complete all or part of the functions of the above-mentioned terminal upgrading device.
  • Each module in the above-mentioned terminal upgrading device may be fully or partially realized by software, hardware and a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • a USB bus is also provided, the bus state of the USB bus is configured to trigger the state of the terminal entering the upgrade mode, the USB bus is used to connect with the USB interface of the terminal to instruct the terminal to enter the upgrade mode, and Upgrade in upgrade mode.
  • the bus state of the USB bus by changing the circuit design of the USB bus, makes the USB bus always be in the state of triggering the terminal to enter the upgrade mode, then when the terminal needs to be upgraded, the terminal and the upgrade device are connected through the USB bus Connected, the terminal can enter the upgrade mode according to the pin status of the USB interface.
  • the bus status includes DM data line status and DP data line status as an example. For example, if the DP data line is always grounded and the DM data line is connected to a high-level VCC power supply, then the state of the DP data line will be at a low level, and the state of the DM data line will be at a high level. After the bus connects the terminal with the upgrade device, the terminal can enter the upgrade mode according to the pin status of the USB interface, so as to perform the upgrade.
  • a first switch can be set between the DM data line and the VCC power supply, and between the DP data line and the VCC power supply. If a second switch is set between the grounding points, the upgrading device can adjust the state of the DM data line by controlling the closing state of the first switch. Similarly, the upgrading device can adjust the state of the DP data line by controlling the closing state of the second switch.
  • a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and or a computer.
  • a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and or a computer.
  • an application running on a server and a server can be a component.
  • One or more components can reside within a process and or thread of execution, and a component can be localized on one computer and or distributed between two or more computers.
  • Fig. 8 is a schematic diagram of an internal structure of a terminal in an embodiment.
  • the terminal includes a processor and a memory connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire terminal.
  • the memory may include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs.
  • the computer program can be executed by a processor, so as to implement a terminal upgrading method provided in the following embodiments.
  • the internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium.
  • the terminal can be any terminal device such as mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, communication module, etc.
  • Fig. 9 is a schematic diagram of the internal structure of an upgrading device in an embodiment.
  • the upgrade device includes a processor and a memory connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire upgraded equipment.
  • Memory can include non-volatile storage media and internal memory.
  • Nonvolatile storage media store operating systems and computer programs.
  • the computer program can be executed by a processor, so as to implement an upgrading method for upgrading equipment provided in the following embodiments.
  • the internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium.
  • the upgrade device can be any upgrade device such as mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales upgrade device), vehicle computer, wearable device, etc.
  • each module in the terminal upgrading apparatus may be in the form of a computer program.
  • the computer program can run on a terminal or a server.
  • the program modules constituted by the computer program can be stored on the memory of the terminal.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • DDR SDRAM Double Data Rate SDRAM
  • ESDRAM Enhanced SDRAM
  • SLDRAM Synchronous Link (Synchlink) DRAM
  • SLDRAM Synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

The present application relates to a terminal upgrading method and system, and a terminal, an upgrading device and a USB bus. The terminal upgrading method comprises: detecting a pin state of a USB interface; identifying, according to the pin state, whether a terminal needs to enter an upgrading mode; and in response to the pin state representing an identification result which indicates that the terminal needs to enter the upgrading mode, entering the upgrading mode, and performing upgrading in the upgrading mode.

Description

终端升级方法、系统、终端、升级设备和USB总线Terminal upgrade method, system, terminal, upgrade device and USB bus
本申请要求于2021年11月18日提交中国专利局、申请号为202111367949.1、发明名称为“终端升级方法、系统、终端、升级设备和USB总线”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111367949.1 and the title of the invention "terminal upgrade method, system, terminal, upgrade device and USB bus" submitted to the China Patent Office on November 18, 2021, the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及智能终端技术领域,特别是涉及一种终端升级方法、系统、终端、升级设备和USB总线(通用串行总线,Universal Serial Bus)。The present application relates to the technical field of intelligent terminals, in particular to a terminal upgrading method, system, terminal, upgrading equipment and USB bus (Universal Serial Bus, Universal Serial Bus).
背景技术Background technique
随着智能终端技术的发展,经常需要对终端进行升级。目前,常用的终端升级方案,需要通过长按特殊按键,例如长按force boot(启动选项设置,Boot Settings Configuration)按键来使得终端强制进入升级模式,从而在升级模式下进行升级。With the development of smart terminal technology, it is often necessary to upgrade the terminal. At present, the commonly used terminal upgrade scheme needs to press and hold a special button, for example, press and hold the force boot (Boot Settings Configuration) button to force the terminal to enter the upgrade mode, so as to upgrade in the upgrade mode.
然而,通过长按特殊按键使终端进入升级模式进行升级的方式十分不便利。However, it is very inconvenient to make the terminal enter the upgrade mode to upgrade by long pressing a special button.
发明内容Contents of the invention
根据本申请的各种实施例,提供了一种终端升级方法、系统、终端、升级设备和USB总线,可以提高终端升级的便利性。According to various embodiments of the present application, a terminal upgrading method, system, terminal, upgrading device and USB bus are provided, which can improve the convenience of terminal upgrading.
一种终端升级方法,应用于终端,所述终端包括USB接口,所述USB接口用于与相配合的USB总线连接,所述方法包括:A method for upgrading a terminal, applied to a terminal, wherein the terminal includes a USB interface, and the USB interface is used to connect to a compatible USB bus, the method comprising:
检测所述USB接口的引脚状态;Detect the pin state of the USB interface;
根据所述引脚状态识别所述终端是否需要进入升级模式;identifying whether the terminal needs to enter an upgrade mode according to the pin state;
响应于所述引脚状态表征所述终端需要进入升级模式的识别结果,进入升级模式,并在所述升级模式下进行升级。Responding to the identification result that the pin state indicates that the terminal needs to enter the upgrade mode, enter the upgrade mode, and perform upgrade in the upgrade mode.
在其中一个实施例中,所述引脚状态包括DM引脚状态和/或DP引脚状态,所述根据所述引脚状态识别所述终端是否需要进入升级模式,包括:In one of the embodiments, the pin state includes DM pin state and/or DP pin state, and identifying whether the terminal needs to enter the upgrade mode according to the pin state includes:
当所述DM引脚状态与预设DM引脚状态一致,和/或所述DP引脚状态与预设DP引脚状态一致,则确定所述终端需要进入升级模式。When the state of the DM pin is consistent with the preset state of the DM pin, and/or the state of the DP pin is consistent with the preset state of the DP pin, it is determined that the terminal needs to enter the upgrade mode.
在其中一个实施例中,所述预设DM引脚状态为所述DM引脚处于高电平,所述预设DP引脚状态为所述DP引脚处于低电平。In one of the embodiments, the preset DM pin state is that the DM pin is at a high level, and the preset DP pin state is that the DP pin is at a low level.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
检测所述USB接口是否连接有所述USB总线;Detecting whether the USB interface is connected to the USB bus;
响应于所述USB接口连接有所述USB总线的检测结果,检测所述USB接口的引脚状态。In response to the detection result that the USB interface is connected to the USB bus, the state of the pins of the USB interface is detected.
在其中一个实施例中,所述检测所述USB接口是否连接有所述USB总线,包括:In one of the embodiments, the detecting whether the USB interface is connected to the USB bus includes:
检测所述USB接口的VBUS引脚是否有效;Detect whether the VBUS pin of the USB interface is valid;
当所述USB接口的VBUS引脚有效,则确定所述USB接口连接有所述USB总线。When the VBUS pin of the USB interface is valid, it is determined that the USB interface is connected to the USB bus.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
检测所述终端的电池的充电类型是否正常;Detecting whether the charging type of the battery of the terminal is normal;
响应于所述充电类型正常的检测结果,检测所述USB接口的引脚状态。In response to the detection result that the charging type is normal, detect the pin state of the USB interface.
在其中一个实施例中,所述检测所述终端的电池的充电类型是否正常,包括:In one of the embodiments, the detecting whether the charging type of the battery of the terminal is normal includes:
识别所述充电类型是否为SDP充电类型、CDP充电类型或DCP充电类型;identifying whether the charging type is an SDP charging type, a CDP charging type or a DCP charging type;
当所述充电类型为SDP充电类型、CDP充电类型或DCP充电类型,则确定所述电池的充电类型正常。When the charging type is the SDP charging type, the CDP charging type or the DCP charging type, it is determined that the charging type of the battery is normal.
一种终端升级方法,应用于升级设备,所述升级设备用于通过USB总线与终端的USB接口连接,所述方法包括:A method for upgrading a terminal, which is applied to an upgrading device, and the upgrading device is used to connect to a USB interface of a terminal through a USB bus, and the method includes:
在所述升级设备通过USB总线与所述USB接口连接的情况下,将所述USB总线的总线状态调节至触发所述终端进入升级模式的状态,以指示所述终端进入升级模式,并在所述升级模式下进行升级。When the upgrade device is connected to the USB interface through a USB bus, adjust the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode, so as to instruct the terminal to enter the upgrade mode, and in the Upgrade in the above upgrade mode.
在其中一个实施例中,所述总线状态包括DM数据线状态和/或DP数据线状态,所述将所述USB总线的总线状态调节至触发所述终端进入升级模式的状态,包括:In one of the embodiments, the bus state includes a DM data line state and/or a DP data line state, and adjusting the bus state of the USB bus to a state that triggers the terminal to enter an upgrade mode includes:
将所述DM数据线状态调节至与预设DM数据线状态一致,和/或将所述DP数据线状态与预设DP数据线状态一致。Adjusting the state of the DM data line to be consistent with the preset state of the DM data line, and/or adjusting the state of the DP data line to be consistent with the preset state of the DP data line.
在其中一个实施例中,所述预设DM数据线状态为所述DM数据线状态处于高电平,所述预设DP数据线状态为所述DP数据线状态处于低电平。In one of the embodiments, the preset DM data line state is that the DM data line state is at high level, and the preset DP data line state is that the DP data line state is at low level.
一种终端升级装置,应用于终端,所述终端包括USB接口,所述USB接口用于与相配合的USB总线连接,所述装置包括:A terminal upgrading device, applied to a terminal, the terminal includes a USB interface, the USB interface is used to connect with a matching USB bus, and the device includes:
检测模块,用于检测所述USB接口的引脚状态;A detection module, configured to detect the pin state of the USB interface;
识别模块,用于根据所述引脚状态识别所述终端是否需要进入升级模式;An identification module, configured to identify whether the terminal needs to enter an upgrade mode according to the state of the pin;
升级模块,用于响应于所述引脚状态表征所述终端需要进入升级模式的识别结果,进入升级模式,并在所述升级模式下进行升级。The upgrade module is configured to enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
一种终端升级装置,应用于升级设备,所述升级设备用于通过USB总线与终端的USB接口连接,所述装置包括:A terminal upgrading device, which is applied to upgrading equipment, and the upgrading equipment is used to connect to a USB interface of a terminal through a USB bus, and the device includes:
调节模块,用于在所述升级设备通过USB总线与所述USB接口连接的情况下,将所述USB总线的总线状态调节至触发所述终端进入升级模式的状态,以指示所述终端进入升级模式,并在所述升级模式下进行升级。An adjustment module, configured to adjust the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode when the upgrade device is connected to the USB interface through the USB bus, so as to instruct the terminal to enter the upgrade mode mode, and perform the upgrade in said upgrade mode.
一种终端,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上述的方法的步骤。A terminal includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is made to execute the steps of the above method.
一种升级设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上述的方法的步骤。An upgrade device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method.
一种USB总线,所述USB总线的总线状态被配置为触发终端进入升级模式的状态,所述USB总线用于与所述终端的USB接口连接,以指示所述终端进入升级模式,并在所述升级模式下进行升级。A USB bus, the bus state of the USB bus is configured to trigger the terminal to enter the state of the upgrade mode, and the USB bus is used to connect with the USB interface of the terminal to instruct the terminal to enter the upgrade mode, and in the Upgrade in the above upgrade mode.
一种终端升级系统,包括:A terminal upgrade system, comprising:
USB总线,所述USB总线的总线状态被配置为触发终端进入升级模式的状态;USB bus, the bus state of the USB bus is configured to trigger the terminal to enter the state of the upgrade mode;
终端,包括USB接口,所述USB接口用于与相配合的USB总线连接,所述终端用于检测所述USB接口的引脚状态,根据所述引脚状态识别所述终端是否需要进入升级模式,响应于所述引脚状态表征所述终端需要进入升级模式的识别结果,进入升级模式,并在所述升级模式下进行升级。The terminal includes a USB interface, the USB interface is used to connect with a matching USB bus, the terminal is used to detect the pin state of the USB interface, and identify whether the terminal needs to enter the upgrade mode according to the pin state , in response to the identification result that the pin state indicates that the terminal needs to enter the upgrade mode, enter the upgrade mode, and perform upgrade in the upgrade mode.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述的方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are realized.
本发明的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects and advantages of the invention will be apparent from the description, drawings and claims.
附图说明Description of drawings
为了更好地描述和说明这里公开的那些发明的实施例和或示例,可以参考一幅或多幅附图。用于描述附图的附加细书或示例不应当被认为是对所公开的发明、目前描述的实施例和或示例以及目前理解的这些发明的最佳模式中的任何一者的范围的限制。In order to better describe and illustrate embodiments and or examples of the inventions disclosed herein, reference may be made to one or more of the accompanying drawings. The accompanying specification or examples used to describe the drawings should not be considered limiting of the scope of any of the disclosed inventions, the presently described embodiments and or examples, and the best mode of these inventions currently understood.
图1为一个实施例中终端升级方法的应用环境示意图;Fig. 1 is a schematic diagram of an application environment of a terminal upgrading method in an embodiment;
图2为一个实施例中的终端升级方法的流程示意图;Fig. 2 is a schematic flow chart of a terminal upgrading method in an embodiment;
图3为另一个实施例中的终端升级方法的流程示意图;Fig. 3 is a schematic flow chart of a terminal upgrading method in another embodiment;
图4为另一个实施例中的终端升级方法的流程示意图;Fig. 4 is a schematic flow chart of a terminal upgrading method in another embodiment;
图5为另一个实施例中的终端升级方法的流程示意图;Fig. 5 is a schematic flow chart of a terminal upgrading method in another embodiment;
图6为另一个实施例中的终端升级方法的流程示意图;Fig. 6 is a schematic flow chart of a terminal upgrading method in another embodiment;
图7为一个实施例中的终端升级装置的结构示意图;Fig. 7 is a schematic structural diagram of a terminal upgrading device in an embodiment;
图8为一个实施例中的终端的内部结构示意图;Fig. 8 is a schematic diagram of an internal structure of a terminal in an embodiment;
图9为一个实施例中的升级设备的内部结构示意图。Fig. 9 is a schematic diagram of the internal structure of an upgrading device in an embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。It can be understood that the terms "first", "second" and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element.
参考图1,图1为一个实施例中终端升级方法的应用环境示意图。如图1所示,该应用环境包括USB总线110、终端120和升级设备130。Referring to FIG. 1 , FIG. 1 is a schematic diagram of an application environment of a method for upgrading a terminal in an embodiment. As shown in FIG. 1 , the application environment includes a USB bus 110 , a terminal 120 and an upgrade device 130 .
其中,USB总线110的总线状态被配置为触发终端120进入升级模式的状态。终端120包括USB接口,USB接口用于与相配合的USB总线110连接,终端120用于根据USB接口的引脚状态确定是否需要进入升级模式,从而在升级模式下升级。升级设备130用于通过USB总线110与终端120的USB接口连接。Wherein, the bus status of the USB bus 110 is configured as a status that triggers the terminal 120 to enter the upgrade mode. The terminal 120 includes a USB interface, and the USB interface is used to connect with the corresponding USB bus 110. The terminal 120 is used to determine whether to enter the upgrade mode according to the pin state of the USB interface, so as to upgrade in the upgrade mode. The upgrading device 130 is used to connect with the USB interface of the terminal 120 through the USB bus 110 .
在本实施例中,在需要对终端120进行升级时,升级设备130通过USB总线110与终端120的USB接口连接,由于USB总线110的总线状态被配置为触发终端120进入升级模式的状态,且USB接口与USB总线110连接,因此相应的USB接口的引脚状态也会发生改变,因此终端120可以根据USB接口的引脚状态来确定是否需要进入升级模式。In this embodiment, when the terminal 120 needs to be upgraded, the upgrade device 130 is connected to the USB interface of the terminal 120 through the USB bus 110, because the bus status of the USB bus 110 is configured to trigger the terminal 120 to enter the upgrade mode, and The USB interface is connected to the USB bus 110 , so the pin state of the corresponding USB interface will also change, so the terminal 120 can determine whether to enter the upgrade mode according to the pin state of the USB interface.
在一个实施例中,升级设备130可以是一个给USB总线110供电的设备,而USB总线110的总线状态被配置为触发终端120进入升级模式的状态,由于USB总线110的总线状态被配置为触发终端120进入升级模式的状态,则升级设备130通过USB总线110与终端120的USB接口连接后,终端120可以根据USB接口的引脚状态确认是否需要进入升级模式。In one embodiment, the upgrade device 130 can be a device that supplies power to the USB bus 110, and the bus state of the USB bus 110 is configured to trigger the state that the terminal 120 enters the upgrade mode, because the bus state of the USB bus 110 is configured to trigger When the terminal 120 enters the upgrade mode, after the upgrade device 130 is connected to the USB interface of the terminal 120 through the USB bus 110, the terminal 120 can confirm whether to enter the upgrade mode according to the pin state of the USB interface.
在一个实施例中,升级设备130通过USB总线110与USB接口连接,而USB总线110的总线状态未 被配置为触发终端120进入升级模式的状态,此时可以通过升级设备130将USB总线110的总线状态配置成触发终端120进入升级模式的状态,从而使得终端120可以根据USB接口的引脚状态确认是否需要进入升级模式。In one embodiment, the upgrade device 130 is connected to the USB interface through the USB bus 110, and the bus state of the USB bus 110 is not configured as a state that triggers the terminal 120 to enter the upgrade mode. The bus status is configured to trigger the terminal 120 to enter the upgrade mode, so that the terminal 120 can confirm whether to enter the upgrade mode according to the pin status of the USB interface.
以下实施例对于如何提高终端升级的便利性进行说明。The following embodiments illustrate how to improve the convenience of terminal upgrade.
参考图2,图2为一个实施例中的终端升级方法的流程示意图。本实施例中的终端升级方法,以运行于图1中的终端上为例进行描述。如图2所示,终端升级方法包括步骤210至步骤230。Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a method for upgrading a terminal in an embodiment. The terminal upgrade method in this embodiment is described by taking the terminal running on the terminal in FIG. 1 as an example. As shown in FIG. 2 , the terminal upgrading method includes step 210 to step 230 .
步骤210、检测USB接口的引脚状态。 Step 210, detecting the state of the pins of the USB interface.
其中,USB接口指的是终端上的接口。USB接口包括但不限于USB-A接口、USB-B接口和USB-C接口,此处不作限定。引脚状态指的是USB接口上的引脚的状态。可选的,本实施例中的引脚状态包括但不限于VCC引脚状态、DP引脚状态、DM引脚状态和GND引脚状态中的至少一个,本实施例不作限定。Wherein, the USB interface refers to an interface on the terminal. The USB interface includes but is not limited to a USB-A interface, a USB-B interface, and a USB-C interface, which are not limited here. The pin status refers to the status of the pins on the USB interface. Optionally, the pin state in this embodiment includes but not limited to at least one of the VCC pin state, the DP pin state, the DM pin state, and the GND pin state, which is not limited in this embodiment.
在本步骤中,终端检测USB接口的引脚状态的触发方式,可以是在终端开机时触发,即在终端的开机过程中,终端检测USB接口的引脚状态。本实施例中,对于如何触发终端检测USB接口的引脚状态的方式不作具体限定。In this step, the trigger mode for the terminal to detect the state of the pins of the USB interface may be triggered when the terminal is turned on, that is, during the booting process of the terminal, the terminal detects the state of the pins of the USB interface. In this embodiment, there is no specific limitation on how to trigger the terminal to detect the state of the pins of the USB interface.
步骤220、根据引脚状态识别终端是否需要进入升级模式。 Step 220, identifying whether the terminal needs to enter the upgrade mode according to the state of the pin.
其中,升级模式指的是终端进入升级状态的模式。在本步骤中,是终端根据引脚状态来识别是否需要进入升级模式。Wherein, the upgrade mode refers to a mode in which the terminal enters an upgrade state. In this step, the terminal identifies whether it needs to enter the upgrade mode according to the state of the pin.
步骤230、响应于引脚状态表征终端需要进入升级模式的识别结果,进入升级模式,并在升级模式下进行升级。Step 230: Enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
可选的,终端在升级模式下进行升级的方式,是需要先获取升级包,并通过安装升级包来进行升级。需要说明的是,获取升级包的方式可以是终端通过蜂窝网络技术来下载安装包,也可以是终端通过USB总线接收升级设备发送的安装包,本实施例不作限定。当终端通过USB总线接收升级设备发送的安装包,则需要将USB总线的总线状态配置为不触发终端进入升级模式的状态。Optionally, the way to upgrade the terminal in the upgrade mode is that the upgrade package needs to be obtained first, and the upgrade is performed by installing the upgrade package. It should be noted that the way to obtain the upgrade package may be that the terminal downloads the installation package through the cellular network technology, or the terminal receives the installation package sent by the upgrade device through the USB bus, which is not limited in this embodiment. When the terminal receives the installation package sent by the upgrade device through the USB bus, the bus state of the USB bus needs to be configured to not trigger the terminal to enter the upgrade mode.
在本步骤中,当终端识别出引脚状态表征终端需要进入升级模式,则终端进入升级模式,从而在升级模式下进行升级。In this step, when the terminal recognizes that the pin state indicates that the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode, so as to perform upgrade in the upgrade mode.
本实施例的技术方案,通过检测USB接口的引脚状态,并根据引脚状态识别终端是否需要进入升级模式,从而在引脚状态表征终端需要进入升级模式时,终端进入升级模式,从而在升级模式下进行升级,由于终端可以根据USB接口的引脚状态来判断是否需要进入升级模式,即终端的升级模式的进入是通过终端上的USB接口的引脚状态来触发的,因此在需要对终端进行升级时,只需要将USB总线与USB接口连接,并且将USB总线配置为触发终端进入升级模式的状态,则此时终端的USB接口的引脚状态也会发生变化,变为表征终端需要进入升级模式的状态,则终端在确定出引脚状态表征终端需要进入升级模式时,终端进入升级模式进行升级,在终端的升级过程中不需要通过长按特殊按键使终端也能使终端进入升级模式,达到了提高终端升级的便利性的技术效果。In the technical solution of this embodiment, by detecting the pin state of the USB interface, and identifying whether the terminal needs to enter the upgrade mode according to the pin state, when the pin state indicates that the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode, thereby upgrading Upgrade in mode, because the terminal can judge whether to enter the upgrade mode according to the pin state of the USB interface, that is, the entry of the upgrade mode of the terminal is triggered by the pin state of the USB interface on the terminal, so when it is necessary to update the terminal When upgrading, you only need to connect the USB bus to the USB interface, and configure the USB bus to trigger the terminal to enter the upgrade mode. At this time, the pin status of the USB interface of the terminal will also change, indicating that the terminal needs to enter The state of the upgrade mode, when the terminal determines that the pin status indicates that the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode to upgrade. During the upgrade process of the terminal, it is not necessary to press and hold the special button to make the terminal enter the upgrade mode. , achieving the technical effect of improving the convenience of terminal upgrades.
可以理解的是,通过在终端开机时触发上述实施例的终端升级方法,即终端在开机的过程中判断是否需要进入升级模式,当需要,则进入升级模式进行升级,则即使无法完成开机进入主界面,也可以对终端完成升级,则在终端无法正常完成开机也可以对终端进行升级,进一步提高了终端升级的便利性。可选的,终端升级方法的触发可以在终端开机的最早期,比如Android(安卓)平台的BootLoader(启动装载) 阶段。It can be understood that by triggering the terminal upgrade method of the above embodiment when the terminal is powered on, that is, the terminal judges whether it needs to enter the upgrade mode during the boot process, and if necessary, enters the upgrade mode to perform the upgrade, even if the boot cannot be completed and enters the main interface, the terminal can also be upgraded, and the terminal can also be upgraded when the terminal cannot be started normally, which further improves the convenience of terminal upgrade. Optionally, the terminal upgrade method can be triggered at the earliest stage of terminal startup, such as the BootLoader (boot loading) stage of the Android (Android) platform.
需要说明的是,当在终端开机的过程中,触发上述实施例的终端升级方法,则在引脚状态未表征终端需要进入升级模式时,终端正常开机,从而进入主界面。It should be noted that when the terminal upgrade method of the above embodiment is triggered during the booting process of the terminal, when the pin status does not indicate that the terminal needs to enter the upgrade mode, the terminal starts up normally and enters the main interface.
在一个实施例中,引脚状态包括DM引脚状态和/或DP引脚状态。在本实施例中,引脚状态包括DM引脚状态和/或DP引脚状态,即终端可以根据DM引脚状态确定是否需要进入升级模式,也可以是终端可以根据DP引脚状态确定是否需要进入升级模式,还可以是终端根据DM引脚状态和DP引脚状态确定是否需要进入升级模式。在本实施例中,根据引脚状态识别终端是否需要进入升级模式,包括:In one embodiment, the pin status includes DM pin status and/or DP pin status. In this embodiment, the pin state includes the DM pin state and/or the DP pin state, that is, the terminal can determine whether to enter the upgrade mode according to the DM pin state, or the terminal can determine whether it needs to enter the upgrade mode according to the DP pin state. Entering the upgrade mode may also be that the terminal determines whether to enter the upgrade mode according to the state of the DM pin and the state of the DP pin. In this embodiment, identifying whether the terminal needs to enter the upgrade mode according to the pin status includes:
当DM引脚状态与预设DM引脚状态一致,和/或DP引脚状态与预设DP引脚状态一致,则确定终端需要进入升级模式。When the state of the DM pin is consistent with the preset state of the DM pin, and/or the state of the DP pin is consistent with the preset state of the DP pin, it is determined that the terminal needs to enter the upgrade mode.
具体的,当引脚状态包括DM引脚状态,则当DM引脚状态与预设DM引脚状态一致时,终端进入升级模式;当引脚状态包括DP引脚状态,则当DP引脚状态与预设DP引脚状态一致时,终端进入升级模式;当引脚状态包括DM引脚状态和DP引脚状态,则当DM引脚状态与预设DM引脚状态一致,且DP引脚状态与预设DP引脚状态一致时,终端进入升级模式。Specifically, when the pin state includes the DM pin state, when the DM pin state is consistent with the preset DM pin state, the terminal enters the upgrade mode; when the pin state includes the DP pin state, then when the DP pin state When it is consistent with the preset DP pin state, the terminal enters the upgrade mode; when the pin state includes DM pin state and DP pin state, then when the DM pin state is consistent with the preset DM pin state, and the DP pin state When the state of the preset DP pin is consistent, the terminal enters the upgrade mode.
在本实施例中,由于终端可以只通过DM引脚状态和DP引脚状态中的至少一个来识别是否需要进行升级模式,而DM引脚状态和DP引脚状态不会对USB接口的安全性带来隐患,因此可以提高终端升级时的安全性。In this embodiment, because the terminal can only identify whether it needs to perform an upgrade mode through at least one of the DM pin state and the DP pin state, and the DM pin state and the DP pin state will not affect the security of the USB interface. It brings hidden dangers, so it can improve the security when the terminal is upgraded.
需要说明的是,可以将USB总线的总线状态调节至使得USB接口的DM引脚状态与预设DM引脚状态一致,和/或使得USB接口的DP引脚状态与预设DP引脚状态一致,从而触发终端的升级。It should be noted that the bus state of the USB bus can be adjusted to make the DM pin state of the USB interface consistent with the preset DM pin state, and/or make the DP pin state of the USB interface consistent with the preset DP pin state , thus triggering the upgrade of the terminal.
具体的,当引脚状态为DP引脚状态时,将USB总线的DP数据线状态调节至与预设DP数据线状态一致,预设DP数据线状态指的是当USB总线与USB接口连接时,可以使得USB接口的DP引脚状态与预设DP引脚状态一致。当引脚状态为DM引脚状态时,将USB总线的DM数据线状态调节至与预设DM数据线状态一致,预设DM数据线状态指的是当USB总线与USB接口连接时,可以使得USB接口的DM引脚状态与预设DM引脚状态一致。Specifically, when the pin state is the DP pin state, the DP data line state of the USB bus is adjusted to be consistent with the preset DP data line state. The preset DP data line state refers to when the USB bus is connected to the USB interface. , which can make the state of the DP pin of the USB interface consistent with the state of the preset DP pin. When the pin state is the DM pin state, adjust the DM data line state of the USB bus to be consistent with the preset DM data line state. The preset DM data line state means that when the USB bus is connected to the USB interface, it can make The DM pin state of the USB interface is consistent with the preset DM pin state.
可以理解的是,当引脚状态包括DM引脚状态和DP引脚状态时,即终端通过DP引脚状态和DM引脚状态来识别是否需要进入升级模式,而不是单纯的依赖DM引脚状态或DP引脚状态,可以排除正常工作下而带来的DM引脚状态或DP引脚状态改变,而导致升级模式误识别的问题,提高了进入升级模式的准确性。It can be understood that when the pin status includes the DM pin status and the DP pin status, that is, the terminal recognizes whether it needs to enter the upgrade mode through the DP pin status and the DM pin status, instead of simply relying on the DM pin status Or DP pin state, can eliminate the problem of DM pin state or DP pin state change caused by normal operation, which leads to the misidentification of the upgrade mode, and improves the accuracy of entering the upgrade mode.
示例性的,在实际使用过程中,比如插着OTG(On The Go)连接外设(U盘、鼠标、键盘等)开机,DP引脚状态会发生改变,但此时终端应该是正常开机,而不是进入升级模式。因此,通过DP引脚状态和DM引脚状态来识别是否需要进入升级模式,可以提高进入升级模式的准确性。Exemplary, in actual use, for example, plugging in OTG (On The Go) to connect peripherals (U disk, mouse, keyboard, etc.) Instead of going into upgrade mode. Therefore, identifying whether to enter the upgrade mode through the DP pin state and the DM pin state can improve the accuracy of entering the upgrade mode.
在一个实施例中,预设DM引脚状态为DM引脚处于高电平,预设DP引脚状态为DP引脚处于低电平。In one embodiment, the preset state of the DM pin is that the DM pin is at a high level, and the preset state of the DP pin is that the DP pin is at a low level.
其中,指的是与低电平相对的高电压,是电工程上的一种说法。在逻辑电平中,保证逻辑门的输入为高电平时所允许的最小输入高电平,当输入电平高于输入高电压(Vih)时,则认为输入电平为高电平。低电平(Vil)指的是保证逻辑门的输入为低电平时所允许的最大输入低电平,当输入电平低于Vil时,则认为输入电平为低电平。一般的,低电平为0V,即短接;高电平为1.8V。则可以将USB总线的DP数据线和DM数据线分别留出接口,在使用的时候将DP数据线接地短路,将DM数据线接高电平(一般是1.8V)即可。Among them, it refers to the high voltage relative to the low level, which is a term in electrical engineering. In the logic level, the minimum input high level allowed when the input of the logic gate is guaranteed to be high. When the input level is higher than the input high voltage (Vih), the input level is considered to be high. Low level (Vil) refers to the maximum input low level allowed when the input of the logic gate is guaranteed to be low level. When the input level is lower than Vil, the input level is considered to be low level. Generally, the low level is 0V, that is, short circuit; the high level is 1.8V. The DP data line and DM data line of the USB bus can be left out of the interface respectively, and the DP data line is grounded and short-circuited when in use, and the DM data line is connected to a high level (usually 1.8V).
需要说明的是,预设DM引脚状态为DM引脚处于高电平,则相应的,USB总线的DM数据线状态处于高电平。同理,预设DP引脚状态为DP引脚状态处于低电平,则相应的,USB总线的DP数据线状态处于低电平。It should be noted that the preset state of the DM pin is that the DM pin is at a high level, and correspondingly, the state of the DM data line of the USB bus is at a high level. Similarly, the default state of the DP pin is that the state of the DP pin is at a low level, and correspondingly, the state of the DP data line of the USB bus is at a low level.
在一些情形中,USB接口的引脚状态表征终端需要进入升级模式,不一定是由于USB总线被配置为触发终端进入升级模式的状态,并且USB接口与USB总线连接导致的,可能是因为终端所处的环境,或者是终端自身发生一些异常,而导致的USB接口的引脚状态跳变为表征终端需要进入升级模式的状态,但在此情形下,按照上述实施例的终端升级方法,终端仍然会进入升级模式,但此情形下是不需要终端进入升级模式的,当终端进入升级模式反而会对终端造成损伤。因此,需要提高终端进入升级模式的识别准确性。In some cases, the pin state of the USB interface indicates that the terminal needs to enter the upgrade mode, not necessarily because the USB bus is configured as a state that triggers the terminal to enter the upgrade mode, and the USB interface is connected to the USB bus, it may be because the terminal environment, or some abnormality occurs in the terminal itself, which causes the pin state of the USB interface to jump to a state indicating that the terminal needs to enter the upgrade mode, but in this case, according to the terminal upgrade method of the above-mentioned embodiment, the terminal still It will enter the upgrade mode, but in this case, it is not necessary for the terminal to enter the upgrade mode. When the terminal enters the upgrade mode, it will cause damage to the terminal. Therefore, it is necessary to improve the recognition accuracy of the terminal entering the upgrade mode.
以下实施例在上述任一实施例的基础上,对于如何提高终端进入升级模式的识别准确性进行说明。The following embodiments describe how to improve the recognition accuracy of the terminal entering the upgrade mode on the basis of any of the above embodiments.
参考图3,图3为另一个实施例中的终端升级方法的流程示意图。在本实施例中,在检测USB接口的引脚状态之间,检测USB接口是否连接有USB总线。如图3所示,终端升级方法包括步骤310至步骤340。Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a method for upgrading a terminal in another embodiment. In this embodiment, before detecting the state of the pins of the USB interface, it is detected whether the USB interface is connected to the USB bus. As shown in FIG. 3 , the terminal upgrading method includes step 310 to step 340 .
步骤310、检测USB接口是否连接有USB总线。 Step 310, detecting whether the USB interface is connected to a USB bus.
在本步骤中,终端检测USB接口是否连接有USB总线。In this step, the terminal detects whether the USB interface is connected to the USB bus.
步骤320、响应于USB接口连接有USB总线的检测结果,检测USB接口的引脚状态。 Step 320 , in response to the detection result that the USB interface is connected to the USB bus, detect the state of the pins of the USB interface.
在本步骤中,当终端检测出USB接口连接有USB总线时,才检测USB接口的引脚状态。本实施例中,对于检测USB接口的引脚状态的步骤可以参考上述任一实施例的描述,本实施例不作赘述。In this step, when the terminal detects that the USB interface is connected to the USB bus, it detects the pin status of the USB interface. In this embodiment, for the step of detecting the state of the pins of the USB interface, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
步骤330、根据引脚状态识别终端是否需要进入升级模式。 Step 330, identifying whether the terminal needs to enter the upgrade mode according to the state of the pin.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
可以理解的是,当终端检测出USB接口连接有USB总线,则可以认为在当前情形中,可能是需要对终端进行升级,也可能是在充电,或者是其他情形。但是,如果引脚状态也表征终端需要进入升级模式的话,则基本可以确定终端是需要进入升级模式的,而不是因为终端所处的环境,或者是终端自身发生一些异常所导致的误判。It can be understood that when the terminal detects that the USB interface is connected to the USB bus, it can be considered that in the current situation, the terminal may need to be upgraded, it may be charging, or other circumstances. However, if the pin status also indicates that the terminal needs to enter the upgrade mode, it can be basically determined that the terminal needs to enter the upgrade mode, and it is not a misjudgment caused by the environment of the terminal or some abnormality of the terminal itself.
步骤340、响应于引脚状态表征终端需要进入升级模式的识别结果,进入升级模式,并在升级模式下进行升级。Step 340: Enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
本实施例的技术方案,通过先检测USB接口是否连接有USB总线,当检测出USB接口连接有USB总线时,才检测USB接口的引脚状态,从而根据USB接口的引脚状态识别是否需要进入升级模式,当检测出USB接口连接有USB总线,则可以认为在当前情形中,可能是需要对终端进行升级,也可能是在充电,或者是其他情形。但是,如果引脚状态也表征终端需要进入升级模式的话,则基本可以确定终端是需要进入升级模式的,而不是因为终端所处的环境,或者是终端自身发生一些异常所导致的误判,达到了提高终端进入升级模式的识别准确性,相应的也提高了终端的安全性。In the technical scheme of this embodiment, by first detecting whether the USB interface is connected to the USB bus, when it is detected that the USB interface is connected to the USB bus, the pin state of the USB interface is detected, so as to identify whether it is necessary to enter the USB interface according to the pin state of the USB interface. Upgrade mode, when it is detected that the USB interface is connected to the USB bus, it can be considered that in the current situation, the terminal may need to be upgraded, it may be charging, or other situations. However, if the pin status also indicates that the terminal needs to enter the upgrade mode, it can be basically determined that the terminal needs to enter the upgrade mode, not because of the environment in which the terminal is located, or a misjudgment caused by some abnormalities in the terminal itself. In order to improve the identification accuracy of the terminal entering the upgrade mode, the security of the terminal is also improved correspondingly.
在一个实施例中,检测USB接口是否连接有USB总线,包括:In one embodiment, detecting whether the USB interface is connected to a USB bus includes:
检测USB接口的VBUS引脚是否有效;当USB接口的VBUS引脚有效,则确定USB接口连接有USB总线。Detect whether the VBUS pin of the USB interface is valid; when the VBUS pin of the USB interface is valid, it is determined that the USB interface is connected to the USB bus.
其中,VBUS引脚指的是USB接口中用于接收供电的引脚。在本实施例中,VBUS引脚有效,则说明存在USB总线向USB接口供电,则此时可以认为USB接口连接有USB总线。相应的,USB总线是通过VBUS线想USB接口的VBUS引脚供电。VBUS线是HOST/HUB向USB设备供电的电源线,即平常USB设备的+5V。Wherein, the VBUS pin refers to a pin used for receiving power supply in the USB interface. In this embodiment, if the VBUS pin is valid, it means that there is a USB bus to supply power to the USB interface, and at this time it can be considered that the USB interface is connected to the USB bus. Correspondingly, the USB bus is powered by the VBUS line to the VBUS pin of the USB interface. The VBUS line is the power line for the HOST/HUB to supply power to the USB device, that is, the +5V of the normal USB device.
在本实施例中,终端通过检测USB接口的VBUS引脚是否有效,当有效,则终端确定USB接口连接有USB总线,通过VBUS引脚的有效性检测即可确定出USB接口是否连接有USB总线,检测的手段简单易行。需要说明的是,一般的,VBUS引脚的有效性检测,可以通过读取电池的在位检测来实现。In this embodiment, the terminal detects whether the VBUS pin of the USB interface is valid, and when it is valid, the terminal determines that the USB interface is connected to the USB bus, and can determine whether the USB interface is connected to the USB bus through the validity detection of the VBUS pin , the detection method is simple and easy. It should be noted that, generally, the validity detection of the VBUS pin can be realized by reading the presence detection of the battery.
参考图4,图4为另一个实施例中的终端升级方法的流程示意图。在本实施例中,在检测USB接口的引脚状态之间,检测终端的电池的充电类型是否正常。如图4所示,终端升级方法包括步骤410至步骤440。Referring to FIG. 4 , FIG. 4 is a schematic flowchart of a method for upgrading a terminal in another embodiment. In this embodiment, before detecting the state of the pins of the USB interface, it is detected whether the charging type of the battery of the terminal is normal. As shown in FIG. 4 , the terminal upgrading method includes step 410 to step 440 .
步骤410、检测终端的电池的充电类型是否正常。 Step 410, detecting whether the charging type of the battery of the terminal is normal.
其中,充电类型指的是电池进行充电的类型,与充电协议有关。本实施例的充电类型包括但不限于SDP充电类型、CDP充电类型和DCP充电类型等,此处不作限定。SDP充电类型在挂起时,最大负载电流为2.5mA;连接且非挂起状态下为100mA,可以配置电流为500mA(最大)。设备可利用硬件识别SDP,USB数据线D+和D-分别通过15kΩ接地,但仍然需要枚举,以符合USB规范。CDP充电类型可提供高达1.5A电流,由于可在枚举之前提供电流,所以有别于USB 2.0。插入CDP的装置可通过操纵和监测D+、D-线,从而利用硬件握手识别CDP。在将数据线转为USB收发之前进行硬件测试,这样就能够在枚举之前检测到CDP(以及开始充电)。DCP充电类型可提供高达1.5A电流,通过短路D+和D-进行识别,从而能够设计DCP“墙上适配器电源”,采用USB mini或微型插孔,而非圆形插头或自制连接器的固定安装线。这样的适配器可采用任意USB电缆(配备正确插头)进行充电。Wherein, the charging type refers to the charging type of the battery, which is related to the charging protocol. The charging type in this embodiment includes, but is not limited to, the SDP charging type, the CDP charging type, and the DCP charging type, etc., which are not limited here. When the SDP charging type is suspended, the maximum load current is 2.5mA; when it is connected and not suspended, it is 100mA, and the current can be configured to be 500mA (maximum). The device can use hardware to identify SDP, and the USB data lines D+ and D- are respectively grounded through 15kΩ, but they still need to be enumerated to comply with the USB specification. The CDP charging type can provide up to 1.5A, which is different from USB 2.0 because the current can be provided before enumeration. A device plugged into a CDP can identify the CDP using hardware handshaking by manipulating and monitoring the D+, D- lines. Perform a hardware test before converting the data line to USB, so that the CDP can be detected (and start charging) before enumeration. The DCP charging type can deliver up to 1.5A and is identified by shorting D+ and D-, enabling the design of a DCP "wall adapter power supply" with a USB mini or mini-jack instead of a round plug or a fixed installation of a homemade connector Wire. Such an adapter can be charged with any USB cable (equipped with the correct plug).
步骤420、响应于充电类型正常的检测结果,检测USB接口的引脚状态。 Step 420 , in response to the detection result that the charging type is normal, detect the pin status of the USB interface.
在本步骤中,当终端检测出充电类型正常,才检测USB接口的引脚状态。本实施例中,对于检测USB接口的引脚状态的步骤可以参考上述任一实施例的描述,本实施例不作赘述。In this step, when the terminal detects that the charging type is normal, it detects the pin state of the USB interface. In this embodiment, for the step of detecting the state of the pins of the USB interface, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
步骤430、根据引脚状态识别终端是否需要进入升级模式。 Step 430, identifying whether the terminal needs to enter the upgrade mode according to the state of the pin.
在本步骤中,本步骤可以参考上述任一实施例的描述,本实施例不作赘述。可以理解的是,当检测出充电类型正常,则可以认为是在当前情形中,可能是需要对终端进行升级,也可能是在充电,或者是其他情形。但是,如果引脚状态也表征终端需要进入升级模式的话,则基本可以确定终端是需要进入升级模式的,而不是因为终端所处的环境,或者是终端自身发生一些异常所导致的误判。In this step, for this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment. It can be understood that when it is detected that the charging type is normal, it can be considered that the terminal needs to be upgraded in the current situation, it may be charging, or other situations. However, if the pin status also indicates that the terminal needs to enter the upgrade mode, it can be basically determined that the terminal needs to enter the upgrade mode, and it is not a misjudgment caused by the environment of the terminal or some abnormality of the terminal itself.
步骤440、响应于引脚状态表征终端需要进入升级模式的识别结果,进入升级模式,并在升级模式下进行升级。Step 440: Enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。本实施例的技术方案,通过终端先检测终端的电池的充电类型是否正常,当充电类型正常时,终端才检测USB接口的引脚状态,从而根据USB接口的引脚状态识别是否需要进入升级模式,当终端检测出电池的充电类型正常,则可以认为在当前情形中,可能是需要对终端进行升级,也可能是在充电,或者是其他情形。但是,如果引脚状态也表征终端需要进入升级模式的话,则基本可以确定终端是需要进入升级模式的,而不是因为终端所处的环境,或者是终端自身发生一些异常所导致的误判,达到了提高终端进入升级模式的识别准确性,相应的也提高了终端的安全性。另外,通过终端的电池的充电类型正常时,避免充电类型检测异常的情况下,充电对机器造成的损耗,还可以对终端的电池进行保护,同时避免充电异常升级失败的问题,保证了终端的安全性。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment. In the technical solution of this embodiment, the terminal first detects whether the charging type of the battery of the terminal is normal, and when the charging type is normal, the terminal detects the pin state of the USB interface, thereby identifying whether it needs to enter the upgrade mode according to the pin state of the USB interface , when the terminal detects that the charging type of the battery is normal, it can be considered that in the current situation, the terminal may need to be upgraded, or it may be charging, or other circumstances. However, if the pin status also indicates that the terminal needs to enter the upgrade mode, it can be basically determined that the terminal needs to enter the upgrade mode, not because of the environment in which the terminal is located, or a misjudgment caused by some abnormalities in the terminal itself. In order to improve the identification accuracy of the terminal entering the upgrade mode, the security of the terminal is also improved correspondingly. In addition, when the battery charging type of the terminal is normal, it can avoid the loss caused by charging to the machine when the charging type detection is abnormal, and can also protect the battery of the terminal, and at the same time avoid the problem of abnormal charging failure and upgrade failure, ensuring the terminal safety.
在一个实施例中,检测终端的电池的充电类型是否正常,包括:识别充电类型是否为SDP充电类型、CDP充电类型或DCP充电类型;当充电类型为SDP充电类型、CDP充电类型或DCP充电类型,则确定电池 的充电类型正常。In one embodiment, detecting whether the charging type of the battery of the terminal is normal includes: identifying whether the charging type is an SDP charging type, a CDP charging type or a DCP charging type; when the charging type is an SDP charging type, a CDP charging type or a DCP charging type , it is determined that the charging type of the battery is normal.
在本实施例中,终端通过识别充电类型是否为SDP充电类型、CDP充电类型或DCP充电类型,当充电类型为SDP充电类型、CDP充电类型或DCP充电类型,则确定电池的充电类型正常,则可以保证以较佳的充电方式对终端进行充电,保证终端升级的安全性。In this embodiment, by identifying whether the charging type is SDP charging type, CDP charging type or DCP charging type, when the charging type is SDP charging type, CDP charging type or DCP charging type, it is determined that the charging type of the battery is normal, then It can ensure that the terminal is charged with a better charging method, ensuring the security of the terminal upgrade.
需要说明的是,终端可以通过检测充电信号的变化情况来识别出电池的充电类型,本实施例不作具体限定。It should be noted that the terminal can identify the charging type of the battery by detecting the change of the charging signal, which is not specifically limited in this embodiment.
在一个实施例中,终端在检测USB接口的引脚状态之前,还可以是检测USB接口是否连接有USB总线,并检测终端的电池的充电类型是否正常,当检测出USB接口连接有USB总线,并且检测出终端的电池的充电类型正常时,才检测USB接口的引脚状态。In one embodiment, before the terminal detects the pin state of the USB interface, it can also detect whether the USB interface is connected to the USB bus, and detect whether the charging type of the battery of the terminal is normal. When it is detected that the USB interface is connected to the USB bus, And when it is detected that the charging type of the battery of the terminal is normal, the pin state of the USB interface is detected.
可以理解的是,通过检测USB接口是否连接有USB总线,并检测终端的电池的充电类型是否正常,相当于通过多重检测来确定终端确实通过USB总线与升级设备连接,保证终端进入升级模式的识别准确性最大化。It can be understood that by detecting whether the USB interface is connected to the USB bus and detecting whether the charging type of the battery of the terminal is normal, it is equivalent to using multiple detections to determine that the terminal is indeed connected to the upgrade device through the USB bus to ensure that the terminal enters the identification of the upgrade mode Accuracy is maximized.
参考图5,图5为另一个实施例中的终端升级方法的流程示意图。本实施例中,以终端升级方法在开机的过程中触发为例进行说明。如图5所示,终端升级方法包括步骤510至步骤580。Referring to FIG. 5 , FIG. 5 is a schematic flowchart of a method for upgrading a terminal in another embodiment. In this embodiment, the terminal upgrade method is triggered during the boot process as an example for illustration. As shown in FIG. 5 , the terminal upgrading method includes step 510 to step 580 .
步骤510、开始开机。 Step 510, start booting.
步骤520、检测USB接口是否连接有USB总线。 Step 520, detecting whether the USB interface is connected to the USB bus.
在本步骤中,当终端检测出USB接口连接有USB总线,则执行步骤530。当终端未检测出USB接口连接有USB总线,则执行步骤580。In this step, when the terminal detects that the USB interface is connected to the USB bus, step 530 is executed. When the terminal does not detect that the USB interface is connected to the USB bus, step 580 is executed.
步骤530、检测终端的电池的充电类型是否正常。 Step 530, detecting whether the charging type of the battery of the terminal is normal.
在本步骤中,当终端检测出终端的电池的充电类型正常,则执行步骤540。当终端检测出电池的充电类型异常,则执行步骤580。In this step, when the terminal detects that the charging type of the battery of the terminal is normal, step 540 is performed. When the terminal detects that the charging type of the battery is abnormal, step 580 is executed.
步骤540、检测USB接口的DP引脚状态和DM引脚状态。 Step 540, detecting the state of the DP pin and the state of the DM pin of the USB interface.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
步骤550、判断DP引脚状态是否处于低电平。 Step 550, judging whether the state of the DP pin is at low level.
在本步骤中,当DP引脚状态处于低电平,则执行步骤560。当不是,则执行步骤580。In this step, when the state of the DP pin is at low level, step 560 is executed. If not, go to step 580 .
步骤560、判断DM引脚状态是否处于高电平。 Step 560, judging whether the state of the DM pin is at a high level.
在本步骤中,当DM引脚状态处于高电平,则执行步骤570。当不是,则执行步骤580。In this step, when the state of the DM pin is at a high level, step 570 is performed. If not, go to step 580 .
步骤570、进入升级模式,并在升级模式下进行升级。 Step 570, enter the upgrade mode, and perform the upgrade in the upgrade mode.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
步骤580、正常开机。 Step 580, start up normally.
需要说明的是,步骤550和步骤560可以调换前后顺序。It should be noted that the order of steps 550 and 560 can be reversed.
本实施例的技术方案,由于终端可以根据USB接口的引脚状态来判断是否需要进入升级模式,即终端的升级模式的进入是通过终端上的USB接口的引脚状态来触发的,因此在需要对终端进行升级时,只需要将USB总线与USB接口连接,并且将USB总线配置为触发终端进入升级模式的状态,则此时终端的USB接口的引脚状态也会发生变化,变为表征终端需要进入升级模式的状态,则终端在确定出引脚状态表征终端需要进入升级模式时,终端进入升级模式进行升级,在终端的升级过程中不需要通过长按特殊按键使终 端也能使终端进入升级模式,达到了提高终端升级的便利性的技术效果。In the technical solution of this embodiment, since the terminal can judge whether it needs to enter the upgrade mode according to the pin state of the USB interface, that is, the entry of the upgrade mode of the terminal is triggered by the pin state of the USB interface on the terminal, so when needed When upgrading the terminal, you only need to connect the USB bus to the USB interface, and configure the USB bus to trigger the terminal to enter the upgrade mode. At this time, the pin status of the USB interface of the terminal will also change and become a representative terminal. When the terminal needs to enter the upgrade mode, the terminal enters the upgrade mode to upgrade when the pin status is determined to indicate that the terminal needs to enter the upgrade mode. During the upgrade process of the terminal, the terminal can also enter the terminal without pressing a special button for a long time. The upgrade mode achieves the technical effect of improving the convenience of terminal upgrade.
参考图6,图6为另一个实施例中的终端升级方法的流程示意图。本实施例中的终端升级方法,以运行于图1中的终端和升级设备上为例进行描述。如图6所示,本实施例的方法包括步骤610至步骤640。Referring to FIG. 6 , FIG. 6 is a schematic flowchart of a method for upgrading a terminal in another embodiment. The terminal upgrade method in this embodiment is described by taking the terminal and the upgrade device running on the terminal and the upgrade device in FIG. 1 as an example. As shown in FIG. 6 , the method of this embodiment includes step 610 to step 640 .
步骤610、升级设备将USB总线的总线状态调节至触发终端进入升级模式的状态。 Step 610, the upgrade device adjusts the bus status of the USB bus to a status that triggers the terminal to enter the upgrade mode.
其中,本步骤是在升级设备通过USB总线与USB接口连接的情况下进行的。总线状态指的是USB总线上的各条线的状态。可选的,本实施例的总线状态包括但不限于VCC供电线状态、DP数据线状态、DM数据线状态和GND接地线状态。在本步骤中,升级设备将USB总线的总线状态调节至触发终端进入升级模式的状态,由于USB总线与USB接口连接,则相应的也会使得USB接口的引脚状态表征为终端需要进入升级模式的状态。Wherein, this step is performed when the upgrading device is connected to the USB interface through the USB bus. The bus status refers to the status of each line on the USB bus. Optionally, the bus state in this embodiment includes, but is not limited to, the state of the VCC power supply line, the state of the DP data line, the state of the DM data line, and the state of the GND ground line. In this step, the upgrade device adjusts the bus state of the USB bus to the state that triggers the terminal to enter the upgrade mode. Since the USB bus is connected to the USB interface, the corresponding pin status of the USB interface will also indicate that the terminal needs to enter the upgrade mode. status.
步骤620、终端检测USB接口的引脚状态。 Step 620, the terminal detects the pin state of the USB interface.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
步骤630、终端根据引脚状态识别终端是否需要进入升级模式。 Step 630, the terminal identifies whether the terminal needs to enter the upgrade mode according to the pin state.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
步骤640、终端响应于引脚状态表征终端需要进入升级模式的识别结果,进入升级模式,并在升级模式下进行升级。Step 640: The terminal enters the upgrade mode in response to the identification result that the pin state indicates that the terminal needs to enter the upgrade mode, and performs upgrade in the upgrade mode.
本步骤可以参考上述任一实施例的描述,本实施例不作赘述。For this step, reference may be made to the description of any of the foregoing embodiments, and details are not described in this embodiment.
本实施例的技术方案,在升级设备通过USB总线与USB接口连接的情况下,升级设备可以通过将USB总线的总线状态调节至触发终端进入升级模式的状态,则终端可以检测USB接口的引脚状态,并根据引脚状态识别终端是否需要进入升级模式,从而响应于引脚状态表征终端需要进入升级模式的识别结果,进入升级模式,并在升级模式下进行升级,终端升级的方式简单易行,实现了提高终端升级的便利性。In the technical solution of this embodiment, when the upgrade device is connected to the USB interface through the USB bus, the upgrade device can adjust the bus state of the USB bus to trigger the terminal to enter the upgrade mode, and then the terminal can detect the pins of the USB interface state, and identify whether the terminal needs to enter the upgrade mode according to the pin state, so as to respond to the identification result of the pin state indicating that the terminal needs to enter the upgrade mode, enter the upgrade mode, and upgrade in the upgrade mode, the terminal upgrade method is simple and easy , which improves the convenience of terminal upgrade.
在一个实施例中,总线状态包括DM数据线状态和/或DP数据线状态,则可以是总线状态包括DM数据线状态,也可以是总线状态包括DP数据线状态,还可以是总线状态包括DP数据线状态和DM数据线状态。当总线状态包括DM数据线状态,则升级设备可以调节DM数据线状态来触发终端进入升级模式;当总线状态包括DP数据线状态,则升级设备可以调节DP数据线状态来触发终端进入升级模式;当总线状态包括DM数据线状态和DP数据线状态,则升级设备可以调节DM数据线状态和DP数据线状态来触发终端进入升级模式。在本实施例中,将USB总线的总线状态调节至触发终端进入升级模式的状态,包括:In one embodiment, the bus state includes the DM data line state and/or the DP data line state, then the bus state may include the DM data line state, or the bus state may include the DP data line state, or the bus state may include the DP data line state. Data line status and DM data line status. When the bus state includes the DM data line state, the upgrade device can adjust the DM data line state to trigger the terminal to enter the upgrade mode; when the bus state includes the DP data line state, the upgrade device can adjust the DP data line state to trigger the terminal to enter the upgrade mode; When the bus state includes the DM data line state and the DP data line state, the upgrade device can adjust the DM data line state and the DP data line state to trigger the terminal to enter the upgrade mode. In this embodiment, adjusting the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode includes:
将DM数据线状态调节至与预设DM数据线状态一致,和/或将DP数据线状态与预设DP数据线状态一致。Adjusting the state of the DM data line to be consistent with the preset state of the DM data line, and/or adjusting the state of the DP data line to be consistent with the preset state of the DP data line.
具体的,当总线状态包括DM数据线状态,则升级设备可以调节DM数据线状态至与预设DM数据线状态一致,从而触发终端进入升级模式;当总线状态包括DP数据线状态,则升级设备可以调节DP数据线状态至与预设DP数据线状态一致,从而触发终端进入升级模式;当总线状态包括DM数据线状态和DP数据线状态,则升级设备可以调节DM数据线状态至与预设DM数据线状态一致,且调节DP数据线状态至与预设DP数据线状态一致,从而触发终端进入升级模式。Specifically, when the bus state includes the DM data line state, the upgrade device can adjust the DM data line state to be consistent with the preset DM data line state, thereby triggering the terminal to enter the upgrade mode; when the bus state includes the DP data line state, the upgrade device The state of the DP data line can be adjusted to be consistent with the preset state of the DP data line, thereby triggering the terminal to enter the upgrade mode; when the bus state includes the state of the DM data line and the state of the DP data line, the upgrade device can adjust the state of the DM data line to be consistent with the preset state The state of the DM data line is consistent, and the state of the DP data line is adjusted to be consistent with the state of the preset DP data line, thereby triggering the terminal to enter the upgrade mode.
在本实施例中,升级设备可以只通过DM数据线状态和DP数据线状态来触发终端进入升级模式,可以提高终端升级时的安全性。In this embodiment, the upgrade device can only trigger the terminal to enter the upgrade mode through the state of the DM data line and the state of the DP data line, which can improve the security of the terminal during upgrade.
在一个实施例中,预设DM数据线状态为DM数据线状态处于高电平,预设DP数据线状态为DP数据 线状态处于低电平。In one embodiment, the preset DM data line state is that the DM data line state is at high level, and the preset DP data line state is that the DP data line state is at low level.
在终端进行升级的情形中,终端在升级模式下进行升级的方式,是需要先获取升级包,并通过安装升级包来进行升级。终端获取升级包的方式,可以是升级设备通过USB总线将发送包发送至终端。In the case where the terminal is upgraded, the way the terminal is upgraded in the upgrade mode is that the upgrade package needs to be obtained first, and then the upgrade is performed by installing the upgrade package. The way for the terminal to obtain the upgrade package may be that the upgrade device sends the sending package to the terminal through the USB bus.
在一个实施例中,终端在进入升级模式后,向升级设备发送升级指令,则升级设备根据升级指令将USB总线的总线状态数据传输的状态,并将升级包通过处于数据传输状态的USB总线发送至终端。In one embodiment, after the terminal enters the upgrade mode, it sends an upgrade instruction to the upgrade device, and the upgrade device transmits the bus state data of the USB bus according to the upgrade instruction, and sends the upgrade package through the USB bus in the data transmission state. to the terminal.
在本实施例中,通过在触发终端进入升级模式时,升级设备将USB总线的总线状态调节至触发终端进入升级模式的状态,并且在终端进入升级模式后,升级设备将USB总线的总线状态调节至数据传输的状态,从而将升级包通过处于数据传输状态的USB总线发送至终端,由于触发终端进入升级模式的USB总线,与发送升级包的USB总线为同一总线,则减少了终端升级所需要的USB总线,减少了终端升级所需要的器件,降低了终端升级的成本。In this embodiment, when the trigger terminal enters the upgrade mode, the upgrade device adjusts the bus state of the USB bus to the state that triggers the terminal to enter the upgrade mode, and after the terminal enters the upgrade mode, the upgrade device adjusts the bus state of the USB bus to the state of data transmission, so that the upgrade package is sent to the terminal through the USB bus in the data transmission state. Since the USB bus that triggers the terminal to enter the upgrade mode is the same bus as the USB bus that sends the upgrade package, the need for terminal upgrades is reduced. The unique USB bus reduces the number of components required for terminal upgrades and reduces the cost of terminal upgrades.
应该理解的是,虽然图2-6的流程示意图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow diagrams of FIGS. 2-6 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in Figures 2-6 may include a plurality of sub-steps or stages, these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
参考图7,图7为一个实施例中的终端升级装置的结构示意图。本实施例中的终端升级装置,以运行于图1中的终端上为例进行描述。如图7所示,终端升级装置包括检测模块710、识别模块720和升级模块730。其中:Referring to FIG. 7, FIG. 7 is a schematic structural diagram of a terminal upgrading device in an embodiment. The terminal upgrading device in this embodiment is described by taking the terminal running on the terminal shown in FIG. 1 as an example. As shown in FIG. 7 , the terminal upgrading device includes a detection module 710 , an identification module 720 and an upgrading module 730 . in:
检测模块710用于检测USB接口的引脚状态;识别模块720用于根据引脚状态识别终端是否需要进入升级模式;升级模块730用于响应于引脚状态表征终端需要进入升级模式的识别结果,进入升级模式,并在升级模式下进行升级。The detection module 710 is used to detect the pin status of the USB interface; the identification module 720 is used to identify whether the terminal needs to enter the upgrade mode according to the pin status; the upgrade module 730 is used to respond to the identification result that the pin status indicates that the terminal needs to enter the upgrade mode, Enter upgrade mode and perform upgrades in upgrade mode.
在一个实施例中,引脚状态包括DM引脚状态和/或DP引脚状态,识别模块720具体用于当DM引脚状态与预设DM引脚状态一致,和/或DP引脚状态与预设DP引脚状态一致,则确定终端需要进入升级模式。In one embodiment, the pin state includes a DM pin state and/or a DP pin state, and the identification module 720 is specifically configured to when the DM pin state is consistent with a preset DM pin state, and/or the DP pin state is consistent with If the preset DP pin status is consistent, it is determined that the terminal needs to enter the upgrade mode.
在一个实施例中,预设DM引脚状态为DM引脚处于高电平,预设DP引脚状态为DP引脚处于低电平。In one embodiment, the preset state of the DM pin is that the DM pin is at a high level, and the preset state of the DP pin is that the DP pin is at a low level.
在一个实施例中,该检测模块710还用于检测USB接口是否连接有USB总线;响应于USB接口连接有USB总线的检测结果,检测USB接口的引脚状态。In one embodiment, the detection module 710 is also used to detect whether the USB interface is connected to the USB bus; in response to the detection result that the USB interface is connected to the USB bus, detect the pin status of the USB interface.
在一个实施例中,检测模块710具体用于检测USB接口的VBUS引脚是否有效;当USB接口的VBUS引脚有效,则确定USB接口连接有USB总线。In one embodiment, the detection module 710 is specifically configured to detect whether the VBUS pin of the USB interface is valid; when the VBUS pin of the USB interface is valid, it is determined that the USB interface is connected to a USB bus.
在一个实施例中,该检测模块710还用于检测终端的电池的充电类型是否正常;响应于充电类型正常的检测结果,检测USB接口的引脚状态。In one embodiment, the detection module 710 is also used to detect whether the charging type of the battery of the terminal is normal; in response to the detection result of the normal charging type, detect the pin state of the USB interface.
在一个实施例中,该检测模块710具体用于识别充电类型是否为SDP充电类型、CDP充电类型或DCP充电类型;当充电类型为SDP充电类型、CDP充电类型或DCP充电类型,则确定电池的充电类型正常。In one embodiment, the detection module 710 is specifically used to identify whether the charging type is an SDP charging type, a CDP charging type or a DCP charging type; when the charging type is an SDP charging type, a CDP charging type or a DCP charging type, then determine the battery Charging type is normal.
在一个实施例中,提供了另一个实施例中的终端升级装置的结构示意图。本实施例中的终端升级装置,以运行于图1中的升级设备上为例进行描述。在一个实施例中,终端升级装置包括调节模块,其中:In one embodiment, a schematic structural diagram of a terminal upgrading device in another embodiment is provided. The terminal upgrade device in this embodiment is described by taking the upgrade device running on the upgrade device in FIG. 1 as an example. In one embodiment, the terminal upgrade device includes an adjustment module, wherein:
调节模块用于在升级设备通过USB总线与USB接口连接的情况下,将USB总线的总线状态调节至触发 终端进入升级模式的状态,以指示终端进入升级模式,并在升级模式下进行升级。The adjustment module is used to adjust the bus state of the USB bus to the state that triggers the terminal to enter the upgrade mode when the upgrade device is connected to the USB interface through the USB bus, to instruct the terminal to enter the upgrade mode, and to upgrade in the upgrade mode.
在一个实施例中,总线状态包括DM数据线状态和/或DP数据线状态,调节模块具体用于将DM数据线状态调节至与预设DM数据线状态一致,和/或将DP数据线状态与预设DP数据线状态一致。In one embodiment, the bus state includes a DM data line state and/or a DP data line state, and the adjustment module is specifically configured to adjust the DM data line state to be consistent with a preset DM data line state, and/or adjust the DP data line state to Consistent with the preset DP data line status.
在一个实施例中,预设DM数据线状态为DM数据线状态处于高电平,预设DP数据线状态为DP数据线状态处于低电平。In one embodiment, the preset state of the DM data line is that the state of the DM data line is at a high level, and the preset state of the DP data line is that the state of the DP data line is at a low level.
上述终端升级装置中各个模块的划分仅用于举例说明,在其他实施例中,可将终端升级装置按照需要划分为不同的模块,以完成上述终端升级装置的全部或部分功能。The division of each module in the above-mentioned terminal upgrading device is only for illustration. In other embodiments, the terminal upgrading device can be divided into different modules according to needs, so as to complete all or part of the functions of the above-mentioned terminal upgrading device.
关于终端升级装置的具体限定可以参见上文中对于终端升级方法的限定,在此不再赘述。上述终端升级装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on the terminal upgrading apparatus, refer to the above-mentioned limitations on the terminal upgrading method, which will not be repeated here. Each module in the above-mentioned terminal upgrading device may be fully or partially realized by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
在一个实施例中,还提供了一种USB总线,USB总线的总线状态被配置为触发终端进入升级模式的状态,USB总线用于与终端的USB接口连接,以指示终端进入升级模式,并在升级模式下进行升级。In one embodiment, a USB bus is also provided, the bus state of the USB bus is configured to trigger the state of the terminal entering the upgrade mode, the USB bus is used to connect with the USB interface of the terminal to instruct the terminal to enter the upgrade mode, and Upgrade in upgrade mode.
在本实施例中,USB总线的总线状态,通过改变USB总线的电路设计,使得USB总线一直处于触发终端进入升级模式的状态,则在需要对终端进行升级时,通过USB总线将终端与升级设备连接起来,则终端可以根据USB接口的引脚状态进入升级模式。In this embodiment, the bus state of the USB bus, by changing the circuit design of the USB bus, makes the USB bus always be in the state of triggering the terminal to enter the upgrade mode, then when the terminal needs to be upgraded, the terminal and the upgrade device are connected through the USB bus Connected, the terminal can enter the upgrade mode according to the pin status of the USB interface.
以总线状态包括DM数据线状态和DP数据线状态举例说明。示例性的,将DP数据线常接地,并且将DM数据线接可以提供高电平的VCC电源,则DP数据线状态会处于低电平,而DM数据线状态处于高电平,则通过USB总线将终端与升级设备连接起来后,终端可以根据USB接口的引脚状态进入升级模式,从而进行升级。The bus status includes DM data line status and DP data line status as an example. For example, if the DP data line is always grounded and the DM data line is connected to a high-level VCC power supply, then the state of the DP data line will be at a low level, and the state of the DM data line will be at a high level. After the bus connects the terminal with the upgrade device, the terminal can enter the upgrade mode according to the pin status of the USB interface, so as to perform the upgrade.
需要说明的是,在本实施例中,当通过升级设备调节USB总线的DM数据线状态和DP数据线状态,则可以在DM数据线与VCC电源之间设置第一开关,在DP数据线与接地点之间设置第二开关,则升级设备可以通过控制第一开关的闭合状态来调节DM数据线状态,同理,升级设备可以通过控制第二开关的闭合状态来调节DP数据线状态。It should be noted that, in this embodiment, when the state of the DM data line and the state of the DP data line of the USB bus are adjusted by the upgrade device, a first switch can be set between the DM data line and the VCC power supply, and between the DP data line and the VCC power supply. If a second switch is set between the grounding points, the upgrading device can adjust the state of the DM data line by controlling the closing state of the first switch. Similarly, the upgrading device can adjust the state of the DP data line by controlling the closing state of the second switch.
如在本申请中所使用的,术语“组件”、“模块”和“系统”等旨在表示计算机相关的实体,它可以是硬件、硬件和软件的组台、软件、或者执行中的软件。例如,组件可以是但不限于是,在处理器上运行的进程、处理器、对象、可执行码、执行的线程、程序和或计算机。作为说明,运行在服务器上的应用程序和服务器都可以是组件。一个或多个组件可以驻留在进程和或执行的线程中,并且组件可以位于一个计算机内和或分布在两个或更多的计算机之间。As used in this application, the terms "component," "module," and "system" and the like are intended to mean a computer-related entity, which may be hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and or a computer. As an illustration, both an application running on a server and a server can be a component. One or more components can reside within a process and or thread of execution, and a component can be localized on one computer and or distributed between two or more computers.
图8为一个实施例中的终端的内部结构示意图。如图8所示,该终端包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个终端的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种终端升级方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该终端可以是手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备、通信模组等任意终端设备。Fig. 8 is a schematic diagram of an internal structure of a terminal in an embodiment. As shown in FIG. 8, the terminal includes a processor and a memory connected through a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire terminal. The memory may include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs. The computer program can be executed by a processor, so as to implement a terminal upgrading method provided in the following embodiments. The internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium. The terminal can be any terminal device such as mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, communication module, etc.
图9为一个实施例中的升级设备的内部结构示意图。如图9所示,该升级设备包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个升级设备的运行。存储器可包括 非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种升级设备升级方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该升级设备可以是手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售升级设备)、车载电脑、穿戴式设备等任意升级设备。Fig. 9 is a schematic diagram of the internal structure of an upgrading device in an embodiment. As shown in FIG. 9, the upgrade device includes a processor and a memory connected through a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire upgraded equipment. Memory can include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs. The computer program can be executed by a processor, so as to implement an upgrading method for upgrading equipment provided in the following embodiments. The internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium. The upgrade device can be any upgrade device such as mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales upgrade device), vehicle computer, wearable device, etc.
本申请实施例中提供的终端升级装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的步骤。The implementation of each module in the terminal upgrading apparatus provided in the embodiment of the present application may be in the form of a computer program. The computer program can run on a terminal or a server. The program modules constituted by the computer program can be stored on the memory of the terminal. When the computer program is executed by the processor, the steps of the methods described in the embodiments of the present application are realized.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行终端升级方法的步骤。The embodiment of the present application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when executed by one or more processors, cause the processors to perform the steps of the terminal upgrading method.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行终端升级方法。A computer program product containing instructions, when run on a computer, causes the computer to execute the terminal upgrading method.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (17)

  1. 一种终端升级方法,应用于终端,所述终端包括USB接口,所述USB接口用于与相配合的USB总线连接,所述方法包括:A method for upgrading a terminal, applied to a terminal, wherein the terminal includes a USB interface, and the USB interface is used to connect to a compatible USB bus, the method comprising:
    检测所述USB接口的引脚状态;Detect the pin state of the USB interface;
    根据所述引脚状态识别所述终端是否需要进入升级模式;identifying whether the terminal needs to enter an upgrade mode according to the pin state;
    响应于所述引脚状态表征所述终端需要进入升级模式的识别结果,进入升级模式,并在所述升级模式下进行升级。Responding to the identification result that the pin state indicates that the terminal needs to enter the upgrade mode, enter the upgrade mode, and perform upgrade in the upgrade mode.
  2. 根据权利要求1所述的方法,其特征在于,所述引脚状态包括DM引脚状态和/或DP引脚状态,所述根据所述引脚状态识别所述终端是否需要进入升级模式,包括:The method according to claim 1, wherein the pin state includes a DM pin state and/or a DP pin state, and identifying whether the terminal needs to enter an upgrade mode according to the pin state includes :
    当所述DM引脚状态与预设DM引脚状态一致,和/或所述DP引脚状态与预设DP引脚状态一致,则确定所述终端需要进入升级模式。When the state of the DM pin is consistent with the preset state of the DM pin, and/or the state of the DP pin is consistent with the preset state of the DP pin, it is determined that the terminal needs to enter the upgrade mode.
  3. 根据权利要求2所述的方法,其特征在于,所述预设DM引脚状态为所述DM引脚处于高电平,所述预设DP引脚状态为所述DP引脚处于低电平。The method according to claim 2, wherein the preset DM pin state is that the DM pin is at a high level, and the preset DP pin state is that the DP pin is at a low level .
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    检测所述USB接口是否连接有所述USB总线;Detecting whether the USB interface is connected to the USB bus;
    响应于所述USB接口连接有所述USB总线的检测结果,检测所述USB接口的引脚状态。In response to the detection result that the USB interface is connected to the USB bus, the state of the pins of the USB interface is detected.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    检测所述终端的电池的充电类型是否正常;Detecting whether the charging type of the battery of the terminal is normal;
    响应于所述充电类型正常的检测结果,检测所述USB接口的引脚状态。In response to the detection result that the charging type is normal, detect the pin state of the USB interface.
  6. 一种终端升级方法,应用于升级设备,所述升级设备用于通过USB总线与终端的USB接口连接,所述方法包括:A method for upgrading a terminal, which is applied to an upgrading device, and the upgrading device is used to connect to a USB interface of a terminal through a USB bus, and the method includes:
    在所述升级设备通过USB总线与所述USB接口连接的情况下,将所述USB总线的总线状态调节至触发所述终端进入升级模式的状态,以指示所述终端进入升级模式,并在所述升级模式下进行升级。When the upgrade device is connected to the USB interface through a USB bus, adjust the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode, so as to instruct the terminal to enter the upgrade mode, and in the Upgrade in the above upgrade mode.
  7. 一种终端升级装置,应用于终端,所述终端包括USB接口,所述USB接口用于与相配合的USB总线连接,所述装置包括:A terminal upgrading device, applied to a terminal, the terminal includes a USB interface, the USB interface is used to connect with a matching USB bus, and the device includes:
    检测模块,用于检测所述USB接口的引脚状态;A detection module, configured to detect the pin state of the USB interface;
    识别模块,用于根据所述引脚状态识别所述终端是否需要进入升级模式;An identification module, configured to identify whether the terminal needs to enter an upgrade mode according to the state of the pin;
    升级模块,用于响应于所述引脚状态表征所述终端需要进入升级模式的识别结果,进入升级模式,并在所述升级模式下进行升级。The upgrade module is configured to enter the upgrade mode in response to the recognition result that the pin state indicates that the terminal needs to enter the upgrade mode, and perform upgrade in the upgrade mode.
  8. 根据权利要求7所述的装置,其特征在于,所述引脚状态包括DM引脚状态和/或DP引脚状态,识别模块具体用于当所述DM引脚状态与预设DM引脚状态一致,和/或所述DP引脚状态与预设DP引脚状态一致,则确定所述终端需要进入升级模式。The device according to claim 7, wherein the pin state includes a DM pin state and/or a DP pin state, and the identification module is specifically used to identify when the DM pin state is different from the preset DM pin state and/or the state of the DP pin is consistent with the preset state of the DP pin, it is determined that the terminal needs to enter the upgrade mode.
  9. 根据权利要求8所述的装置,其特征在于,所述预设DM引脚状态为所述DM引脚处于高电平,所述预设DP引脚状态为所述DP引脚处于低电平。The device according to claim 8, wherein the preset DM pin state is that the DM pin is at a high level, and the preset DP pin state is that the DP pin is at a low level .
  10. 根据权利要求7所述的装置,其特征在于,检测模块还用于检测所述USB接口是否连接有所述USB总线;响应于所述USB接口连接有所述USB总线的检测结果,检测所述USB接口的引脚状态。The device according to claim 7, wherein the detection module is further used to detect whether the USB interface is connected to the USB bus; in response to the detection result that the USB interface is connected to the USB bus, detect the The pin status of the USB interface.
  11. 根据权利要求7所述的装置,其特征在于,检测模块还用于检测所述终端的电池的充电类型是否正常;响应于所述充电类型正常的检测结果,检测所述USB接口的引脚状态。The device according to claim 7, wherein the detection module is also used to detect whether the charging type of the battery of the terminal is normal; in response to the detection result that the charging type is normal, detect the pin state of the USB interface .
  12. 一种终端升级装置,应用于升级设备,所述升级设备用于通过USB总线与终端的USB接口连接,所述装置包括:A terminal upgrading device, which is applied to upgrading equipment, and the upgrading equipment is used to connect to a USB interface of a terminal through a USB bus, and the device includes:
    调节模块,用于在所述升级设备通过USB总线与所述USB接口连接的情况下,将所述USB总线的总线状态调节至触发所述终端进入升级模式的状态,以指示所述终端进入升级模式,并在所述升级模式下进行升级。An adjustment module, configured to adjust the bus state of the USB bus to a state that triggers the terminal to enter the upgrade mode when the upgrade device is connected to the USB interface through the USB bus, so as to instruct the terminal to enter the upgrade mode mode, and perform the upgrade in said upgrade mode.
  13. 一种终端,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至5中任一项所述的方法的步骤。A terminal, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 5 method steps.
  14. 一种升级设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求6所述的方法的步骤。An upgrade device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method as claimed in claim 6 .
  15. 一种USB总线,所述USB总线的总线状态被配置为触发终端进入升级模式的状态,所述USB总线用于与所述终端的USB接口连接,以指示所述终端进入升级模式,并在所述升级模式下进行升级。A USB bus, the bus state of the USB bus is configured to trigger the terminal to enter the state of the upgrade mode, and the USB bus is used to connect with the USB interface of the terminal to instruct the terminal to enter the upgrade mode, and in the Upgrade in the above upgrade mode.
  16. 一种终端升级系统,包括:A terminal upgrade system, comprising:
    USB总线,所述USB总线的总线状态被配置为触发终端进入升级模式的状态;USB bus, the bus state of the USB bus is configured to trigger the terminal to enter the state of the upgrade mode;
    终端,包括USB接口,所述USB接口用于与相配合的USB总线连接,所述终端用于检测所述USB接口的引脚状态,根据所述引脚状态识别所述终端是否需要进入升级模式,响应于所述引脚状态表征所述终端需要进入升级模式的识别结果,进入升级模式,并在所述升级模式下进行升级;The terminal includes a USB interface, the USB interface is used to connect with a matching USB bus, the terminal is used to detect the pin state of the USB interface, and identify whether the terminal needs to enter the upgrade mode according to the pin state , entering an upgrade mode in response to the identification result that the terminal needs to enter an upgrade mode in response to the state of the pin, and performing an upgrade in the upgrade mode;
    升级设备,所述升级设备用于通过所述USB总线与所述终端的USB接口连接。an upgrade device, the upgrade device is used to connect to the USB interface of the terminal through the USB bus.
  17. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述的方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are realized.
PCT/CN2022/105136 2021-11-18 2022-07-12 Terminal upgrading method and system, and terminal, upgrading device and usb bus WO2023087748A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111367949.1 2021-11-18
CN202111367949.1A CN114238190A (en) 2021-11-18 2021-11-18 Terminal upgrading method, system, terminal, upgrading device and USB bus

Publications (1)

Publication Number Publication Date
WO2023087748A1 true WO2023087748A1 (en) 2023-05-25

Family

ID=80750260

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105136 WO2023087748A1 (en) 2021-11-18 2022-07-12 Terminal upgrading method and system, and terminal, upgrading device and usb bus

Country Status (2)

Country Link
CN (1) CN114238190A (en)
WO (1) WO2023087748A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114238190A (en) * 2021-11-18 2022-03-25 深圳市广和通无线通信软件有限公司 Terminal upgrading method, system, terminal, upgrading device and USB bus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6292859B1 (en) * 1998-10-27 2001-09-18 Compaq Computer Corporation Automatic selection of an upgrade controller in an expansion slot of a computer system motherboard having an existing on-board controller
CN101963910A (en) * 2010-09-21 2011-02-02 深圳市元征软件开发有限公司 General USB (Universal Serial Bus) based equipment firmware updating method
CN102185972A (en) * 2011-04-25 2011-09-14 惠州Tcl移动通信有限公司 Novel mobile terminal software upgrading system and method as well as mobile terminal
CN107783769A (en) * 2016-08-24 2018-03-09 青岛歌尔声学科技有限公司 A kind of method, apparatus and electronic equipment by USB upgrading electronic equipment
CN108471660A (en) * 2018-04-17 2018-08-31 四川省能源投资集团有限责任公司 No key ISP upgrades circuit
CN111241015A (en) * 2019-12-31 2020-06-05 广州展讯信息科技有限公司 Master-slave CPU circuit structure, method and storage medium capable of realizing USB interface multiplexing
CN114238190A (en) * 2021-11-18 2022-03-25 深圳市广和通无线通信软件有限公司 Terminal upgrading method, system, terminal, upgrading device and USB bus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6292859B1 (en) * 1998-10-27 2001-09-18 Compaq Computer Corporation Automatic selection of an upgrade controller in an expansion slot of a computer system motherboard having an existing on-board controller
CN101963910A (en) * 2010-09-21 2011-02-02 深圳市元征软件开发有限公司 General USB (Universal Serial Bus) based equipment firmware updating method
CN102185972A (en) * 2011-04-25 2011-09-14 惠州Tcl移动通信有限公司 Novel mobile terminal software upgrading system and method as well as mobile terminal
CN107783769A (en) * 2016-08-24 2018-03-09 青岛歌尔声学科技有限公司 A kind of method, apparatus and electronic equipment by USB upgrading electronic equipment
CN108471660A (en) * 2018-04-17 2018-08-31 四川省能源投资集团有限责任公司 No key ISP upgrades circuit
CN111241015A (en) * 2019-12-31 2020-06-05 广州展讯信息科技有限公司 Master-slave CPU circuit structure, method and storage medium capable of realizing USB interface multiplexing
CN114238190A (en) * 2021-11-18 2022-03-25 深圳市广和通无线通信软件有限公司 Terminal upgrading method, system, terminal, upgrading device and USB bus

Also Published As

Publication number Publication date
CN114238190A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
US8171502B2 (en) Methods, devices and computer program products for automatically installing device drivers from a peripheral device onto a host computer
US9577452B2 (en) Portable electronic device and charging method therefor
WO2013168289A1 (en) Electronic device and control method therefor
CN101330399A (en) Method for upgrading built-in equipment
CN108845655B (en) Electronic equipment control method and device, control circuit and electronic equipment
US20100060233A1 (en) Charger with USB detection
WO2023087748A1 (en) Terminal upgrading method and system, and terminal, upgrading device and usb bus
JP2021529320A (en) Adapter test equipment, methods and computer storage media
US10216550B2 (en) Technologies for fast boot with adaptive memory pre-training
US20100095044A1 (en) Motherboard system, storage device for booting up thereof and connector
US11151065B2 (en) Method for performing detection control of write protection function of memory device, associated control chip and associated electronic device
US11936231B2 (en) System and method for detecting electrical connection and disconnection on USB type-A charging port
WO2015089803A1 (en) Method and apparatus for charging electronic device with usb connection
CN104572387A (en) Method and device for debugging terminal in engineering mode
KR102651715B1 (en) Electronic device for preventing damage of usb device and operating method thereof
US8740456B2 (en) Adjusting delivery of current in a connection based on temperature
CN105736433B (en) A kind of control method for fan, device and terminal
CN115273955A (en) Data testing method and device for power failure in eMMC busy time
CN101639877A (en) Electronic device and method for updating basic input and output system thereof
CN104008353A (en) Computer and control method thereof
CN112579500A (en) Method and device for prompting anti-misplug USB interface and electronic equipment
CN111858422B (en) Integrated interface and electronic device with same
CN112380078A (en) USB equipment communication test method and test device
US8566575B2 (en) Computer apparatus and method for charging portable electronic device using the computer apparatus
CN115129378A (en) Intelligent network card starting method and device capable of being actively adjusted, storage medium and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22894291

Country of ref document: EP

Kind code of ref document: A1