AT port unlocking method, device and equipment

Through the checksum encryption key mechanism, the problem of AT port vulnerability is solved, the device is ensured to be secure, and only authorized users are allowed to unlock, reducing potential security risks.

CN120296809APending Publication Date: 2025-07-11HUIZHOU TCL MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510339576.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

AT ports are vulnerable to unauthorized attacks, resulting in device configuration tampering and security threats.

Method used

Key generation is achieved by verifying the key characteristics and encryption algorithms to ensure that the AT port is unlocked only when the key matches, preventing unauthorized access.

Benefits of technology

Effectively prevent malicious attacks and unauthorized operations, ensure that only authorized users can unlock the device and reduce security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296809A_ABST
    Figure CN120296809A_ABST
Patent Text Reader

Abstract

The invention discloses an AT port unlocking method, device and equipment, and the AT port of the equipment end is in a locking state by default so as to prevent unauthorized access. When an unlocking instruction of a user side is received, the device side extracts and verifies whether the first secret key in the instruction conforms to the preset secret key feature or not. And if the first key accords with the preset key feature, the device generates a second key through an encryption algorithm, and matches the second key with the first key. And if the two are matched, the equipment terminal unlocks the AT port, and normal operation is allowed. According to the method, hostile attacks and unauthorized users are effectively prevented from bypassing security measures to carry out illegal operations through key verification, encryption and matching mechanisms, so that only authorized users can unlock the equipment, and potential security risks are reduced to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to an AT port unlocking method, apparatus, and device. Background Art

[0002] The AT (Attention Command) port is an interface for a device to communicate with the outside. A user can send AT commands to the AT port of the device to control the device, configure parameters, or query the device status. If the AT port is not locked, an attacker can connect to the port without authorization and send malicious AT commands to tamper with the device configuration, implant malicious code, or even illegally control the device behavior. Such security vulnerabilities can be exploited to launch distributed denial-of-service (DDoS) attacks, spread malware, or launch attacks on other devices, thereby causing a wider range of security threats. Summary of the Invention

[0003] Based on this, it is necessary to provide an AT port unlocking method, apparatus, and device to solve the problem that the AT port of the device side is vulnerable to attacks.

[0004] In a first aspect, an embodiment of the present application provides an AT port unlocking method, which is applied to the device side. The AT port of the device side is default in a locked state, and the method includes:

[0005] When receiving an unlocking instruction from the user side, extract the first key carried in the unlocking instruction;

[0006] Verify whether the first key conforms to a preset key feature. If the first key conforms to the preset key feature, obtain the first device code of the device side;

[0007] Encrypt the first device code into a second key through a preset encryption algorithm;

[0008] Verify whether the first key matches the second key. If the first key matches the second key, adjust the AT port from the locked state to the unlocked state.

[0009] In one of the embodiments, the verifying whether the first key conforms to a preset key feature, and if the first key conforms to the preset key feature, obtaining the first device code of the device side includes:

[0010] Verify whether the key length of the first key is a preset length, and verify whether the key type of the first key is a preset type;

[0011] If the key length of the first key is the preset length and the key type of the first key is the preset type, obtain the first device code of the device side.

[0012] In one embodiment, after verifying whether the first key conforms to a preset key feature, the method further includes:

[0013] If the first key does not conform to the preset key feature, increment the unlock failure count by 1;

[0014] When the unlock failure count is greater than a preset failure count threshold, adjust the status of the AT port to the non-unlockable state.

[0015] In one embodiment, after verifying whether the first key matches the second key, the method further includes:

[0016] If the first key does not match the second key, increment the unlock failure count by 1;

[0017] When the unlock failure count is greater than a preset failure count threshold, adjust the status of the AT port to the non-unlockable state.

[0018] In one embodiment, the method further includes: setting the duration of the non-unlockable state to be positively correlated with the unlock failure count.

[0019] In one embodiment, the encoding and encrypting the first device into the second key by a preset encryption algorithm includes:

[0020] Obtain the dynamic factor pre-agreed between the client and the device;

[0021] Encode and encrypt the first device and the dynamic factor into the second key by a preset encryption algorithm.

[0022] In a second aspect, an embodiment of the present application provides an AT port unlocking method, which is applied to a client. The method includes:

[0023] Obtain the second device code of the device end, and encrypt the second device code into the first key by a preset encryption algorithm; wherein, the AT port of the device end is default in a locked state;

[0024] Generate an unlock instruction carrying the first key, and send the unlock instruction to the device end, so that the device end verifies the first key in the unlock instruction through the above AT port unlocking method, and adjusts the AT port to the unlock state after passing the verification.

[0025] In one embodiment, the encrypting the second device code into the first key by a preset encryption algorithm includes:

[0026] Obtain the dynamic factor pre-agreed between the client and the device;

[0027] Encode the second device and encrypt the dynamic factor into a first key through a preset encryption algorithm.

[0028] In a third aspect, an embodiment of the present application provides an AT port unlocking device, which is applied to a device end. The AT port of the device end is default in a locked state. The AT port unlocking device includes:

[0029] A key extraction module, configured to extract the first key carried in the unlocking instruction when receiving the unlocking instruction from the user end;

[0030] A first verification module, configured to verify whether the first key conforms to a preset key feature. If the first key conforms to the preset key feature, obtain the first device code of the device end;

[0031] An encryption module, configured to encrypt the first device code into a second key through a preset encryption algorithm;

[0032] A second verification module, configured to verify whether the first key matches the second key. If the first key matches the second key, adjust the AT port from the locked state to the unlocked state.

[0033] In a fourth aspect, an embodiment of the present application provides an AT port unlocking device, which is applied to a user end. The AT port unlocking device includes:

[0034] A second encryption module, configured to obtain the second device code of the device end and encrypt the second device code into a first key through a preset encryption algorithm;

[0035] A communication module, configured to generate an unlocking instruction carrying the first key, and send the unlocking instruction to the device end, so that the device end verifies the first key in the unlocking instruction and adjusts the AT port to the unlocked state after passing the verification.

[0036] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, the processor is caused to execute the steps of the above-mentioned AT port unlocking method applied to the device end, or execute the steps of the above-mentioned AT port unlocking method applied to the user end.

[0037] In a sixth aspect, an embodiment of the present application provides a terminal device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to execute the steps of the above-mentioned AT port unlocking method applied to the device end, or execute the steps of the above-mentioned AT port unlocking method applied to the user end.

[0038] In a seventh aspect, an embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various alternative implementations described in the embodiments of the present application.

[0039] The present invention provides an AT port unlocking method, device, and equipment. The AT port at the device end is default in a locked state to prevent unauthorized access. When an unlocking instruction from the user end is received, the device end extracts and verifies whether the first key in the instruction conforms to a preset feature. If the key is valid, the device will generate a second key through an encryption algorithm and match it with the first key. If the two match, the device end will unlock the AT port to allow normal operation. This method effectively prevents malicious attacks and unauthorized users from bypassing security measures for illegal operations through key verification, encryption, and matching mechanisms, ensuring that only authorized users can unlock the device and minimizing potential security risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0041] Among them:

[0042] Figure 1 It is a schematic flowchart of the AT port unlocking method applied to the user end;

[0043] Figure 2 It is a first schematic flowchart of the AT port unlocking applied to the device end;

[0044] Figure 3 It is a second schematic flowchart of the AT port unlocking applied to the device end;

[0045] Figure 4 It is a schematic structural diagram of the AT port unlocking device applied to the device end;

[0046] Figure 5 It is a schematic structural diagram of the AT port unlocking device applied to the user end;

[0047] Figure 6 It is a block diagram of the structure of the terminal device. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

[0049] The terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.

[0050] Referring to "embodiments" herein means that a specific feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0051] As Figure 1 shown, Figure 1 It is a schematic flow chart of an AT port unlocking method in an embodiment, which is applied to a user terminal. Here, the user terminal refers to the hardware device held by the user and can directly communicate with the device terminal. Specifically, it can be a PC, a laptop, a smart phone, a tablet, etc.

[0052] The steps provided by the AT port unlocking method in this embodiment include:

[0053] S101, obtain the second device code of the device terminal, and encrypt the second device code into the first key through a preset encryption algorithm.

