Updating method, related device and system

By triggering electronic devices to automatically power on and perform encryption verification using near-field communication signals, the time-consuming and costly manual software update process in existing technologies is solved, enabling a convenient and efficient software update process.

CN123137680APending Publication Date: 2026-11-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510654204.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In the existing technology, electronic devices require users to manually power on and operate them before they are sold in order to update the software, which is time-consuming, inconvenient, and increases costs.

Method used

The electronic device is automatically powered on by triggering a near-field communication signal, and after confirming the device is trustworthy using encrypted verification data, the software installation package is automatically obtained and updated, achieving software updates without manual operation by the user.

Benefits of technology

It improves the ease of software updates, reduces costs, and ensures data transmission security and reliable device connectivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137680A_ABST
    Figure CN123137680A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses an updating method, related equipment and system, without manual operation of the electronic equipment in the package box, software updating of the electronic equipment can be completed, the convenience of software updating is improved, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to updating methods, related equipment and systems. Background Technology

[0002] Electronic devices are placed in their packaging boxes (such as color boxes) when they are not sold. Currently, in this situation, if a store or production line needs to update the software of an electronic device, the device must first be removed from the packaging box and powered on and activated before it can connect to other electronic devices or networks for software updates. The entire process requires the user to manually operate the electronic device, which is time-consuming, inconvenient, and increases costs. Summary of the Invention

[0003] This application provides an update method, related equipment, and system that allows for software updates of electronic devices without requiring manual operation by the user, thereby improving the convenience of software updates and reducing costs.

[0004] In a first aspect, this application provides an update method applied to a first electronic device, the method comprising: powering on the first electronic device in response to detecting a near-field communication signal; after the first electronic device is powered on, receiving encrypted verification data sent by a second electronic device via near-field communication; decrypting the encrypted verification data; and if the decrypted verification data passes verification, obtaining a software installation package and updating the software based on the software installation package.

[0005] The first electronic device can be an electronic device whose software needs to be updated, for example... Figure 10 The electronic device 100 shown; the second electronic device can be equipment on an OTA production line workstation, for example... Figure 11 The electronic device 200 shown.

[0006] By using the method provided in the first aspect, the user can power on the first electronic device. After powering on, the first electronic device can automatically obtain the software installation package for software updates. The entire software update process does not require the user to manually operate the electronic device, which improves the convenience of software updates and reduces costs.

[0007] In conjunction with the first aspect, in some embodiments, the software installation package is used to update the operating system version of the first electronic device.

[0008] In other embodiments, the software installation package is also used to update the application version of the first electronic device. This application embodiment does not limit what software is being updated.

[0009] In conjunction with the first aspect, in some embodiments, before the first electronic device acquires the software installation package, the method further includes: the first electronic device acquiring the target device data stored in the first electronic device; the first electronic device comparing whether the decrypted verification data is consistent with the target device data, and if so, the first electronic device determining that the decrypted verification data has passed the verification.

[0010] The purpose of verifying the decrypted verification data is to confirm that the second electronic device is a trusted device.

[0011] The comparison between the decrypted verification data and the target device data can be achieved through one or more of the following methods:

[0012] Method 1: Compare the decrypted serial number with the locally stored serial number. If they are the same, then the decrypted verification data is consistent with the target device data.

[0013] Method 1 is applicable when the verification data sent by the second electronic device to the first electronic device only contains the serial number.

[0014] Method 2: Compare the decrypted unlock code with the locally stored unlock code. If they are the same, then the decrypted verification data is consistent with the target device data.

[0015] Method 2 can be applied to situations where the verification data sent by the second electronic device to the first electronic device only contains the unlock code.

[0016] Method 3: Compare the decrypted serial number and unlock code with the locally stored serial number and unlock code. If they match, then the decrypted verification data is consistent with the target device data.

[0017] Method 3 is applicable when the verification data sent by the second electronic device to the first electronic device includes a serial number and an unlock code.

[0018] In conjunction with the first aspect, in some embodiments, the verification data includes one or more of the following: the device's serial number and the device's unlock code; wherein the unlock code is used to remove access restrictions on the device.

[0019] The serial number (SN) of a device is a unique identifier assigned to each device by the device manufacturer, which can be used to distinguish different devices of the same model.

[0020] The device's unlock code can be used to remove access restrictions on the device, for example, allowing the device to use the embedded Subscriber Identity Module (eSIM) service without being bound to a specific carrier, allowing the device to customize kernel parameters (such as Central Processing Unit (CPU) scheduling and power consumption optimization), and allowing the device to flash third-party firmware, etc. In this embodiment, the unlock code of the first electronic device can be used to remove the restrictions on pairing and establishing a connection between the first electronic device and the second electronic device without user operation.

[0021] In conjunction with the first aspect, in some embodiments, the verification data includes: the device's serial number and the device's unlock code; the first electronic device compares whether the decrypted verification data is consistent with the target device data, specifically including: the first electronic device first compares whether the decrypted serial number is consistent with the serial number of the first electronic device, and if so, the first electronic device continues to compare whether the decrypted unlock code is consistent with the unlock code of the first electronic device.

[0022] In conjunction with the first aspect, in some embodiments, the serial number is obtained by the second electronic device by scanning a first graphic code located on the packaging of the first electronic device.

[0023] The first graphic code can be, for example, the graphic code on the packaging box of the first electronic device, which corresponds one-to-one with the serial number of the device.

[0024] Specifically, the second electronic device can obtain the serial number by scanning a first graphic code (e.g., a barcode on the color box) located on the packaging box (e.g., a color box) of the first electronic device. It is understood that the serial number can be scanned at other locations besides the packaging box of the first electronic device, and this embodiment does not limit this. It is understood that, besides the graphic code, the second electronic device can also obtain the serial number by scanning other methods, and this embodiment does not limit this. It is understood that, besides scanning, other input methods can also be used, such as voice input or keyboard input, and this embodiment does not limit this.

[0025] In conjunction with the first aspect, in some embodiments, the method further includes: after the first electronic device is updated, the first electronic device sends an update result to the second electronic device, the update result indicating the updated software version of the first electronic device, and the update result being displayed in the second electronic device.

[0026] When the second electronic device includes a screen, the update results of the first electronic device can be intuitively displayed on the screen of the second electronic device. This makes it easier for the user to observe the software update results of the first electronic device, improving the user experience.

[0027] In conjunction with the first aspect, in some embodiments, the first electronic device includes a screen, and the first electronic device sends an update result to the second electronic device, specifically including: the first electronic device sending a screenshot image to the second electronic device, the content of the screenshot image including the updated software version of the first electronic device, and the screenshot image being displayed on the second electronic device.

[0028] For example, such as Figure 4 As shown, the second electronic device can display a user interface 1070, which may include a screenshot (e.g., image 1071). The content of the screenshot may include, but is not limited to, one or more of the following: the name of the first electronic device (e.g., "Lisa's Watch"), the model number of the first electronic device (e.g., "Watch D"), the MAC address of the first electronic device (e.g., "00:1A:2B:3C:4D:5E"), the software version of the first electronic device (e.g., "2.1.0"), and the serial number of the first electronic device (e.g., "0123456789ABCD"). It is understood that, in addition to screenshots, the update result received by the second electronic device from the first electronic device may also be of other types (e.g., Bluetooth commands), and this embodiment does not limit this.

[0029] In conjunction with the first aspect, in some embodiments, before the first electronic device sends the update result to the second electronic device, the method further includes: the first electronic device taking a screenshot of the updated software version of the first electronic device.

[0030] For example, the first electronic device can first enter the device information interface in the settings application, and then take a screenshot of the device information interface, which displays the updated software version of the first electronic device. Optionally, the first electronic device can turn on its screen before taking a screenshot of the updated software version.

[0031] In conjunction with the first aspect, in some embodiments, the first electronic device includes a first circuit module, which is used to detect near-field communication signals by detecting whether there is a change in magnetic flux when the first electronic device is powered off and has not entered a first state. The first circuit module does not work when the first electronic device is in the first state, and not working includes not detecting near-field communication signals. The first state is entered by the first electronic device after being powered off for a first time.

[0032] The first circuit module is a circuit module that triggers the first electronic device to power on by detecting changes in magnetic flux when the first electronic device is powered off and not in a first state (e.g., transport mode). In this way, the user can simulate a button press by creating a change in magnetic flux on the first electronic device (e.g., by continuously bringing a near-field communication device close to the first electronic device), thus achieving power-on without the need for manual power-on via a physical button (e.g., pressing a power button).

[0033] The first state can be the state that the first electronic device enters after being powered off for a first period of time (e.g., 6 months). In the first state (e.g., transportation mode), the first electronic device can save energy and prevent battery wear and device damage. It is understood that the conditions for entering the first state are not limited to this. For example, in addition to the power-off time, the conditions for entering the first state may also include: the number of updates to the first electronic device reaching a first threshold (e.g., 3 times); the manufacturing time of the first electronic device exceeding a first period (e.g., 6 months); the battery level of the first electronic device falling below a battery threshold A (e.g., 50%); or detecting an instruction to set the first electronic device to the first state. There can be one or more conditions triggering the first electronic device to enter the first state, and this embodiment of the application does not limit this.

[0034] The first time can be the minimum duration during which the first electronic device automatically enters the first state after being turned off (i.e., switching from being turned off but not yet in the first state to being turned off and then entering the first state), such as 6 months.

[0035] In conjunction with the first aspect, in some embodiments, the method further includes: when the second electronic device determines that the first electronic device has successfully updated, the first electronic device receives a first instruction sent by the second electronic device, the first instruction being used to trigger the first electronic device to clear redundant data generated after the first electronic device is powered on.

[0036] The first instruction can be an instruction sent by the second electronic device to the first electronic device after the second electronic device has determined that the first electronic device has successfully updated.

[0037] The redundant data can be all data generated after the first electronic device is powered on, except for the updated software version. In this embodiment, the redundant data generated after the first electronic device is powered on may include, but is not limited to, one or more of the following: update result data, acquired software installation package data, data from the communication connection established with the second electronic device and / or the server, and received verification data.

[0038] In this way, the first electronic device can clear storage space to improve system smoothness and stability.

[0039] In conjunction with the first aspect, in some embodiments, the first instruction is also used to restore access restrictions on the first electronic device.

[0040] Restoring access restrictions on the first electronic device can, for example, prohibit the device from using eSIM services from non-bundled carriers, prohibit the device from customizing kernel parameters (such as CPU scheduling and power optimization), and prohibit the device from flashing third-party firmware, thereby improving the device's data security. In this embodiment, restoring access restrictions on the first electronic device may include restoring restrictions on pairing and establishing connections between the first and second electronic devices without user intervention. Restoring access restrictions on the first electronic device after an update helps improve the device's data security.

