CN113741925B - Software upgrading method and device - Google Patents

Software upgrading method and device Download PDF

Info

Publication number
CN113741925B
CN113741925B CN202010942977.0A CN202010942977A CN113741925B CN 113741925 B CN113741925 B CN 113741925B CN 202010942977 A CN202010942977 A CN 202010942977A CN 113741925 B CN113741925 B CN 113741925B
Authority
CN
China
Prior art keywords
module
upgrade
information
version information
upgrade package
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010942977.0A
Other languages
Chinese (zh)
Other versions
CN113741925A (en
Inventor
陈磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202010942977.0A priority Critical patent/CN113741925B/en
Publication of CN113741925A publication Critical patent/CN113741925A/en
Application granted granted Critical
Publication of CN113741925B publication Critical patent/CN113741925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a software upgrading method and device, relates to the field of terminals, and aims to enable a first device (for example, a mobile phone) to assist a second device (for example, a sound box or an earphone) in software upgrading. The method is applied to a system comprising first equipment, second equipment and a server, wherein the first equipment comprises a first module set, the first module set comprises a first module and a second module, the second equipment comprises a second module set and first configuration information, and the second module set is a subset of the first module set, and the method comprises the following steps: the second device may determine to schedule the first module of the first device to search for the second version information of the first software from the server according to the first configuration information; the second equipment determines to schedule a second module of the first equipment to download an upgrade package corresponding to the second version information from the server according to the first configuration information; the second equipment receives the upgrade package corresponding to the second version information from the first equipment; and the second equipment installs the upgrade package corresponding to the second version information.

Description

一种软件升级方法和装置A software upgrade method and device

技术领域technical field

本申请涉及通信领域,尤其涉及一种软件升级方法和装置。The present application relates to the communication field, in particular to a software upgrading method and device.

背景技术Background technique

目前,设备厂商/厂家(例如,物联网(internet of things,IOT)设备厂商)在对IOT设备进行升级时,通常采用手机辅助IOT设备升级的策略。IOT设备可以分为多种类型,IOT设备厂商可以针对每种类型的IOT设备提供一套集成二进制组件,分别在IOT设备侧和手机侧集成,确保手机和IOT设备之间的接口稳定。At present, when equipment manufacturers/manufacturers (for example, Internet of Things (internet of things, IOT) equipment manufacturers) upgrade the IOT equipment, they usually adopt a mobile phone-assisted IOT equipment upgrade strategy. IOT devices can be divided into multiple types. IOT device manufacturers can provide a set of integrated binary components for each type of IOT device, which are integrated on the IOT device side and the mobile phone side respectively to ensure the stability of the interface between the mobile phone and the IOT device.

上述方案具有以下缺点:手机侧和IOT设备侧的功能实现是固定好的,在IOT设备的类型不同的情况下,手机和IOT设备之间的交互接口也不同。随着IOT设备的不断增加,如果手机侧要统一控制多种不同类型的IOT设备,则手机侧需要集成很多不同的二进制组件,导致手机侧的存储空间消耗大。并且,当出现新类型的IOT设备时,需要针对新类型的IOT设备重新设计并集成相应的二进制组件,导致手机难以实现对多种类型IOT设备辅助升级的有效扩展。The above solution has the following disadvantages: the function realization of the mobile phone side and the IOT device side is fixed, and in the case of different types of IOT devices, the interaction interfaces between the mobile phone and the IOT device are also different. With the continuous increase of IOT devices, if the mobile phone side wants to uniformly control multiple different types of IOT devices, the mobile phone side needs to integrate many different binary components, resulting in a large consumption of storage space on the mobile phone side. Moreover, when a new type of IOT device appears, it is necessary to redesign and integrate the corresponding binary components for the new type of IOT device, making it difficult for the mobile phone to effectively expand the assisted upgrade of various types of IOT devices.

发明内容Contents of the invention

本申请实施例提供一种软件升级方法和装置,用于辅助升级设备(例如,IOT设备)的软件。Embodiments of the present application provide a software upgrading method and apparatus, which are used to assist in upgrading software of a device (for example, an IOT device).

第一方面,本申请实施例提供一种软件升级方法,应用于包括第一设备、第二设备和服务器的系统,第一设备包括第一模块集合,第一模块集合包括第一模块和第二模块,第二设备包括第二模块集合和第一配置信息,第二模块集合是第一模块集合的子集,方法包括:第二设备确定第二设备的第一软件待升级,第一软件当前的版本信息为第一版本信息;第二设备根据第一配置信息确定调度第一设备的第一模块从服务器搜索第一软件的第二版本信息,第二版本信息不同于第一版本信息;第一设备的第一模块从服务器搜索第一软件的第二版本信息;第二设备根据第一配置信息确定调度第一设备的第二模块从服务器下载第二版本信息对应的升级包;第一设备的第二模块从服务器下载第二版本信息对应的升级包;第一设备向第二设备发送第二版本信息对应的升级包;第二设备从第一设备接收第二版本信息对应的升级包;第二设备安装第二版本信息对应的升级包。In the first aspect, the embodiment of the present application provides a software upgrade method, which is applied to a system including a first device, a second device, and a server. The first device includes a first module set, and the first module set includes the first module and the second module. module, the second device includes a second module set and first configuration information, the second module set is a subset of the first module set, the method includes: the second device determines that the first software of the second device is to be upgraded, and the first software is currently The version information is the first version information; the second device determines to schedule the first module of the first device to search for the second version information of the first software from the server according to the first configuration information, and the second version information is different from the first version information; The first module of a device searches the second version information of the first software from the server; the second device determines and schedules the second module of the first device to download the upgrade package corresponding to the second version information from the server according to the first configuration information; the first device The second module downloads the upgrade package corresponding to the second version information from the server; the first device sends the upgrade package corresponding to the second version information to the second device; the second device receives the upgrade package corresponding to the second version information from the first device; The second device installs an upgrade package corresponding to the second version information.

基于本申请实施例提供的方法,第一设备(例如,手机)可以辅助第二设备(例如,音箱)搜索和下载第二版本信息对应的升级包。这样,若第二设备不具备联网能力或者在第二设备不能联网的情况下,第二设备可以借助第一设备的联网能力搜索和下载第二版本信息对应的升级包,可以实现第二设备的软件升级。Based on the method provided in the embodiment of the present application, the first device (for example, a mobile phone) can assist the second device (for example, a speaker) to search for and download an upgrade package corresponding to the second version information. In this way, if the second device does not have the networking capability or if the second device cannot be connected to the Internet, the second device can use the networking capability of the first device to search and download the upgrade package corresponding to the second version information, which can realize the upgrade of the second device. software upgrade.

在一种可能的实现方式中,系统还包括第三设备,第三设备包括第三模块集合和第二配置信息,第三模块集合是第一模块集合的子集,且第三模块集合与第二模块集合不同,方法还包括:第三设备确定第三设备的第二软件待升级,第二软件当前的版本信息为第三版本信息;第三设备根据第二配置信息确定调度第一设备的第一模块从服务器搜索第二软件的第四版本信息,第四版本信息不同于第一版本信息;第一设备的第一模块从服务器搜索第二软件的第四版本信息;第三设备根据第二配置信息确定调度第一设备的第二模块从服务器下载第四版本信息对应的升级包;第一设备的第二模块从服务器下载第四版本信息对应的升级包;第一设备向第三设备发送第四版本信息对应的升级包;第三设备从第一设备接收第四版本信息对应的升级包;第三设备安装第四版本信息对应的升级包。In a possible implementation manner, the system further includes a third device, the third device includes a third module set and second configuration information, the third module set is a subset of the first module set, and the third module set and the first The two module sets are different, and the method further includes: the third device determines that the second software of the third device is to be upgraded, and the current version information of the second software is the third version information; the third device determines and schedules the first device according to the second configuration information The first module searches the fourth version information of the second software from the server, and the fourth version information is different from the first version information; the first module of the first device searches the fourth version information of the second software from the server; the third device searches according to the fourth version information of the second software. Two configuration information determines and schedules the second module of the first device to download the upgrade package corresponding to the fourth version information from the server; the second module of the first device downloads the upgrade package corresponding to the fourth version information from the server; the first device downloads the upgrade package corresponding to the fourth version information from the server; An upgrade package corresponding to the fourth version information is sent; the third device receives the upgrade package corresponding to the fourth version information from the first device; and the third device installs the upgrade package corresponding to the fourth version information.

基于本申请实施例提供的方法,第一设备(例如,手机)可以辅助第三设备(例如,音箱)搜索和下载第四版本信息对应的升级包。这样,若第三设备不具备联网能力或者在第三设备不能联网的情况下,第三设备可以借助第一设备的联网能力搜索和下载第四版本信息对应的升级包,可以实现第三设备的软件升级。Based on the method provided in the embodiment of the present application, the first device (for example, a mobile phone) can assist a third device (for example, a speaker) to search for and download an upgrade package corresponding to the fourth version information. In this way, if the third device does not have networking capabilities or the third device cannot be connected to the Internet, the third device can use the networking capabilities of the first device to search and download the upgrade package corresponding to the fourth version information, which can realize the third device's software upgrade.

并且,本申请实施例提供的方法可以使第一设备通过第一模块集合中的模块(例如,第一模块和第二模块)辅助不同设备(第二设备和第三设备)进行升级。Moreover, the method provided in the embodiment of the present application can enable the first device to assist different devices (the second device and the third device) to upgrade through the modules in the first module set (for example, the first module and the second module).

在一种可能的实现方式中,第一模块集合还包括第三模块,方法还包括:第二设备根据第一配置信息确定调度第一设备的第三模块校验第二版本信息对应的升级包;第一设备的第三模块校验第二版本信息对应的升级包。In a possible implementation manner, the first module set further includes a third module, and the method further includes: the second device determines and schedules the third module of the first device to check the upgrade package corresponding to the second version information according to the first configuration information ; The third module of the first device verifies the upgrade package corresponding to the second version information.

这样,若第二设备不具备升级包检验能力或者在第二设备不能检验升级包的情况下,第二设备可以借助第一设备的升级包检验能力校验第二版本信息对应的升级包。In this way, if the second device does not have the upgrade package checking capability or the second device cannot check the upgrade package, the second device can check the upgrade package corresponding to the second version information by means of the upgrade package checking capability of the first device.

在一种可能的实现方式中,第一模块集合还包括第四模块,方法还包括:第二设备根据第一配置信息确定调度第一设备的第四模块对第二版本信息对应的升级包进行差分还原和/或压缩还原;第一设备的第四模块对第二版本信息对应的升级包进行差分还原和/或压缩还原。In a possible implementation manner, the first module set further includes a fourth module, and the method further includes: the second device determines and schedules the fourth module of the first device to upgrade the upgrade package corresponding to the second version information according to the first configuration information. Differential restoration and/or compression restoration; the fourth module of the first device performs differential restoration and/or compression restoration on the upgrade package corresponding to the second version information.

这样,若第二设备不具备升级包差分还原和/或压缩还原能力或者在第二设备不能进行差分还原和/或压缩还原的情况下,第二设备可以借助第一设备的差分还原和/或压缩还原能力对第二版本信息对应的升级包进行差分还原和/或压缩还原。In this way, if the second device does not have the capability of differential restoration and/or compression restoration of the upgrade package or if the second device cannot perform differential restoration and/or compression restoration, the second device can rely on the differential restoration and/or compression restoration of the first device. The compression restoration capability performs differential restoration and/or compression restoration on the upgrade package corresponding to the second version information.

在一种可能的实现方式中,第一设备的第一模块从服务器搜索第一软件的第二版本信息包括:向第一模块输入第二设备的标识信息和第一软件的类型信息,第一模块输出第二版本信息的搜索结果。In a possible implementation manner, the searching by the first module of the first device for the second version information of the first software from the server includes: inputting the identification information of the second device and the type information of the first software to the first module, and the first The module outputs search results for the second version information.

即第一模块可以根据第二设备的标识信息和第一软件的类型信息搜索第二版本信息。That is, the first module may search for the second version information according to the identification information of the second device and the type information of the first software.

在一种可能的实现方式中,第一模块还输出第二版本信息、第二版本信息对应的升级包的统一资源定位器地址信息、升级包大小信息或更新日志信息中的至少一个。In a possible implementation manner, the first module further outputs at least one of the second version information, URL address information of the upgrade package corresponding to the second version information, upgrade package size information, or update log information.

在一种可能的实现方式中,第一设备的第二模块从服务器下载第二版本信息对应的升级包包括:向第二模块输入第二设备的标识信息、第二版本信息、第二版本信息对应的升级包的统一资源定位器地址信息或第一软件的类型信息中的至少一个,第二模块输出第二版本信息对应的升级包的下载结果。In a possible implementation manner, the second module of the first device downloading the upgrade package corresponding to the second version information from the server includes: inputting the identification information of the second device, the second version information, and the second version information to the second module. Corresponding to at least one of the URL address information of the upgrade package or the type information of the first software, the second module outputs the download result of the upgrade package corresponding to the second version information.

即第二模块可以根据第二设备的标识信息、第二版本信息、第二版本信息对应的升级包的统一资源定位器地址信息或第一软件的类型信息中的至少一个下载第二版本信息对应的升级包。That is, the second module may download the second version information corresponding to at least one of the identification information of the second device, the second version information, the URL address information of the upgrade package corresponding to the second version information, or the type information of the first software. upgrade package.

在一种可能的实现方式中,第二模块还输出第二版本信息对应的升级包的缓存地址或第二版本信息对应的升级包的下载进度中的至少一个。In a possible implementation manner, the second module further outputs at least one of a cache address of the upgrade package corresponding to the second version information or a download progress of the upgrade package corresponding to the second version information.

在一种可能的实现方式中,第一模块集合或第二模块集合集成在软件开发工具包(software development kit,SDK)中。第一模块集合可以集成在第一设备的SDK中,第二模块集合可以集成在第二设备的SDK。其中,SDK可以是软件厂商(例如,华为)统一提供的。In a possible implementation manner, the first module set or the second module set is integrated in a software development kit (software development kit, SDK). The first module set can be integrated in the SDK of the first device, and the second module set can be integrated in the SDK of the second device. Wherein, the SDK may be uniformly provided by a software manufacturer (for example, Huawei).

在一种可能的实现方式中,第二设备确定第二设备的第一软件待升级之前,方法还包括:第一设备在应用程序的第一界面显示提示信息,提示信息用于提示第二设备的第一软件待升级;第一设备接收用户的第一操作,第一操作用于升级第二设备的第一软件;第一设备向第二设备发送通知消息,通知消息用于指示第一软件待升级。即用户可以在第一设备上进行相应操作,以便对第二设备的软件进行升级,无需用户在第二设备上操作,可以提高用户的操作便利性。In a possible implementation manner, before the second device determines that the first software of the second device is to be upgraded, the method further includes: the first device displays prompt information on the first interface of the application program, and the prompt information is used to prompt the second device The first software of the user is to be upgraded; the first device receives the first operation of the user, and the first operation is used to upgrade the first software of the second device; the first device sends a notification message to the second device, and the notification message is used to indicate that the first software pending upgrade. That is, the user can perform corresponding operations on the first device to upgrade the software of the second device, without requiring the user to operate on the second device, which can improve the user's operation convenience.

在一种可能的实现方式中,第一设备向第二设备发送第二版本信息对应的升级包包括:第一设备基于近场设备通信协议向第二设备发送第二版本信息对应的升级包;其中,近场设备通信协议包括无线保真协议、蓝牙协议或近场通信协议(near fieldcommunication,NFC)中的至少一个。In a possible implementation manner, the first device sending the upgrade package corresponding to the second version information to the second device includes: the first device sending the upgrade package corresponding to the second version information to the second device based on a near-field device communication protocol; Wherein, the near field device communication protocol includes at least one of a Wi-Fi protocol, a Bluetooth protocol, or a near field communication protocol (near field communication, NFC).

在一种可能的实现方式中,方法还包括:第一设备向第二设备发送第二版本信息对应的升级包的下载进度。若第二设备有显示屏,可以向用户显示下载进度。In a possible implementation manner, the method further includes: the first device sends a download progress of the upgrade package corresponding to the second version information to the second device. If the second device has a display screen, the download progress can be displayed to the user.

在一种可能的实现方式中,方法还包括:第二设备向第一设备发送第二版本信息对应的升级包的安装进度。这样,第一设备可以通过显示屏向用户显示安装进度。In a possible implementation manner, the method further includes: the second device sends an installation progress of the upgrade package corresponding to the second version information to the first device. In this way, the first device can display the installation progress to the user through the display screen.

在一种可能的实现方式中,第一软件的类型包括固件、补丁、软件开发工具包、插件或设备参数中的至少一个。即第一设备可以辅助第二设备进行多种升级业务的升级。In a possible implementation manner, the type of the first software includes at least one of firmware, patch, software development kit, plug-in, or device parameter. That is, the first device can assist the second device to upgrade various upgrade services.

在一种可能的实现方式中,第一配置信息是第二设备的生产厂商提供的。这样,可以确保音箱的升级流程都是经过音箱厂商有效验证测试的,确保升级可靠性。In a possible implementation manner, the first configuration information is provided by a manufacturer of the second device. In this way, it can be ensured that the upgrade process of the speaker has been effectively verified and tested by the speaker manufacturer to ensure the reliability of the upgrade.

在一种可能的实现方式中,第一配置信息是第二设备根据第二设备的能力信息和第一设备的能力信息确定的;其中,第二设备的能力信息包括第二设备的通信能力、处理能力、显示能力中的至少一种,第一设备的能力信息包括第一设备的通信能力、处理能力、显示能力中的至少一种。这样,可以使升级过程更加灵活。In a possible implementation manner, the first configuration information is determined by the second device according to the capability information of the second device and the capability information of the first device; wherein, the capability information of the second device includes the communication capability of the second device, At least one of processing capability and display capability, the capability information of the first device includes at least one of communication capability, processing capability, and display capability of the first device. In this way, the upgrade process can be made more flexible.

第二方面,本申请实施例提供一种软件升级方法,应用于第一设备,第一设备包括第一模块集合,第一模块集合包括第一模块和第二模块,方法包括:第一设备确定第二设备的第一软件待升级,第一软件当前的版本信息为第一版本信息;第一设备的第一模块从服务器搜索第一软件的第二版本信息;第一设备的第二模块从服务器下载第二版本信息对应的升级包;第一设备向第二设备发送第二版本信息对应的升级包。In the second aspect, the embodiment of the present application provides a method for upgrading software, which is applied to a first device. The first device includes a first module set, and the first module set includes a first module and a second module. The method includes: the first device determines The first software of the second device is to be upgraded, and the current version information of the first software is the first version information; the first module of the first device searches the second version information of the first software from the server; the second module of the first device searches for the second version information of the first software from the server; The server downloads the upgrade package corresponding to the second version information; the first device sends the upgrade package corresponding to the second version information to the second device.

基于本申请实施例提供的方法,第一设备(例如,手机)可以辅助第二设备(例如,音箱)搜索和下载第二版本信息对应的升级包。这样,若第二设备不具备联网能力或者在第二设备不能联网的情况下,第二设备可以借助第一设备的联网能力搜索和下载第二版本信息对应的升级包,可以实现第二设备的软件升级。Based on the method provided in the embodiment of the present application, the first device (for example, a mobile phone) can assist the second device (for example, a speaker) to search for and download an upgrade package corresponding to the second version information. In this way, if the second device does not have the networking capability or if the second device cannot be connected to the Internet, the second device can use the networking capability of the first device to search and download the upgrade package corresponding to the second version information, which can realize the upgrade of the second device. software upgrade.

第三方面,本申请实施例提供一种软件升级方法,包括:第二设备确定第二设备的第一软件待升级,第一软件当前的版本信息为第一版本信息;第二设备根据第一配置信息确定调度第一设备的第一模块从服务器搜索第一软件的第二版本信息,第二版本信息不同于第一版本信息;第二设备根据第一配置信息确定调度第一设备的第二模块从服务器下载第二版本信息对应的升级包;第二设备从第一设备接收第二版本信息对应的升级包;第二设备安装第二版本信息对应的升级包。In the third aspect, the embodiment of the present application provides a method for upgrading software, including: the second device determines that the first software of the second device is to be upgraded, and the current version information of the first software is the first version information; The configuration information determines to schedule the first module of the first device to search the second version information of the first software from the server, and the second version information is different from the first version information; the second device determines to schedule the second version of the first device according to the first configuration information The module downloads the upgrade package corresponding to the second version information from the server; the second device receives the upgrade package corresponding to the second version information from the first device; the second device installs the upgrade package corresponding to the second version information.

基于本申请实施例提供的方法,若第二设备不具备联网能力或者在第二设备不能联网的情况下,第二设备可以借助第一设备的联网能力搜索和下载第二版本信息对应的升级包,可以实现第二设备的软件升级。Based on the method provided by the embodiment of the present application, if the second device does not have the networking capability or the second device cannot connect to the Internet, the second device can use the networking capability of the first device to search for and download the upgrade package corresponding to the second version information , the software upgrade of the second device can be realized.

第四方面,本申请实施例提供一种第一设备,该第一设备包括:无线通信模块、存储器和一个或多个处理器;无线通信模块、存储器与处理器耦合;其中,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令;当计算机指令被处理器执行时,使得第一设备执行如第一方面或第二方面及其任一种可能的实现方式所述的方法。In a fourth aspect, the embodiment of the present application provides a first device, the first device includes: a wireless communication module, a memory, and one or more processors; the wireless communication module, the memory is coupled to the processor; wherein the memory is used to store Computer program code, the computer program code includes computer instructions; when the computer instructions are executed by the processor, the first device is made to execute the method described in the first aspect or the second aspect and any possible implementation thereof.

第五方面,本申请实施例提供一种第一设备,该装置具有实现上述第一方面或第二方面及其任一种可能的实现方式所述的方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In the fifth aspect, the embodiment of the present application provides a first device, which has the function of implementing the method described in the first aspect or the second aspect and any possible implementation manner thereof. The functions described above may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.

第六方面,本申请实施例提供一种第二设备,该第二设备包括:无线通信模块、存储器和一个或多个处理器;无线通信模块、存储器与处理器耦合;其中,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令;当计算机指令被处理器执行时,使得第二设备执行如第一方面或第三方面及其任一种可能的实现方式所述的方法。In a sixth aspect, the embodiment of the present application provides a second device, the second device includes: a wireless communication module, a memory, and one or more processors; the wireless communication module, the memory is coupled to the processor; wherein the memory is used to store Computer program code, where the computer program code includes computer instructions; when the computer instructions are executed by the processor, the second device is made to execute the method described in the first aspect or the third aspect and any possible implementation thereof.

第七方面,本申请实施例提供一种第二设备,该装置具有实现上述第一方面或第三方面及其任一种可能的实现方式所述的方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a seventh aspect, the embodiment of the present application provides a second device, which has the function of implementing the method described in the first aspect or the third aspect and any possible implementation manner thereof. The functions described above may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.

第八方面,本申请实施例提供一种芯片系统,该芯片系统包括一个或多个接口电路和一个或多个处理器。该接口电路和处理器通过线路互联。In an eighth aspect, the embodiment of the present application provides a chip system, where the chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by wires.

上述芯片系统可以应用于包括通信模块和存储器的第一设备。该接口电路用于从存储器接收信号,并向处理器发送接收到的信号,该信号包括存储器中存储的计算机指令。当处理器执行该计算机指令时,第一设备可以执行如第一方面及其任一种可能的实现方式所述的方法。The system-on-a-chip described above can be applied to a first device including a communication module and a memory. The interface circuit is for receiving signals from the memory and sending the received signals to the processor, the signals comprising computer instructions stored in the memory. When the processor executes the computer instruction, the first device may execute the method described in the first aspect and any possible implementation manner thereof.

或者,上述芯片系统可以应用于包括通信模块和存储器的第二设备。该接口电路用于从第二设备的存储器接收信号,并向处理器发送接收到的信号,该信号包括存储器中存储的计算机指令。当处理器执行该计算机指令时,第二设备可以执行如第二方面及其任一种可能的实现方式所述的方法。Alternatively, the above system-on-a-chip may be applied to a second device including a communication module and a memory. The interface circuit is adapted to receive signals from the memory of the second device and to send the received signals to the processor, the signals comprising computer instructions stored in the memory. When the processor executes the computer instruction, the second device may execute the method described in the second aspect and any possible implementation manner thereof.

第九方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令。当计算机指令在第一设备上运行时,使得该第一设备执行如第一方面及其任一种可能的实现方式所述的方法。当计算机指令在第二设备上运行时,使得该第二设备执行如第二方面及其任一种可能的实现方式所述的方法。In a ninth aspect, the embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium includes computer instructions. When the computer instructions are run on the first device, the first device is made to execute the method described in the first aspect and any possible implementation manner thereof. When the computer instructions are run on the second device, the second device is made to execute the method described in the second aspect and any possible implementation manner thereof.

第十方面,本申请实施例提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面、第二方面或第三方面及其任一种可能的实现方式所述的方法。In a tenth aspect, the embodiment of the present application provides a computer program product, which, when the computer program product is run on a computer, enables the computer to execute the first aspect, the second aspect, or the third aspect and any possible one thereof. The method described in the implementation.

第十一方面,本申请实施例提供一种软件升级系统,包括第一设备、第二设备和服务器,其中,第一设备可以执行如第一方面或第二方面及其任一种可能的实现方式所述的方法,第二设备可以执行如第一方面或第三方面及其任一种可能的实现方式所述的方法。In the eleventh aspect, the embodiment of the present application provides a software upgrade system, including a first device, a second device, and a server, wherein the first device can implement the first aspect or the second aspect and any possible implementation thereof For the method described in the first aspect or the third aspect and any possible implementation thereof, the second device may execute the method described in the first aspect or the third aspect and any possible implementation manner thereof.

可选的,上述软件升级系统还可以包括第三设备,第三设备可以执行第一方面或第三方面及其任一种可能的实现方式中与第二设备所涉及的方法类似的方法。Optionally, the above software upgrade system may further include a third device, and the third device may execute a method similar to that involved in the second device in the first aspect or the third aspect and any possible implementation thereof.

附图说明Description of drawings

图1A为本申请实施例提供的一种系统架构示意图;FIG. 1A is a schematic diagram of a system architecture provided by an embodiment of the present application;

图1B为本申请实施例提供的一种第一设备的示意图;FIG. 1B is a schematic diagram of a first device provided in an embodiment of the present application;

图2A为本申请实施例提供的一种手机的显示示意图;FIG. 2A is a schematic display diagram of a mobile phone provided by an embodiment of the present application;

图2B为本申请实施例提供的又一种手机的显示示意图;FIG. 2B is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2C为本申请实施例提供的又一种手机的显示示意图;FIG. 2C is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2D为本申请实施例提供的又一种手机的显示示意图;FIG. 2D is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2E为本申请实施例提供的又一种手机的显示示意图;FIG. 2E is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2F为本申请实施例提供的又一种手机的显示示意图;FIG. 2F is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2G为本申请实施例提供的又一种手机的显示示意图;FIG. 2G is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2H为本申请实施例提供的又一种手机的显示示意图;FIG. 2H is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2I为本申请实施例提供的又一种手机的显示示意图;FIG. 2I is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2J为本申请实施例提供的又一种手机的显示示意图;FIG. 2J is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2K为本申请实施例提供的又一种手机的显示示意图;FIG. 2K is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图2L为本申请实施例提供的又一种手机的显示示意图;FIG. 2L is a schematic display diagram of another mobile phone provided by the embodiment of the present application;

图3A为本申请实施例提供的一种升级模块集合的示意图;FIG. 3A is a schematic diagram of an upgrade module set provided by an embodiment of the present application;

图3B为本申请实施例提供的又一种升级模块集合的示意图;FIG. 3B is a schematic diagram of another upgrade module set provided by the embodiment of the present application;

图4A为本申请实施例提供的一种不同升级业务对应的不同升级模块的示意图;FIG. 4A is a schematic diagram of different upgrade modules corresponding to different upgrade services provided in the embodiment of the present application;

图4B为本申请实施例提供的又一种升级模块集合的示意图;FIG. 4B is a schematic diagram of another upgrade module set provided by the embodiment of the present application;

图5A为本申请实施例提供的一种音箱和手机的结构示意图;FIG. 5A is a schematic structural diagram of a speaker and a mobile phone provided by an embodiment of the present application;

图5B为本申请实施例提供的一种音箱和手机的升级管理模块和各个升级模块的交互示意图;FIG. 5B is a schematic diagram of interaction between an upgrade management module of a speaker and a mobile phone and each upgrade module provided by the embodiment of the present application;

图6A为本申请实施例提供的一种音箱、手机和服务器的架构示意图;FIG. 6A is a schematic structural diagram of a speaker, a mobile phone, and a server provided in an embodiment of the present application;

图6B为本申请实施例提供的又一种音箱、手机和服务器的架构示意图;FIG. 6B is a schematic structural diagram of yet another speaker, mobile phone and server provided by the embodiment of the present application;

图6C为本申请实施例提供的又一种音箱和手机的架构示意图;FIG. 6C is a schematic structural diagram of another speaker and a mobile phone provided by the embodiment of the present application;

图7A为本申请实施例提供的一种音箱和手机的模块交互示意图;FIG. 7A is a schematic diagram of module interaction between a speaker and a mobile phone provided by the embodiment of the present application;

图7B为本申请实施例提供的又一种音箱和手机的升级管理模块和各个升级模块的交互示意图;FIG. 7B is a schematic diagram of interaction between another upgrade management module of speakers and mobile phones and each upgrade module provided by the embodiment of the present application;

图8A为本申请实施例提供的又一种音箱和手机的模块交互示意图;FIG. 8A is a schematic diagram of another module interaction between a speaker and a mobile phone provided by the embodiment of the present application;

图8B为本申请实施例提供的又一种音箱和手机的升级管理模块和各个升级模块的交互示意图;FIG. 8B is a schematic diagram of interaction between another upgrade management module of speakers and mobile phones and each upgrade module provided by the embodiment of the present application;

图9A为本申请实施例提供的一种音箱和手机的信号交互示意图;FIG. 9A is a schematic diagram of signal interaction between a speaker and a mobile phone according to an embodiment of the present application;

图9B为本申请实施例提供的又一种音箱和手机的信号交互示意图;FIG. 9B is another schematic diagram of signal interaction between a speaker and a mobile phone according to an embodiment of the present application;

图9C为本申请实施例提供的又一种音箱和手机的信号交互示意图;FIG. 9C is another schematic diagram of signal interaction between a speaker and a mobile phone provided by the embodiment of the present application;

图10A为本申请实施例提供的一种耳机和手机的信号交互示意图;FIG. 10A is a schematic diagram of signal interaction between an earphone and a mobile phone according to an embodiment of the present application;

图10B为本申请实施例提供的又一种耳机和手机的信号交互示意图;FIG. 10B is another schematic diagram of signal interaction between an earphone and a mobile phone according to an embodiment of the present application;

图11为本申请实施例提供的一种第一设备、第二设备和第三设备的信号交互示意图;FIG. 11 is a schematic diagram of signal interaction of a first device, a second device, and a third device provided in an embodiment of the present application;

图12为本申请实施例提供的一种芯片系统的结构示意图;FIG. 12 is a schematic structural diagram of a chip system provided by an embodiment of the present application;

图13为本申请实施例提供的一种第二设备的结构示意图。FIG. 13 is a schematic structural diagram of a second device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the present application, unless otherwise specified, "at least one" refers to one or more, and "multiple" refers to two or more than two. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not necessarily limit the difference.

为了下述各实施例的描述清楚简洁,首先给出相关概念或技术的简要介绍:In order to make the description of the following embodiments clear and concise, a brief introduction of related concepts or technologies is given first:

固件:是指实现设备(例如,IOT设备)的基础功能的(软件)程序,可以安装于设备的芯片中。可以通过空中下载(over the air,OTA)技术对固件进行升级,因此固件升级也可以称为OTA升级,固件升级业务也可以称为OTA升级业务。Firmware: refers to a (software) program that implements the basic functions of a device (for example, an IOT device), and can be installed in a chip of the device. The firmware can be upgraded through an over the air (OTA) technology, so the firmware upgrade can also be called an OTA upgrade, and the firmware upgrade service can also be called an OTA upgrade service.

补丁:是指针对固件存在的问题而发布的程序代码,用于解决固件存在的问题。Patch: refers to the program code released for the problems existing in the firmware, and is used to solve the problems existing in the firmware.

SDK:广义上指辅助开发某一类软件的相关文档、范例和工具的集合。SDK: In a broad sense, it refers to a collection of related documents, examples and tools that assist in the development of a certain type of software.

KIT(服务):是一种用于向应用层(的应用程序)提供基础服务的SDK,例如,定位服务,“一碰传”服务等。KIT (service): It is an SDK used to provide basic services to the application layer (applications), for example, location services, "pass by one touch" services, etc.

插件:是针对特定应用程序接口编写的程序。插件又称plug-in、addin、add-in、addon或add-on。插件可以用于新增特定应用程序的功能,例如可以在相机应用中安装“夜景模式”的插件,从而可以在相机应用中新增夜景模式的功能。Plug-in: is a program written for a specific application programming interface. A plug-in is also called a plug-in, addin, add-in, addon, or add-on. The plug-in can be used to add the function of a specific application, for example, a plug-in of "night scene mode" can be installed in the camera application, so that the function of the night scene mode can be added in the camera application.

设备参数:可以包括设备的协议类参数、功耗参数、时区参数、性能参数和定制参数等等。本申请实施例中,设备参数可以简称为参数。Device parameters: can include device protocol parameters, power consumption parameters, time zone parameters, performance parameters, custom parameters, and so on. In this embodiment of the present application, the device parameters may be simply referred to as parameters.

目前,IOT设备厂商在对IOT设备进行升级时,通常采用手机辅助IOT设备升级的策略。IOT设备可以分为多种类型,IOT设备厂商可以针对每种类型的IOT设备提供一套集成二进制组件,分别在IOT设备侧和手机侧集成,确保手机和IOT设备之间的接口稳定。At present, when IOT device manufacturers upgrade IOT devices, they usually adopt a mobile phone-assisted IOT device upgrade strategy. IOT devices can be divided into multiple types. IOT device manufacturers can provide a set of integrated binary components for each type of IOT device, which are integrated on the IOT device side and the mobile phone side respectively to ensure the stability of the interface between the mobile phone and the IOT device.

上述方案具有以下特点:手机侧和IOT设备侧的功能实现都是固定好的,在IOT设备的类型不同的情况下,手机侧实现、手机和IOT设备之间的交互接口都不一样,随着IOT设备的不断增加,如果手机侧要统一控制多种不同类型的IOT设备,则手机侧需要集成很多不同的二进制组件,导致手机侧的存储空间消耗大。且当出现新类型的IOT设备时,需要针对新类型的IOT设备重新设计并集成相应的二进制组件,导致手机难以实现对多种类型IOT设备辅助升级的有效扩展。The above solution has the following characteristics: the function implementations on the mobile phone side and the IOT device side are fixed. In the case of different types of IOT devices, the implementation on the mobile phone side and the interaction interface between the mobile phone and the IOT device are different. With the continuous increase of IOT devices, if the mobile phone side wants to uniformly control multiple different types of IOT devices, the mobile phone side needs to integrate many different binary components, resulting in a large consumption of storage space on the mobile phone side. And when a new type of IOT device appears, it is necessary to redesign and integrate the corresponding binary components for the new type of IOT device, making it difficult for mobile phones to effectively expand the auxiliary upgrade of various types of IOT devices.

本申请实施例采用一种公共的升级框架(升级管理机制)来实现设备(例如,IOT设备)的升级,可以通过电子设备(例如,手机)对多种类型IOT设备(例如,音箱和耳机)进行升级,多种类型的IOT设备采用同一套升级框架来升级,存储空间消耗小,且能够实现IOT设备辅助升级的有效扩展。The embodiment of this application adopts a common upgrade framework (upgrade management mechanism) to realize the upgrade of devices (for example, IOT devices), and various types of IOT devices (for example, speakers and earphones) can be upgraded through electronic devices (for example, mobile phones) To upgrade, various types of IOT devices are upgraded using the same set of upgrade framework, which consumes less storage space and can effectively expand the auxiliary upgrade of IOT devices.

如图1A所示,为本申请实施例提供的一种系统架构示意图。该系统可以包括第一设备、第二设备和服务器。其中,第一设备中安装有应用程序(application,APP)。服务器可以是应用程序的管理服务器。其中,应用程序例如可以是智慧生活APP、运动健康APP等。或者,应用程序可以是第一设备本地的设置APP。As shown in FIG. 1A , it is a schematic diagram of a system architecture provided by an embodiment of the present application. The system may include a first device, a second device and a server. Wherein, an application program (application, APP) is installed in the first device. The server may be an administration server for the application. Wherein, the application program may be, for example, a smart life APP, a sports health APP, and the like. Alternatively, the application program may be a local setting APP of the first device.

其中,第二设备和第一设备之间可以通过无线保真(wireless fidelity,WIFI)、蓝牙、NFC等通信方式进行通信。Wherein, the communication between the second device and the first device may be performed through wireless fidelity (wireless fidelity, WIFI), bluetooth, NFC and other communication methods.

示例性的,本申请实施例中的第一设备可以是手机、平板电脑、台式机(桌面型电脑)、手持计算机、笔记本电脑(膝上型电脑)、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等可以安装上述目标应用的设备,本申请实施例对第一设备的具体形态不作特殊限制。Exemplarily, the first device in the embodiment of the present application may be a mobile phone, a tablet computer, a desktop computer (desktop computer), a handheld computer, a notebook computer (laptop computer), an ultra-mobile personal computer (ultra-mobilepersonal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) equipment, etc. can install the above-mentioned target application equipment, the embodiment of the present application is for the first The specific form of the device is not particularly limited.

其中,第一设备的操作系统可以是安卓(Android)。可选的,在Android平台上可以搭载EMUI系统。可选的,Android平台上还可以集成华为移动服务(huawei mobileservice,HMS)引擎(engine)或者谷歌移动服务(google mobile service,GMS)模块。或者第一设备可以是鸿蒙系统、IOS系统或者其他操作系统,本申请实施例对第一设备的操作系统类型不做限定。Wherein, the operating system of the first device may be Android (Android). Optionally, the EMUI system can be installed on the Android platform. Optionally, a Huawei mobile service (huawei mobile service, HMS) engine (engine) or a Google mobile service (google mobile service, GMS) module may also be integrated on the Android platform. Alternatively, the first device may be a Hongmeng system, an IOS system, or another operating system, and the embodiment of the present application does not limit the type of operating system of the first device.

本申请实施例提供的第二设备可以是指具有WIFI、蓝牙或NFC等通信能力的设备,例如可以是路由器、电视机、音响、摄像头、空调、电冰箱、智能窗帘、台灯、吊灯、电饭煲、安防设备(如智能电子锁)、个人计算机(personal computer,PC)等可以接入家庭无线局域网的设备。或者,本申请实施例中的第二设备可以是智能手表、智能手环、无线定位器、追踪器(Tracker)、电子项圈等穿戴设备,本申请实施例中的第二设备还可以是车载音响、车载空调等设备,本申请实施例对第二设备的具体形态不作特殊限制。The second device provided in the embodiment of the present application may refer to a device with communication capabilities such as WIFI, Bluetooth or NFC, such as a router, a TV, a stereo, a camera, an air conditioner, a refrigerator, a smart curtain, a desk lamp, a chandelier, a rice cooker, Security devices (such as smart electronic locks), personal computers (personal computers, PCs) and other devices that can access the home wireless local area network. Alternatively, the second device in the embodiment of the present application may be a wearable device such as a smart watch, a smart bracelet, a wireless locator, a tracker (Tracker), and an electronic collar, and the second device in the embodiment of the present application may also be a car stereo , a vehicle air conditioner and other equipment, the embodiment of the present application does not specifically limit the specific form of the second equipment.

其中,第二设备的操作系统可以是鸿蒙系统,轻量级鸿蒙系统,Android系统轻量级物联网操作系统(lite OS),linux系统,双框架系统,或者其他操作系统,本申请实施例不做限定。Wherein, the operating system of the second device may be the Hongmeng system, the lightweight Hongmeng system, the lightweight Internet of Things operating system (lite OS) of the Android system, the linux system, the dual-framework system, or other operating systems. Do limited.

本申请实施例中以图1A所示的第一设备是电子设备200(如手机)为例,对本申请实施例提供的第一设备的结构进行举例说明。如图1B所示,电子设备200(如手机)可以包括:处理器210,外部存储器接口220,内部存储器221,通用串行总线(universal serialbus,USB)接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,移动通信模块250,无线通信模块260,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294,以及用户标识模块(subscriber identification module,SIM)卡接口295等。In the embodiment of the present application, the structure of the first device provided in the embodiment of the present application is illustrated by taking the electronic device 200 (such as a mobile phone) as an example in which the first device shown in FIG. 1A is taken as an example. As shown in Figure 1B, the electronic device 200 (such as a mobile phone) may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (universal serialbus, USB) interface 230, a charging management module 240, and a power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, earphone jack 270D, sensor module 280, button 290, motor 291, indicator 292, a camera 293, a display screen 294, a subscriber identification module (subscriber identification module, SIM) card interface 295, and the like.

其中,上述传感器模块280可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器和骨传导传感器等传感器。Wherein, the above-mentioned sensor module 280 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.

可以理解的是,本实施例示意的结构并不构成对电子设备200的具体限定。在另一些实施例中,电子设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure shown in this embodiment does not constitute a specific limitation on the electronic device 200 . In other embodiments, the electronic device 200 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 210 may include one or more processing units, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. . Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

控制器可以是电子设备200的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 200 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.

处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 210 is reduced, thereby improving the efficiency of the system.

在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 210 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.

可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备200的结构限定。在另一些实施例中,电子设备200也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that, the interface connection relationship among the modules shown in this embodiment is only a schematic illustration, and does not constitute a structural limitation of the electronic device 200 . In other embodiments, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

充电管理模块240用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块240为电池242充电的同时,还可以通过电源管理模块241为电子设备供电。The charging management module 240 is configured to receive charging input from the charger. Wherein, the charger may be a wireless charger or a wired charger. While the charging management module 240 is charging the battery 242 , it can also supply power to the electronic device through the power management module 241 .

电源管理模块241用于连接电池242,充电管理模块240与处理器210。电源管理模块241接收电池242和/或充电管理模块240的输入,为处理器210,内部存储器221,外部存储器,显示屏294,摄像头293,和无线通信模块260等供电。在一些实施例中,电源管理模块241和充电管理模块240也可以设置于同一个器件中。The power management module 241 is used for connecting the battery 242 , the charging management module 240 and the processor 210 . The power management module 241 receives the input from the battery 242 and/or the charging management module 240 to provide power for the processor 210 , internal memory 221 , external memory, display screen 294 , camera 293 , and wireless communication module 260 . In some embodiments, the power management module 241 and the charging management module 240 can also be set in the same device.

电子设备200的无线通信功能可以通过天线1,天线2,移动通信模块250,无线通信模块260,调制解调处理器以及基带处理器等实现。在一些实施例中,电子设备200的天线1和移动通信模块250耦合,天线2和无线通信模块260耦合,使得电子设备200可以通过无线通信技术与网络以及其他设备通信。The wireless communication function of the electronic device 200 can be realized by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor. In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 can communicate with the network and other devices through wireless communication technology.

天线1和天线2用于发射和接收电磁波信号。电子设备200中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块250可以提供应用在电子设备200上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块250可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块250可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。The mobile communication module 250 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 200 . The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 250 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.

移动通信模块250还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块250的至少部分功能模块可以被设置于处理器210中。在一些实施例中,移动通信模块250的至少部分功能模块可以与处理器210的至少部分模块被设置在同一个器件中。The mobile communication module 250 can also amplify the signal modulated by the modem processor, convert it into electromagnetic wave and radiate it through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 250 may be set in the processor 210 . In some embodiments, at least part of the functional modules of the mobile communication module 250 and at least part of the modules of the processor 210 may be set in the same device.

无线通信模块260可以提供应用在电子设备200上的包括WLAN(如(wirelessfidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigationsatellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(nearfield communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。例如,本申请实施例中,电子设备200(如第一设备110)可以通过无线通信模块260接入家居设备130提供的临时网络(如Wi-Fi网络)。The wireless communication module 260 can provide WLAN (such as (wireless fidelity, Wi-Fi) network), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation) applied on the electronic device 200. , FM), nearfield communication technology (nearfield communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. For example, in this embodiment of the application, the electronic device 200 (such as the first device 110 ) can access the temporary network (such as the Wi-Fi network) provided by the home device 130 through the wireless communication module 260 .

无线通信模块260可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块260经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。无线通信模块260还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 260 may be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210 . The wireless communication module 260 can also receive the signal to be sent from the processor 210 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 to radiate out.

电子设备200通过GPU,显示屏294,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏294和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 200 realizes the display function through the GPU, the display screen 294 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.

显示屏294用于显示图像,视频等。该显示屏294包括显示面板。例如,本申请实施例中,显示屏294可以用于显示上述第一APP的应用界面,如设备分享界面、设备搜索界面和二维码扫描界面等。The display screen 294 is used to display images, videos and the like. The display screen 294 includes a display panel. For example, in this embodiment of the present application, the display screen 294 may be used to display the application interface of the above-mentioned first APP, such as a device sharing interface, a device search interface, and a QR code scanning interface.

电子设备200可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。ISP用于处理摄像头293反馈的数据。摄像头293用于捕获静态图像或视频。在一些实施例中,电子设备200可以包括1个或N个摄像头293,N为大于1的正整数。The electronic device 200 can realize the shooting function through the ISP, the camera 293 , the video codec, the GPU, the display screen 294 and the application processor. The ISP is used for processing the data fed back by the camera 293 . Camera 293 is used to capture still images or video. In some embodiments, the electronic device 200 may include 1 or N cameras 293, where N is a positive integer greater than 1.

外部存储器接口220可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备200的存储能力。外部存储卡通过外部存储器接口220与处理器210通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory 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 memory interface 220 to implement a data storage function. Such as saving music, video and other files in the external memory card.

内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行电子设备200的各种功能应用以及数据处理。例如,在本申请实施例中,处理器210可以通过执行存储在内部存储器221中的指令,内部存储器221可以包括存储程序区和存储数据区。The internal memory 221 may be used to store computer-executable program codes including instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by executing instructions stored in the internal memory 221 . For example, in the embodiment of the present application, the processor 210 may execute instructions stored in the internal memory 221, and the internal memory 221 may include a program storage area and a data storage area.

其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备200使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universalflash storage,UFS)等。Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 200 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.

电子设备200可以通过音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 200 can realize the audio function through the audio module 270 , the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor. Such as music playback, recording, etc.

按键290包括开机键,音量键等。按键290可以是机械按键。也可以是触摸式按键。马达291可以产生振动提示。马达291可以用于来电振动提示,也可以用于触摸振动反馈。指示器292可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口295用于连接SIM卡。SIM卡可以通过插入SIM卡接口295,或从SIM卡接口295拔出,实现和电子设备200的接触和分离。电子设备200可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口295可以支持Nano SIM卡,Micro SIM卡,SIM卡等。The keys 290 include a power key, a volume key and the like. The key 290 may be a mechanical key. It can also be a touch button. The motor 291 can generate a vibrating reminder. The motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 292 can be an indicator light, which can be used to indicate the charging status, the change of the battery capacity, and also can be used to indicate messages, missed calls, notifications and so on. The SIM card interface 295 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 200 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295 . The electronic device 200 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 295 can support Nano SIM card, Micro SIM card, SIM card and so on.

下面以目标应用是智慧生活APP,第一设备为手机为例,对第一设备辅助第二设备(例如,IOT设备)进行升级的操作过程进行说明。Taking the target application as a smart life APP and the first device as a mobile phone as an example, the operation process in which the first device assists the second device (for example, an IOT device) to upgrade will be described below.

如图2A所示,手机的主界面(即桌面)201中包括智慧生活应用的图标202,手机可以接收用户对智慧生活应用的图标202的点击操作,响应于该点击操作,手机可以打开智慧生活应用。响应于用户在智慧生活应用的界面中打开“设置”选项的操作,手机可以显示如图2B所示的界面203。在界面203中,可以包括多个可设置的选项,例如,可以包括IOT设备升级选项204。可选的,界面203中还可以包括智能按钮音效、智能按钮震动、消息通知、个性化内容推荐等选项,本申请不做限定。响应于用户在界面203选择IOT设备升级选项204的操作,如图2C所示,手机可以显示界面205,界面205中可以包括多个IOT设备的标识,例如可以包括电饭煲、电冰箱、台灯、音箱等等。用户可以在界面205中手动触发某个IOT设备进行升级。示例性的,响应用户在界面205选择音箱的升级按钮206的操作,如图2D所示,音箱的升级按钮206可以提示用户正在加载(正在搜索新版本)。进一步的,如图2E所示,手机可以显示界面209,在界面209中,可以显示提示文字210,提示文字210用于提示用户检查到音箱的固件的新版本,该新版本为11.1.01A。在界面209中,还可以包括提示框211,提示框211中可以包括立即升级、夜间升级、WLAN自动升级等选项供用户选择。响应于用户在提示框211中选择立即升级选项2111的操作,如图2F中的(a)所示,手机可以显示界面212。在界面212中,可以包括提示条213,提示条213用于向用户提示固件下载进度(例如,已下载58%)。固件下载完成后,如图2F中的(b)所示,手机可以显示提示文字214,提示文字214用于提示用户已下载版本11.1.01A,是否安装。响应于用户点击“是”的按钮215,手机可以显示如图2G中的(a)所示的进度条216,进度条216用于向用户提示安装进度(例如,已安装90%)。安装完成后,如图2G中的(b)所示,手机可以显示提示文字217,提示文字217用于提示用户固件已升级到版本11.1.01A。As shown in Figure 2A, the main interface (i.e. desktop) 201 of the mobile phone includes an icon 202 of the smart life application, and the mobile phone can receive the user's click operation on the icon 202 of the smart life application, and in response to the click operation, the mobile phone can open the smart life application icon 202. application. In response to the user's operation of opening the "Settings" option in the interface of the smart life application, the mobile phone may display an interface 203 as shown in FIG. 2B . In the interface 203, a plurality of configurable options may be included, for example, an IOT device upgrade option 204 may be included. Optionally, the interface 203 may also include options such as smart button sound effect, smart button vibration, message notification, and personalized content recommendation, which are not limited in this application. In response to the user's operation of selecting the IOT device upgrade option 204 on the interface 203, as shown in FIG. 2C, the mobile phone can display an interface 205, which can include a plurality of IOT device identifiers, such as rice cookers, refrigerators, desk lamps, and speakers. and many more. The user can manually trigger an IOT device to upgrade in the interface 205 . Exemplarily, in response to the user's operation of selecting the upgrade button 206 of the speaker on the interface 205 , as shown in FIG. 2D , the upgrade button 206 of the speaker may prompt the user that it is loading (searching for a new version). Further, as shown in FIG. 2E , the mobile phone can display an interface 209, and in the interface 209, a prompt text 210 can be displayed, and the prompt text 210 is used to prompt the user to check a new version of the firmware of the speaker, and the new version is 11.1.01A. In the interface 209, a prompt box 211 may also be included, and the prompt box 211 may include options such as immediate upgrade, nightly upgrade, and WLAN automatic upgrade for the user to choose. In response to the user's operation of selecting the immediate upgrade option 2111 in the prompt box 211 , as shown in (a) in FIG. 2F , the mobile phone may display an interface 212 . In the interface 212, a prompt bar 213 may be included, and the prompt bar 213 is used to remind the user of the progress of the firmware download (for example, 58% has been downloaded). After the firmware download is completed, as shown in (b) in FIG. 2F , the mobile phone can display prompt text 214, which is used to remind the user that version 11.1.01A has been downloaded and whether to install it. In response to the user clicking the "Yes" button 215, the mobile phone may display a progress bar 216 as shown in (a) in FIG. 2G , the progress bar 216 is used to remind the user of the installation progress (for example, 90% has been installed). After the installation is completed, as shown in (b) in FIG. 2G , the mobile phone may display prompt text 217, which is used to remind the user that the firmware has been upgraded to version 11.1.01A.

可选的,如图2E所示,若用户在提示框211中选择夜间升级或WLAN自动升级的选项,手机可以在夜间或者在连接到WLAN的情况下将目标版本的升级包下载到本地。当用户想升级IOT设备时,不需要再下载升级包,可以直接安装升级包,缩短了用户的等待时间,提升了用户使用体验,且提升升级率。Optionally, as shown in FIG. 2E , if the user selects the nightly upgrade or WLAN automatic upgrade option in the prompt box 211, the mobile phone can download the upgrade package of the target version to the local at night or when connected to the WLAN. When the user wants to upgrade the IOT device, he does not need to download the upgrade package, but can directly install the upgrade package, which shortens the user's waiting time, improves the user experience, and increases the upgrade rate.

在一种可能的设计中,手机可以直接向用户提示当前待升级的一个或多个的IOT设备。示例性的,如图2H中的(a)所示,当用户打开智慧生活APP进入到智慧生活APP的家居页面220时,手机可以在提示框(或搜索框)221中显示提示文字“2个设备的固件有更新,快去升级吧”。响应于用户点击提示框221的操作,如图2H中的(b)所示,手机可以显示我的页面222,在我的页面222中可以包括设备固件升级选项223,在固件升级选项223中可以通过提示点(例如,小黑点或小红点)提示设备固件待升级。响应于用户点击固件升级选项223的操作,如图2I中的(a)所示,手机可以显示界面224,在界面224中,包括2个待升级的设备,分别是第一房间(例如,卧室)的电视和第四房间(例如,客厅)的路由器。每个待升级的设备对应一个升级按钮。示例性的,响应于用户点击第一房间的电视的升级按钮225的操作,如图2I中的(b)所示,按钮225上的提示文字可以变为“升级中”,表示第一房间的电视正在升级。其中,“升级中”可以表示固件正在下载和安装。第一房间的电视升级成功后,如图2I中的(c)所示,界面224中可以不再显示第一房间的电视,仅显示第四房间的路由器,用户可以对第四房间的路由器进行升级,具体过程参考第一房间的电视的升级过程,在此不做赘述。In a possible design, the mobile phone can directly prompt the user of one or more IOT devices currently to be upgraded. Exemplarily, as shown in (a) in FIG. 2H, when the user opens the smart life APP and enters the home page 220 of the smart life APP, the mobile phone can display the prompt text "2 The firmware of the device has been updated, go and upgrade it." In response to the operation of the user clicking the prompt box 221, as shown in (b) in FIG. Use prompt dots (for example, small black dots or small red dots) to indicate that the firmware of the device is about to be upgraded. In response to the operation of the user clicking on the firmware upgrade option 223, as shown in (a) in FIG. ) TV and a router in a fourth room (eg, living room). Each device to be upgraded corresponds to an upgrade button. Exemplarily, in response to the user's operation of clicking the upgrade button 225 of the TV in the first room, as shown in (b) in FIG. TVs are being upgraded. Wherein, "upgrading" may indicate that the firmware is being downloaded and installed. After the TV in the first room is upgraded successfully, as shown in (c) in FIG. For the upgrade, refer to the upgrade process of the TV in the first room for the specific process, so I won’t repeat it here.

在另一种可能的设计中,如图2I中的(a)所示,手机可以显示界面224,在界面224中,包括2个待升级的设备,分别是第一房间(例如,卧室)的电视和第四房间(例如,客厅)的路由器。每个待升级的设备对应一个升级按钮。示例性的,响应于用户点击第一房间的电视的升级按钮225的操作,如图2J中的(a)所示,按钮225上的提示文字可以变为“下载中”,表示第一房间的电视的固件正在下载。下载完成后,如图2J中的(b)所示,按钮225上的提示文字可以变为“安装中”,表示第一房间的电视的固件正在安装。安装完成后,如图2I中的(c)所示,界面224中可以不再显示第一房间的电视,仅显示第四房间的路由器,用户可以对第四房间的路由器进行升级,具体过程参考第一房间的电视的升级过程,在此不做赘述。In another possible design, as shown in (a) in FIG. 2I , the mobile phone can display an interface 224. In the interface 224, there are two devices to be upgraded, which are respectively the first room (for example, the bedroom) The TV and the router in the fourth room (e.g., the living room). Each device to be upgraded corresponds to an upgrade button. Exemplarily, in response to the user's operation of clicking the upgrade button 225 of the TV in the first room, as shown in (a) in FIG. The TV's firmware is being downloaded. After the download is completed, as shown in (b) in FIG. 2J , the prompt text on the button 225 may change to "Installing", indicating that the firmware of the TV in the first room is being installed. After the installation is completed, as shown in (c) in Figure 2I, the TV in the first room may no longer be displayed on the interface 224, and only the router in the fourth room may be displayed. The user can upgrade the router in the fourth room. For details, refer to The upgrade process of the TV in the first room will not be repeated here.

在又一种可能的设计中,如图2K中的(a)所示,手机可以显示界面224,在界面224中,包括2个待升级的设备,分别是第一房间(例如,卧室)的电视和第四房间(例如,客厅)的路由器。每个待升级的设备对应一个升级按钮。并且,还可以包括用于升级界面224中的全部待升级的设备的一键升级按钮230。示例性的,响应于用户点击一键升级按钮230的操作,如图2K中的(b)所示,一键升级按钮230上的提示文字可以变为“升级中”,并且,第一房间的电视对应的升级按钮225和第四房间的路由器对应的升级按钮231上的提示文字可以为“升级中”,表示第一房间的电视的软件和第四房间的路由器的软件正在升级(下载和安装)。升级完成后,如图2K中的(c)所示,界面224中可以不再显示第一房间的电视和第四房间的路由器,表示第一房间的电视和第四房间的路由器已升级成功,当前无待升级的设备。In yet another possible design, as shown in (a) in FIG. 2K , the mobile phone can display an interface 224. In the interface 224, there are two devices to be upgraded, which are respectively the first room (for example, the bedroom) The TV and the router in the fourth room (e.g., the living room). Each device to be upgraded corresponds to an upgrade button. Moreover, a one-key upgrade button 230 for all devices to be upgraded in the upgrade interface 224 may also be included. Exemplarily, in response to the user's operation of clicking the one-key upgrade button 230, as shown in (b) in FIG. The prompt text on the upgrade button 225 corresponding to the TV and the upgrade button 231 corresponding to the router in the fourth room can be "upgrading", indicating that the software of the TV in the first room and the software of the router in the fourth room are being upgraded (download and install ). After the upgrade is completed, as shown in (c) in FIG. 2K, the TV in the first room and the router in the fourth room may no longer be displayed on the interface 224, indicating that the TV in the first room and the router in the fourth room have been successfully upgraded. There are currently no devices to upgrade.

又例如,如图2L所示,当用户打开智慧生活APP时,智慧生活APP的界面中可以弹出弹框215,提示用户电视、音箱、路由器等IOT设备检测到新版本,是否进行升级。用户可以选择对其中的一个或多个IOT设备进行升级,或者用户可以选择对检测到新版本的全部IOT设备进行升级。例如,响应于用户在提示框215中选择全部升级选项216的操作,手机可以对检测到新版本的全部IOT设备进行升级。For another example, as shown in FIG. 2L , when the user opens the Smart Life APP, a bullet box 215 may pop up on the interface of the Smart Life APP, prompting the user whether to upgrade the IOT devices such as TVs, speakers, and routers to detect new versions. The user may choose to upgrade one or more of the IOT devices, or the user may choose to upgrade all the IOT devices that have detected a new version. For example, in response to the user's operation of selecting the all upgrade option 216 in the prompt box 215, the mobile phone can upgrade all IOT devices that detect a new version.

下面对本申请实施例提供的升级方法的流程进行说明,本申请实施例提供的方法可以包括以下流程:(1)建立升级模块集合;(2)升级流程调度执行。The procedure of the upgrade method provided by the embodiment of the present application is described below. The method provided by the embodiment of the present application may include the following procedures: (1) establishing a set of upgrade modules; (2) scheduling and executing the upgrade process.

下面对流程(1)(即建立升级模块集合)进行说明。The process (1) (that is, the establishment of an upgrade module set) will be described below.

如图3A所示,可以在第二设备(例如,音箱)和第一设备(例如,手机)分别建立各自设备所能支持的升级模块集合。其中,升级模块表示用于升级的程序代码。升级模块也可以称为升级能力、升级子能力或升级单元等等,本申请不做限定。多个升级模块可以组成一个集合,可以将一个集合视为一个资源池。As shown in FIG. 3A , upgrade module sets that can be supported by the respective devices can be respectively established on the second device (for example, a sound box) and the first device (for example, a mobile phone). Wherein, the upgrading module represents the program code used for upgrading. An upgrade module may also be called an upgrade capability, an upgrade sub-capability, or an upgrade unit, etc., which is not limited in this application. Multiple upgrade modules can form a collection, and a collection can be regarded as a resource pool.

由于手机的软硬件功能比较全面,因此可以在手机侧建立一套较为完整的升级模块集合。如图3B中的(a)所示,手机的升级模块集合可以包括用户体验设计(userexperience design,UX)模块、升级包搜索模块(可以简称为搜索模块)、升级包下载模块(可以简称为下载模块)、升级包执行模块(或者称为升级包升级执行模块)。可选的,手机侧升级模块集合还可以包括升级包安全校验模块(可以简称为安全校验模块)、升级包差分/压缩还原模块(可以简称为差分/压缩还原模块)等。其中,升级包可以是指固件升级包(或称为OTA包)、补丁升级包、SDK升级包(例如,KIT升级包(简称KIT包))、插件升级包或参数升级包等。Since the software and hardware functions of the mobile phone are relatively comprehensive, a relatively complete set of upgrade modules can be established on the mobile phone side. As shown in (a) in Figure 3B, the upgrade module set of the mobile phone may include a user experience design (UX) module, an upgrade package search module (which may be referred to as a search module for short), an upgrade package download module (which may be referred to as a download module for short). module), an upgrade package execution module (or called an upgrade package upgrade execution module). Optionally, the set of upgrade modules on the mobile phone side may also include an upgrade package security verification module (which may be referred to as a security verification module for short), an upgrade package differential/compression restoration module (which may be referred to as a differential/compression restoration module) and the like. Wherein, the upgrade package may refer to a firmware upgrade package (or OTA package), a patch upgrade package, an SDK upgrade package (for example, a KIT upgrade package (KIT package for short)), a plug-in upgrade package or a parameter upgrade package, etc.