[0054] Among them, the device side refers to the hardware device that needs to unlock the AT port, such as a modem, a wireless communication module, an Internet of Things terminal, etc. The AT port of this device side is default in a locked state. The second device code is the unique identifier of the device side, which is used to encrypt and generate a key. In this embodiment, it can specifically adopt any one of the following forms: International Mobile Equipment Identity (IMEI): The globally unique identifier of a communication device, which is often used for a mobile communication module. Serial Number (SN): The unique number assigned when the device leaves the factory. Media Access Control Address (MAC address): The unique identifier of a network interface card. The preset encryption algorithm is an algorithm used to encrypt the second device code. In this embodiment, the encryption algorithm can specifically adopt any one of the following algorithms: SHA-256: A secure hash algorithm that outputs a fixed-length 256-bit encrypted value. Other symmetric or asymmetric encryption algorithms: such as AES or RSA. It can be understood that the device code and the encryption algorithm here can be set by themselves based on actual needs, and no specific limitation is made here.

[0055] Exemplarily, the user side obtains the IMEI number of the device through the product manual of the device, or the body QR code, or other specific channels, and then encrypts the IMEI number through the SHA-256 algorithm to generate the corresponding first key.

[0056] S102, generate an unlocking instruction carrying the first key, and send the unlocking instruction to the device side, so that the device side verifies the first key in the unlocking instruction through the AT port unlocking method, and adjusts the AT port to the unlocked state after the verification passes.

[0057] Specifically, the user side embeds the first key into a preset unlocking command to form a complete instruction format. Then, the unlocking instruction is sent to the connected device side through Bluetooth, Wi-Fi or other communication forms. After receiving the unlocking instruction, the device side extracts the first key therein and verifies it through a specific AT port unlocking method, which will be elaborated in detail below and will not be elaborated here for the time being. If the verification of the device side passes, the AT port is adjusted from the locked state to the unlocked state. Further, the device side can return a confirmation message, such as OK or UNLOCKED, to indicate that the unlocking is successful. After the AT port enters the unlocked state, the user can send other instructions to control the device. For example: Query the device status: AT+CSQ (query signal strength). Configure device parameters: AT+CGDCONT=... (set network access point). Execute a function: ATD1234567890; (make a call).

[0058] Through the above-mentioned AT port unlocking method, the security of the device side can be guaranteed, attacks from illegal devices can be avoided, and flexible management of the device side can be achieved at the same time.

[0059] Optionally, the specific steps of encrypting the second device code into the first key through a preset encryption algorithm in S101 are as follows:

[0060] S101a, obtain the dynamic factor pre-agreed between the user side and the device side.

[0061] Among them, the dynamic factor is a variable pre-agreed between the user side and the device side, which is used to enhance the timeliness and uniqueness of the key. This dynamic factor has dynamic variability and is different for each encryption process.

[0062] Exemplarily, the dynamic factor can be: the current time, for example, accurate to the minute. Or it can be a single-use code, a random code pre-agreed by the device side or the user side each time, which can only be used once.

[0063] S101b, encrypt the second device code and the dynamic factor into the first key through a preset encryption algorithm.

[0064] When the dynamic factor is the current time, the first key encrypted by the preset encryption algorithm from the second device code and the dynamic factor is valid within that minute. In this way, by restricting the time range, the timeliness of the unlocking instruction is improved, and replay attacks are prevented.

[0065] When the dynamic factor is a single-use code, the first key encrypted by the preset encryption algorithm from the second device code and the dynamic factor can only be used once and becomes invalid after the unlocking is completed. In this way, high security can also be achieved through a one-time random code, avoiding the reuse of the key or being exploited by attackers.

[0066] As Figure 2 shown, Figure 2 is a schematic flowchart of the AT port unlocking method in an embodiment, which is applied to the device side. These device sides can specifically be devices such as modems, Internet of Things terminals, and wireless modules. The AT port of the device side is default in a locked state. In the locked state, the device side does not respond to all non-unlocking instructions and will not give any prompts. The user side must use the correct unlocking instruction to unlock the AT port so that the device can normally respond to other control instructions. At the same time, it can be set that the device side automatically returns to the locked state after each restart.

[0067] Specifically, the steps provided by the AT port unlocking method in this embodiment include:

[0068] S201, when receiving the unlocking instruction from the user side, extract the first key carried in the unlocking instruction.

[0069] Specifically, the client here refers to the hardware device held by the user, which can communicate directly with the device side. Specifically, it can be a PC, laptop, smartphone, tablet, etc. After receiving the unlocking instruction, the device side will identify the position of the key in the entire instruction and extract the value at that position as the first key.

[0070] S202, verify whether the first key conforms to the preset key characteristics. If the first key conforms to the preset key characteristics, then execute S203 to obtain the first device code of the device side.

[0071] Specifically, after receiving the unlocking instruction and extracting the first key, the device side will perform a key verification to determine whether the first key conforms to the preset key characteristics. For example, verify whether the received first key is encrypted by a preset encryption method. If the first key is encrypted by a preset encryption method, it is considered to conform to the preset key characteristics; or if the first key directly carries a timestamp, verify that the format of the timestamp should be the standard date and time format. If the format of the timestamp is the standard date and time format, it is considered to conform to the preset key characteristics; or if the first key directly carries a one-time dynamic code, verify whether the one-time password has timeliness. If the one-time password has timeliness, it is considered to conform to the preset key characteristics.

[0072] If the first key conforms to the preset key characteristics, at this time, it is initially determined that the first key is legal, and S203 is executed to obtain the first device code of the device side.

[0073] S204, encrypt the first device code into a second key through a preset encryption algorithm.

[0074] Similarly, the first device code here is the unique identifier of the device side, which is used to encrypt and generate the key. In this embodiment, it can specifically adopt any one of the following forms: International Mobile Equipment Identity (IMEI): The globally unique identifier of the communication device, which is often used in the mobile communication module. Serial Number (SN): The unique number assigned when the device leaves the factory. Media Access Control Address (MAC address): The unique identifier of the network interface card. The preset encryption algorithm is an algorithm used to encrypt the first device code. In this embodiment, the encryption algorithm can specifically adopt any one of the following algorithms: SHA-256: A secure hash algorithm that outputs a fixed-length 256-bit encrypted value. Other symmetric or asymmetric encryption algorithms: Such as AES or RSA. It can be understood that the device code and encryption algorithm here can be set according to actual needs and are not specifically limited here.

[0075] S205, Verify whether the first key matches the second key. If the first key matches the second key, then execute S206 to adjust the status of the AT port to the unlocked state.

[0076] Specifically, "Verify whether the first key matches the second key" here means verifying whether the first key is the same as the second key. If the first key is exactly the same as the second key, it indicates that the unlocking instruction sent by the client is legal, and the client has the permission to unlock the device. At this time, adjust the status of the AT port to the unlocked state. Further, the device side can return a confirmation message, such as OK or UNLOCKED, to indicate that the unlocking is successful. After the AT port enters the unlocked state, the device side can respond to the control of the client. For example: Query the device status: AT+CSQ (query signal strength). Configure device parameters: AT+CGDCONT=... (set network access point). Execute functions: ATD1234567890; (make a call).

[0077] In the above AT port unlocking method, the AT port of the device side is default in the locked state to prevent unauthorized access. When receiving the unlocking instruction from the client, the device side will extract and verify whether the first key in the instruction conforms to the preset characteristics. If the key is valid, the device will generate a second key through an encryption algorithm and match it with the first key. If the two match, the device side will unlock the AT port to allow normal operation. This method effectively prevents malicious attacks and unauthorized users from bypassing security measures for illegal operations through key verification, encryption, and matching mechanisms, ensuring that only authorized users can unlock the device and minimizing potential security risks.

[0078] Optionally, verifying whether the first key conforms to the preset key characteristics in S202 specifically includes the following sub-steps:

[0079] S202a, Verify whether the key length of the first key is the preset length and verify whether the key type of the first key is the preset type.

[0080] Exemplarily, if the encryption algorithm adopted by the device side is SHA-256, then when the device side executes this step, it will verify whether the key length of the first key is 256 bits and verify whether the key type of the first key is a hash key.

[0081] In S203, if the first key conforms to the preset key characteristics, then obtain the first device code of the device side, which specifically includes the following sub-steps:

[0082] S203a, If the key length of the first key is the preset length and the key type of the first key is the preset type, then obtain the first device code of the device side.

[0083] Exemplarily, if the encryption algorithm adopted by the device side is SHA-256, that is, if the key length of the first key is 256 bits and the key type of the first key is a hash key, then obtain the first device code of the device side.

[0084] Through this specific embodiment, the device side can effectively perform a preliminary verification on the first key during each unlocking request.

[0085] Optionally, as Figure 3 shown, after S202 verifies whether the first key conforms to the preset key characteristics, if the first key does not conform to the preset key characteristics, the following steps are further executed:

[0086] S207, increment the unlocking failure count by 1.

[0087] The initial value of this unlocking failure count is 0. Whenever the device side receives a first key that does not conform to the preset key characteristics, that is, when unlocking fails, the device side will increase the unlocking failure count by one.

[0088] To avoid long-term accumulation of incorrect requests, the system can also design a clearing mechanism: for example, after restarting the device, the failure count will be reset to 0. Or according to a preset time interval (such as every 24 hours), the failure count will also be reset to 0. The purpose of this is to prevent error counting caused by long-term non-unlocking.

[0089] S208, when the unlocking failure count is greater than the preset failure count threshold, adjust the status of the AT port to the non-unlockable state.

[0090] Specifically, the non-unlockable state means that the AT port will automatically ignore any subsequent unlocking instructions. That is to say, the device side will not respond to any unlocking requests from the user until the unlocking failure count is cleared or effectively managed.

[0091] This specific embodiment can prevent attackers from brute-forcing by repeatedly attempting incorrect unlocking instructions by setting a failure count threshold and limiting the number of unlocking attempts.

[0092] Optionally, as Figure 3 shown, after S205 verifies whether the first key matches the second key, if the first key does not match the second key, the following steps are further executed:

[0093] S207, increment the unlocking failure count by 1.

[0094] Similarly, the initial value of this unlocking failure count is 0. Whenever the first key does not match the second key, that is, when unlocking fails, the device side will increase the unlocking failure count by one.

[0095] S208. When the number of unlocking failures is greater than a preset failure threshold, adjust the status of the AT port to the non-unlockable state.

[0096] Similarly, in this specific embodiment, by setting a failure threshold and limiting the number of unlocking attempts, it is possible to prevent an attacker from brute-forcing by repeatedly trying incorrect unlocking instructions.

[0097] Furthermore, the above AT port unlocking method can also perform the following steps: Set the duration of the non-unlockable state to be positively correlated with the number of unlocking failures. For example, when the user continuously tries 3 incorrect unlocking instructions, the system enters the non-unlockable state for 5 minutes. After the non-unlockable state ends and the user tries to unlock again and fails, the system re-enters the non-unlockable state for 10 minutes.

[0098] It can be seen that the attacker has to wait longer and longer to continue trying, which greatly increases the difficulty and cost of brute-forcing and ensures that the device can better defend against continuous attacks.

[0099] Optionally, in S204, the first device code is encrypted into the second key through a preset encryption algorithm, which specifically includes the following sub-steps:

[0100] S204a. Obtain the dynamic factor pre-agreed between the user side and the device side.

[0101] Among them, the dynamic factor is a variable pre-agreed between the user side and the device side, which is used to enhance the timeliness and uniqueness of the key. This dynamic factor has the property of dynamic change, and each encryption process is different.

[0102] Exemplarily, the dynamic factor can be: the current time, for example, accurate to minutes. Or it can be a single-use valid code, a random code pre-agreed by the device side or the user side each time, which can only be used once.

[0103] S204b. Encrypt the first device code and the dynamic factor into the second key through a preset encryption algorithm.

[0104] When the dynamic factor is the current time, the first key encrypted by the preset encryption algorithm with the first device code and the dynamic factor is valid within that minute. It can be understood that once the generation time between the first key and the second key exceeds one minute, the two cannot pass the verification in S205. In this way, by restricting the time range, the timeliness of the unlocking instruction is improved and replay attacks are prevented.