[0041] In conjunction with the first aspect, in some embodiments, the first instruction is also used to trigger the first electronic device to shut down and enter a first state. The first circuit module does not work when the first electronic device is in the first state. Not working includes not detecting near-field communication signals. The first state is entered by the first electronic device after it has been shut down for a first time.

[0042] The first circuit module is inactive when the first electronic device is in a first state. This inactivity may include not detecting near-field communication signals, i.e., not detecting changes in magnetic flux, and further, not performing inductive power-on. In the first state, all modules in the first electronic device, such as the near-field communication module, WiFi module, Bluetooth module, processor, sensors, etc., are turned off. This saves energy and prevents battery depletion and device damage.

[0043] In conjunction with the first aspect, in some embodiments, before the first electronic device receives encrypted verification data sent by the second electronic device via near-field communication, the method further includes: in response to detecting that a flag bit of the first electronic device is a first preset value, the first electronic device enters a second state, and in the second state, the first electronic device detects a near-field communication device by sending a near-field communication signal to exchange data with the near-field communication device, the near-field communication device including the second electronic device, and the data exchange including receiving encrypted verification data sent by the second electronic device via near-field communication.

[0044] The first preset value can be the value of a flag bit that triggers the first electronic device to enter the second state, and the second state can be the state in which the first electronic device supports software updates.

[0045] Software updates can be supported through periodic NFC polling. Specifically, NFC polling is activated at a preset frequency (e.g., once per second) to detect the presence of nearby (e.g., within 1 meter) NFC devices (e.g., NFC tags, NFC cards, NFC-enabled electronic devices, etc.). This allows the first electronic device to exchange data with the NFC device, enabling it to obtain a software installation package for software updates. In this embodiment, the NFC device includes a second electronic device. In a second state, the first electronic device can receive encrypted verification data sent by the second electronic device via NFC, further enabling it to obtain the software installation package for software updates if the verification data passes verification.

[0046] In conjunction with the first aspect, in some embodiments, the method further includes: when preset conditions are met, the first electronic device sets a flag bit from a first preset value to a second preset value; the preset conditions include one or more of the following: the number of updates of the first electronic device reaches a first threshold; the manufacturing time of the first electronic device exceeds a first duration; the battery level of the first electronic device is lower than a first battery level threshold.

[0047] It is understood that, in response to the detection of a flag bit as the second preset value, the first electronic device may not support updates in the following ways: not receiving data sent by other electronic devices, not verifying data after receiving data sent by other electronic devices, not establishing a communication connection with other electronic devices after verifying data, not obtaining the software installation package after establishing a communication connection with other electronic devices, and not performing software updates after obtaining the software installation package. This application embodiment does not impose any restrictions on this.

[0048] The second preset value can be the value of the flag bit that triggers the first electronic device to exit the second state, the first threshold can be the minimum number of updates required to trigger the first electronic device to exit the second state, the first duration can be the shortest manufacturing time required to trigger the first electronic device to exit the second state, and the first power threshold can be the minimum power level required to trigger the first electronic device to exit the second state, or it can also be called power threshold A.

[0049] In this way, when the preset conditions are met, the first electronic device can exit the second state, so that the first electronic device will no longer support software updates, thereby further realizing power management and functional balance.

[0050] It should be noted that the conditions for the first electronic device to enter the first state and the conditions for exiting the second state can be the same or different.

[0051] In conjunction with the first aspect, in some embodiments, before the first electronic device acquires the software installation package, the method further includes: the first electronic device detecting that one or more of the following conditions are met: the battery level of the first electronic device is higher than a second battery threshold, or the software version of the first electronic device supports an update.

[0052] The second power threshold can be the minimum power required for the first electronic device to perform a software update, or it can be called power threshold B.

[0053] The statement that the software version of the first electronic device supports updates can mean that the software version of the first electronic device before the update meets the minimum compatibility requirements with the base version of the software installation package. For example, the software version of the first electronic device before the update must be higher than or equal to the base version of the software installation package. It is understood that, in addition to the above conditions, other conditions may also trigger the first electronic device to obtain the software installation package for updating, and this application embodiment does not impose limitations on these. It is understood that the software version of the first electronic device is only detected when the software version of the first electronic device restricts software updates.

[0054] This can increase the success rate of software updates.

[0055] It should be noted that the above embodiments are illustrated by taking the example of obtaining the software installation package for software updates only after detecting that the conditions are met.

[0056] It's understandable that one could first obtain the software installation package, and then determine whether to perform a software update based on whether the above conditions are met; or, if condition A is met, obtain the installation package, and then determine whether to perform a software update based on whether condition B is met. Conditions A and B can be the same or different.

[0057] In conjunction with the first aspect, in some embodiments, the first electronic device obtaining the software installation package specifically includes: the first electronic device obtaining the software installation package from a second electronic device or a server.

[0058] In conjunction with the first aspect, in some embodiments, the first electronic device obtains a software installation package from the second electronic device, specifically including: the first electronic device establishing a first communication connection with the second electronic device; and the first electronic device obtaining the software installation package from the second electronic device based on the first communication connection.

[0059] The first communication connection can be a short-range communication connection with a short communication distance (e.g., 10 centimeters), such as near-field communication, Bluetooth, etc.

[0060] In conjunction with the first aspect, in some embodiments, the first electronic device obtains a software installation package from the server, specifically including: the first electronic device establishing a second communication connection with the server; and the first electronic device obtaining the software installation package from the server based on the second communication connection.

[0061] The second communication connection can be a long-distance communication connection with a relatively long communication distance (e.g., 500 meters), such as WiFi, cellular network, satellite communication, etc.

[0062] In conjunction with the first aspect, in some embodiments, the update includes: an upgraded version and a rolled-back version.

[0063] Upgrades, for example, update the software to a higher version, typically used to add new features, security patches, or performance optimizations. Rollbacks, on the other hand, revert the software to an earlier version, typically used to resolve compatibility issues with the new version or restore existing usage habits.

[0064] Secondly, this application provides an update method applied to a second electronic device, the method comprising: the second electronic device acquiring verification data and encrypting the verification data; and after the first electronic device is powered on, the second electronic device sending the encrypted verification data to the first electronic device via near-field communication.

[0065] The first electronic device can be an electronic device whose software needs to be updated, for example... Figure 10 The electronic device 100 shown; the second electronic device can be equipment on an OTA production line workstation, for example... Figure 11 The electronic device 200 shown.

[0066] By using the method provided in the second aspect, the second electronic device can send encrypted verification data to the first electronic device after the first electronic device is powered on, ensuring the security of data transmission. Furthermore, after receiving the verification data, the first electronic device can perform verification to confirm that the second electronic device is a trusted device, thereby establishing a trusted connection with the second electronic device. This allows the second electronic device to send a software installation package to the first electronic device for software updates based on this trusted connection.

[0067] In conjunction with the second aspect, in some embodiments, the verification data includes one or more of the following: the device's serial number and the device's unlock code; wherein the unlock code is used to remove access restrictions on the device.

[0068] In conjunction with the second aspect, in some embodiments, the serial number is obtained by the second electronic device by scanning a first graphic code located on the packaging of the first electronic device.

[0069] The first graphic code can be, for example, the graphic code on the packaging box of the first electronic device, which corresponds one-to-one with the serial number of the device.

[0070] In conjunction with the second aspect, in some embodiments, the method further includes: when the first electronic device determines that the verification data has passed verification, the second electronic device establishes a first communication connection with the first electronic device; the second electronic device sends a software installation package to the first electronic device based on the first communication connection, the software installation package being used by the first electronic device to update its software.

[0071] The first communication connection can be a short-range communication connection with a short communication distance (e.g., 10 centimeters), such as near-field communication, Bluetooth, etc.

[0072] In conjunction with the second aspect, in some embodiments, the second electronic device can also be used to trigger the first electronic device to power on.

[0073] In conjunction with the second aspect, in some embodiments, updating the software includes updating the operating system version of the first electronic device.

[0074] In conjunction with the second aspect, in some embodiments, before the second electronic device sends a software installation package to the first electronic device based on the first communication connection, the method further includes: the second electronic device detecting that one or more of the following conditions are met: the battery level of the first electronic device is higher than a first battery level threshold, or the software version of the first electronic device supports an update.

[0075] The first power threshold can be the minimum power required for the first electronic device to perform a software update, or it can be called power threshold B.

[0076] In conjunction with the second aspect, in some embodiments, the second electronic device includes a screen, and the method further includes: after the first electronic device is updated, the second electronic device displays an update result, the update result being used to indicate the updated software version of the first electronic device.

[0077] In conjunction with the second aspect, in some embodiments, the second electronic device displays the update result, specifically including: the second electronic device displays a screenshot of the first electronic device, the content of which includes the updated software version of the first electronic device.

[0078] In conjunction with the second aspect, in some embodiments, the screenshot is obtained by the first electronic device taking a screenshot of the updated software version of the first electronic device.

[0079] In conjunction with the second aspect, in some embodiments, the method further includes: when the second electronic device determines that the first electronic device has been successfully updated, the second electronic device sends a first instruction to the first electronic device, the first instruction being used to trigger the first electronic device to clear redundant data generated after the first electronic device is powered on.

[0080] The first instruction can be an instruction sent by the second electronic device to the first electronic device after the second electronic device has determined that the first electronic device has successfully updated.

[0081] In conjunction with the second aspect, in some embodiments, the first instruction is also used to restore access restrictions on the first electronic device.

[0082] In conjunction with the second aspect, in some embodiments, the first instruction is also used to trigger the first electronic device to shut down and enter a first state. The first circuit module of the first electronic device does not work when the first electronic device is in the first state. Not working includes not detecting the near-field communication signal. The first state is entered by the first electronic device after it has been shut down for a first time. The first circuit module is used to detect the near-field communication signal by detecting whether the magnetic flux changes when the first electronic device is shut down and has not entered the first state. The near-field communication signal is used to trigger the first electronic device to turn on.

[0083] The first circuit module is a circuit module that triggers the first electronic device to power on by detecting changes in magnetic flux when the first electronic device is powered off and not in a first state (e.g., transport mode). In this way, the user can simulate a button press by creating a change in magnetic flux on the first electronic device (e.g., by continuously bringing a near-field communication device close to the first electronic device), thus achieving power-on without the need for manual power-on via a physical button (e.g., pressing a power button).