由于第二设备包括多种类型,不同类型的第二设备的软硬件功能不同,因此,在第二设备侧,在不同类型的第二设备可以建立不同的升级模块集合。通常,可以根据第二设备的通信模块(蓝牙模块、WIFI模块或NFC模块),处理器运算能力、存储器大小等等因素对第二设备进行分类。例如,根据第二设备具备的不同通信模块可以将第二设备分为WIFI类设备、蓝牙类设备和NFC类设备等等。其中,WIFI类设备例如可以为音箱,蓝牙类设备例如可以为耳机。Since the second device includes multiple types, different types of second devices have different software and hardware functions, therefore, at the second device side, different sets of upgrade modules can be established on different types of second devices. Generally, the second device can be classified according to factors such as the communication module (Bluetooth module, WIFI module or NFC module) of the second device, the computing power of the processor, and the size of the memory. For example, according to the different communication modules of the second device, the second device can be classified into WIFI-type devices, Bluetooth-type devices, NFC-type devices, and so on. Wherein, the WIFI type device may be, for example, a sound box, and the Bluetooth type device may be, for example, an earphone.

示例性的,如图3B中的(b)所示,若第二设备为音箱,音箱可以为WIFI类设备,由于WIFI类设备具有连接互联网的功能,因此音箱的升级模块集合可以包括升级包搜索模块和升级包下载模块。可选的,若音箱具有显示屏或触摸屏等用于可以进行用户交互的器件,音箱还可以建立UI模块。可选的,若音箱的处理器功能较强,音箱还可以建立安全校验模块。可选的,若音箱的ROM较大,音箱还可以建立差分/压缩还原模块等。Exemplarily, as shown in (b) in FIG. 3B, if the second device is a speaker, the speaker may be a WIFI type device. Since the WIFI type device has the function of connecting to the Internet, the upgrade module set of the speaker may include an upgrade package search Modules and upgrade packages Download modules. Optionally, if the speaker has a device for user interaction such as a display screen or a touch screen, the speaker can also establish a UI module. Optionally, if the processor of the speaker has a stronger function, the speaker can also establish a safety verification module. Optionally, if the ROM of the speaker is large, the speaker can also establish a differential/compression restoration module and the like.