[0105] When the dynamic factor is a single-use valid code, the first device code and the dynamic factor are encrypted into a first key through a preset encryption algorithm and can only be used once, becoming invalid after the unlocking is completed. It can be understood that once the client repeats the previous single-use valid code, it cannot pass the verification in S205. In this way, high security can also be achieved through a one-time random code, avoiding the reuse of keys or their exploitation by attackers.

[0106] To facilitate the better implementation of the AT port unlocking method of the present application, the present application also provides an AT port unlocking device based on the AT port unlocking method. The meanings of the nouns are the same as those in the above AT port unlocking method, and the specific implementation details can be referred to the description in the method embodiments.

[0107] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of the AT port unlocking device provided by the embodiments of the present application and is applied to the device side, specifically including:

[0108] A key extraction module 401, configured to extract the first key carried in the unlocking instruction when receiving the unlocking instruction from the client;

[0109] A first verification module 402, configured to verify whether the first key conforms to a preset key feature. If the first key conforms to the preset key feature, the first device code of the device side is obtained;

[0110] A first encryption module 403, configured to encrypt the first device code into a second key through a preset encryption algorithm;

[0111] A second verification module 404, configured to verify whether the first key matches the second key. If the first key matches the second key, the AT port is adjusted from the locked state to the unlocked state.

[0112] In the embodiments of the present application, the AT port of the device side is default in the locked state to prevent unauthorized access. When the key extraction module 401 receives the unlocking instruction from the client, the device side extracts and verifies the first key in the instruction, and the first verification module 402 determines whether the first key conforms to the preset feature. If the key is valid, the first encryption module 403 will generate a second key through the encryption algorithm, and the second verification module 404 will match the second key with the first key. If the two match, the AT port will be unlocked to allow normal operation. This AT port unlocking device effectively prevents malicious attacks and unauthorized users from bypassing security measures for illegal operations through key verification, encryption, and matching mechanisms, ensuring that only authorized users can unlock the device and minimizing potential security risks.

[0113] Please refer to Figure 5 , Figure 5FIG. 0 is a schematic structural diagram of the AT port unlocking device provided by the embodiments of the present application, which is applied to the user side and specifically includes:

[0114] A second encryption module 501, configured to obtain a second device code of the device side, and encrypt the second device code into a first key through a preset encryption algorithm;

[0115] A communication module 502, configured to generate an unlocking instruction carrying the first key, and send the unlocking instruction to the device side, so that the device side verifies the first key in the unlocking instruction, and adjusts the AT port to an unlocked state after the verification passes.

[0116] This AT port unlocking device effectively prevents malicious attacks and unauthorized users from bypassing security measures for illegal operations through encryption, ensures that only authorized users can unlock the device, and minimizes potential security risks.

[0117] In addition, the present application also provides a terminal device, as Figure 6 shown, which shows a schematic structural diagram of the terminal device involved in the present application. Specifically:

[0118] The terminal device may include a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, an input unit 606, and other components. Those skilled in the art can understand that Figure 6 the structural diagram of the terminal device shown in does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components.

[0119] Wherein:

[0120] The processor 601 is the control center of the terminal device, connects various parts of the entire terminal device through various interfaces and lines, executes various functions of the terminal device and processes data by running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, thereby monitoring the terminal device as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above modem processor may not be integrated into the processor 601.

[0121] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 602 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 602 can also include a memory controller to provide the processor 601 with access to the memory 602.

[0122] The terminal device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 603 can also include any components such as one or more DC or AC power supplies, a recharge system, a power device debugging circuit, a power converter or inverter, and a power status indicator.

[0123] The terminal device may further include an input unit 606, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0124] Although not shown, the terminal device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 601 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, so as to implement the steps in any one of the AT port unlocking methods provided in the embodiments of the present application, including: when receiving an unlocking instruction from the user end, extracting the first key carried in the unlocking instruction; verifying whether the first key conforms to a preset key feature, if the first key conforms to the preset key feature, obtaining the first device code of the device end; encrypting the first device code into a second key through a preset encryption algorithm; verifying whether the first key matches the second key, if the first key matches the second key, adjusting the AT port from the locked state to the unlocked state.

[0125] Or implement the following steps: Obtain the second device code of the device end, encrypt the second device code into a first key through a preset encryption algorithm; generate an unlocking instruction carrying the first key, and send the unlocking instruction to the device end, so that the device end verifies the first key in the unlocking instruction, and adjusts the AT port to the unlocking state after the verification passes.