[0084] The first state can be the state that the first electronic device enters after being powered off for a first period of time (e.g., 6 months). In the first state (e.g., transportation mode), the first electronic device can save energy and prevent battery wear and device damage. It is understood that the conditions for entering the first state are not limited to this. For example, in addition to the power-off time, the conditions for entering the first state may also include: the number of updates to the first electronic device reaching a first threshold (e.g., 3 times); the manufacturing time of the first electronic device exceeding a first period (e.g., 6 months); the battery level of the first electronic device falling below a battery threshold A (e.g., 50%); or detecting an instruction to set the first electronic device to the first state. There can be one or more conditions triggering the first electronic device to enter the first state, and this embodiment of the application does not limit this.

[0085] The first time can be the minimum duration during which the first electronic device automatically enters the first state after being turned off (i.e., switching from being turned off but not yet in the first state to being turned off and then entering the first state), such as 6 months.

[0086] Thirdly, this application provides a communication system, which includes a first electronic device and a second electronic device; wherein there is a communication connection between the first electronic device and the second electronic device; the first electronic device is the electronic device described in any one of the first aspects above, and the second electronic device is the electronic device described in any one of the second aspects above.

[0087] Fourthly, this application provides an electronic device, which includes a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program, and when the processor executes the computer program, the electronic device performs the method of either the first or second aspect described above.

[0088] Fifthly, this application provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in either the first or second aspect above.

[0089] Sixthly, this application provides a computer program product that, when executed by a processor, implements the method described in either the first or second aspect above.

[0090] In a seventh aspect, this application provides a chip including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, causing the chip to perform the method described in either the first or second aspect above.

[0091] The solutions provided in the third to seventh aspects above are used to implement or cooperate with the methods provided in the first or second aspects above, and therefore can achieve the same or corresponding beneficial effects as the methods in the first or second aspects, which will not be elaborated here. Attached Figure Description

[0092] Figures 1A-1C This is a schematic diagram of the interaction process provided in this application embodiment, whereby a user takes out the smartwatch A from the packaging box and pairs it with the mobile phone B.

[0093] Figures 2A-2C This is a schematic diagram illustrating the pairing and connection process between a smartwatch A and a mobile phone B without user intervention, as provided in an embodiment of this application.

[0094] Figure 3 This is a flowchart illustrating an update method provided in an embodiment of this application;

[0095] Figure 4 This is a schematic diagram of the interface displaying the update result of a second electronic device provided in an embodiment of this application;

[0096] Figure 5 This is a flowchart illustrating a data transmission and verification method provided in an embodiment of this application;

[0097] Figure 6 This is a flowchart illustrating another data transmission and verification method provided in an embodiment of this application;

[0098] Figure 7 This is a schematic diagram of a process for obtaining a software installation package from a server, provided in an embodiment of this application.

[0099] Figure 8 This is a schematic diagram of a process for obtaining a software installation package from a second electronic device, provided in an embodiment of this application.

[0100] Figure 9 This is a schematic diagram of a communication system provided in an embodiment of this application;

[0101] Figure 10 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application;

[0102] Figure 11 This is a schematic diagram of the structure of an electronic device 200 provided in an embodiment of this application;

[0103] Figure 12 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0104] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be a limitation of this application.

[0105] Figures 1A-1C This example illustrates the interaction process of a user taking out smartwatch A from the packaging box and pairing it with mobile phone B.

[0106] like Figure 1A As shown, firstly, smartwatch A displays a pairing request interface 1010. This pairing request interface 1010 may include a mobile phone B capable of pairing with smartwatch A, a cancellation control 1011, and a confirmation control 1012. After detecting an operation on the confirmation control 1012, smartwatch A can display... Figure 1B The user interface 1020 shown illustrates the pairing process between smartwatch A and mobile phone B. After pairing is complete, smartwatch A can display... Figure 1C The pairing success screen shown is 1030.

[0107] As can be seen, after taking the smartwatch A out of the box, the user still needs to manually turn it on and pair it with the mobile phone B before the smartwatch A can obtain the software installation package and update the software based on the connection established with the mobile phone B.

[0108] To address the aforementioned issues, this application provides an update method. This method allows users to power on electronic devices within the packaging box (also known as the package) without requiring them to remove the device from the box and manually power it on. Once powered on, the electronic device can automatically acquire the software installation package for software updates (also known as version updates). The entire software update process does not require manual operation of the electronic device by the user, thus improving efficiency and reducing costs.

[0109] The electronic device whose software needs updating can obtain the software installation package from other electronic devices by pairing and establishing a connection with them. Thus, this embodiment of the application can achieve pairing and connection without user intervention.

[0110] Taking a smartwatch (A) whose software needs updating and a mobile phone (B) as an example, Figures 2A-2C The process of establishing a pairing connection without user intervention is illustrated in the example.

[0111] like Figures 2A-2C As shown, from the user's perspective, smartwatch A can first display as follows: Figure 2A The pairing request interface shown is, for example, user interface 1040; after a period of time, smartwatch A can switch to, as shown in... Figure 2B The pairing process interface shown, such as user interface 1050, allows for switching without requiring user interaction with the confirmation controls in the pairing request interface; after a period of time, smartwatch A can switch back to... Figure 2C The pairing success interface shown is, for example, user interface 1060. Technically, when the pairing request interface is displayed, smartwatch A can send a pairing request to mobile phone B; when the pairing process interface is displayed, smartwatch A can pair with mobile phone B; when the pairing success interface is displayed, smartwatch A has completed pairing with mobile phone B. Optionally, the smartwatch A displayed in the above-mentioned pairing request interface, pairing process interface, and pairing success interface can be placed in a packaging box (e.g., a color box). Figures 2A-2C Not shown in the image.

[0112] It should be noted that the above example is for display purposes. Figures 2A-2C The user interface shown is used as an example for illustration. It can be understood that smartwatch A may also not display this interface. Figures 2A-2C The user interface shown illustrates, for example, the process of pairing and establishing a connection in the background.

[0113] In this context, software update can refer to updating the operating system or updating an application. This application does not limit what kind of software is being updated.

[0114] Software updates can include software upgrades, such as updating to a higher software version, which typically adds new features, security patches, or performance optimizations. Software updates can also include reverting to an earlier software version, which is usually used to resolve compatibility issues with the new version or restore existing usage habits.

[0115] Figure 3 This document illustrates the overall flow of an update method provided in an embodiment of this application. The method can be applied to a communication system comprising a first electronic device and a second electronic device. The first electronic device is an electronic device whose software needs to be updated, such as the smartwatch A mentioned earlier. The second electronic device can be, for example, another electronic device mentioned earlier, such as the mobile phone B mentioned earlier. The second electronic device can be equipment on an Over-The-Air (OTA) production line. OTA is a technology that remotely updates the software, firmware, or configuration of an electronic device via a wireless network (such as Wireless Fidelity (WiFi), cellular mobile networks, etc.) without requiring a physical connection to the electronic device.

[0116] A first circuit module is deployed in the first electronic device. When the first electronic device is powered off and not in a first state (e.g., transport mode), the first circuit module is in a working state, capable of detecting changes in magnetic flux, and powering on the first electronic device upon detecting a change in magnetic flux. That is, the near-field communication signal corresponding to the change in magnetic flux can be used as the power-on signal for the first electronic device. In this way, the user can simulate a button press by creating a change in magnetic flux on the first electronic device (e.g., continuously bringing a near-field communication device close to the first electronic device) to achieve inductive power-on of the first electronic device, without the need for manual power-on via a physical button (e.g., pressing a power button).

[0117] In this context, the first state is the state that the first electronic device enters after being powered off for a first period of time (e.g., 6 months). In this first state, the first electronic device can save energy and prevent battery depletion and device damage. It should be noted that the above example uses the duration of power off as the condition for entering the first state; however, it is understood that the conditions for entering the first state are not limited to this. For example, the conditions for entering the first state may also include: the number of updates to the first electronic device reaching a first threshold (e.g., 3 times); the manufacturing time of the first electronic device exceeding a first period (e.g., 6 months); the battery level of the first electronic device falling below a battery threshold A (e.g., 50%); or detecting an instruction to set the first electronic device to the first state. There can be one or more conditions triggering the first electronic device to enter the first state, and this embodiment of the application does not impose any limitations on this.

[0118] like Figure 3 As shown, the method may include:

[0119] S101a, the second electronic device acquires and encrypts the verification data.

[0120] S101 b. In response to the detection of a near-field communication signal, the first electronic device is powered on.

[0121] The near-field communication signal mentioned above is the same as the near-field communication signal detected by the first circuit module. This near-field communication signal can be used as a power-on signal for the first electronic device, triggering it to power on. In other words, detecting the power-on signal can serve as an event to trigger the first electronic device to power on. Besides the near-field communication signal, the wireless charging signal can also be used as a power-on signal for the first electronic device; this application embodiment does not limit this usage. It is understood that this application embodiment only uses the near-field communication signal as a power-on signal as an example for explanation.

[0122] After powering on, all modules in the first electronic device, such as the near-field communication module, WiFi module, Bluetooth module, processor, etc., are powered on and activated. From then on, the first electronic device is capable of data processing, communicating with the second electronic device, and so on.

[0123] Before executing step S101 b, the first electronic device may be powered off but not in the first state (e.g., transport mode). As mentioned above, when the first electronic device is powered off but not in the first state, the first circuit module may remain operational while the other modules remain inactive. In this way, the first electronic device can maintain low-power operation and be able to detect the near-field communication signal that triggers power-on.

[0124] S102, the second electronic device sends encrypted verification data to the first electronic device via near-field communication.

[0125] For example, the verification data may include one or more of the following: the device's serial number and the device's unlock code.

[0126] The serial number (SN) of the device is a unique identifier assigned to each device by the device manufacturer, which is used to distinguish different devices of the same model. It is understood that, in addition to the serial number, other codes may be used as the unique identifier of the device in this embodiment, such as a Media Access Control (MAC) address; this embodiment does not impose any restrictions on this.

[0127] The device's unlock code can be used to remove access restrictions on the device, such as allowing the device to use the embedded Subscriber Identity Module (eSIM) service without being bound to a specific carrier, allowing the device to customize kernel parameters (such as Central Processing Unit (CPU) scheduling and power consumption optimization), and allowing the device to flash third-party firmware, etc. In this embodiment, the unlock code of the first electronic device can be used to remove the restriction on pairing and establishing a connection between the first electronic device and the second electronic device without user operation. In some embodiments, the device's unlock code can be generated based on the device's serial number and MAC address. It is understood that, in addition to the device's serial number and MAC address, the data used to generate the device's unlock code may also include other data, and this embodiment does not limit this. It is understood that, in addition to the device's serial number and unlock code, the verification data may also include other data, and this embodiment does not limit this.