如图3B中的(c)所示,第二设备可以为耳机,耳机可以为蓝牙类设备,由于蓝牙类设备不具有连接互联网的功能,可以不建立升级包搜索模块和升级包下载模块。可选的,若耳机具有显示屏或触摸屏等用于可以进行用户交互的器件,耳机还可以建立UI模块。可选的,若耳机的处理器功能较强,耳机还可以建立安全校验模块。可选的,若耳机的ROM较大,耳机还可以建立差分/压缩还原模块等。As shown in (c) in Figure 3B, the second device can be an earphone, and the earphone can be a Bluetooth device. Since the Bluetooth device does not have the function of connecting to the Internet, the upgrade package search module and the upgrade package download module may not be established. Optionally, if the headset has a device for user interaction such as a display screen or a touch screen, the headset may also establish a UI module. Optionally, if the processor of the earphone has a strong function, the earphone can also establish a security verification module. Optionally, if the ROM of the earphone is large, the earphone can also establish a differential/compression restoration module and the like.

需要说明的是,所有类型的第二设备都需要具备升级执行模块。升级执行能力可以是指将升级包写入ROM的能力,是第二设备应该具备的基础模块。可选的,可以在升级包执行模块中集成升级包安全校验模块和升级包差分/压缩还原模块。即升级执行能力不仅是指将升级包写入ROM的能力,还包括安全校验模块、差分/压缩还原模块。It should be noted that all types of second devices need to have an upgrade execution module. The upgrade execution capability may refer to the capability of writing the upgrade package into ROM, which is a basic module that the second device should have. Optionally, the upgrade package security verification module and the upgrade package differential/compression restoration module may be integrated in the upgrade package execution module. That is, the upgrade execution capability not only refers to the ability to write the upgrade package into ROM, but also includes the security verification module, differential/compression restoration module.