[0126] In this way, through the key verification, encryption and matching mechanisms, malicious attacks and unauthorized users bypassing security measures for illegal operations are effectively prevented, ensuring that only authorized users can unlock the device, and the potential security risks are minimized.

[0127] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0128] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0129] Therefore, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any of the AT port unlocking methods provided by the present application.

[0130] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0131] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

[0132] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the AT port unlocking methods provided by the present application, the beneficial effects that can be achieved by any of the AT port unlocking methods provided by the present application can be realized. For details, refer to the previous embodiments, which will not be elaborated here.

[0133] The above has introduced in detail an AT port unlocking method, device, terminal device and computer-readable storage medium provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. An AT port unlocking method, characterized in that, Applied to a device end, the AT port of the device end is in a locked state by default, and the method includes: When receiving an unlocking instruction from the user terminal, extracting a first key carried in the unlocking instruction; Verifying whether the first key meets the preset key characteristics, and if the first key meets the preset key characteristics, obtaining the first device code of the device end; Encrypting the first device code into a second key using a preset encryption algorithm; Verify whether the first key matches the second key, and if the first key matches the second key, adjust the AT port from the locked state to the unlocked state.

2. The AT port unlocking method according to claim 1, wherein The verifying whether the first key meets the preset key characteristics, and if the first key meets the preset key characteristics, obtaining the first device code of the device end includes: Verifying whether the key length of the first key is a preset length, and verifying whether the key type of the first key is a preset type; If the key length of the first key is a preset length and the key type of the first key is a preset type, the first device code of the device end is obtained.

3. The AT port unlocking method according to claim 1, characterized in that After verifying whether the first key meets the preset key characteristics, the method further includes: If the first key does not meet the preset key characteristics, the number of unlocking failures is increased by 1; When the number of unlocking failures is greater than a preset failure number threshold, the state of the AT port is adjusted to an unlockable state.

4. The AT port unlocking method according to claim 1, wherein After verifying whether the first key matches the second key, the method further includes: If the first key does not match the second key, the number of unlocking failures is increased by 1; When the number of unlocking failures is greater than a preset failure number threshold, the state of the AT port is adjusted to an unlockable state.

5. The AT port unlocking method according to claim 3 or 4, characterized in that, The method further includes: setting the duration of the unlockable state to be positively correlated with the number of unlock failures.

6. The AT port unlocking method according to claim 1, wherein The step of encrypting the first device code into a second key by using a preset encryption algorithm includes: Acquire a dynamic factor pre-agreed between the user terminal and the device terminal; The first device code and the dynamic factor are encrypted into a second key using a preset encryption algorithm.

7. An AT port unlocking method, characterized in that, Applied to a user terminal, the method includes: Obtaining a second device code of the device end, and encrypting the second device code into a first key by using a preset encryption algorithm; wherein the AT port of the device end is in a locked state by default; Generate an unlock instruction carrying the first key, and send the unlock instruction to the device end, so that the device end verifies the first key in the unlock instruction by any method according to claims 1-6, and adjusts the AT port to an unlocked state after the verification passes.

8. The AT port unlocking method according to claim 7, wherein The step of encrypting the second device code into a first key by using a preset encryption algorithm includes: Acquire a dynamic factor pre-agreed between the user terminal and the device terminal; The second device code and the dynamic factor are encrypted into a first key using a preset encryption algorithm.

9. An AT port unlocking device, characterized in that, Applied to a device end, the AT port of the device end is in a locked state by default, and the AT port unlocking device includes: A key extraction module, configured to extract a first key carried in an unlocking instruction when receiving an unlocking instruction from a user terminal; The first verification module is used to verify whether the first key conforms to the preset key characteristics. If the first key conforms to the preset key characteristics, the first device code of the device end is obtained; The first encryption module is used to encrypt the first device code into a second key through a preset encryption algorithm; The second verification module is used to verify whether the first key matches the second key. If the first key matches the second key, the AT port is adjusted from the locked state to the unlocked state.

10. A terminal device, characterized in that, It includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6, or the method according to any one of claims 7 to 8.