[0128] Compared to the near-field communication in step S101b, the near-field communication here carries encrypted verification data. That is to say, the near-field communication in step S101b may not carry content data, while the near-field communication in step S102 can be used to transmit content data.

[0129] Before step S102, as shown in step S101a, the second electronic device can acquire and encrypt verification data. Specifically, the second electronic device first obtains the serial number by scanning the first graphic code (e.g., barcode on the color box) located on the packaging box (e.g., color box) of the first electronic device, then obtains the unlock code and public key from the first database based on the acquired serial number, and finally encrypts the serial number and unlock code using the acquired public key to ensure the security of data transmission. The first database stores the serial numbers, unlock codes, and public keys of one or more devices, including the first electronic device. The first database can be deployed at an OTA production line workstation; for example, the first database is deployed within the second electronic device. It is understood that the serial number can be scanned at locations other than the packaging box of the first electronic device, and this embodiment does not limit this. It is understood that, in addition to graphic codes, the second electronic device can also obtain the serial number by scanning other methods, and this embodiment does not limit this. It is understood that, in addition to scanning, other input methods can be used, such as voice input or keyboard input, and this embodiment does not limit this.

[0130] S103, The first electronic device decrypts and verifies the encrypted verification data.

[0131] After receiving the encrypted verification data sent by the second electronic device via near-field communication, the first electronic device can decrypt the encrypted verification data using its private key to obtain the decrypted verification data.

[0132] The purpose of verifying the decrypted verification data is to confirm that the second electronic device is a trusted device. Specifically, the verification can be implemented as follows: the first electronic device can first obtain the target device data of the first electronic device stored locally; then, the first electronic device can compare whether the decrypted verification data is consistent with the aforementioned target device data. If so, the decrypted verification data is determined to have passed the verification. It is understood that the type and quantity of target device data correspond to those of verification data. The target device data may include one or more of the following: the serial number of the first electronic device, and the unlock code of the first electronic device. It is understood that this application embodiment uses device data as verification data as an example for verification, but other data can also be used as verification data, and this application embodiment does not limit this. Device data can refer to the total amount of all information generated or stored during the operation of the device, and may include, but is not limited to, hardware identifiers (e.g., serial number), software configurations (e.g., unlock code), and user data.

[0133] The comparison between the decrypted verification data and the target device data can be achieved through one or more of the following methods:

[0134] Method 1: Compare the decrypted serial number with the locally stored serial number. If they are the same, then the decrypted verification data is consistent with the target device data.

[0135] Method 1 is applicable when the verification data sent by the second electronic device to the first electronic device only contains the serial number.

[0136] Method 2: Compare the decrypted unlock code with the locally stored unlock code. If they are the same, then the decrypted verification data is consistent with the target device data.

[0137] Method 2 can be applied to situations where the verification data sent by the second electronic device to the first electronic device only contains the unlock code.

[0138] Method 3: Compare the decrypted serial number and unlock code with the locally stored serial number and unlock code. If they match, then the decrypted verification data is consistent with the target device data.

[0139] Method 3 is applicable when the verification data sent by the second electronic device to the first electronic device includes a serial number and an unlock code.

[0140] As mentioned earlier, the device's unlock code is generated based on the device's serial number and MAC address. Comparing the decrypted unlock code with the locally stored unlock code can be achieved as follows: first, convert the decrypted unlock code into a serial number and MAC address; then, compare the converted serial number and MAC address with the locally stored serial number and MAC address. If they match, then the decrypted verification data is confirmed to be consistent with the target device data.

[0141] S104. If the decrypted verification data passes verification, the first electronic device obtains the software installation package and updates the software based on the software installation package. How the first electronic device obtains the software installation package will be explained in detail in later embodiments and will not be elaborated here.

[0142] This method allows users to power on the first electronic device via sensor. Once powered on, the device can automatically obtain the software installation package for software updates. The entire software update process does not require manual operation of the electronic device, improving the convenience of software updates and reducing costs.

[0143] This application does not restrict the order in which steps S101a and S101b are executed. In some embodiments, the second electronic device may first acquire and encrypt the verification data, and the first electronic device may then power on in response to the detection of a near-field communication signal. In other embodiments, the first electronic device may first power on in response to the detection of a near-field communication signal, and the second electronic device may then acquire and encrypt the verification data. In still other embodiments, the second electronic device may acquire and encrypt the verification data, while the first electronic device simultaneously powers on in response to the detection of a near-field communication signal.

[0144] Understandably, compared to other sequences of execution between steps S101a and S101b, step S101a is executed before step S101b. That is, the second electronic device first acquires and encrypts the verification data, and then the first electronic device powers on in response to the detection of the near-field communication signal. This results in a shorter waiting time after the first electronic device powers on; in other words, the time interval between powering on the first electronic device and receiving the encrypted verification data sent by the second electronic device via near-field communication is shorter. Furthermore, the first electronic device consumes less power throughout the entire software update process.

[0145] It is understood that the purpose of steps S101a, S102, and S103 is to confirm that the second electronic device is a trusted device, so as to securely trigger the establishment of a trusted connection between the first electronic device and the second electronic device. In this embodiment of the application, a trusted connection may not be established between the first electronic device and the second electronic device, and the above steps S101a, S102, and S103 are optional.

[0146] I. Receiving verification data after power-on

[0147] In some embodiments, a flag bit is stored in the register of the first electronic device. This flag bit can be used to indicate whether the first electronic device is in a second state after power-on, and the first electronic device can support software updates in the second state. For example, if the flag bit is a first preset value (e.g., 1), it indicates that the first electronic device is in the second state after power-on, that is, the first electronic device supports software updates; if the flag bit is a second preset value (e.g., 0), it indicates that the first electronic device is not in the second state after power-on, that is, the first electronic device does not support software updates. Support for software updates can be achieved by periodically enabling Near Field Communication (NFC) polling, that is, by sending NFC signals at a preset frequency (e.g., once per second) to detect whether there are NFC devices (e.g., NFC tags, NFC cards, NFC-enabled electronic devices, etc.) nearby (e.g., within 1 meter), so that the first electronic device can exchange data with the NFC device, and further obtain a software installation package for software updates. In this embodiment, the near-field communication device includes a second electronic device. In a second state, the first electronic device can receive encrypted verification data sent by the second electronic device via near-field communication. This further enables the first electronic device to obtain a software installation package for software updates if the verification data passes verification. The above example illustrates that the device triggering the first electronic device's power-on and the device sending the verification data are the same. It is understood that the device triggering the first electronic device's power-on and the device sending the verification data can be different. For example, the first electronic device may be triggered by a third electronic device, and the second electronic device may send verification data to the first electronic device.

[0148] After powering on, in response to the detection that the flag bit of the first electronic device is a first preset value, the first electronic device enters a second state. In the second state, the first electronic device is ready to receive encrypted verification data sent by the second electronic device through near-field communication.

[0149] It should be noted that the second electronic device may or may not be aware that the first electronic device is powered on before sending the encrypted verification data to the first electronic device via near-field communication (NFC). This application embodiment does not impose any limitations on this. In some embodiments, in response to an indication that the first electronic device is powered on (e.g., Bluetooth broadcast), the second electronic device can send encrypted verification data to the first electronic device via NFC. In other embodiments, since the first electronic device can only receive the encrypted verification data sent by the second electronic device via NFC after it is powered on, a preset duration (e.g., 10 seconds) needs to be set before the second electronic device sends the encrypted verification data to the first electronic device to wait for it to power on. This preset duration is empirical data required for the first electronic device to power on. In this case, after the preset duration (e.g., 10 seconds) for acquiring and encrypting the verification data, the second electronic device can send the encrypted verification data to the first electronic device via NFC.

[0150] The transmission of encrypted verification data to the first electronic device via near-field communication (NFC) can be achieved as follows: First, the encrypted verification data is sent to a NFC tag for storage. Then, the NFC tag storing the encrypted verification data is brought close to the first electronic device, enabling the NFC tag to transmit the encrypted verification data to the first electronic device via NFC. It is understood that the NFC tag can be located on the second electronic device or independently of it; this embodiment does not limit this. It is also understood that, besides the NFC tag, the object used to store the encrypted verification data can be other objects (e.g., NFC cards); this embodiment does not limit what the object used to store the encrypted verification data is.

[0151] Specifically, the second electronic device can be used to control the first electronic device to power on and send encrypted verification data to the first electronic device via near-field communication, improving the efficiency of powering on and receiving encrypted verification data. For example, the second electronic device stores encrypted verification data. First, the second electronic device can control the first electronic device to power on by sending a near-field communication signal to it when it is close to the first electronic device. Within a preset time (e.g., 1 second) after the first electronic device is powered on, the second electronic device then sends encrypted verification data to the first electronic device via near-field communication, while the second electronic device is still close to the first electronic device.

[0152] It should be noted that the embodiments of this application do not limit the type and quantity of verification data sent by the second electronic device to the first electronic device. For example, the verification data sent by the second electronic device to the first electronic device may be a serial number. Another example is that the verification data sent by the second electronic device to the first electronic device may be an unlock code. Yet another example is that the verification data sent by the second electronic device to the first electronic device may be both a serial number and an unlock code.

[0153] It should be noted that the embodiments of this application do not limit the type and quantity of verification data used to verify the first electronic device. For example, the verification data used to verify the first electronic device may be a serial number. Another example is that the verification data used to verify the first electronic device may be an unlock code. Yet another example is that the verification data used to verify the first electronic device may be both a serial number and an unlock code. It is understood that when the verification data used to verify the first electronic device is a serial number and an unlock code, the embodiments of this application do not limit the order in which the serial number and the unlock code are verified. For example, the first electronic device may verify the serial number first, and then verify the unlock code after the serial number passes verification. Another example is that the first electronic device may verify the unlock code first, and then verify the serial number after the unlock code passes verification. Yet another example is that the first electronic device may verify both the serial number and the unlock code simultaneously.

[0154] II. Obtaining the Software Installation Package