在一种可能的设计中,可以按照不同类型的升级业务对每种升级模块进一步进行区分。其中,升级业务的类型可以包括固件升级业务(OTA升级业务)、补丁升级业务、SDK升级业务(KIT升级业务)、插件升级业务、参数升级业务等。In a possible design, each upgrade module can be further distinguished according to different types of upgrade services. Wherein, the types of upgrade services may include firmware upgrade services (OTA upgrade services), patch upgrade services, SDK upgrade services (KIT upgrade services), plug-in upgrade services, parameter upgrade services, and the like.

示例性的,如图4A所示,固件升级业务可以对应固件搜索模块、固件下载模块、固件升级执行模块等。参数升级业务可以对应参数搜索模块、参数下载模块、参数升级执行模块等。补丁升级业务可以对应补丁搜索模块、补丁下载模块、补丁升级执行模块等。Exemplarily, as shown in FIG. 4A , the firmware upgrade service may correspond to a firmware search module, a firmware download module, a firmware upgrade execution module, and the like. The parameter upgrade service may correspond to a parameter search module, a parameter download module, a parameter upgrade execution module, and the like. The patch upgrade service may correspond to a patch search module, a patch download module, a patch upgrade execution module, and the like.

对于第二设备来说,若该第二设备需要支持不同类型的升级业务,该第二设备需要包括不同类型的升级业务对应的升级模块。例如,如图4B所示,对于音箱来说,若需要支持固件升级业务和参数升级业务,则音箱的升级模块集合中的升级包搜索模块可以包括固件搜索模块和参数搜索模块,升级包下载模块可以包括固件下载模块和参数下载模块,升级包安全校验模块可以包括固件安全校验模块和参数安全校验模块,升级包差分/压缩还原模块可以包括固件差分/压缩还原模块和参数差分/压缩还原模块,升级包升级执行模块可以包括固件升级执行模块和参数升级执行模块。其中,固件升级业务可以对应固件升级搜索模块、固件升级下载模块、固件安全校验模块、固件差分/压缩还原模块和固件升级执行模块等。参数升级业务可以对应参数升级搜索模块、参数升级下载模块、参数安全校验模块、参数差分/压缩还原模块和参数升级执行模块等。For the second device, if the second device needs to support different types of upgrade services, the second device needs to include upgrade modules corresponding to the different types of upgrade services. For example, as shown in Figure 4B, for the speaker, if it is necessary to support firmware upgrade service and parameter upgrade service, the upgrade package search module in the upgrade module set of the speaker can include a firmware search module and a parameter search module, an upgrade package download module It can include a firmware download module and a parameter download module. The upgrade package security check module can include a firmware security check module and a parameter security check module. The upgrade package differential/compression restoration module can include a firmware differential/compression restoration module and a parameter differential/compression module. The restore module, the upgrade package upgrade execution module may include a firmware upgrade execution module and a parameter upgrade execution module. Among them, the firmware upgrade service may correspond to a firmware upgrade search module, a firmware upgrade download module, a firmware security verification module, a firmware difference/compression restore module, and a firmware upgrade execution module. The parameter upgrade service can correspond to a parameter upgrade search module, a parameter upgrade download module, a parameter safety verification module, a parameter difference/compression restoration module, and a parameter upgrade execution module.

在一种可能的设计中,部分不同升级业务的升级模块可以共享。例如,采用同样升级包结构、同样升级包签名和同样安全校验机制的不同升级业务,可以共享升级包安全校验模块和升级包差分/压缩还原模块。例如,OTA包升级业务(固件升级业务)和补丁升级业务可以共享升级包安全校验模块和升级包差分/压缩还原模块。In a possible design, some upgrade modules of different upgrade services can be shared. For example, different upgrade services using the same upgrade package structure, same upgrade package signature, and same security verification mechanism can share the upgrade package security verification module and the upgrade package differential/compression recovery module. For example, the OTA package upgrade service (firmware upgrade service) and the patch upgrade service may share the upgrade package security verification module and the upgrade package differential/compression restoration module.

需要说明的是,无论在第一设备侧还是在第二设备侧,每个升级模块具有固定的输入接口和输出接口,输入接口可以接收特定的输入参数,输出接口可以输出特定的返回信息,以保证不同升级模块集合的升级模块可以无缝对接。It should be noted that, no matter on the first device side or the second device side, each upgrade module has a fixed input interface and output interface, the input interface can receive specific input parameters, and the output interface can output specific return information to Ensure that the upgrade modules of different upgrade module sets can be seamlessly connected.

示例性的,升级包搜索模块的定义格式可以包括功能,输入参数和返回信息,其中:Exemplarily, the definition format of the upgrade package search module may include functions, input parameters and return information, where:

功能描述:发起目标版本(新版本)升级包的搜索(检测)。Function description: Initiate the search (detection) of the target version (new version) upgrade package.

输入参数:第二设备的标识信息,新版本升级包类型(例如固件、补丁、参数、插件或SDK(例如,KIT)等)。Input parameters: identification information of the second device, new version upgrade package type (for example, firmware, patch, parameter, plug-in or SDK (for example, KIT), etc.).

返回信息:新版本升级包搜索结果(没有新版本升级包/有新版本升级包)。若有新版本升级包,返回信息还可以包括新版本升级包的版本号信息、URL地址信息、升级包大小信息和更新日志(changelog)信息等。Return information: search results for new version upgrade packages (no new version upgrade package/new version upgrade package available). If there is a new version upgrade package, the returned information may also include version number information, URL address information, upgrade package size information and update log (changelog) information of the new version upgrade package.

升级包下载模块的定义格式可以包括功能,输入参数和返回信息,其中:The definition format of the upgrade package download module can include functions, input parameters and return information, where:

功能描述:发起新版本升级包下载,或者取消新版本升级包下载。Function description: Initiate the download of the new version upgrade package, or cancel the download of the new version upgrade package.

输入参数:第二设备的标识信息,新版本升级包的URL地址,新版本升级包类型。Input parameters: the identification information of the second device, the URL address of the new version upgrade package, and the type of the new version upgrade package.

返回信息:可以包括新版本升级包下载进度、新版本升级包下载结果(下载成功/下载失败)。返回信息还可以包括新版本升级包下载完成后本地缓存地址和新版本升级包版本号信息等。或者返回信息可以包括新版本升级包取消下载结果(取消成功,取消失败)。Return information: can include the download progress of the new version upgrade package, the download result of the new version upgrade package (download success/download failure). The returned information may also include the address of the local cache after the download of the upgrade package of the new version is completed, the version number information of the upgrade package of the new version, and the like. Alternatively, the returned information may include a result of canceling the download of the new version upgrade package (cancellation succeeds, cancellation fails).

安全校验模块的定义格式可以包括功能,输入参数和返回信息,其中:The definition format of the security verification module can include functions, input parameters and return information, among which:

功能描述:发起升级包安全校验。Function description: Initiate the security verification of the upgrade package.

输入参数:第二设备的标识信息,新版本升级包存储地址,新版本升级包类型等。Input parameters: the identification information of the second device, the storage address of the new version upgrade package, the type of the new version upgrade package, etc.

返回信息:新版本升级包校验结果(校验成功/校验失败)。Return information: The verification result of the new version upgrade package (verification successful/verification failed).

差分/压缩还原模块的定义格式可以包括功能,输入参数和返回信息,其中:The definition format of the differential/compression restoration module can include functions, input parameters and return information, where:

功能描述:发起升级包差分/压缩还原。Function description: Initiate the difference/compression restore of the upgrade package.

输入参数:第二设备的标识信息,新版本升级包存储地址,新版本升级包类型。Input parameters: the identification information of the second device, the storage address of the new version upgrade package, and the type of the new version upgrade package.

返回信息:升级包差分/压缩还原结果(差分/压缩还原成功或者差分/压缩还原失败)。Return information: upgrade package differential/compression restoration result (differential/compression restoration successful or differential/compression restoration failed).

升级执行模块的定义格式可以包括功能,输入参数和返回信息,其中:The definition format of an upgrade execution module can include functions, input parameters and return information, where:

功能描述:发起升级包的升级执行(即安装升级包),或者取消升级包的升级执行。Function description: Initiate the upgrade execution of the upgrade package (that is, install the upgrade package), or cancel the upgrade execution of the upgrade package.

输入参数:第二设备的标识信息,新版本升级包存储地址,新版本升级包类型。Input parameters: the identification information of the second device, the storage address of the new version upgrade package, and the type of the new version upgrade package.

返回信息:可以包括新版本升级包升级执行进度(即安装进度)、升级执行结果(安装成功/升级失败),或者取消安装结果(取消安装成功/升级失败)。Return information: It can include the progress of the upgrade execution of the new version upgrade package (that is, the progress of the installation), the result of the upgrade execution (successful installation/failure of the upgrade), or the result of canceling the installation (successful cancellation of the installation/failure of the upgrade).

UI模块的定义格式可以包括功能,输入参数和返回信息,其中:The definition format of a UI module can include functions, input parameters and return information, where:

功能描述:供用户选择是否发起新版本升级包搜索、下载和安装(即升级执行),或者取消下载、取消安装等过程,并将相应的进度(例如,下载进度、安装进度等)和结果(例如,下载结果、取消下载结果、安装结果、取消安装结果等)显示给用户。Function description: It is for the user to choose whether to initiate the search, download and installation of the new version upgrade package (that is, upgrade execution), or cancel the download and installation process, and report the corresponding progress (for example, download progress, installation progress, etc.) and results ( For example, download results, cancel download results, install results, cancel install results, etc.) are displayed to the user.

输入参数:第二设备的标识信息,新版本升级包类型、新版本升级包的版本号信息(包括ROM版本、补丁版本)以及第二设备的升级状态(包括初始化、检测中、下载中、安装中)等。Input parameters: identification information of the second device, new version upgrade package type, version number information of the new version upgrade package (including ROM version, patch version) and the upgrade status of the second device (including initialization, detection, downloading, installation medium.

返回信息:用户UX设置信息,例如确定发起新版本升级包搜索、下载和安装,取消下载、取消安装等。Return information: user UX setting information, such as determining to initiate a new version upgrade package search, download and installation, canceling downloading, canceling installation, etc.

为了将不同设备的升级模块集合中的升级模块汇总成一个完整的升级流程,在第一设备(例如,手机)和第二设备(例如,音箱)之间,可以建立一套升级模块统一协调调度的管理机制(即升级框架/升级管理机制)。In order to aggregate the upgrade modules in the upgrade module sets of different devices into a complete upgrade process, a set of upgrade modules can be established for unified coordination and scheduling between the first device (for example, a mobile phone) and the second device (for example, a speaker) The management mechanism (that is, the upgrade framework/upgrade management mechanism).

如图5A所示,以第一设备为手机,第二设备为音箱为例,可以在音箱上可以建立一个升级管理模块(或称为升级流程调度执行模块),音箱上的升级管理模块可以调度音箱的升级模块集合中的各个升级模块。手机上也可以建立一个升级管理模块,手机上的升级管理模块可以调度手机上的升级模块集合中的各个升级模块。音箱上的升级管理模块和手机的升级管理模块可以进行信令交互。As shown in Figure 5A, taking the first device as a mobile phone and the second device as a speaker, an upgrade management module (or an upgrade process scheduling execution module) can be established on the speaker, and the upgrade management module on the speaker can be scheduled Each upgrade module in the speaker's upgrade module collection. An upgrade management module can also be established on the mobile phone, and the upgrade management module on the mobile phone can schedule each upgrade module in the upgrade module set on the mobile phone. The upgrade management module on the speaker and the upgrade management module of the mobile phone can perform signaling interaction.

示例性的,如图5B所示,在手机侧,UI模块可以将用户UX设置信息(例如,用户在手机的触摸屏进行的升级设置操作的相关信息,例如,升级设置操作可以是对台灯的固件进行升级)发送给升级管理模块,升级管理模块根据用户UX设置信息确定需要进行升级包升级(例如,对台灯的固件进行升级)。然后,升级管理模块可以调度相应的升级模块,例如升级包搜索模块,升级包下载模块和升级包升级执行模块等。升级管理模块可以向升级包搜索模块的输入接口输入相应的输入参数,升级包搜索模块输出接口可以输出相应的搜索信息(例如升级包的URL地址),升级管理模块在调度升级包下载模块时,可以将升级包搜索模块输出接口输出的搜索信息(例如升级包的URL地址)作为升级包下载模块的输入接口的输入参数,即升级包搜索模块的输出接口可以与升级包下载模块的输入接口对接。升级包下载模块输出接口可以输出相应的下载信息(例如升级包的存储地址),升级管理模块在调度升级包升级执行模块时,可以将升级包下载模块输出接口输出的下载信息(例如升级包的存储地址)作为升级包升级执行模块的输入接口的输入参数,即升级包升级执行模块的输出接口可以与升级包升级执行模块的输入接口对接。Exemplarily, as shown in FIG. 5B , on the mobile phone side, the UI module can store user UX setting information (for example, information about the upgrade setting operation performed by the user on the touch screen of the mobile phone, for example, the upgrade setting operation can be for the firmware of the desk lamp upgrade) is sent to the upgrade management module, and the upgrade management module determines that the upgrade package needs to be upgraded according to the user UX setting information (for example, the firmware of the desk lamp is upgraded). Then, the upgrade management module can schedule corresponding upgrade modules, such as an upgrade package search module, an upgrade package download module, and an upgrade package upgrade execution module. The upgrade management module can input corresponding input parameters to the input interface of the upgrade package search module, and the upgrade package search module output interface can output corresponding search information (such as the URL address of the upgrade package), and the upgrade management module is when scheduling the upgrade package download module, The search information (such as the URL address of the upgrade package) output by the upgrade package search module output interface can be used as the input parameter of the input interface of the upgrade package download module, that is, the output interface of the upgrade package search module can be docked with the input interface of the upgrade package download module . The upgrade package download module output interface can output corresponding download information (such as the storage address of the upgrade package). storage address) as the input parameter of the input interface of the upgrade package upgrade execution module, that is, the output interface of the upgrade package upgrade execution module can be connected with the input interface of the upgrade package upgrade execution module.

类似的,在音箱侧,UI模块可以将用户UX设置信息(例如,用户在音箱的触摸屏进行的升级设置操作的相关信息,例如,升级设置操作可以是对台灯的固件进行升级)发送给升级管理模块,升级管理模块可以根据用户UX设置信息确定需要进行升级包升级(例如,对台灯的固件进行升级)。然后,升级管理模块可以调度相应的升级模块,例如升级包搜索模块,升级包下载模块和升级包升级执行模块等。升级管理模块可以向升级包搜索模块的输入接口输入相应的输入参数,升级包搜索模块输出接口可以输出相应的搜索信息(例如升级包的URL地址),升级管理模块在调度升级包下载模块时,可以将升级包搜索模块输出接口输出的搜索信息(例如升级包的URL地址)作为升级包下载模块的输入接口的输入参数,即升级包搜索模块的输出接口可以与升级包下载模块的输入接口对接。升级包下载模块输出接口可以输出相应的下载信息(例如升级包的存储地址),升级管理模块在调度升级包升级执行模块时,可以将升级包下载模块输出接口输出的下载信息(例如升级包的存储地址)作为升级包升级执行模块的输入接口的输入参数,即升级包升级执行模块的输出接口可以与升级包升级执行模块的输入接口对接。Similarly, on the speaker side, the UI module can send user UX setting information (for example, information about the upgrade setting operation performed by the user on the touch screen of the speaker, for example, the upgrade setting operation can be to upgrade the firmware of the desk lamp) to the upgrade management module, the upgrade management module can determine that an upgrade package needs to be upgraded according to the user UX setting information (for example, upgrade the firmware of the desk lamp). Then, the upgrade management module can schedule corresponding upgrade modules, such as an upgrade package search module, an upgrade package download module, and an upgrade package upgrade execution module. The upgrade management module can input corresponding input parameters to the input interface of the upgrade package search module, and the upgrade package search module output interface can output corresponding search information (such as the URL address of the upgrade package), and the upgrade management module is when scheduling the upgrade package download module, The search information (such as the URL address of the upgrade package) output by the upgrade package search module output interface can be used as the input parameter of the input interface of the upgrade package download module, that is, the output interface of the upgrade package search module can be docked with the input interface of the upgrade package download module . The upgrade package download module output interface can output corresponding download information (such as the storage address of the upgrade package). storage address) as the input parameter of the input interface of the upgrade package upgrade execution module, that is, the output interface of the upgrade package upgrade execution module can be connected with the input interface of the upgrade package upgrade execution module.

综上可知,无论在手机侧还是在音箱侧,各个升级模块(例如升级包搜索模块、升级包下载模块和升级包升级执行模块)的输入接口和输出接口是固定的,这样,无论升级包搜索模块、升级包下载模块和升级包升级执行模块集成在音箱还是在手机侧,都可以实现无缝对接。In summary, no matter on the mobile phone side or on the speaker side, the input interface and output interface of each upgrade module (such as the upgrade package search module, the upgrade package download module and the upgrade package upgrade execution module) are fixed. Whether the module, the upgrade package download module, and the upgrade package upgrade execution module are integrated on the speaker or on the mobile phone side, seamless connection can be realized.

可以理解的是,由于音箱和手机的升级模块集合中的升级模块可能有重复(例如,音箱(例如,WIFI类型设备)和手机都可以建立有升级包搜索模块和升级包下载模块),因此需要一套模块选择机制,以明确从哪个设备的升级模块集合中选择哪些模块来完成升级流程。It can be understood that, since the upgrade modules in the upgrade module sets of speakers and mobile phones may be repeated (for example, both speakers (for example, WIFI type equipment) and mobile phones can have upgrade package search modules and upgrade package download modules), it is necessary to A module selection mechanism to clearly select which modules from which device's upgrade module set to complete the upgrade process.