[0155] If the decrypted verification data passes verification, the first electronic device can obtain the software installation package in the following ways: 1. Obtain the software installation package from the second electronic device; 2. Obtain the software installation package from the server. The server stores one or more software installation packages and can be, for example, an OTA server. OTA servers are remote upgrade services provided by device manufacturers to push system updates, security patches, or feature upgrades to electronic devices (such as mobile phones, smartwatches, smart home devices, cars, etc.). Figure 3 Not shown. In some embodiments, if both the second electronic device and the server store software installation packages, the first electronic device may preferentially obtain the software installation package from the second electronic device.

[0156] Optionally, the first electronic device and / or the second electronic device may obtain the software installation package only if one or more of the following conditions are met: the battery level of the first electronic device is higher than a battery threshold B (e.g., 60%), or the software version of the first electronic device supports updates, in order to improve the success rate of software updates. Wherein, "the software version of the first electronic device supports updates" may mean that the software version of the first electronic device before the update meets the minimum compatibility requirements with the underlying version of the software installation package; for example, the software version of the first electronic device before the update must be higher than or equal to the underlying version of the software installation package. It is understood that, in addition to the above conditions, other conditions may also be included to trigger the first electronic device to obtain the software installation package for updating, and this embodiment of the application does not limit this. It is understood that the software version of the first electronic device is only detected when the software version of the first electronic device restricts software updates.

[0157] Specifically, the first electronic device can obtain the software installation package from the second electronic device in the following way: First, the first electronic device establishes a first communication connection with the second electronic device; then, the first electronic device obtains the software installation package from the second electronic device based on the first communication connection. How the first electronic device obtains the software installation package from the second electronic device will be explained in detail in later embodiments, and will not be elaborated here.

[0158] Specifically, the first electronic device obtains the software installation package from the server in the following way: First, the first electronic device establishes a second communication connection with the server; then, the first electronic device obtains the software installation package from the server based on the second communication connection. How the first electronic device obtains the software installation package from the server is explained in detail in later embodiments, and will not be elaborated here.

[0159] III. Distribution of Update Results

[0160] When the second electronic device includes a screen, the update results of the first electronic device can be intuitively displayed on the screen of the second electronic device. This allows users to easily observe the software update results of the first electronic device, improving the user experience. The update results can be used to indicate the updated software version of the first electronic device.

[0161] Before displaying the update result, the second electronic device can receive the update result from the first electronic device in the following ways: 1. The second electronic device directly receives the update result sent by the first electronic device; 2. The second electronic device receives the update result forwarded by the first electronic device through a server, where the server can store and forward the update result of the first electronic device. In some embodiments, when the first electronic device and the second electronic device have established a first communication connection, the second electronic device can directly receive the update result sent by the first electronic device in the following ways: 1. The second electronic device receives the update result sent by the first electronic device after the update; 2. The second electronic device sends a request to the first electronic device to obtain the update result, and in response to the request, the second electronic device receives the update result returned by the first electronic device. In other embodiments, when the first electronic device and the second electronic device have established communication connections with the server respectively, the second electronic device can receive the update result forwarded by the first electronic device through the server in the following ways: the first electronic device first sends the update result to the server after the update, and then the second electronic device receives the update result forwarded by the server.

[0162] It is understood that, in addition to updating the results, the second electronic device can also receive other information from the first electronic device, such as battery level, and this embodiment of the application does not limit this. It is understood that the first electronic device can only be sold if its battery level is within a preset range (e.g., within 50%-70%).

[0163] After receiving the update result from the first electronic device, the second electronic device can display the update result as follows: the second electronic device displays a screenshot of the first electronic device, the content of which may include the updated software version of the first electronic device. It is understood that in this case, the first electronic device includes a screen. For example, as... Figure 4 As shown, the second electronic device can display a user interface 1070, which may include a screenshot (e.g., image 1071). The content of the screenshot may include, but is not limited to, one or more of the following: the name of the first electronic device (e.g., "Lisa's Watch"), the model number of the first electronic device (e.g., "Watch D"), the MAC address of the first electronic device (e.g., "00:1A:2B:3C:4D:5E"), the software version of the first electronic device (e.g., "2.1.0"), and the serial number of the first electronic device (e.g., "0123456789ABCD"). It is understood that, in addition to screenshots, the update result received by the second electronic device from the first electronic device may also be of other types (e.g., Bluetooth commands), and this embodiment does not limit this.

[0164] Before the second electronic device displays the update result, the first electronic device can take a screenshot of the updated software version. For example, the first electronic device can first access the device information interface in the settings application, and then take a screenshot of that interface, which displays the updated software version. Optionally, before taking a screenshot of the updated software version, the first electronic device can turn on its screen.

[0165] Optionally, if the second electronic device determines that the first electronic device has successfully updated, the second electronic device may send a first instruction to the first electronic device.

[0166] The first instruction can be used to trigger the first electronic device to clear redundant data generated after the first electronic device is powered on (this can be referred to as restoring factory settings). In this way, the first electronic device can clear storage space to improve system smoothness and stability. The redundant data can be all data generated after the first electronic device is powered on, except for the updated software version. In this embodiment, the redundant data generated after the first electronic device is powered on may include, but is not limited to, one or more of the following: update result data, acquired software installation package data, data from the communication connection established with the second electronic device and / or the server, and received verification data.

[0167] Furthermore, the first instruction can also be used to restore access restrictions on the first electronic device, such as prohibiting the device from using eSIM services from non-bundled operators, prohibiting the device from customizing kernel parameters (such as CPU scheduling and power optimization), and prohibiting the device from flashing third-party firmware, etc., to improve the device's data security. In this embodiment, restoring access restrictions on the first electronic device may include restoring restrictions on pairing and establishing connections between the first electronic device and the second electronic device without user intervention.

[0168] Optionally, in addition to triggering the first electronic device to clear redundant data generated after powering on and restore access restrictions, the first instruction can also be used to set a flag bit of the first electronic device from a first preset value to a second preset value. In this case, the first electronic device can exit the second state. After exiting the second state, the first electronic device does not support software updates, further realizing power management and functional balance. It should be noted that, in addition to receiving the first instruction, when preset conditions are met, the first electronic device can set the flag bit from the first preset value to the second preset value, so that the first electronic device can exit the second state, further making the first electronic device not support software updates. The preset conditions may include one or more of the following: the number of updates of the first electronic device reaches a first threshold (e.g., 3 times); the manufacturing time of the first electronic device exceeds a first duration (e.g., 6 months); the power of the first electronic device is lower than the power threshold A (e.g., 50%). In addition, the preset conditions for setting the flag bit from the first preset value to the second preset value may also include others, such as the electronic warranty card of the first electronic device being activated by the user. This application embodiment does not limit this. The electronic warranty card is a digital warranty certificate provided by the manufacturer to verify the warranty status of the device and to access after-sales service. The activation status of the electronic warranty card can be used to indicate the activation status of the device. It should be noted that the conditions for entering the first state and the conditions for exiting the second state can be the same or different, and this application embodiment does not impose any restrictions on this.

[0169] It is understood that, in response to the detection of a flag bit as the second preset value, the first electronic device may not support updates in the following ways: not receiving data sent by other electronic devices, not verifying data after receiving data sent by other electronic devices, not establishing a communication connection with other electronic devices after verifying data, not obtaining the software installation package after establishing a communication connection with other electronic devices, and not performing software updates after obtaining the software installation package. This application embodiment does not impose any restrictions on this.

[0170] Optionally, in addition to triggering the first electronic device to clear redundant data generated after power-on and restore access restrictions, the first instruction can also be used to trigger the first electronic device to power off and enter a first state (e.g., transport mode). In this first state, the first circuit module is inactive. This inactivity may include not detecting near-field communication signals, i.e., not detecting changes in magnetic flux, and further, not performing inductive power-on. In the first state, all modules in the first electronic device, such as the near-field communication module, WiFi module, Bluetooth module, processor, sensors, etc., are turned off. This saves energy and prevents battery depletion and device damage.

[0171] When there are multiple verification data sets, data transmission and verification can be performed in two ways: The first method involves the second electronic device sending these multiple verification data sets to the first electronic device, which then verifies each set sequentially. The second method involves the second electronic device sending the first portion of the multiple verification data sets to the first electronic device for verification. After the first portion passes verification, the second electronic device sends the second portion of the multiple verification data sets back to the first electronic device for verification, and so on. Combining these two data transmission and verification methods, and taking a verification data set including a serial number and an unlock code as an example, [the following is a further explanation of the methods used]. Figure 3 The detailed explanations of steps S102 and S103 in the process shown can be found as follows: Figure 5 and Figure 6 As shown.

[0172] Figure 5 The flowchart of a data transmission and verification method provided in an embodiment of this application is illustrated. This method can be applied to a communication system comprising a first electronic device and a second electronic device.

[0173] like Figure 5 As shown, the method may include:

[0174] S201, the second electronic device sends encrypted verification data to the first electronic device via near-field communication. The verification data includes a serial number and an unlock code.

[0175] S202, The first electronic device decrypts the encrypted verification data.

[0176] In some embodiments, the second electronic device can send encrypted verification data, such as an encrypted serial number and unlock code, to the first electronic device via near-field communication. After receiving the encrypted verification data sent by the second electronic device, the first electronic device can decrypt the encrypted verification data to obtain decrypted verification data, such as a decrypted serial number and unlock code.

[0177] S203. The first electronic device verifies whether the decrypted serial number matches the serial number of the first electronic device.

[0178] S204. The first electronic device verifies whether the decrypted unlock code matches the unlock code of the first electronic device.

[0179] S205a, The first electronic device confirms that the decrypted verification data has passed verification.

[0180] S205b: The first electronic device determines that the decrypted verification data failed the verification.

[0181] In some embodiments, after decrypting all encrypted verification data, the first electronic device can sequentially verify each decrypted verification data. For example, the first electronic device can first verify whether the decrypted serial number matches the serial number of the first electronic device (i.e., step S203). If yes, then step S204 is executed, meaning the first electronic device can continue to verify whether the decrypted unlock code matches the unlock code of the first electronic device. If no, then step S205b is executed, meaning the first electronic device can determine that the decrypted verification data has failed verification. If the decrypted unlock code matches the unlock code of the first electronic device, then step S205a is executed, meaning the first electronic device can determine that the decrypted verification data has passed verification. If the decrypted unlock code does not match the unlock code of the first electronic device, then step S205b is executed, meaning the first electronic device can determine that the decrypted verification data has failed verification.

[0182] Figure 6 The flowchart of another data transmission and verification method provided in an embodiment of this application is illustrated. This method can be applied to a communication system including a first electronic device and a second electronic device.

[0183] like Figure 6 As shown, the method may include:

[0184] S301. The second electronic device sends encrypted first part of verification data to the first electronic device via near-field communication. The first part of verification data includes a serial number.

[0185] S302, The first electronic device decrypts the encrypted first part of the verification data.

[0186] S303. The first electronic device verifies whether the decrypted serial number matches the serial number of the first electronic device.

[0187] In other embodiments, the second electronic device can send encrypted first part of the verification data, such as an encrypted serial number, to the first electronic device via near-field communication. After receiving the encrypted first part of the verification data from the second electronic device, the first electronic device can decrypt the encrypted first part of the verification data to obtain decrypted first part of the verification data, such as a decrypted serial number. It is understood that this first part of the verification data is a partial verification data set.

[0188] In other embodiments, after decrypting the encrypted first part of the verification data, the first electronic device can verify the decrypted first part of the verification data. For example, the first electronic device can verify whether the decrypted serial number matches the serial number of the first electronic device (i.e., step S303). If yes, then step S304 is executed, meaning the first electronic device can send an indication message to the second electronic device that the first part of the verification data has passed verification; if no, then step S308b is executed, meaning the first electronic device can determine that the decrypted verification data has failed verification.

[0189] S304. The first electronic device sends an indication message to the second electronic device that the first part of the verification data has passed the verification.

[0190] S305, the second electronic device continues to send encrypted second part of verification data to the first electronic device, the second part of verification data including the unlock code.

[0191] S306. The first electronic device decrypts the encrypted second part of the verification data.

[0192] S307. The first electronic device verifies whether the decrypted unlock code matches the unlock code of the first electronic device.

[0193] S308a, The first electronic device confirms that the decrypted verification data has passed verification.

[0194] S308b: The first electronic device determines that the decrypted verification data failed the verification.

[0195] In some embodiments, if the decrypted serial number matches the serial number of the first electronic device, the first electronic device can send an indication that the first portion of the verification data has passed verification to the second electronic device. After receiving the indication that the first portion of the verification data has passed verification from the first electronic device, the second electronic device can continue to send encrypted second portion of verification data, such as an encrypted unlock code, to the first electronic device. After receiving the encrypted second portion of verification data from the second electronic device, the first electronic device can decrypt the encrypted second portion of verification data to obtain decrypted second portion of verification data, such as a decrypted unlock code. It is understood that this second portion of verification data is partial verification data.

[0196] In some embodiments, after decrypting the encrypted second part of the verification data, the first electronic device can verify the decrypted second part of the verification data. For example, the first electronic device can verify whether the decrypted unlock code is consistent with the unlock code of the first electronic device (i.e., step S307). If yes, then step S308a is executed, that is, the decrypted verification data passes the verification; if no, then step S308b is executed, that is, the decrypted verification data fails the verification.

[0197] As mentioned above, the first electronic device can obtain the software installation package from the second electronic device or the server. Combining these two methods of obtaining the software installation package, [the following is discussed]: Figure 3 A detailed explanation of step S104 in the process shown can be found as follows: Figure 7 and Figure 8 As shown.

[0198] Figure 7 This application illustrates a process for obtaining a software installation package from a server, as provided in an embodiment of this application.

[0199] like Figure 7 As shown, the method may include:

[0200] S401. If the decrypted verification data passes the verification, the first electronic device establishes a second communication connection with the server.

[0201] It is understandable that the prerequisites for the first electronic device to establish a second communication connection with the server may include: the first electronic device obtaining the server's communication address, and / or the server obtaining the first electronic device's communication address. One implementation of the first electronic device obtaining the server's communication address is: if the first electronic device stores the server's communication address, the first electronic device obtains the stored server's communication address; another implementation is: if the second electronic device stores the server's communication address and the first electronic device and the second electronic device have established a first communication connection, the first electronic device obtains the server's communication address from the second electronic device based on the first communication connection. One implementation of the server obtaining the first electronic device's communication address is: if the second electronic device stores the first electronic device's communication address and the second electronic device and the server have established a third communication connection, the server can obtain the first electronic device's communication address from the second electronic device based on the third communication connection.

[0202] It should be noted that, in the embodiments of this application, the first communication connection established between the first electronic device and the second electronic device can be a short-range communication connection with a short communication distance (e.g., 10 centimeters), such as near-field communication, Bluetooth, etc.; the second communication connection established between the first electronic device and the server and the third communication connection established between the second electronic device and the server can be long-range communication connections with a long communication distance (e.g., 500 meters), such as cellular network, satellite communication, WiFi, etc.

[0203] S402, The first electronic device obtains the software installation package from the server based on the second communication connection.

[0204] S403, The first electronic device updates its software based on the software installation package.

[0205] The server stores one or more software installation packages.

[0206] Optionally, before obtaining the software installation package from the server based on the second communication connection, the first electronic device may detect that one or more of the following conditions are met: the battery level of the first electronic device is higher than a battery threshold B (e.g., 60%), or the software version of the first electronic device supports updates. Here, "the software version of the first electronic device supports updates" can mean that the software version of the first electronic device before the update meets the minimum compatibility requirements with the underlying version of the software installation package; for example, the software version of the first electronic device before the update must be higher than or equal to the underlying version of the software installation package. It is understood that, in addition to the above conditions, other conditions may also be included to trigger the first electronic device to obtain the software installation package for updating, and this embodiment of the application does not limit this. It is understood that the detection of the software version of the first electronic device is only performed when the software version of the first electronic device restricts software updates.

[0207] Specifically, the first electronic device can obtain the software installation package from the server in the following ways: 1. The first electronic device sends a request to the server to obtain the software installation package based on the second communication connection. In response to the request, the server returns the software installation package to the first electronic device based on the second communication connection; 2. When the first electronic device and the second electronic device have established a first communication connection and the second electronic device and the server have established a third communication connection, the first electronic device sends a request to the server to obtain the software installation package based on the second communication connection. In response to the request, the server returns the software installation package to the second electronic device based on the third communication connection, and the second electronic device then sends the software installation package to the first electronic device based on the first communication connection; 3. When the first electronic device... When the first electronic device establishes a first communication connection with the second electronic device and the second electronic device establishes a third communication connection with the server, the first electronic device sends a request to the second electronic device to obtain a software installation package based on the first communication connection. In response to the request, the second electronic device notifies the server to send the software installation package to the first electronic device based on the second communication connection. 4. When the first electronic device and the second electronic device establish a first communication connection, the first electronic device sends a request to the second electronic device to obtain a software installation package based on the first communication connection. In response to the request, the second electronic device returns the communication address of the server to the first electronic device based on the first communication connection, so that the first electronic device can obtain the software installation package from the server based on the second communication connection.

[0208] It is understood that the requester seeking the software installation package from the server and the recipient of the software installation package sent by the server can be the same, or they can be different. This application embodiment does not impose any restrictions on this. It is also understood that the second electronic device can establish a third communication connection with the server before communicating with the server. This application embodiment does not impose any restrictions on the timing of the establishment of the third communication connection between the second electronic device and the server.

[0209] The software installation package obtained by the first electronic device can be the latest version of the software installation package stored on the server.

[0210] Optionally, before the first electronic device establishes a second communication connection with the server, the second electronic device may establish a first communication connection with the first electronic device and send data for network access (such as WiFi password, etc.) to the first electronic device based on the first communication connection, so that the first electronic device can access the Internet (also known as a network), thereby establishing the second communication connection. The version of the software installation package obtained by the first electronic device may be a specified version sent to the first electronic device by the second electronic device along with the data for network access based on the first communication connection.

[0211] Figure 8 This application illustrates a process for obtaining a software installation package from a second electronic device, as provided in an embodiment of this application.

[0212] The second electronic device stores a software installation package, which can be obtained by the second electronic device from a server or from other electronic devices besides the first electronic device; this embodiment does not impose any restrictions on this. It is understood that the second electronic device can obtain the software installation package before sending it to the first electronic device based on the first communication connection; this embodiment does not limit the timing of the second electronic device obtaining the software installation package. For example, the second electronic device can obtain the software installation package before establishing the first communication connection with the first electronic device. Alternatively, the second electronic device can obtain the software installation package after establishing the first communication connection with the first electronic device. It is understood that if the software installation package is obtained by the second electronic device from a server, then the second electronic device establishes a third communication connection with the server.

[0213] like Figure 8 As shown, the method may include:

[0214] S501. If the decrypted verification data passes the verification, the first electronic device establishes a first communication connection with the second electronic device.

[0215] It is understood that the embodiments of this application do not limit the object that actively initiates the request to establish the first communication connection. For example, the first electronic device may initiate a request to establish the first communication connection to the second electronic device. As another example, the first electronic device may send an indication (e.g., a notification) indicating that the verification data has passed verification to the second electronic device, thereby causing the second electronic device to initiate a request to establish the first communication connection to the first electronic device. The electronic device establishing the first communication connection may be the second electronic device that sends encrypted verification data to the first electronic device. It is understood that if the verification data passes verification, the first communication connection may be a user-free pairing connection between the aforementioned first and second electronic devices.

[0216] It is understood that when the first electronic device and the second electronic device establish a first communication connection, this application embodiment does not limit whether the second electronic device displays a user-free pairing and connection interface. Optionally, if the second electronic device includes a screen, the second electronic device may display a user-free pairing and connection interface. It is understood that the user-free pairing and connection interface displayed by the second electronic device may be the same as or different from the user-free pairing and connection interface displayed by the first electronic device, and this application embodiment does not limit this. When the user-free pairing and connection interface displayed by the second electronic device is the same as the user-free pairing and connection interface displayed by the first electronic device, the second electronic device may display as follows: Figure 2A The user interface 1040 shown is as follows: Figure 2B The user interface 1050 shown is as follows: Figure 2C The user interface shown is 1060.

[0217] S502, The first electronic device obtains the software installation package from the second electronic device based on the first communication connection.

[0218] S503, the first electronic device updates software based on the software installation package.

[0219] It is understood that the first electronic device can detect whether the conditions for triggering the first electronic device to obtain the software installation package for updating are met, and the second electronic device can also detect whether the conditions for triggering the first electronic device to obtain the software installation package for updating are met. This application embodiment does not limit this.

[0220] When the first electronic device detects that the aforementioned conditions for triggering the first electronic device to obtain the software installation package for updating are met, the first electronic device can obtain the software installation package from the second electronic device in the following ways: 1. The first electronic device sends a request to the second electronic device to obtain the software installation package based on the first communication connection, and in response to the request, the second electronic device returns the software installation package to the first electronic device based on the first communication connection.