在一种可能的设计中,如图5A所示,可以在音箱上集成配置信息,配置信息可以是音箱厂商指定的。音箱的升级管理模块可以根据配置信息确定从哪个设备的升级模块集合中选择哪些模块来完成升级流程。In a possible design, as shown in FIG. 5A , configuration information may be integrated on the speaker, and the configuration information may be specified by the speaker manufacturer. The upgrade management module of the speaker can determine which modules to select from the upgrade module set of which device to complete the upgrade process according to the configuration information.

示例性的,若第二设备为音箱,配置信息可以如表1所示:Exemplarily, if the second device is a speaker, the configuration information may be as shown in Table 1:

表1Table 1

升级模块upgrade module 音箱侧speaker side 手机侧mobile phone side UI模块UI module 升级包搜索模块Upgrade package search module 升级包下载模块Upgrade package download module 升级包安全校验模块Upgrade package security verification module 升级包差分/压缩还原模块Upgrade package differential/compression restore module 升级包升级执行模块Upgrade package upgrade execution module

示例性的,若第二设备为耳机,配置信息(list)可以如表2所示:Exemplarily, if the second device is a headset, the configuration information (list) may be as shown in Table 2:

表2Table 2

升级模块upgrade module 耳机侧earphone side 手机侧mobile phone side UI模块UI module 升级包搜索模块Upgrade package search module 升级包下载模块Upgrade package download module 升级包安全校验模块Upgrade package security verification module 升级包差分/压缩还原模块Upgrade package differential/compression restore module 升级包升级执行模块Upgrade package upgrade execution module

需要说明的是,配置信息中,UI模块可以并行,即在第一设备侧(例如,手机)和第二设备侧(例如,音箱或耳机)都可以进行UX交互。在不同设备上的UX交互具有相同的效果,即针对升级的用户交互界面可以有多个,每个界面都可以供用户独立操作以便进行升级控制,操作结果在不同的交互界面共享。并且,可以理解的是,对第二设备进行升级时,升级执行模块只能选择第二设备侧的升级执行模块。除UI模块和升级执行模块之外的其余模块(例如,升级包搜索模块、升级包下载模块等)只选择一侧/一端设备的升级模块即可。It should be noted that in the configuration information, the UI modules can be parallelized, that is, UX interaction can be performed on both the first device side (for example, a mobile phone) and the second device side (for example, a speaker or earphone). The UX interaction on different devices has the same effect, that is, there can be multiple user interaction interfaces for the upgrade, and each interface can be operated independently by the user for upgrade control, and the operation results are shared on different interactive interfaces. Moreover, it can be understood that when upgrading the second device, the upgrade execution module can only select the upgrade execution module on the side of the second device. For other modules except the UI module and the upgrade execution module (for example, the upgrade package search module, the upgrade package download module, etc.), only the upgrade module of one side/one end device can be selected.

在另一种可能的设计中,升级管理模块可以根据第二设备侧和第一设备侧的升级模块信息自动编排用于完成升级流程的升级模块。自动编排的策略可以是:优先调度第二设备侧的升级模块,当第二设备缺少必要的升级模块(例如,升级包下载模块)时,从第一设备侧调度相应的升级模块。In another possible design, the upgrade management module may automatically compile upgrade modules for completing the upgrade process according to the upgrade module information on the second device side and the first device side. The automatic arrangement strategy may be: priority scheduling of the upgrade module on the second device side, when the second device lacks a necessary upgrade module (for example, an upgrade package download module), schedule the corresponding upgrade module from the first device side.

示例性的,如图6A所示,为本申请实施例提供的一种系统架构示意图,包括音箱、手机和服务器。其中,手机包括应用程序和SDK集合。SDK集合例如可以是HMS模块(或者称为HMS engine))或者GMS模块。其中,应用程序例如可以是智慧生活APP,应用程序中包括升级管理界面。SDK集合中包括第一SDK、第二SDK和近场设备通信协议模块。其中,第一SDK例如可以是KIT框架(framework),第二SDK例如可以是智慧家居工具包(smarthome KIT)。第一SDK中包括升级功能模块,升级功能模块包括如图5A中手机侧的升级管理模块和升级模块集合中除UI模块之外的升级模块。Exemplarily, as shown in FIG. 6A , it is a schematic diagram of a system architecture provided by an embodiment of the present application, including a speaker, a mobile phone, and a server. Wherein, the mobile phone includes application program and SDK collection. The SDK set may be, for example, an HMS module (or called an HMS engine)) or a GMS module. Wherein, the application program may be, for example, a smart life APP, and the application program includes an upgrade management interface. The SDK set includes a first SDK, a second SDK and a near-field device communication protocol module. Wherein, the first SDK may be, for example, a KIT framework (framework), and the second SDK may, for example, be a smart home toolkit (smarthome KIT). The first SDK includes an upgrade function module, and the upgrade function module includes an upgrade management module on the mobile phone side as shown in FIG. 5A and an upgrade module in the upgrade module set except the UI module.

其中,应用程序的升级管理界面可以接收用户的操作,基于用户的操作,应用程序可以调用第一SDK提供的应用程序接口(application programming interface,API)接口,与升级功能模块进行交互。在手机上,第一SDK可以以APP的模式独立存在,或者第一SDK可以集成在应用程序中,或者可以将SDK集合作为一个独立的APP,应用程序和该独立APP可以协同下载安装,应用程序的运行依赖于该独立APP。Wherein, the upgrade management interface of the application program can receive the user's operation, and based on the user's operation, the application program can call the application programming interface (application programming interface, API) interface provided by the first SDK to interact with the upgrade function module. On the mobile phone, the first SDK can exist independently in APP mode, or the first SDK can be integrated in the application program, or the SDK collection can be used as an independent APP, and the application program and the independent APP can be downloaded and installed together. The operation of the software depends on the independent APP.

其中,音箱包括升级相关用户交互应用(即用于进行升级的应用,例如可以是音箱的设置应用)、SDK集合、升级适配层和厂家自有代码。SDK集合例如可以是HMS模块或者GMS模块。其中,SDK集合中包括第一SDK、第二SDK和近场设备通信协议模块。其中第一SDK例如可以是第一SDK,第二SDK例如可以是smarthome KIT。第一SDK中包括升级功能模块,升级功能模块包括如图5A中音箱侧的升级管理模块和升级模块集合中除UI模块之外的升级模块。Among them, the speaker includes an upgrade-related user interaction application (that is, an application for upgrading, such as a speaker setting application), an SDK set, an upgrade adaptation layer, and the manufacturer's own code. The SDK set can be, for example, an HMS module or a GMS module. Wherein, the SDK set includes the first SDK, the second SDK and the near-field device communication protocol module. The first SDK may be, for example, the first SDK, and the second SDK may be, for example, smarthome KIT. The first SDK includes an upgrade function module, and the upgrade function module includes an upgrade management module on the speaker side as shown in FIG. 5A and an upgrade module in the upgrade module set except the UI module.

其中,音箱侧的SDK集合可以是由软件厂商(例如,华为)统一交付的。SDK集合可以脱离音箱独立升级,即SDK集合与音箱厂商的代码是解耦的。音箱的其余软件代码是音箱厂商根据当前音箱的特点进行适配开发的。Wherein, the SDK set on the speaker side may be uniformly delivered by a software manufacturer (for example, Huawei). The SDK set can be upgraded independently from the speaker, that is, the SDK set is decoupled from the code of the speaker manufacturer. The rest of the software code of the speaker is adapted and developed by the speaker manufacturer according to the characteristics of the current speaker.

音箱的厂家自有代码中可以承载音箱的自有升级能力。音箱的自有升级能力可以通过升级适配层和SDK集合建立关联。如图6B所示,音箱可以通过厂家自有代码与服务器(例如,厂家的OTA服务器)进行通信,例如,可以从服务器获取OTA升级包。音箱的自有升级能力可以参考下文的相关描述,在此暂时省略。The speaker manufacturer's own code can carry the speaker's own upgrade capability. The speaker's own upgrade capability can be associated with the SDK set by upgrading the adaptation layer. As shown in FIG. 6B , the speaker can communicate with the server (for example, the OTA server of the manufacturer) through the manufacturer's own code, for example, the OTA upgrade package can be obtained from the server. You can refer to the related description below for the self-upgrading ability of the speaker, which is temporarily omitted here.

音箱或手机中的软总线用于提供设备间的通信能力。例如,软总线可以提供近场设备的设备间通信能力,近场设备可以包括通过蓝牙等近场协议连接的设备,或者通过家庭路由器连接的设备。The soft bus in speakers or mobile phones is used to provide communication capabilities between devices. For example, the soft bus may provide inter-device communication capabilities of near-field devices, which may include devices connected through a near-field protocol such as Bluetooth, or devices connected through a home router.

音箱或手机中的第二SDK可以提供远场设备通信能力。其中,远场设备是指通过云服务器(cloud server)完成设备间信息交互的设备。需要注意的是,近场设备和远场设备不是固定的,可以动态切换。例如用户在公司通过手机控制家里的空调时,手机和空调属于远场设备,采用远场设备通信协议。如果用户回到家中,手机和空调都接入到了家庭路由器网络中,此时手机和空调属于近场设备,采用近场设备通信协议。第一SDK可以调用第二SDK提供的远场设备通信能力接口,以完成远场设备之间的信息交互。A second SDK in the speaker or phone can provide far-field device communication capabilities. Wherein, the far-field device refers to a device that completes information exchange between devices through a cloud server (cloud server). It should be noted that the near-field device and the far-field device are not fixed and can be switched dynamically. For example, when a user controls the air conditioner at home through a mobile phone in the company, the mobile phone and the air conditioner are far-field devices, and the far-field device communication protocol is adopted. If the user returns home, the mobile phone and the air conditioner are connected to the home router network. At this time, the mobile phone and the air conditioner are near-field devices and adopt the near-field device communication protocol. The first SDK can call the far-field device communication capability interface provided by the second SDK to complete the information exchange between the far-field devices.

其中,服务器可以包括OTA服务器和应用市场服务器。其中,OTA服务器可以存放OTA升级包(例如,软件厂家(例如,华为)提供的OTA升级包)和补丁升级包。应用市场服务器中可以存放SDK,例如(KIT升级包)。Wherein, the server may include an OTA server and an application market server. Wherein, the OTA server may store an OTA upgrade package (for example, an OTA upgrade package provided by a software manufacturer (for example, Huawei)) and a patch upgrade package. The SDK, for example (KIT upgrade package), can be stored in the application market server.

其中,手机的操作系统可以是安卓系统、鸿蒙系统、IOS系统或者其他操作系统。音箱的操作系统可以是鸿蒙系统,轻量级鸿蒙系统,lite OS,linux系统,双框架系统,或者其他操作系统。Wherein, the operating system of the mobile phone may be an Android system, a Hongmeng system, an IOS system or other operating systems. The operating system of the speaker can be Hongmeng system, lightweight Hongmeng system, lite OS, linux system, dual-frame system, or other operating systems.

其中,手机的第二SDK中可以包括远场设备通信模块,手机的第一SDK中还可以包括远场升级控制接口和近场升级控制接口。第一SDK可以通过远场升级控制接口调用远场设备通信模块的远场设备通信能力接口,以便第一SDK可以与远场设备进行通信。第一SDK可以通过近场升级控制接口调用软总线的近场设备通信能力接口,以便第一SDK可以与近场设备进行通信。Wherein, the second SDK of the mobile phone may include a far-field device communication module, and the first SDK of the mobile phone may further include a far-field upgrade control interface and a near-field upgrade control interface. The first SDK can call the far-field device communication capability interface of the far-field device communication module through the far-field upgrade control interface, so that the first SDK can communicate with the far-field device. The first SDK can call the near-field device communication capability interface of the soft bus through the near-field upgrade control interface, so that the first SDK can communicate with the near-field device.

类似的,音箱的第二SDK中可以包括远场设备通信模块,音箱的第一SDK中还可以包括远场升级控制接口和近场升级控制接口。第一SDK可以通过远场升级控制接口调用远场设备通信模块的远场设备通信能力接口,以便第一SDK可以与远场设备进行通信。第一SDK可以通过近场升级控制接口调用软总线的近场设备通信能力接口,以便第一SDK可以与近场设备进行通信。Similarly, the second SDK of the speaker may include a far-field device communication module, and the first SDK of the speaker may further include a far-field upgrade control interface and a near-field upgrade control interface. The first SDK can call the far-field device communication capability interface of the far-field device communication module through the far-field upgrade control interface, so that the first SDK can communicate with the far-field device. The first SDK can call the near-field device communication capability interface of the soft bus through the near-field upgrade control interface, so that the first SDK can communicate with the near-field device.

示例性的,如图6C所示,在音箱侧,SDK集合的第一SDK中可以包括升级功能模块,升级功能模块中可以包括升级管理模块和升级模块集合中除UI模块之外的升级模块。在手机侧,第一SDK中可以包括升级功能模块,升级功能模块中可以包括升级管理模块和升级模块集合中除UI模块之外的升级模块。Exemplarily, as shown in FIG. 6C , on the speaker side, the first SDK in the SDK set may include an upgrade function module, and the upgrade function module may include an upgrade management module and an upgrade module in the upgrade module set except the UI module. On the mobile phone side, the first SDK may include an upgrade function module, and the upgrade function module may include an upgrade management module and upgrade modules other than the UI module in the upgrade module set.

音箱的UI模块可以集成在升级相关用户交互应用中,升级相关用户交互应用可以通过升级API接口与升级管理模块进行信息交互。手机的UI模块可以集成在应用程序中,用户可以通过应用程序的升级管理界面进行相应的升级设置,即手机可以通过升级管理界面接收用户的升级设置的相应操作,升级管理界面可以通过升级API接口与升级管理模块进行信息交互。手机的升级管理模块和音箱的升级管理模块可以通过升级控制接口进行交互。The UI module of the speaker can be integrated in an upgrade-related user interaction application, and the upgrade-related user interaction application can perform information interaction with the upgrade management module through an upgrade API interface. The UI module of the mobile phone can be integrated in the application program, and the user can perform corresponding upgrade settings through the upgrade management interface of the application program, that is, the mobile phone can receive the corresponding operation of the user's upgrade settings through the upgrade management interface, and the upgrade management interface can be updated through the upgrade API interface Interact information with the upgrade management module. The upgrade management module of the mobile phone and the upgrade management module of the speaker can interact through the upgrade control interface.

其中,音箱厂商指定的升级配置信息是音箱厂商在集成SDK集合的过程中,根据当前音箱的情况以及手机能提供的辅助升级能力(模块)的情况确定的。配置信息经过音箱厂商有效验证测试后,可以固化在音箱中。后续升级模块调度执行过程将按照固化调度顺序和过程执行。这样,可以确保音箱的升级流程都是经过音箱厂商有效验证测试的,确保升级可靠性。Among them, the upgrade configuration information specified by the speaker manufacturer is determined by the speaker manufacturer in the process of integrating the SDK set, according to the current situation of the speaker and the auxiliary upgrade capability (module) that the mobile phone can provide. The configuration information can be solidified in the speaker after being effectively verified and tested by the speaker manufacturer. Subsequent upgrade module scheduling execution process will be executed in accordance with the fixed scheduling sequence and process. In this way, it can be ensured that the upgrade process of the speaker has been effectively verified and tested by the speaker manufacturer to ensure the reliability of the upgrade.

在一种可能的设计中,音箱的升级模块可以不集成在SDK集合的第一SDK中,音箱可以具备自有升级能力。其中,音箱的自有升级能力可以承载在音箱厂商的自有代码中,并通过升级适配层和SDK集合建立关联。其中,音箱的自有升级能力是指音箱厂商负责集成开发的内容。在以下两种情况中音箱可以具备自有升级能力。In a possible design, the speaker upgrade module may not be integrated in the first SDK of the SDK set, and the speaker may have its own upgrade capability. Among them, the speaker's own upgrade capability can be carried in the speaker manufacturer's own code, and the association is established by upgrading the adaptation layer and the SDK set. Among them, the self-upgrading ability of speakers refers to the content that speaker manufacturers are responsible for integrated development. In the following two cases, the speaker can have its own upgrade capability.

1、部分模块需要由音箱厂商自行开发。例如,升级执行模块可选地由音箱厂商自行开发。升级执行模块例如可以支持AB升级模式、独立模组升级等模式。1. Some modules need to be developed by speaker manufacturers themselves. For example, the upgrade execution module is optionally developed by the speaker manufacturer itself. For example, the upgrade execution module may support modes such as AB upgrade mode and independent module upgrade.

2、部分音箱厂商的能力较强,可以自行设计升级功能。例如,部分音箱厂商有OTA服务器,可以自行制作并发布OTA升级包。这样,升级包的搜索模块和下载模块,都可以由音箱厂商自行实现。即音箱厂商可以自行构建升级包搜索模块和下载模块。2. Some speaker manufacturers have strong capabilities and can design and upgrade functions by themselves. For example, some speaker manufacturers have OTA servers, which can make and release OTA upgrade packages by themselves. In this way, both the search module and the download module of the upgrade package can be implemented by the speaker manufacturer. That is, speaker manufacturers can build upgrade package search modules and download modules by themselves.

需要说明的是,音箱的自有升级能力的调度仍旧依赖音箱的升级管理模块,这样可以确保目标应用(例如,应用程序)对音箱升级做到有效管理。It should be noted that the scheduling of the self-upgrading capability of the speaker still depends on the upgrade management module of the speaker, so as to ensure that the target application (for example, an application program) can effectively manage the upgrade of the speaker.

并且,音箱的升级模块无论是在SDK集合的第一SDK中构建,还是音箱厂商自行构建,其输入接口和输出接口是固定的,这样可以保证音箱的升级模块与手机的升级模块可以无缝对接。Moreover, no matter whether the upgrade module of the speaker is built in the first SDK of the SDK collection or built by the speaker manufacturer itself, its input interface and output interface are fixed, so as to ensure that the upgrade module of the speaker and the upgrade module of the mobile phone can be seamlessly connected .

下面对流程(2)(即升级流程调度执行)进行说明。The process (2) (that is, the scheduling and execution of the upgrade process) will be described below.

示例性的,用户可以在第一设备(例如,手机)上的应用程序上发起对第二设备(例如,音箱)的升级(例如,固件升级)。手机可以将用户UX设置信息发送给音箱,音箱上的升级管理模块可以读取集成在音箱上的配置信息,根据配置信息中的编排结果调度各个升级模块。或者,音箱上升级管理模块可以根据音箱侧和手机侧的升级模块信息确定(即自动编排)用于完成升级流程的升级模块,并调度相应的升级模块。Exemplarily, the user may initiate an upgrade (for example, firmware upgrade) on the second device (for example, a speaker) on an application program on the first device (for example, a mobile phone). The mobile phone can send user UX setting information to the speaker, and the upgrade management module on the speaker can read the configuration information integrated on the speaker, and schedule each upgrade module according to the arrangement result in the configuration information. Alternatively, the upgrade management module on the speaker may determine (that is, automatically arrange) the upgrade modules used to complete the upgrade process according to the upgrade module information on the speaker side and the mobile phone side, and schedule corresponding upgrade modules.

如图7A所示,用户可以通过应用程序的升级管理界面进行升级设置(例如,如图2C所示,用户可以在界面205通过升级按钮206对音箱进行升级),升级管理界面可以通过升级API接口将用户UX设置信息(即用户在升级管理界面进行的升级设置的相关信息)传递给升级管理模块。手机的升级管理模块可以通过升级控制接口向音箱的升级管理模块发送用户UX设置信息,音箱的升级管理模块可以通过升级控制接口接收用户UX设置信息。根据该用户UX设置信息,音箱的升级管理模块确定需要进行升级包(例如,OTA包)升级。音箱的升级管理模块可以读取配置信息,配置信息可以指定采用音箱上的OTA包搜索模块、OTA包下载模块和OTA包升级执行模块。这样,音箱的升级管理模块可以确定升级执行流程为:(1)调用音箱上的OTA包搜索模块;(2)调用音箱上的OTA包下载模块;(3)调用音箱上的OTA包升级执行模块。As shown in Figure 7A, the user can upgrade settings through the upgrade management interface of the application program (for example, as shown in Figure 2C, the user can upgrade the speaker through the upgrade button 206 on the interface 205), and the upgrade management interface can be upgraded through the API interface. Pass the user UX setting information (that is, information related to the upgrade settings performed by the user on the upgrade management interface) to the upgrade management module. The upgrade management module of the mobile phone can send user UX setting information to the upgrade management module of the speaker through the upgrade control interface, and the upgrade management module of the speaker can receive the user UX setting information through the upgrade control interface. According to the user UX setting information, the upgrade management module of the speaker determines that an upgrade package (for example, an OTA package) needs to be upgraded. The upgrade management module of the speaker can read the configuration information, and the configuration information can specify the OTA package search module, the OTA package download module and the OTA package upgrade execution module on the speaker. In this way, the upgrade management module of the speaker can determine that the upgrade execution process is: (1) calling the OTA package search module on the speaker; (2) calling the OTA package download module on the speaker; (3) calling the OTA package upgrade execution module on the speaker .