[0221] When the second electronic device detects that the aforementioned conditions for triggering the first electronic device to obtain the software installation package for updating are met, the first electronic device can obtain the software installation package from the second electronic device in the following ways: 1. The second electronic device sends the software installation package to the first electronic device based on the first communication connection; 2. The second electronic device sends its communication address to the first electronic device based on the first communication connection, and the first electronic device then obtains the software installation package from the second electronic device based on the communication address of the second electronic device.

[0222] Figure 9 An exemplary embodiment of the communication system provided in this application is shown.

[0223] like Figure 9 As shown, the communication system may include: a first electronic device, a second electronic device, and a server. The first electronic device may be placed in a packaging box (e.g., a color box). Figure 9 The server shown in the dashed box is optional.

[0224] The first electronic device can establish a first communication connection with the second electronic device. Optionally, the first electronic device can also establish a second communication connection with the server. Optionally, the second electronic device can also establish a third communication connection with the server. The first communication connection can be a short-range communication connection with a short communication distance (e.g., 10 centimeters), such as near-field communication, Bluetooth, etc.; the second and third communication connections can be long-range communication connections with a long communication distance (e.g., 500 meters), such as WiFi, cellular networks, satellite communication, etc.

[0225] The first electronic device can be used to power on in response to the detection of a near-field communication signal; the first electronic device can also be used to receive encrypted verification data sent by the second electronic device via near-field communication; the first electronic device can also be used to obtain a software installation package for software updates. In some embodiments, the first electronic device can be used to obtain a software installation package from the second electronic device based on a first communication connection. In other embodiments, the first electronic device can be used to obtain a software installation package from a server based on a second communication connection.

[0226] The second electronic device can be used to send encrypted verification data to the first electronic device via near-field communication; the second electronic device can also be used to send a software installation package to the first electronic device based on the first communication connection.

[0227] The server can be used to send a software installation package to the first electronic device via a second communication connection.

[0228] The first communication connection may include, but is not limited to, wireless connections such as Bluetooth (BT) connections and near-field communication connections. Furthermore, the first and second electronic devices in this communication system can also connect and communicate using any of the above methods; this application embodiment does not impose any limitations on this. That is to say, the first and second electronic devices in this communication system can form a network (i.e., a network) according to a certain communication protocol and networking strategy, enabling communication between the first and second electronic devices.

[0229] The second and third communication connections can include, but are not limited to, wireless connections such as WLAN or cellular mobile communication connections. If it is a WLAN or cellular mobile communication connection, the second and third communication connections can be indirect, i.e., connections established through an access point (AP), which can include, but is not limited to, base stations or routers. Furthermore, the first and second electronic devices in this communication system can also connect and communicate with the server using any of the above methods; this application does not impose any limitations on this. In other words, the first and second electronic devices in this communication system can form a network (i.e., a network) according to a certain communication protocol and networking strategy, enabling communication between the first and second electronic devices and the server.

[0230] Optionally, the communication system may further include a third electronic device, which can be used to trigger the first electronic device to power on. Alternatively, a second electronic device in the communication system can be used to trigger the first electronic device to power on.

[0231] Figure 10 An electronic device 100 provided in an embodiment of this application is illustrated by way of example.

[0232] In this embodiment, the first electronic device can be electronic device 100. Electronic device 100 can be various types of smart terminal devices that support inductive power-on and air-to-ground software version updates. This embodiment does not limit the specific type of electronic device 100. For example, electronic device 100 can be a mobile phone, or it can be a mobile tablet computer, in-vehicle tablet computer, desktop computer, laptop computer, handheld computer, smartwatch, etc.

[0233] like Figure 10 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a first circuit module 130, a short-range communication module 140, a long-range communication module 150, a display screen 160, etc.

[0234] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0235] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0236] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0237] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0238] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, photos, videos, and other data can be stored on the external memory card.

[0239] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the instructions stored in internal memory 121, thereby causing electronic device 100 to perform the update methods provided in some embodiments of this application, as well as various functional applications and data processing. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system; it may also store one or more application programs (such as a gallery, contacts, etc.). The data storage area may store data created during the use of electronic device 100 (such as update results). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0240] In this embodiment, the first circuit module 130 can be used to detect near-field communication signals by detecting changes in magnetic flux when the electronic device 100 is powered off and not in a first state. The first circuit module 130 is inactive when the electronic device 100 is in the first state, which may include not detecting near-field communication signals. This first state is entered by the electronic device 100 after being powered off for a first period of time (e.g., 6 months). For example, in response to detecting a near-field communication signal, the electronic device 100 can detect a change in magnetic flux through the first circuit module 130, and this change in magnetic flux can be used to trigger the electronic device 100 to power on.

[0241] The wireless communication function of the electronic device 100 can be implemented through a short-range communication module 140, a long-range communication module 150, a modem processor, and a baseband processor.

[0242] In this embodiment, the near-field communication module 140 can be used to receive encrypted verification data sent by other electronic devices via near-field communication. In some embodiments, the electronic device 100 can establish a first communication connection with other electronic devices through the near-field communication module 140, and obtain software installation packages from other electronic devices for software updates based on the first communication connection. It is understood that the communication distance through the near-field communication module 140 is relatively short (e.g., 10 centimeters), and can be, for example, near-field communication, Bluetooth, etc.

[0243] In some embodiments, the long-distance communication module 150 can be used by the electronic device 100 to establish a second communication connection with the server and to obtain a software installation package from the server for software updates based on the second communication connection. It is understood that the communication distance via the long-distance communication module 150 is relatively long (e.g., 500 meters), and can be, for example, WiFi, cellular networks, satellite communication, etc. It is understood that the long-distance communication module 150 is optional.

[0244] The modem processor may include a modulator and a demodulator. The modulator modulates a low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor displays images or videos via the display screen 160. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and housed within the same device as other functional modules.

[0245] Electronic device 100 can perform display functions, such as displaying updated results, through a GPU, a display screen 160, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 160 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute instructions to generate or modify display information.

[0246] The display screen 160 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 160, where N is a positive integer greater than 1. It is understood that the display screen 160 is optional.

[0247] Figure 11 An electronic device 200 provided in an embodiment of this application is illustrated by way of example.

[0248] In this embodiment, the second electronic device can be electronic device 200. Electronic device 200 can be various types of smart terminal devices that support near-field communication, and this embodiment does not limit the specific type of electronic device 200. For example, electronic device 200 can be a mobile phone, or it can be a mobile tablet computer, in-vehicle tablet computer, desktop computer, laptop computer, handheld computer, smartwatch, etc.

[0249] like Figure 11 As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a short-range communication module 230, a long-range communication module 240, a display screen 250, a camera 260, etc.

[0250] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0251] Processor 210 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0252] The controller can be the nerve center and command center of the electronic device 200. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0253] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0254] The external storage interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external storage interface 220 to perform data storage functions. For example, music, photos, videos, and other data can be stored on the external memory card.

[0255] Internal memory 221 can be used to store one or more computer programs, which include instructions. Processor 210 can execute the instructions stored in internal memory 221, thereby causing electronic device 200 to perform the update methods provided in some embodiments of this application, as well as various functional applications and data processing. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system; it may also store one or more application programs (such as a gallery, contacts, etc.). The data storage area may store data created during the use of electronic device 200 (such as update results). Furthermore, internal memory 221 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0256] The wireless communication function of the electronic device 200 can be implemented through a short-range communication module 230, a long-range communication module 240, a modem processor, and a baseband processor.

[0257] In this embodiment, the near-field communication module 230 can be used to send encrypted verification data to the electronic device 100 via near-field communication. In some embodiments, the electronic device 200 can establish a first communication connection with the electronic device 100 through the near-field communication module 230, and send a software installation package to the electronic device 100 based on the first communication connection. It is understood that the communication distance through the near-field communication module 230 is relatively short (e.g., 10 centimeters), and can be, for example, near-field communication, Bluetooth, etc.

[0258] In some embodiments, the long-distance communication module 240 can be used by the electronic device 200 to establish a third communication connection with the server and obtain a software installation package from the server based on the third communication connection. It is understood that the communication distance via the long-distance communication module 240 is relatively long (e.g., 500 meters), and can be, for example, WiFi, cellular networks, satellite communication, etc. It is understood that the long-distance communication module 240 is optional.

[0259] The modem processor may include a modulator and a demodulator. The modulator modulates a low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor displays images or videos via the display screen 250. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and housed within the same device as other functional modules.

[0260] Electronic device 200 can perform display functions, such as displaying updated results, through a GPU, display screen 250, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 250 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs, which execute instructions to generate or modify display information.

[0261] The display screen 250 is used to display images, videos, etc. In some embodiments, the electronic device 200 may include one or N display screens 250, where N is a positive integer greater than 1. It is understood that the display screens 250 are optional.

[0262] In this embodiment, camera 260 can be used to obtain a serial number by scanning a first graphic code (e.g., a barcode on the color box) located on the packaging box (e.g., a color box) of electronic device 100. It is understood that camera 260 is optional.

[0263] Figure 12 The structure of the server provided in the embodiments of this application is illustrated by way of example.

[0264] like Figure 12 As shown, the server may include a processor 310, a memory 320, and a communication module 330. The components in the server are connected to each other via a bus and communicate based on the bus.

[0265] Processor 310 may include one or more processing units, such as application processors, modem processors, GPUs, ISPs, controllers, video codecs, DSPs, baseband processors, and / or NPUs. These different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0266] Memory 320 is coupled to processor 310 and is used to store various software programs and / or multiple sets of instructions. Memory 320 can be used to store computer executable program code, which includes instructions. Processor 310 executes various functional applications and data processing of the server by running the instructions stored in memory 320. Memory may also be provided in processor 310 for storing instructions and data.

[0267] The memory 320 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 310. The RAM can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs. The NVM can also store executable programs and user and application data. Executable programs, i.e., user data, stored in the NVM can be pre-loaded into the RAM for direct reading and writing by the processor 310.

[0268] The communication module 330 can be used to establish a second communication connection with the electronic device 100 and send a software installation package to the electronic device 100 through the second communication connection. Optionally, the communication module 330 can also be used to establish a third communication connection with the electronic device 200 and send a software installation package to the electronic device 200 through the third communication connection.