如图7B所示,在手机侧,UI模块(可以集成在如图7A中的应用程序)可以向升级管理模块发送用户UX设置信息,升级管理模块可以将用户UX设置信息发送给音箱侧的升级管理模块。音箱侧的升级管理模块根据用户UX设置信息确定需要进行OTA包升级。音箱侧的升级管理模块可以根据配置信息确定调用本地(即音箱)的升级包搜索模块、升级包下载模块和升级包升级执行模块。具体调用过程可以参考图5B的相关说明,在此不做赘述。As shown in Figure 7B, on the mobile phone side, the UI module (which can be integrated in the application program in Figure 7A) can send the user UX setting information to the upgrade management module, and the upgrade management module can send the user UX setting information to the upgrade on the speaker side management module. The upgrade management module on the speaker side determines that the OTA package upgrade needs to be performed according to the user UX setting information. The upgrade management module on the speaker side can determine to call the local (ie speaker) upgrade package search module, upgrade package download module and upgrade package upgrade execution module according to the configuration information. For the specific calling process, reference may be made to the relevant description in FIG. 5B , and details are not repeated here.

可选的,音箱侧的升级管理模块还可以将相应的搜索信息、下载信息、升级执行信息发送给手机侧的升级管理模块,由手机侧的升级管理模块转发给手机侧的UI模块,以便通过应用程序向用户呈现相应的搜索信息(例如,如图2E所示的新版本的版本号)、下载信息(例如,如图2F中的(a)所示的下载进度或如图2J中的(a)所示的下载进度、如图2F中的(b)所示的下载完成结果)、升级执行信息(例如,如图2G中的(a)所示的安装进度或如图2J中的(b)所示的安装进度、如图2G中的(b)所示的安装完成结果等)。Optionally, the upgrade management module on the speaker side can also send corresponding search information, download information, and upgrade execution information to the upgrade management module on the mobile phone side, and the upgrade management module on the mobile phone side forwards it to the UI module on the mobile phone side, so that through The application presents to the user corresponding search information (for example, the version number of the new version as shown in Figure 2E), download information (for example, the download progress as shown in (a) in Figure 2F or ( The download progress shown in a), the download completion result shown in (b) in Figure 2F), the upgrade execution information (for example, the installation progress shown in Figure 2G (a) or the ( The installation progress shown in b), the installation completion result shown in (b) in FIG. 2G, etc.).

再例如,如图8A所示,用户可以通过应用程序的升级管理界面进行升级设置,升级管理界面可以通过升级API接口将用户UX设置信息传递给升级管理模块。手机的升级管理模块可以通过升级控制接口发送升级设置信息,音箱的升级管理模块可以通过升级控制接口接收升级设置信息。根据该升级设置信息,音箱的升级管理模块确定需要进行OTA包升级。音箱的升级管理模块可以读取配置信息,配置信息可以指定采用手机上的搜索模块和下载模块,以及采用音箱上的升级执行模块。这样,音箱的升级管理模块可以确定升级执行流程为:(1)调用手机上的OTA包搜索模块;(2)调用手机上的OTA包下载模块;(3)调用音箱上的OTA包升级执行模块。For another example, as shown in FIG. 8A , the user can perform upgrade settings through the upgrade management interface of the application program, and the upgrade management interface can pass the user UX setting information to the upgrade management module through the upgrade API interface. The upgrade management module of the mobile phone can send upgrade setting information through the upgrade control interface, and the upgrade management module of the speaker can receive the upgrade setting information through the upgrade control interface. According to the upgrade setting information, the upgrade management module of the speaker determines that an OTA package upgrade is required. The upgrade management module of the speaker can read the configuration information, and the configuration information can specify to use the search module and the download module on the mobile phone, and the upgrade execution module on the speaker. In this way, the upgrade management module of the speaker can determine that the upgrade execution process is: (1) calling the OTA package search module on the mobile phone; (2) calling the OTA package download module on the phone; (3) calling the OTA package upgrade execution module on the speaker .

如图8B所示,在手机侧,UI模块(可以集成在如图8A中的应用程序)可以向升级管理模块发送用户UX设置信息,升级管理模块可以将用户UX设置信息发送给音箱侧的升级管理模块。音箱侧的升级管理模块根据用户UX设置信息确定需要进行升级包(例如,OTA包)升级。音箱侧的升级管理模块可以根据配置信息确定调用手机侧的升级包搜索模块、升级包下载模块和本地(即音箱侧)的升级包升级执行模块。音箱侧的升级管理模块可以将配置信息发送给手机侧的升级管理模块,以便手机侧的升级管理模块依次调用手机侧的升级包搜索模块和升级包下载模块。手机侧的升级管理模块可以将手机侧的升级包搜索模块和升级包下载模块的返回信息发送给音箱侧的升级管理模块,音箱侧的升级管理模块可以对上述返回信息进行解析,并且音箱调用升级包升级执行模块。具体调用过程可以参考图5B的相关说明,在此不做赘述。As shown in Figure 8B, on the mobile phone side, the UI module (which can be integrated into the application program in Figure 8A) can send the user UX setting information to the upgrade management module, and the upgrade management module can send the user UX setting information to the upgrade on the speaker side management module. The upgrade management module on the speaker side determines that an upgrade package (for example, an OTA package) needs to be upgraded according to the user UX setting information. The upgrade management module on the speaker side can determine to call the upgrade package search module, the upgrade package download module and the local (ie speaker side) upgrade package upgrade execution module on the mobile phone side according to the configuration information. The upgrade management module on the speaker side can send the configuration information to the upgrade management module on the mobile phone side, so that the upgrade management module on the mobile phone side calls the upgrade package search module and the upgrade package download module on the mobile phone side in turn. The upgrade management module on the mobile phone side can send the return information from the upgrade package search module and the upgrade package download module on the mobile phone side to the upgrade management module on the speaker side, and the upgrade management module on the speaker side can analyze the above returned information, and the speaker calls the upgrade Package upgrade execution module. For the specific calling process, reference may be made to the relevant description in FIG. 5B , and details are not repeated here.

可选的,音箱侧的升级管理模块还可以将升级执行信息以及解析后的搜索信息和下载信息发送给手机侧的升级管理模块,由手机侧的升级管理模块将升级执行信息、搜索信息和下载信息转发给手机侧的UI模块,以便通过应用程序向用户呈现相应的搜索信息(例如,如图2E所示的新版本的版本号)、下载信息(例如,如图2F中的(a)所示的下载进度或如图2J中的(a)所示的下载进度、如图2F中的(b)所示的下载结果)、升级执行信息(例如,如图2G中的(a)所示的安装进度或如图2J中的(b)所示的安装进度、如图2G中的(b)所示的安装结果等)。Optionally, the upgrade management module on the speaker side can also send the upgrade execution information and the parsed search information and download information to the upgrade management module on the mobile phone side, and the upgrade management module on the mobile phone side will update the upgrade execution information, search information and download information. The information is forwarded to the UI module on the mobile phone side, so that the corresponding search information (for example, the version number of the new version as shown in Figure 2E), download information (for example, as shown in (a) in Figure 2F) is presented to the user through the application program. The download progress shown in Figure 2J or the download progress shown in (a) in Figure 2J, the download result shown in Figure 2F in (b)), upgrade execution information (for example, as shown in Figure 2G in (a) The installation progress or the installation progress shown in (b) in FIG. 2J , the installation result shown in (b) in FIG. 2G , etc.).

需要说明的是,在图7A、图7B所示的过程中,手机与音箱可以采用远场设备通信或近场设备通信。在图8A、图8B所示的过程中,手机与音箱可以采用近场设备通信。这是由于远场设备通信通常不能传递文件(即手机不能向音箱发送手机下载的升级包)。It should be noted that, in the process shown in FIG. 7A and FIG. 7B , the mobile phone and the sound box may use far-field device communication or near-field device communication. In the process shown in FIG. 8A and FIG. 8B , the mobile phone and the sound box can communicate using a near-field device. This is because far-field device communication usually cannot transfer files (that is, the mobile phone cannot send the upgrade package downloaded by the mobile phone to the speaker).

第一设备(例如,手机)的升级管理模块可以判断当前待升级的第二设备(例如,音箱)是远场设备还是近场设备,进而决定使用近场设备通信接口还是远场设备通信接口完成设备间通信。远场设备和近场设备的判断模式为:软总线提供当前与第一设备连接的全部近场设备的信息,因此可以第一设备可以确定全部近场设备,若当前待升级的第二设备为非近场设备,则认为是远场设备。当然,第二设备也需要判断当前的通信模式是近场设备通信还是远场设备通信,进而决定当前需要使用哪套通信接口。第二设备也可以通过软总线接口确定当前与第二设备连接的全部近场设备的信息,若当前第一设备为非近场设备,则认为是远场设备。The upgrade management module of the first device (for example, a mobile phone) can determine whether the second device (for example, a speaker) to be upgraded is a far-field device or a near-field device, and then decide to use the near-field device communication interface or the far-field device communication interface to complete the upgrade. Communication between devices. The judgment mode of the far-field device and the near-field device is: the soft bus provides the information of all the near-field devices currently connected to the first device, so the first device can determine all the near-field devices, if the second device to be upgraded currently is Non-near-field devices are considered far-field devices. Of course, the second device also needs to determine whether the current communication mode is near-field device communication or far-field device communication, and then decide which communication interface needs to be used currently. The second device may also determine the information of all near-field devices currently connected to the second device through the soft bus interface, and if the current first device is not a near-field device, it is regarded as a far-field device.

示例性的,下面以第一设备为手机,第二设备为音箱,配置信息指定采用音箱上的搜索模块、下载模块和升级执行模块为例,分别对升级包搜索过程、升级包下载过程和升级包执行过程进行说明。Exemplarily, the following assumes that the first device is a mobile phone, the second device is a speaker, and the configuration information specifies the search module, download module and upgrade execution module on the speaker as an example. The upgrade package search process, upgrade package download process and upgrade The package execution process is described.

以升级业务类型为OTA业务为例,升级包(OTA包)搜索过程如图9A所示,包括:Taking the upgrade service type as an OTA service as an example, the upgrade package (OTA package) search process is shown in Figure 9A, including:

901、手机的UI模块通知手机的升级管理模块用户发起OTA升级包搜索。901. The UI module of the mobile phone notifies the upgrade management module of the mobile phone that a user initiates an OTA upgrade package search.

示例性的,手机的UI模块可以集成在应用程序中,用户可以通过应用程序进行相应的升级设置,手机可以通过应用程序的升级管理界面接收用户的升级设置的相应操作。其中,OTA升级包的版本不同于(例如,高于)当前音箱上的OTA包的版本。Exemplarily, the UI module of the mobile phone can be integrated in the application program, the user can perform corresponding upgrade settings through the application program, and the mobile phone can receive corresponding operations of the user's upgrade settings through the upgrade management interface of the application program. Wherein, the version of the OTA upgrade package is different from (for example, higher than) the version of the OTA package on the current speaker.

902、手机的升级管理模块通知音箱的升级管理模块用户发起OTA升级包搜索。902. The upgrade management module of the mobile phone notifies the user of the upgrade management module of the speaker to initiate an OTA upgrade package search.

手机的升级管理模块与音箱的升级管理模块可以采用近场设备通信或远场设备通信。The upgrade management module of the mobile phone and the upgrade management module of the sound box can use near-field device communication or far-field device communication.

903、音箱的升级管理模块启动版本搜索流程。903. The upgrade management module of the speaker starts a version search process.

904、音箱的升级管理模块读取设备厂商配置的模块调度配置信息。904. The upgrade management module of the sound box reads the module scheduling configuration information configured by the device manufacturer.

其中,设备厂商配置的模块调度配置信息可以是音箱厂商固化在音箱中的配置信息。Wherein, the module scheduling configuration information configured by the device manufacturer may be the configuration information solidified in the speaker by the speaker manufacturer.

905、音箱的升级管理模块确认使用本设备的搜索模块。905. The upgrade management module of the sound box confirms that the search module of the device is used.

即音箱中的配置信息规定使用音箱自身的搜索模块。That is, the configuration information in the speaker specifies to use the search module of the speaker itself.

906、音箱的升级管理模块调用本设备的搜索模块。906. The upgrade management module of the sound box calls the search module of the device.

907、音箱的搜索模块发起OTA新版本搜索。907. The search module of the speaker initiates an OTA new version search.

音箱的搜索模块可以从OTA服务器或音箱厂商自有的OTA服务器搜索新版本的OTA包。The search module of the speaker can search the OTA package of the new version from the OTA server or the OTA server owned by the speaker manufacturer.

908、音箱的搜索模块向音箱的升级管理模块发送OTA包新版本信息。908. The search module of the sound box sends the new version information of the OTA package to the upgrade management module of the sound box.

909、音箱的升级管理模块将OTA包新版本信息保存在本地。909. The upgrade management module of the sound box saves the new version information of the OTA package locally.

910、音箱的升级管理模块向手机的升级管理模块发送OTA包新版本信息。910. The upgrade management module of the sound box sends the new version information of the OTA package to the upgrade management module of the mobile phone.

911、手机的升级管理模块向手机的UI模块发送OTA包新版本信息。911. The upgrade management module of the mobile phone sends the new version information of the OTA package to the UI module of the mobile phone.

912、手机的UI模块进行OTA包新版本信息显示。912. The UI module of the mobile phone displays the new version information of the OTA package.

示例性的,如图2E所示,手机可以显示提示文字210,提示用户检查到新版本11.1.01A。Exemplarily, as shown in FIG. 2E , the mobile phone may display prompt text 210 to prompt the user to check the new version 11.1.01A.

其他类型升级业务的升级包搜索过程与图9A类似,本申请不做赘述。The upgrade package search process for other types of upgrade services is similar to that shown in FIG. 9A , and will not be repeated in this application.

OTA业务的升级包下载过程如图9B所示,包括:The upgrade package download process of the OTA service is shown in Figure 9B, including:

920、手机的UI模块通知手机的升级管理模块用户发起OTA升级包下载。920. The UI module of the mobile phone notifies the upgrade management module of the mobile phone that the user initiates an OTA upgrade package download.

示例性的,如图2E所示,手机可以接收用户点击立即升级条目2111的操作,响应于该操作,升级管理界面(即界面209)可以通过相应的升级API接口通知手机的升级管理模块用户发起音箱的OTA升级包下载。或者,如图2I中的(a)所示,手机可以接收用户点击第一房间的电视对应的升级按钮225的操作,响应于该操作,升级管理界面(即界面224)可以通过相应的升级API接口通知手机的升级管理模块用户发起第一房间的电视的OTA升级包下载。Exemplarily, as shown in FIG. 2E , the mobile phone may receive an operation in which the user clicks the upgrade immediately item 2111, and in response to the operation, the upgrade management interface (that is, the interface 209) may notify the upgrade management module of the mobile phone through the corresponding upgrade API interface that the user initiates an upgrade. Speaker OTA upgrade package download. Or, as shown in (a) in Fig. 2I, the mobile phone can receive the operation that the user clicks the upgrade button 225 corresponding to the TV in the first room, and in response to this operation, the upgrade management interface (ie interface 224) can pass the corresponding upgrade API The interface notifies the upgrade management module of the mobile phone that the user initiates the download of the OTA upgrade package of the TV in the first room.

921、手机的升级管理模块通知音箱的升级管理模块用户发起OTA升级包下载。921. The upgrade management module of the mobile phone notifies the user of the upgrade management module of the speaker to initiate an OTA upgrade package download.

922、音箱的升级管理模块启动OTA升级包下载流程。922. The upgrade management module of the speaker starts an OTA upgrade package download process.

923、音箱的升级管理模块读取设备厂商配置的配置信息。923. The upgrade management module of the sound box reads the configuration information configured by the device manufacturer.

924、音箱的升级管理模块确认使用本设备(即音箱)的下载模块。924. The upgrade management module of the sound box confirms that the download module of the device (that is, the sound box) is used.

925、音箱的升级管理模块调用本设备的下载模块。925. The upgrade management module of the sound box calls the download module of the device.

926、音箱的下载模块进行OTA升级包下载。926. The download module of the sound box downloads the OTA upgrade package.

927、音箱的下载模块向音箱的升级管理模块发送OTA升级包的本地缓存地址。927. The download module of the sound box sends the local cache address of the OTA upgrade package to the upgrade management module of the sound box.

928、音箱的升级管理模块将OTA升级包保存在本地。928. The upgrade management module of the sound box saves the OTA upgrade package locally.

音箱的升级管理模块根据OTA升级包的本地缓存地址将OTA升级包保存在本地。The upgrade management module of the speaker saves the OTA upgrade package locally according to the local cache address of the OTA upgrade package.

929、音箱的下载模块向音箱的升级管理模块反馈升级包的下载进展(也可以称为下载进度)。929. The download module of the sound box feeds back the progress of downloading the upgrade package (also referred to as the download progress) to the upgrade management module of the sound box.

930、音箱的升级管理模块向手机的升级管理模块反馈下载进展。930. The upgrade management module of the speaker feeds back the download progress to the upgrade management module of the mobile phone.

931、手机的升级管理模块向手机的UI模块反馈下载进展。931. The upgrade management module of the mobile phone feeds back the download progress to the UI module of the mobile phone.

931a、手机的UI模块进行下载进展显示。931a. The UI module of the mobile phone performs a download progress display.

示例性的,如图2F中的(a)所示,当前下载进度可以是58%。又例如,如图2J中的(a)所示,手机可以通过按钮225显示“下载中”,无需显示具体下载进度。Exemplarily, as shown in (a) in FIG. 2F , the current download progress may be 58%. For another example, as shown in (a) in FIG. 2J , the mobile phone can display "downloading" through the button 225 without displaying the specific downloading progress.

932、音箱的下载模块向音箱的升级管理模块通知OTA升级包下载完成。932. The download module of the sound box notifies the upgrade management module of the sound box that the download of the OTA upgrade package is completed.

933、音箱的升级管理模块向手机的升级管理模块通知OTA升级包下载完成。933. The upgrade management module of the speaker notifies the upgrade management module of the mobile phone that the download of the OTA upgrade package is completed.

934、手机的升级管理模块向手机的UI模块通知OTA升级包下载完成。934. The upgrade management module of the mobile phone notifies the UI module of the mobile phone that the download of the OTA upgrade package is completed.

935、手机的UI模块进行OTA升级包下载完成结果显示。935 . The UI module of the mobile phone completes the download of the OTA upgrade package and displays a result.

示例性的,如图2F中的(b)所示,OTA升级包下载完成后,手机可以通过提示文字214提示用户已下载版本11.1.01A,且可以提示用户是否需要进行安装。Exemplarily, as shown in (b) in FIG. 2F , after the download of the OTA upgrade package is completed, the mobile phone can prompt the user through the prompt text 214 that version 11.1.01A has been downloaded, and can prompt the user whether to install it.

OTA业务的升级包执行过程如图9C所示,包括:The upgrade package execution process of the OTA service is shown in Figure 9C, including:

940、手机的UI模块通知手机的升级管理模块用户发起OTA升级包安装。940. The UI module of the mobile phone notifies the upgrade management module of the mobile phone that the user initiates the installation of the OTA upgrade package.

示例性的,如图2F中的(b)所示,手机可以通过提示文字214提示用户已下载版本11.1.01A,且可以提示用户是否需要进行安装。响应于用户点击按钮215的操作,升级管理界面(即界面212)可以通过相应的升级API接口通知手机的升级管理模块用户发起音箱的OTA升级包安装。Exemplarily, as shown in (b) in FIG. 2F , the mobile phone may prompt the user through the prompt text 214 that the version 11.1.01A has been downloaded, and may prompt the user whether to install it. In response to the user's operation of clicking the button 215, the upgrade management interface (that is, the interface 212) can notify the upgrade management module of the mobile phone through the corresponding upgrade API interface that the user initiates the installation of the OTA upgrade package of the speaker.

或者,手机的升级管理模块确定OTA升级包已下载后,可以自动发起OTA升级包安装。Alternatively, after the upgrade management module of the mobile phone determines that the OTA upgrade package has been downloaded, it may automatically initiate the installation of the OTA upgrade package.

941、手机的升级管理模块通知音箱的升级管理模块用户发起OTA升级包安装。941. The upgrade management module of the mobile phone notifies the user of the upgrade management module of the speaker to initiate OTA upgrade package installation.

942、音箱的升级管理模块启动OTA升级包安装流程。942. The upgrade management module of the speaker starts an OTA upgrade package installation process.

943、音箱的升级管理模块读取设备厂商配置的配置信息。943. The upgrade management module of the sound box reads the configuration information configured by the device manufacturer.

944、音箱的升级管理模块确认使用本设备的升级执行模块。944. The upgrade management module of the sound box confirms that the upgrade execution module of the device is used.

945、音箱的升级管理模块调用本设备的升级执行模块。945. The upgrade management module of the sound box calls the upgrade execution module of the device.

946、音箱的升级执行模块安装OTA升级包。946. Install an OTA upgrade package in the upgrade execution module of the sound box.

947、音箱的升级执行模块向音箱的升级管理模块反馈安装进展(也可以称为下载进度)。947. The upgrade execution module of the sound box feeds back the installation progress (also called the download progress) to the upgrade management module of the sound box.

948、音箱的升级管理模块向手机的升级管理模块反馈安装进展。948. The upgrade management module of the speaker feeds back the installation progress to the upgrade management module of the mobile phone.

949、手机的升级管理模块向手机的UI模块反馈安装进展。949. The upgrade management module of the mobile phone feeds back the installation progress to the UI module of the mobile phone.

950、手机的UI模块进行安装进展显示。950. Displaying progress of the UI module of the mobile phone being installed.

示例性的,如图2G中的(a)所示,当前安装进度可以是90%。或者,如图2J中的(b)所示,手机可以通过按钮225显示“安装中”,无需显示具体安装进度。Exemplarily, as shown in (a) in FIG. 2G , the current installation progress may be 90%. Or, as shown in (b) in FIG. 2J , the mobile phone can display "Installing" through the button 225 without displaying the specific installation progress.

951、音箱的升级执行模块向音箱的升级管理模块反馈安装完成。951. The upgrade execution module of the sound box feeds back to the upgrade management module of the sound box that the installation is completed.

952、音箱的升级管理模块进行安装完成信息记录。952 . Record the installation completion information of the upgrade management module of the sound box.

953、音箱的升级管理模块向手机的升级管理模块反馈安装完成。953. The upgrade management module of the speaker feeds back that the installation is completed to the upgrade management module of the mobile phone.

954、手机的升级管理模块向手机的UI模块反馈安装完成。954. The upgrade management module of the mobile phone reports to the UI module of the mobile phone that the installation is completed.

955、手机的UI模块进行安装完成结果显示。955. The UI module of the mobile phone is installed and a result is displayed.

示例性的,如图2G中的(b)所示,手机可以通过提示文字217提示用户音箱的固件(OTA包)已升级到版本11.1.01A。或者,如图2I中的(c)所示,界面224中可以不再显示第一房间的电视,以表示第一房间的OTA升级包安装完成。Exemplarily, as shown in (b) in FIG. 2G , the mobile phone may prompt the user through prompt text 217 that the firmware (OTA package) of the speaker has been upgraded to version 11.1.01A. Or, as shown in (c) in FIG. 2I , the TV in the first room may no longer be displayed on the interface 224 to indicate that the OTA upgrade package installation in the first room is completed.

下面以第一设备为手机,第二设备为耳机,配置信息指定采用手机上的搜索模块和下载模块,以及耳机上的升级执行模块为例,分别对升级包搜索过程、升级包下载过程和升级包执行过程进行说明。In the following, the first device is a mobile phone, the second device is a headset, and the configuration information specifies the search module and download module on the mobile phone, and the upgrade execution module on the headset as an example. The upgrade package search process, upgrade package download process and upgrade The package execution process is described.

以升级业务类型为OTA业务为例,升级包(OTA包)搜索过程如图10A所示,包括:Taking the upgrade service type as an OTA service as an example, the upgrade package (OTA package) search process is shown in Figure 10A, including:

1001、手机的UI模块向手机的升级管理模块通知用户发起OTA升级包搜索。1001. The UI module of the mobile phone notifies the upgrade management module of the mobile phone that the user initiates an OTA upgrade package search.

1002、手机的升级管理模块向耳机的升级管理模块通知用户发起OTA升级包搜索。1002. The upgrade management module of the mobile phone notifies the user to initiate an OTA upgrade package search to the upgrade management module of the earphone.

手机的升级管理模块与耳机的升级管理模块可以采用近场设备通信或远场设备通信。The upgrade management module of the mobile phone and the upgrade management module of the headset can use near-field device communication or far-field device communication.

1003、耳机的升级管理模块启动OTA升级包搜索流程。1003. The upgrade management module of the headset starts an OTA upgrade package search process.

1004、耳机的升级管理模块读取设备厂商配置的配置信息。1004. The upgrade management module of the headset reads the configuration information configured by the device manufacturer.

1005、耳机的升级管理模块确认使用手机的搜索模块。1005. The upgrade management module of the earphone confirms that the search module of the mobile phone is used.

1006、耳机的升级管理模块通过手机的升级管理模块调用手机的搜索模块。1006. The upgrade management module of the earphone calls the search module of the mobile phone through the upgrade management module of the mobile phone.

1007、手机的升级管理模块调用手机的搜索模块。1007. The upgrade management module of the mobile phone calls the search module of the mobile phone.

1008、手机的搜索模块发起OTA升级包搜索。1008. The search module of the mobile phone initiates an OTA upgrade package search.

耳机的搜索模块可以从OTA服务器或耳机厂商自有的OTA服务器搜索新版本的OTA包。The search module of the earphone can search the OTA package of the new version from the OTA server or the OTA server owned by the earphone manufacturer.

1009、手机的搜索模块向手机的升级管理模块反馈OTA升级包版本信息。1009. The search module of the mobile phone feeds back the version information of the OTA upgrade package to the upgrade management module of the mobile phone.

1010、手机的升级管理模块向耳机的升级管理模块反馈OTA升级包版本信息。1010. The upgrade management module of the mobile phone feeds back the version information of the OTA upgrade package to the upgrade management module of the earphone.

1011、耳机的升级管理模块将OTA升级包版本信息保存在本地。1011. The upgrade management module of the headset saves the version information of the OTA upgrade package locally.

即耳机的升级管理模块将OTA包版本信息保存在耳机上。That is, the upgrade management module of the headset saves the OTA package version information on the headset.

1012、耳机的升级管理模块向手机的升级管理模块发送升级包描述文件信息。1012. The upgrade management module of the earphone sends the upgrade package description file information to the upgrade management module of the mobile phone.

需要说明的是,手机的搜索模块完成OTA升级包搜索后,不会对OTA升级包版本信息进行处理,由手机的升级管理模块直接传递给耳机的升级管理模块,耳机的升级管理模块可以从OTA升级包版本信息中解析出升级包描述文件信息,再将升级包描述文件信息传递给手机的升级管理模块。It should be noted that after the search module of the mobile phone completes the search for the OTA upgrade package, it will not process the version information of the OTA upgrade package, and the upgrade management module of the mobile phone will directly pass it to the upgrade management module of the earphone. The upgrade package description file information is analyzed from the upgrade package version information, and then the upgrade package description file information is passed to the upgrade management module of the mobile phone.

1013、手机的升级管理模块向手机的UI模块发送升级包描述文件信息。1013. The upgrade management module of the mobile phone sends the upgrade package description file information to the UI module of the mobile phone.

1014、手机的UI模块进行OTA升级包版本信息显示。1014. The UI module of the mobile phone displays the version information of the OTA upgrade package.

手机的UI模块基于升级包描述文件信息显示OTA升级包的版本信息。示例性的,如图2E所示,手机可以显示提示文字210,提示用户检查到新版本11.1.01A。The UI module of the mobile phone displays the version information of the OTA upgrade package based on the upgrade package description file information. Exemplarily, as shown in FIG. 2E , the mobile phone may display prompt text 210 to prompt the user to check the new version 11.1.01A.

OTA业务的升级包下载过程如图10B所示,包括:The upgrade package download process of the OTA service is shown in Figure 10B, including:

1021、手机的UI模块向手机的升级管理模块通知用户发起OTA升级包下载。1021. The UI module of the mobile phone notifies the user to initiate an OTA upgrade package download to the upgrade management module of the mobile phone.

示例性的,如图2E所示,手机可以接收用户点击立即升级条目2111的操作,响应于该操作,升级管理界面(即界面209)可以通过相应的升级API接口通知手机的升级管理模块用户发起音箱的OTA升级包下载。或者,如图2I中的(a)所示,手机可以接收用户点击第一房间的电视对应的升级按钮225的操作,响应于该操作,升级管理界面(即界面224)可以通过相应的升级API接口通知手机的升级管理模块用户发起第一房间的电视的OTA升级包下载。Exemplarily, as shown in FIG. 2E , the mobile phone may receive an operation in which the user clicks the upgrade immediately item 2111, and in response to the operation, the upgrade management interface (that is, the interface 209) may notify the upgrade management module of the mobile phone through the corresponding upgrade API interface that the user initiates an upgrade. Speaker OTA upgrade package download. Or, as shown in (a) in Fig. 2I, the mobile phone can receive the operation that the user clicks the upgrade button 225 corresponding to the TV in the first room, and in response to this operation, the upgrade management interface (ie interface 224) can pass the corresponding upgrade API The interface notifies the upgrade management module of the mobile phone that the user initiates the download of the OTA upgrade package of the TV in the first room.

1022、手机的升级管理模块向耳机的升级管理模块通知用户发起OTA升级包下载。1022. The upgrade management module of the mobile phone notifies the user to initiate an OTA upgrade package download to the upgrade management module of the headset.

1023、耳机的升级管理模块启动OTA升级包搜索流程。1023. The upgrade management module of the headset starts an OTA upgrade package search process.

1024、耳机的升级管理模块读取设备厂商配置的配置信息。1024. The upgrade management module of the headset reads the configuration information configured by the device manufacturer.

1025、耳机的升级管理模块确认使用手机的下载模块。1025. The upgrade management module of the earphone confirms that the download module of the mobile phone is used.

1026、耳机的升级管理模块通过手机的升级管理模块调用手机的下载模块。1026. The upgrade management module of the earphone calls the download module of the mobile phone through the upgrade management module of the mobile phone.

1027、手机的升级管理模块调用手机的下载模块。1027. The upgrade management module of the mobile phone calls the download module of the mobile phone.

1028、手机的下载模块进行OTA升级包下载。1028. The download module of the mobile phone downloads the OTA upgrade package.

1029、手机的下载模块向手机的升级管理模块发送OTA升级包的缓存地址。1029. The download module of the mobile phone sends the cache address of the OTA upgrade package to the upgrade management module of the mobile phone.

1030、手机的升级管理模块将OTA升级包保存在本地。1030. The upgrade management module of the mobile phone stores the OTA upgrade package locally.

1031、手机的下载模块向手机的升级管理模块反馈下载进度。1031. The download module of the mobile phone feeds back the download progress to the upgrade management module of the mobile phone.

1032、手机的升级管理模块向耳机的升级管理模块反馈下载进度。1032. The upgrade management module of the mobile phone feeds back the download progress to the upgrade management module of the earphone.

1032a、耳机的升级管理模块向手机的升级管理模块反馈下载进度。1032a. The upgrade management module of the headset feeds back the download progress to the upgrade management module of the mobile phone.

1033、手机的升级管理模块向手机的UI模块反馈下载进度。1033. The upgrade management module of the mobile phone feeds back the download progress to the UI module of the mobile phone.

1034、手机的UI模块进行下载进度显示。1034. The UI module of the mobile phone displays the download progress.

示例性的,如图2F中的(a)所示,当前下载进度可以是58%。又例如,如图2J中的(a)所示,手机可以通过按钮225显示“下载中”,无需显示具体下载进度。Exemplarily, as shown in (a) in FIG. 2F , the current download progress may be 58%. For another example, as shown in (a) in FIG. 2J , the mobile phone can display "downloading" through the button 225 without displaying the specific downloading progress.

1035、手机的下载模块向手机的升级管理模块反馈下载完成。1035. The download module of the mobile phone feeds back that the download is completed to the upgrade management module of the mobile phone.

1036、手机的升级管理模块向耳机的升级管理模块发送OTA升级包。1036. The upgrade management module of the mobile phone sends an OTA upgrade package to the upgrade management module of the headset.

1037、耳机的升级管理模块将OTA升级包保存在本地。1037. The upgrade management module of the headset saves the OTA upgrade package locally.

1037a、耳机的升级管理模块向手机的升级管理模块反馈OTA升级包下载完成。1037a. The upgrade management module of the earphone feeds back to the upgrade management module of the mobile phone that the download of the OTA upgrade package is completed.

需要说明的是,手机的下载模块完成OTA升级包下载后,不会对OTA升级包进行处理,由手机的升级管理模块将OTA升级包直接传递给耳机的升级管理模块,由耳机的升级管理模块最终确定OTA升级包下载完成,然后,耳机的升级管理模块向手机的升级管理模块反馈OTA升级包下载完成。It should be noted that after the download module of the mobile phone completes the download of the OTA upgrade package, it will not process the OTA upgrade package, and the upgrade management module of the mobile phone will directly pass the OTA upgrade package to the upgrade management It is finally determined that the download of the OTA upgrade package is completed, and then, the upgrade management module of the earphone feeds back the download completion of the OTA upgrade package to the upgrade management module of the mobile phone.

1038、手机的升级管理模块向手机的UI模块反馈OTA升级包下载完成。1038. The upgrade management module of the mobile phone feeds back to the UI module of the mobile phone that the download of the OTA upgrade package is completed.

1039、手机的UI模块进行OTA升级包下载完成结果显示。1039. The UI module of the mobile phone completes the downloading of the OTA upgrade package and displays the result.

示例性的,如图2F中的(b)所示,OTA升级包下载完成后,手机可以通过提示文字214提示用户已下载版本11.1.01A。Exemplarily, as shown in (b) in FIG. 2F , after the download of the OTA upgrade package is completed, the mobile phone may prompt the user through a prompt text 214 that version 11.1.01A has been downloaded.

蓝牙类设备的升级包执行过程可以参考图9C所示的流程,在此不做赘述。For the execution process of the upgrade package of the Bluetooth device, reference may be made to the flow shown in FIG. 9C , which will not be repeated here.

基于本申请实施例提供的方法,第一设备(例如,手机)可以采用同一套升级框架对不同类型的第二设备(例如,音箱或耳机)进行升级,手机的存储空间消耗小,并且手机可以通过升级框架对不同类型的第二设备提供不同的能力辅助。例如,针对仅具有蓝牙、NFC等通信能力的耳机,手机可以辅助耳机搜索和下载升级包。又例如,针对不具有触摸屏的设备或者用户交互操作繁琐的设备(例如,电视机通过遥控器操作的过程繁琐),手机可以为电视提供用户交互能力。又例如,针对无法支持差分还原能力和安全校验能力的第二设备,手机可以为第二设备提供安全校验能力,例如手机可以辅助第二设备对升级包进行HTTPS安全协议和PKI认证。这样,能够实现第一设备对第二设备辅助升级的有效扩展。Based on the method provided in the embodiment of the present application, the first device (for example, a mobile phone) can use the same set of upgrade frameworks to upgrade different types of second devices (for example, speakers or earphones), the storage space consumption of the mobile phone is small, and the mobile phone can Different capability assistance is provided for different types of second devices through the upgrade framework. For example, for a headset that only has communication capabilities such as Bluetooth and NFC, the mobile phone can assist the headset to search for and download an upgrade package. For another example, for a device without a touch screen or a device with cumbersome user interaction operations (for example, the process of operating a TV through a remote control is cumbersome), the mobile phone can provide the TV with user interaction capabilities. For another example, for a second device that cannot support differential restoration and security verification capabilities, the mobile phone can provide security verification capabilities for the second device, for example, the mobile phone can assist the second device to perform HTTPS security protocol and PKI authentication on the upgrade package. In this way, the effective extension of the first device to assist the upgrade of the second device can be realized.

如图11所示,本申请实施例提供一种软件升级方法,应用于包括第一设备、第二设备和服务器的系统,第一设备包括第一模块集合,第一模块集合包括第一模块和第二模块,第二设备包括第二模块集合和第一配置信息,第二模块集合是第一模块集合的子集,包括:As shown in Figure 11, the embodiment of the present application provides a software upgrade method, which is applied to a system including a first device, a second device, and a server. The first device includes a first module set, and the first module set includes a first module and a The second module, the second device includes a second module set and first configuration information, the second module set is a subset of the first module set, including:

1101、第二设备确定第二设备的第一软件待升级,第一软件当前的版本信息为第一版本信息。1101. The second device determines that the first software of the second device is to be upgraded, and the current version information of the first software is the first version information.

在步骤1101之前,还可以包括如下步骤:第一设备在应用程序的第一界面显示提示信息,提示信息用于提示第二设备的第一软件待升级;第一设备接收用户的第一操作,第一操作用于升级第二设备的第一软件;第一设备向第二设备发送通知消息,通知消息用于指示第一软件待升级。Before step 1101, the following steps may also be included: the first device displays prompt information on the first interface of the application program, and the prompt information is used to prompt the first software of the second device to be upgraded; the first device receives the user's first operation, The first operation is used to upgrade the first software of the second device; the first device sends a notification message to the second device, and the notification message is used to indicate that the first software is to be upgraded.

其中,第一软件的类型包括固件、补丁、软件开发工具包、插件或设备参数中的至少一个。第一配置信息是第二设备的生产厂商提供的。或者,第一配置信息是第二设备根据第二设备的能力信息和第一设备的能力信息确定的;其中,第二设备的能力信息包括第二设备的通信能力、处理能力、显示能力中的至少一种,第一设备的能力信息包括第一设备的通信能力、处理能力、显示能力中的至少一种。Wherein, the type of the first software includes at least one of firmware, patch, software development kit, plug-in or device parameter. The first configuration information is provided by the manufacturer of the second device. Alternatively, the first configuration information is determined by the second device according to the capability information of the second device and the capability information of the first device; wherein, the capability information of the second device includes communication capability, processing capability, and display capability of the second device. At least one, the capability information of the first device includes at least one of communication capability, processing capability, and display capability of the first device.

1102、第二设备根据第一配置信息确定调度第一设备的第一模块从服务器搜索第一软件的第二版本信息,第二版本信息不同于第一版本信息。1102. The second device determines and schedules the first module of the first device to search for second version information of the first software from the server according to the first configuration information, where the second version information is different from the first version information.

其中,第一模块可以是前文所述的升级包搜索模块。Wherein, the first module may be the upgrade package search module mentioned above.

1103、第一设备的第一模块从服务器搜索第一软件的第二版本信息。1103. The first module of the first device searches for the second version information of the first software from the server.

示例性的,可以向第一模块输入第二设备的标识信息和第一软件的类型信息,第一模块输出第二版本信息的搜索结果。Exemplarily, the identification information of the second device and the type information of the first software may be input to the first module, and the first module outputs the search result of the second version information.

可选的,第一模块还输出第二版本信息、第二版本信息对应的升级包的统一资源定位器地址信息、升级包大小信息或更新日志信息中的至少一个。Optionally, the first module further outputs at least one of the second version information, URL address information of the upgrade package corresponding to the second version information, size information of the upgrade package, or update log information.

1104、第二设备根据第一配置信息确定调度第一设备的第二模块从服务器下载第二版本信息对应的升级包。1104. The second device determines and schedules the second module of the first device to download the upgrade package corresponding to the second version information from the server according to the first configuration information.

其中,第二模块可以是前文所述的升级包下载模块。Wherein, the second module may be the above-mentioned upgrade package download module.

1105、第一设备的第二模块从服务器下载第二版本信息对应的升级包。1105. The second module of the first device downloads an upgrade package corresponding to the second version information from the server.

示例性的,可以向第二模块输入第二设备的标识信息、第二版本信息、第二版本信息对应的升级包的统一资源定位器地址信息或第一软件的类型信息中的至少一个,第二模块输出第二版本信息对应的升级包的下载结果。Exemplarily, at least one of the identification information of the second device, the second version information, the Uniform Resource Locator address information of the upgrade package corresponding to the second version information, or the type information of the first software may be input to the second module. The second module outputs the download result of the upgrade package corresponding to the second version information.

可选的,第二模块还输出第二版本信息对应的升级包的缓存地址或第二版本信息对应的升级包的下载进度中的至少一个。Optionally, the second module further outputs at least one of the cache address of the upgrade package corresponding to the second version information or the download progress of the upgrade package corresponding to the second version information.

可选的,第一设备可以向第二设备发送第二版本信息对应的升级包的下载进度。Optionally, the first device may send the download progress of the upgrade package corresponding to the second version information to the second device.

进一步的,第一模块集合还包括第三模块,第三模块可以是前文所述的升级包安全检验模块。第二设备可以根据第一配置信息确定调度第三模块校验第二版本信息对应的升级包;第一设备的第三模块校验第二版本信息对应的升级包。Further, the first module set further includes a third module, and the third module may be the aforementioned upgrade package security verification module. The second device may determine and schedule the third module to check the upgrade package corresponding to the second version information according to the first configuration information; the third module of the first device checks the upgrade package corresponding to the second version information.

进一步的,第一模块集合还包括第四模块,第四模块可以是前文所述的升级包差分/压缩还原模块。第二设备可以根据第一配置信息确定调度第四模块对第二版本信息对应的升级包进行差分还原和/或压缩还原;第一设备的第四模块对第二版本信息对应的升级包进行差分还原和/或压缩还原。Further, the first module set further includes a fourth module, which may be the upgrade package difference/compression restoration module mentioned above. The second device may determine and schedule the fourth module to perform differential restoration and/or compression restoration on the upgrade package corresponding to the second version information according to the first configuration information; the fourth module of the first device performs differential restoration on the upgrade package corresponding to the second version information Restore and/or Compress Restore.

1106、第一设备向第二设备发送第二版本信息对应的升级包。1106. The first device sends an upgrade package corresponding to the second version information to the second device.

第一设备基于近场设备通信协议向第二设备发送第二版本信息对应的升级包;其中,近场设备通信协议包括无线保真协议、蓝牙协议或近场通信协议中的至少一个。The first device sends an upgrade package corresponding to the second version information to the second device based on a near-field device communication protocol; wherein the near-field device communication protocol includes at least one of a Wi-Fi protocol, a Bluetooth protocol, or a near-field communication protocol.

1107、第二设备从第一设备接收第二版本信息对应的升级包。1107. The second device receives an upgrade package corresponding to the second version information from the first device.