[0269] It should be understood that, Figure 12 The server shown is merely an example, and servers can have more than that. Figure 12 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. Figure 12 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0270] Based on the embodiments of this application, the electronic device 100 may include a first circuit module, which can be used to convert the near-field communication signal detected by the electronic device 100 into a change in magnetic flux. This change in magnetic flux can be used to trigger the electronic device 100 to power on using a simulated button. After powering on, the electronic device 100 can receive encrypted verification data sent by the electronic device 200 via near-field communication, and then decrypt and verify the encrypted verification data. If the verification data passes verification, the electronic device 100 can remove access restrictions (e.g., remove restrictions on pairing and establishing a connection between the electronic device 100 and the electronic device 200 without user operation). After removing the restrictions, the electronic device 100 and the electronic device 200 can establish a pairing and establishing a connection without user operation to obtain a software installation package. After the electronic device 100 is updated, the electronic device 100 can take a screenshot of the update result, which can be used to indicate the updated software version of the electronic device 100. Then, the electronic device 100 can send the update result to the electronic device 200. If the electronic device 200 includes a screen, the update result of the electronic device 100 can be intuitively presented on the screen of the electronic device 200 for easy observation by the user. Furthermore, the electronic device 100 can manage the value of a flag bit, which is set in the register of the electronic device 100 and can be used to indicate whether the electronic device 100 supports updates after power-on. When preset conditions are met, the electronic device 100 can change the flag bit from a value that supports updates to a value that does not support updates. The preset conditions may include one or more of the following: the number of updates of the electronic device 100 reaches a first threshold (e.g., 3 times); the manufacturing time of the electronic device 100 exceeds a first duration (e.g., 6 months); the battery level of the electronic device 100 is lower than a battery threshold (e.g., 50%); the electronic warranty card of the electronic device 100 is activated by the user to achieve battery management and functional balance.

[0271] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps performed by the electronic device in the above method embodiments, or the steps performed by the human-computer interaction module and the computing module.

[0272] This application also provides a computer program product that, when run on a terminal device, enables the terminal device to perform the steps executed by the electronic device in the above method embodiments.

[0273] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps performed by the electronic device in any of the method embodiments of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0274] The term "user interface (UI)," or simply "interface," used in the specification and accompanying drawings of this application, refers to the medium through which an application or operating system interacts and exchanges information with the user. It facilitates the conversion between the internal form of information and a form acceptable to the user. The user interface of an application is written in source code using specific computer languages ​​such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the terminal device, ultimately presenting user-recognizable content, such as images, text, and buttons. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, images, and text. The attributes and content of controls in the interface are defined using tags or nodes, such as XML tags. <textview> 、 <imgview> 、 <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a web page is also defined through tags or nodes in the web page source code; for example, HTML uses tags or nodes to define the content. 、 、 <video> 、 <canvas>Used to define the elements and attributes of a webpage.

[0275] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0276] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0277] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0278] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if determining..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)".

[0279] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0280] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.< / canvas> < / video> < / videoview> < / imgview> < / textview>

Claims

1. An update method applied to a first electronic device, characterized in that, The method includes: In response to the detection of a near-field communication signal, the first electronic device is powered on; After the first electronic device is powered on, the first electronic device receives encrypted verification data sent by the second electronic device via near-field communication; The first electronic device decrypts the encrypted verification data; If the decrypted verification data passes the verification, the first electronic device obtains the software installation package and updates the software based on the software installation package.

2. The method according to claim 1, characterized in that, The software installation package is used to update the operating system version of the first electronic device.

3. The method according to claim 1 or 2, characterized in that, Before the first electronic device acquires the software installation package, the method further includes: The first electronic device acquires the target device data stored in the first electronic device; The first electronic device compares the decrypted verification data with the target device data to see if they are consistent. If they are, the first electronic device determines that the decrypted verification data has passed the verification.

4. The method according to claim 3, characterized in that, The verification data includes one or more of the following: the device's serial number and the device's unlock code; wherein the unlock code is used to remove the access restrictions on the device.

5. The method according to claim 4, characterized in that, The verification data includes: the device's serial number and the device's unlock code; the first electronic device compares the decrypted verification data with the target device data to see if they match, specifically including: The first electronic device first compares the decrypted serial number with the serial number of the first electronic device. If they match, the first electronic device then compares the decrypted unlock code with the unlock code of the first electronic device.

6. The method according to claim 4 or 5, characterized in that, The serial number is obtained by the second electronic device by scanning a first graphic code located on the packaging of the first electronic device.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: After the first electronic device is updated, the first electronic device sends an update result to the second electronic device. The update result is used to indicate the updated software version of the first electronic device and is used to display the update result in the second electronic device.

8. The method according to claim 7, characterized in that, The first electronic device includes a screen, and the first electronic device sends an update result to the second electronic device, specifically including: The first electronic device sends a screenshot to the second electronic device. The content of the screenshot includes the updated software version of the first electronic device. The screenshot is used to display on the second electronic device.

9. The method according to claim 8, characterized in that, Before the first electronic device sends the update result to the second electronic device, the method further includes: The first electronic device takes a screenshot of the updated software version of the first electronic device.

10. The method according to any one of claims 1-9, characterized in that, The first electronic device includes a first circuit module, which is used to detect the near-field communication signal by detecting whether the magnetic flux changes when the first electronic device is powered off and has not entered a first state. The first circuit module does not work when the first electronic device is in the first state, and the non-operation includes not detecting the near-field communication signal. The first state is entered by the first electronic device after being powered off for a first time.

11. The method according to claim 10, characterized in that, The method further includes: When the second electronic device determines that the first electronic device has successfully updated, the first electronic device receives a first instruction sent by the second electronic device. The first instruction is used to trigger the first electronic device to clear redundant data generated after the first electronic device is powered on.

12. The method according to claim 11, characterized in that, The first instruction is also used to restore access restrictions on the first electronic device.

13. The method according to claim 11 or 12, characterized in that, The first instruction is also used to trigger the first electronic device to shut down and enter the first state. The first circuit module does not work when the first electronic device is in the first state. The inoperability includes not detecting the near-field communication signal. The first state is entered by the first electronic device after it has been shut down for the first time.

14. The method according to any one of claims 1-13, characterized in that, Before the first electronic device receives the encrypted verification data sent by the second electronic device via near-field communication, the method further includes: In response to detecting that the flag bit of the first electronic device is a first preset value, the first electronic device enters a second state. In the second state, the first electronic device detects a near-field communication device by sending the near-field communication signal to exchange data with the near-field communication device. The near-field communication device includes the second electronic device. The data exchange includes receiving the encrypted verification data sent by the second electronic device through the near-field communication.

15. The method according to claim 14, characterized in that, The method further includes: When the preset conditions are met, the first electronic device sets the flag bit from the first preset value to the second preset value; The preset conditions include one or more of the following: the number of updates of the first electronic device reaches a first threshold; the manufacturing time of the first electronic device exceeds a first duration; the battery level of the first electronic device is lower than a first battery level threshold.

16. The method according to any one of claims 1-15, characterized in that, Before the first electronic device acquires the software installation package, the method further includes: The first electronic device detects that one or more of the following conditions are met: the battery level of the first electronic device is higher than the second battery threshold, or the software version of the first electronic device supports an update.

17. The method according to any one of claims 1-16, characterized in that, The first electronic device acquires a software installation package, specifically including: The first electronic device obtains the software installation package from the second electronic device or the server.

18. The method according to claim 17, characterized in that, The first electronic device obtains the software installation package from the second electronic device, specifically including: The first electronic device establishes a first communication connection with the second electronic device; The first electronic device obtains the software installation package from the second electronic device based on the first communication connection.

19. The method according to claim 17, characterized in that, The first electronic device obtains the software installation package from the server, specifically including: The first electronic device establishes a second communication connection with the server; The first electronic device obtains the software installation package from the server based on the second communication connection.

20. An update method applied to a second electronic device, the method comprising: The second electronic device acquires the verification data and encrypts the verification data; After the first electronic device is powered on, the second electronic device sends encrypted verification data to the first electronic device via near-field communication.

21. The method according to claim 20, characterized in that, The verification data includes one or more of the following: the device's serial number and the device's unlock code; wherein the unlock code is used to remove the access restrictions on the device.

22. The method according to claim 21, characterized in that, The serial number is obtained by the second electronic device by scanning a first graphic code located on the packaging of the first electronic device.

23. The method according to any one of claims 20-22, characterized in that, The method further includes: If the first electronic device determines that the verification data has passed the verification, the second electronic device establishes a first communication connection with the first electronic device; The second electronic device sends a software installation package to the first electronic device based on the first communication connection. The software installation package is used by the first electronic device to update its software.

24. The method according to claim 23, characterized in that, The software update includes updating the operating system version of the first electronic device.

25. The method according to claim 23 or 24, characterized in that, Before the second electronic device sends a software installation package to the first electronic device based on the first communication connection, the method further includes: The second electronic device detects that one or more of the following conditions are met: the battery level of the first electronic device is higher than a first battery threshold, or the software version of the first electronic device supports an update.

26. The method according to any one of claims 23-25, characterized in that, The second electronic device includes a screen, and the method further includes: After the first electronic device is updated, the second electronic device displays the update result, which indicates the updated software version of the first electronic device.

27. The method according to claim 26, characterized in that, The second electronic device displays the update results, specifically including: The second electronic device displays a screenshot of the first electronic device, the content of which includes the updated software version of the first electronic device.

28. The method according to claim 27, characterized in that, The screenshot was obtained by the first electronic device from a screenshot of the updated software version of the first electronic device.

29. The method according to any one of claims 23-28, characterized in that, The method further includes: If the second electronic device determines that the first electronic device has successfully updated, the second electronic device sends a first instruction to the first electronic device. The first instruction is used to trigger the first electronic device to clear redundant data generated after the first electronic device is powered on.

30. The method according to claim 29, characterized in that, The first instruction is also used to restore access restrictions on the first electronic device.

31. The method according to claim 29 or 30, characterized in that, The first instruction is also used to trigger the first electronic device to shut down and enter a first state. The first circuit module of the first electronic device does not work when the first electronic device is in the first state. The inoperability includes not detecting the near-field communication signal. The first state is entered by the first electronic device after it has been shut down for a first time. The first circuit module is used to detect the near-field communication signal by detecting whether the magnetic flux changes when the first electronic device is shut down and has not entered the first state. The near-field communication signal is used to trigger the first electronic device to turn on.

32. A communication system, characterized in that, It includes a first electronic device and a second electronic device; wherein there is a communication connection between the first electronic device and the second electronic device; the first electronic device is the electronic device according to any one of claims 1-19, and the second electronic device is the electronic device according to any one of claims 20-31.

33. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-19 or 20-31.

34. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by a processor, causes the electronic device to perform the method as described in any one of claims 1-31.

35. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it causes the electronic device to perform the method as described in any one of claims 1-31.