第二设备可以基于近场设备通信协议从第一设备接收第二版本信息对应的升级包。The second device may receive an upgrade package corresponding to the second version information from the first device based on the near-field device communication protocol.

1108、第二设备安装第二版本信息对应的升级包。1108. The second device installs an upgrade package corresponding to the second version information.

可选的,第二设备可以向第一设备发送第二版本信息对应的升级包的安装进度。Optionally, the second device may send the installation progress of the upgrade package corresponding to the second version information to the first device.

在一种可能的设计中,上述系统还包括第三设备,第三设备包括第三模块集合和第二配置信息,第三模块集合是第一模块集合的子集,且第三模块集合与第二模块集合不同,上述方法还包括:In a possible design, the above system further includes a third device, the third device includes a third module set and second configuration information, the third module set is a subset of the first module set, and the third module set and the first The two module sets are different, and the above method also includes:

1109、第三设备确定第三设备的第二软件待升级,第二软件当前的版本信息为第三版本信息。1109. The third device determines that the second software of the third device is to be upgraded, and the current version information of the second software is the third version information.

1110、第三设备根据第二配置信息确定调度第一设备的第一模块从服务器搜索第二软件的第四版本信息,第四版本信息不同于第一版本信息。1110. The third device determines and schedules the first module of the first device to search for fourth version information of the second software from the server according to the second configuration information, where the fourth version information is different from the first version information.

1111、第一设备的第一模块从服务器搜索第二软件的第四版本信息。1111. The first module of the first device searches for fourth version information of the second software from the server.

1112、第三设备根据第二配置信息确定调度第一设备的第二模块从服务器下载第四版本信息对应的升级包;1112. The third device determines and schedules the second module of the first device to download the upgrade package corresponding to the fourth version information from the server according to the second configuration information;

1113、第一设备的第二模块从服务器下载第四版本信息对应的升级包。1113. The second module of the first device downloads an upgrade package corresponding to the fourth version information from the server.

1114、第一设备向第三设备发送第四版本信息对应的升级包。1114. The first device sends an upgrade package corresponding to the fourth version information to the third device.

1115、第三设备从第一设备接收第四版本信息对应的升级包。1115. The third device receives an upgrade package corresponding to the fourth version information from the first device.

1116、第三设备安装第四版本信息对应的升级包。1116. The third device installs an upgrade package corresponding to the fourth version information.

其中,步骤1109-步骤1116的过程可以参考步骤1101-步骤1118的相关描述,在此不做赘述。Wherein, for the process of step 1109-step 1116, reference may be made to the relevant description of step 1101-step 1118, which will not be repeated here.

需要说明的是,图11所述的实施例中的第一设备可以为前述实施例中的手机,第二设备可以为音箱,第三设备可以为耳机,图11所述的实施例中未详述的部分,可以参考前述实施例,在此不做赘述。It should be noted that the first device in the embodiment described in FIG. 11 may be the mobile phone in the foregoing embodiments, the second device may be a sound box, and the third device may be an earphone, which is not detailed in the embodiment described in FIG. 11 For the above-mentioned part, reference may be made to the foregoing embodiments, and details are not repeated here.

基于本申请实施例提供的方法,第一设备(例如,手机)可以采用同一套升级框架对不同类型的第二设备(例如,音箱或耳机)进行升级,手机的存储空间消耗小,并且手机可以通过升级框架对不同类型的第二设备提供不同的能力辅助。例如,针对仅具有蓝牙、NFC等通信能力的耳机,手机可以辅助耳机搜索和下载升级包。又例如,针对不具有触摸屏的设备或者用户交互操作繁琐的设备(例如,电视机通过遥控器操作的过程繁琐),手机可以为电视提供用户交互能力。又例如,针对无法支持差分还原能力和安全校验能力的第二设备,手机可以为第二设备提供安全校验能力,例如手机可以辅助第二设备对升级包进行超文本传输安全协议(hyper text transfer protocol over secure socket,HTTPS)安全协议和公开密钥基础设施(public key infrastructure,PKI)认证。这样,能够实现第一设备对第二设备辅助升级的有效扩展。Based on the method provided in the embodiment of the present application, the first device (for example, a mobile phone) can use the same set of upgrade frameworks to upgrade different types of second devices (for example, speakers or earphones), the storage space consumption of the mobile phone is small, and the mobile phone can Different capability assistance is provided for different types of second devices through the upgrade framework. For example, for a headset that only has communication capabilities such as Bluetooth and NFC, the mobile phone can assist the headset to search for and download an upgrade package. For another example, for a device without a touch screen or a device with cumbersome user interaction operations (for example, the process of operating a TV through a remote control is cumbersome), the mobile phone can provide the TV with user interaction capabilities. For another example, for a second device that cannot support differential restoration capability and security verification capability, the mobile phone can provide the security verification capability for the second device. transfer protocol over secure socket (HTTPS) security protocol and public key infrastructure (public key infrastructure, PKI) authentication. In this way, the effective extension of the first device to assist the upgrade of the second device can be realized.

本申请另一实施例提供一种芯片系统,如图12所示,该芯片系统包括至少一个处理器1201和至少一个接口电路1202。处理器1201和接口电路1202可通过线路互联。例如,接口电路1202可用于从其它装置(例如,第一设备的存储器,第二设备的存储器或第三设备的存储器)接收信号。又例如,接口电路1202可用于向其它装置(例如处理器1201)发送信号。Another embodiment of the present application provides a chip system. As shown in FIG. 12 , the chip system includes at least one processor 1201 and at least one interface circuit 1202 . The processor 1201 and the interface circuit 1202 may be interconnected through wires. For example, the interface circuit 1202 may be used to receive signals from other means (eg, a memory of a first device, a memory of a second device, or a memory of a third device). As another example, the interface circuit 1202 may be used to send signals to other devices (such as the processor 1201).

例如,接口电路1202可读取设备中存储器中存储的指令,并将该指令发送给处理器1201。当所述指令被处理器1201执行时,可使得第一设备或第二设备(如图1B所示的电子设备200)执行上述实施例中的各个步骤。For example, the interface circuit 1202 may read instructions stored in a memory in the device and send the instructions to the processor 1201 . When the instructions are executed by the processor 1201, the first device or the second device (such as the electronic device 200 shown in FIG. 1B ) may be made to execute various steps in the foregoing embodiments.

当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。Of course, the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.

本申请另一些实施例提供了一种第一设备(如图1B所示的电子设备200),该第一设备可以包括:通信模块、存储器和一个或多个处理器。该通信模块、存储器与处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。Other embodiments of the present application provide a first device (such as the electronic device 200 shown in FIG. 1B ), where the first device may include: a communication module, a memory, and one or more processors. The communication module, memory and processor are coupled. The memory is used to store computer program code comprising computer instructions.

本申请另一实施例提供一种第二设备,如图13所示,第二设备1300包括通信模块1303、存储器1302和一个或多个处理器1301。该通信模块1303、存储器1302与处理器1201耦合。其中,存储器1302用于存储计算机程序代码,计算机程序代码包括计算机指令。当计算机指令被处理器1301执行时,使得第二设备1300执行上述各方法实施例中第二设备执行的各个功能或者步骤。Another embodiment of the present application provides a second device. As shown in FIG. 13 , the second device 1300 includes a communication module 1303 , a memory 1302 and one or more processors 1301 . The communication module 1303 , the memory 1302 are coupled with the processor 1201 . Wherein, the memory 1302 is used for storing computer program codes, and the computer program codes include computer instructions. When the computer instructions are executed by the processor 1301, the second device 1300 is made to perform various functions or steps performed by the second device in the foregoing method embodiments.

本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当所述计算机指令在第一设备(如图1B所示的电子设备200)上运行时,使得电子设备200执行上述方法实施例中第一设备(例如,手机)执行的各个功能或者步骤。当所述计算机指令在第二设备(如图13所示的第二设备1300)上运行时,使得第二设备1300执行上述方法实施例中第二设备(例如,音箱或耳机)执行的各个功能或者步骤。The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are run on the first device (such as the electronic device 200 shown in FIG. 1B ), the electronic The device 200 executes various functions or steps performed by the first device (for example, a mobile phone) in the foregoing method embodiments. When the computer instructions are run on the second device (such as the second device 1300 shown in FIG. 13 ), the second device 1300 is made to execute the various functions performed by the second device (for example, speaker or earphone) in the above method embodiments. or steps.

本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中第一设备(例如,手机)或第二设备(例如,音箱或耳机)执行的各个功能或者步骤。The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is made to execute the first device (for example, a mobile phone) or the second device (for example, a speaker) in the above method embodiment. or earphones) perform various functions or steps.

通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be assigned by Completion of different functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application. The above-mentioned storage medium includes: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, and other various media that can store program codes.

以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above content is only the specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application shall be covered within the protection scope of the application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (19)

1. A software upgrade method applied to a system including a first device, a second device and a server, wherein the first device includes a first module set including a first module and a second module, the second device includes a second module set and first configuration information, and the second module set is a subset of the first module set, the method comprising:
the second equipment determines that first software of the second equipment is to be upgraded, wherein the current version information of the first software is first version information;
the second device determines to schedule the first module of the first device to search the server for second version information of the first software according to the first configuration information, wherein the second version information is different from the first version information; wherein the first configuration information is determined by the second device according to the capability information of the second device and the capability information of the first device; the capability information of the second device comprises at least one of communication capability, processing capability and display capability of the second device, and the capability information of the first device comprises at least one of communication capability, processing capability and display capability of the first device;
the first module of the first device searching the server for the second version information of the first software;
the second equipment determines to schedule the second module of the first equipment to download the upgrade package corresponding to the second version information from the server according to the first configuration information;
the second module of the first device downloads the upgrade package corresponding to the second version information from the server;
the first equipment sends an upgrade package corresponding to the second version information to the second equipment;
the second equipment receives the upgrade package corresponding to the second version information from the first equipment;
and the second equipment installs the upgrade package corresponding to the second version information.
2. The method of claim 1, wherein the system further comprises a third device comprising a third set of modules and second configuration information, wherein the third set of modules is a subset of the first set of modules, and wherein the third set of modules is different from the second set of modules, the method further comprising:
the third equipment determines that second software of the third equipment is to be upgraded, wherein the current version information of the second software is third version information;
the third device determines to schedule the first module of the first device to search for fourth version information of the second software from the server according to the second configuration information, wherein the fourth version information is different from the first version information;
the first module of the first device searching the server for the fourth version information of the second software;
the third equipment determines to schedule the second module of the first equipment to download the upgrade package corresponding to the fourth version information from the server according to the second configuration information;
the second module of the first device downloads the upgrade package corresponding to the fourth version information from the server;
the first equipment sends an upgrade package corresponding to the fourth version information to the third equipment;
the third equipment receives the upgrade package corresponding to the fourth version information from the first equipment;
and the third equipment installs the upgrade package corresponding to the fourth version information.
3. The method of claim 1 or 2, wherein the first set of modules further comprises a third module, the method further comprising:
the second equipment determines to schedule the third module of the first equipment to check the upgrade package corresponding to the second version information according to the first configuration information;
and the third module of the first equipment verifies the upgrade package corresponding to the second version information.
4. The method of claim 3, wherein the first set of modules further comprises a fourth module, the method further comprising:
the second device determines to schedule the fourth module of the first device to perform differential restoration and/or compression restoration on the upgrade package corresponding to the second version information according to the first configuration information;
and the fourth module of the first device performs differential restoration and/or compression restoration on the upgrade package corresponding to the second version information.
5. The method of any of claims 1, 2, and 4, wherein the first module of the first device searching for second version information of the first software from the server comprises:
and inputting the identification information of the second device and the type information of the first software to the first module, and outputting the search result of the second version information by the first module.
6. The method of claim 5,
the first module further outputs at least one of the second version information, uniform resource locator address information of an upgrade package corresponding to the second version information, upgrade package size information, or update log information.
7. The method according to any one of claims 1, 2, 4 and 6, wherein the downloading, by the second module of the first device, the upgrade package corresponding to the second version information from the server includes:
inputting at least one of identification information of the second device, the second version information, uniform resource locator address information of an upgrade package corresponding to the second version information, or type information of the first software to the second module, and outputting a download result of the upgrade package corresponding to the second version information by the second module.
8. The method of claim 7,
the second module further outputs at least one of a cache address of the upgrade package corresponding to the second version information or a download progress of the upgrade package corresponding to the second version information.
9. The method of any one of claims 1, 2, 4, 6, 8,
the first set of modules or the second set of modules are integrated in an SDK.
10. The method of any one of claims 1, 2, 4, 6, and 8, wherein before the second device determines that the first software of the second device is to be upgraded, the method further comprises:
the first equipment displays prompt information on a first interface of an application program, wherein the prompt information is used for prompting that first software of the second equipment is to be upgraded;
the first device receives a first operation of a user, wherein the first operation is used for upgrading the first software of the second device;
and the first equipment sends a notification message to the second equipment, wherein the notification message is used for indicating that the first software is to be upgraded.
11. The method according to any one of claims 1, 2, 4, 6, and 8, wherein the sending, by the first device, the upgrade package corresponding to the second version information to the second device includes:
the first equipment sends an upgrade packet corresponding to the second version information to the second equipment based on a near field equipment communication protocol; wherein the near field device communication protocol comprises at least one of a wireless fidelity protocol, a Bluetooth protocol, or a near field communication protocol.
12. The method of any one of claims 1, 2, 4, 6, 8, further comprising:
and the first equipment sends the download progress of the upgrade package corresponding to the second version information to the second equipment.
13. The method of any one of claims 1, 2, 4, 6, 8, further comprising:
and the second equipment sends the installation progress of the upgrade package corresponding to the second version information to the first equipment.
14. The method according to any one of claims 1, 2, 4, 6, 8,
the type of the first software includes at least one of firmware, a patch, a software development kit, a plug-in, or a device parameter.
15. The method according to any one of claims 1, 2, 4, 6, 8,
the first configuration information is provided by a manufacturer of the second device.
16. A software upgrading method applied to a first device, wherein the first device comprises a first module set, the first module set comprises a first module and a second module, and the method comprises the following steps:
the first equipment determines that first software of second equipment is to be upgraded, wherein the current version information of the first software is first version information; wherein the second device comprises a second set of modules and first configuration information, the second set of modules being a subset of the first set of modules, the first configuration information being determined by the second device from capability information of the second device and capability information of the first device; the capability information of the second device comprises at least one of communication capability, processing capability and display capability of the second device, and the capability information of the first device comprises at least one of communication capability, processing capability and display capability of the first device;
the first module of the first device searches for second version information of the first software from a server;
the second module of the first device downloads the upgrade package corresponding to the second version information from the server;
and the first equipment sends the upgrade package corresponding to the second version information to the second equipment.
17. A method of upgrading software, comprising:
the method comprises the steps that a second device determines that first software of the second device is to be upgraded, wherein current version information of the first software is first version information;
the second equipment determines to schedule a first module of the first equipment to search second version information of the first software from a server according to first configuration information, wherein the second version information is different from the first version information; wherein the first configuration information is determined by the second device according to the capability information of the second device and the capability information of the first device; the capability information of the second device comprises at least one of communication capability, processing capability and display capability of the second device, and the capability information of the first device comprises at least one of communication capability, processing capability and display capability of the first device;
the second equipment determines to schedule a second module of the first equipment to download the upgrade package corresponding to the second version information from the server according to the first configuration information;
the second equipment receives the upgrade package corresponding to the second version information from the first equipment;
and the second equipment installs the upgrade package corresponding to the second version information.
18. A software upgrade system, comprising a first device performing the method of any one of claims 1-16, a second device performing the method of any one of claims 1-15 or 17, and a server.
19. A computer-readable storage medium comprising computer instructions;
when the computer instructions are run on a first device, cause the first device to perform the method of any one of claims 1-16;
alternatively, the computer instructions, when executed on a second device, cause the second device to perform the method of any of claims 1-15 or 17.
CN202010942977.0A 2020-09-09 2020-09-09 Software upgrading method and device Active CN113741925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010942977.0A CN113741925B (en) 2020-09-09 2020-09-09 Software upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010942977.0A CN113741925B (en) 2020-09-09 2020-09-09 Software upgrading method and device

Publications (2)

Publication Number Publication Date
CN113741925A CN113741925A (en) 2021-12-03
CN113741925B true CN113741925B (en) 2022-11-11

Family

ID=78728027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010942977.0A Active CN113741925B (en) 2020-09-09 2020-09-09 Software upgrading method and device

Country Status (1)

Country Link
CN (1) CN113741925B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048546B (en) * 2022-08-25 2023-10-31 荣耀终端有限公司 System upgrade method, electronic device and computer-readable storage medium
CN117130627B (en) * 2023-02-28 2024-05-17 荣耀终端有限公司 Fitting upgrading method and electronic equipment
CN119172773A (en) * 2023-04-13 2024-12-20 南京泉峰科技有限公司 Power tool system and firmware upgrade method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387165A (en) * 2010-08-27 2012-03-21 腾讯科技(深圳)有限公司 System and method for upgrading software
WO2012156295A1 (en) * 2011-05-13 2012-11-22 Antix Labs Ltd Method of distributing a multi-user software application
CN106648725A (en) * 2016-09-07 2017-05-10 努比亚技术有限公司 Terminal, server and configuration file upgrading method
CN107621941A (en) * 2017-09-22 2018-01-23 美的智慧家居科技有限公司 Method for upgrading software, system and intelligent movable equipment
CN108376078A (en) * 2018-02-26 2018-08-07 广东美的制冷设备有限公司 Upgrade method, device and the household appliance of equipment
CN109960521A (en) * 2019-03-20 2019-07-02 北京顺丰同城科技有限公司 Application program updating method, apparatus, electronic equipment and storage medium
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium
CN111367542A (en) * 2018-12-26 2020-07-03 博西华电器(江苏)有限公司 Household appliance and household appliance firmware upgrading method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160132314A1 (en) * 2014-11-10 2016-05-12 Amazon Technologies, Inc. Remote configuration management of applications
CN106708544A (en) * 2015-08-13 2017-05-24 中兴通讯股份有限公司 Method and apparatus for assisting in firmware upgrading of electronic devices, and terminal
CN109522032B (en) * 2018-09-12 2022-03-25 视联动力信息技术股份有限公司 Firmware upgrading method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387165A (en) * 2010-08-27 2012-03-21 腾讯科技(深圳)有限公司 System and method for upgrading software
WO2012156295A1 (en) * 2011-05-13 2012-11-22 Antix Labs Ltd Method of distributing a multi-user software application
CN106648725A (en) * 2016-09-07 2017-05-10 努比亚技术有限公司 Terminal, server and configuration file upgrading method
CN107621941A (en) * 2017-09-22 2018-01-23 美的智慧家居科技有限公司 Method for upgrading software, system and intelligent movable equipment
CN108376078A (en) * 2018-02-26 2018-08-07 广东美的制冷设备有限公司 Upgrade method, device and the household appliance of equipment
CN111367542A (en) * 2018-12-26 2020-07-03 博西华电器(江苏)有限公司 Household appliance and household appliance firmware upgrading method
CN109960521A (en) * 2019-03-20 2019-07-02 北京顺丰同城科技有限公司 Application program updating method, apparatus, electronic equipment and storage medium
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Framework of Big data Analysis about IoT-Home-device for supporting a decision making an effective strategy about new product design;Jong-jin Jung;《2019 International Conference on Artificial Intelligence in Information and Communication (ICAIIC)》;20190327;582-584 *
基于交通一卡通的小额支付POS机研究与实现;刘泽文;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20151015;C029-48 *

Also Published As

Publication number Publication date
CN113741925A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
CN113741925B (en) Software upgrading method and device
CN112789934B (en) Bluetooth service query method and electronic equipment
CN108540193B (en) Front-end module and electronics supporting device-to-device communication using multiple frequency bands
CN111010693B (en) Method for providing wireless fidelity network access service and electronic equipment
KR20190065786A (en) Method for reconnecting bluetooth communication and apparatus using the same
WO2021147406A1 (en) Audio output method and terminal device
CN112068903A (en) Application loading method, application loading device, medium and equipment
WO2022063037A1 (en) Method and apparatus for installing patch package
WO2022062875A1 (en) Data transmission method and system, electronic device, and storage medium
CN114816442A (en) Processing method and device for distributed application
CN116686257A (en) Method for providing user interface and electronic device thereof
CN117335830B (en) Wireless communication circuit, bluetooth communication switching method and electronic device
CN114915619B (en) A file sharing method and electronic device
CN113608753A (en) Application uninstalling method, application recovery method, electronic device and storage medium
CN114816463A (en) Upgrade prompting method, terminal device and computer readable storage medium
CN111917916B (en) A display method and device
CN116049070B (en) A camera module identification method and electronic equipment
CN116489645B (en) Data transmission method and electronic equipment
WO2022174718A1 (en) Data backup method, and electronic device
CN115087134A (en) A Bluetooth connection method and electronic device
CN115248885A (en) Device discovery method and system and electronic device thereof
CN115250261B (en) Information display method and electronic equipment
CN115209213B (en) Wireless screen projection method and mobile device
CN116737193B (en) Software upgrading method, electronic device and communication system
US20250097283A1 (en) Method for controlling cross-device application and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address