OTA upgrade methods, devices, electronic devices and computer-readable storage media
By working collaboratively with the host computer, the main speaker detects and sends upgrade packages, resolving the issue of inconsistent speaker versions in home theater systems. This enables collaborative batch OTA upgrades between master and slave speakers, improving upgrade efficiency and consistency.
Patent Information
- Application Number
- CN202611302656.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the wireless speaker upgrade methods for home theater systems can easily lead to inconsistencies in speaker versions or upgrade results.
The main speaker communicates with the host computer, detects online slave speakers, and sends upgrade packages to the host computer based on the information of the slave speakers to be upgraded, thereby realizing collaborative batch OTA upgrades of the main speaker and slave speakers.
It enables collaborative batch upgrades of master and slave speakers, reducing the risk of version inconsistencies and inconsistent upgrade results, and improving upgrade efficiency and consistency.
Smart Images

Figure CN123123150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of OTA (Over-The-Air) upgrade technology, and more specifically, to an OTA upgrade method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] A home theater system consists of one main speaker and multiple secondary speakers. After deployment, home theater speakers require continuous feature iteration, bug fixes, and security patch updates. Currently, upgrade solutions for wireless speakers typically involve individually sending upgrade packages to mobile phones to upgrade the wireless speakers. However, if this upgrade method is applied to home theater system speaker upgrades, treating the main speaker and each secondary speaker as independent wireless speakers for independent upgrades can easily lead to inconsistent versioning across multiple wireless speakers or inconsistent upgrade results. Summary of the Invention
[0003] The purpose of this invention is to provide an OTA upgrade method, apparatus, electronic device, and computer-readable storage medium.
[0004] The embodiments of the present invention can be implemented as follows: In a first aspect, the present invention provides an OTA upgrade method applied to a main speaker in a home theater system, wherein the main speaker is communicatively connected to a host computer, and the main speaker is also connected to multiple slave speakers via a star connection; the method includes: Receive the upgrade command sent by the host computer; Based on the upgrade command, detect the target slave speakers whose status is online among the plurality of slave speakers; Based on the stated objective, the speaker to be upgraded is determined; The host computer returns information about the slave speaker to be upgraded, so that the host computer can send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
[0005] In an optional implementation, if the number of speakers to be upgraded is not zero, the method further includes: Receive the upgrade package sent by the host computer based on the information of the speaker to be upgraded; The upgrade package is sent to each of the speakers to be upgraded via StarFlash connection; After receiving all the response messages from the speakers indicating successful reception of the upgrade package, a response message indicating successful reception of the upgrade package is returned to the host computer. Receive and store the main upgrade package sent by the host computer based on the received response message; The upgrade processing command of the main speaker is triggered to enable the main speaker to perform OTA upgrade processing. At the same time, the upgrade processing command is sent to each of the slave speakers to be upgraded so that each of the slave speakers to be upgraded can perform its own OTA upgrade processing based on the upgrade processing command. or, If the number of speakers to be upgraded is 0, the method further includes: Receive and store the main upgrade package sent by the host computer based on the received response message; Trigger the upgrade processing command for the main speaker to enable OTA upgrade processing for the main speaker.
[0006] In an optional implementation, the step of triggering the upgrade processing command for the main speaker includes: The main speaker actively triggers the upgrade processing command; or, The main speaker receives the upgrade processing command sent by the host computer to trigger the upgrade processing command of the main speaker.
[0007] In an optional implementation, before the step of receiving the upgrade package sent by the host computer based on the information of the speaker to be upgraded, the method further includes: Receive the upgrade preprocessing request sent by the host computer; In response to the upgrade preprocessing request, upgrade preparation processing is performed, and the upgrade preprocessing request is sent to each of the slave speakers to be upgraded, so that each of the slave speakers to be upgraded responds to the upgrade preprocessing request and performs its own upgrade preparation processing.
[0008] Secondly, this invention provides an OTA (Over-The-Air) upgrade method, applied to a host computer communicating with a home theater system, the home theater system including a main speaker and multiple slave speakers connected to the main speaker via a star-flash connection, the method comprising: An upgrade command is sent to the main speaker, so that the main speaker can detect the target slave speaker that is online among the multiple slave speakers based on the upgrade command, and return the information of the slave speaker to be upgraded based on the target slave speaker to the host computer. Based on the information of the slave speaker to be upgraded, an upgrade package is sent to the main speaker to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
[0009] In an optional implementation, the target slave speaker is displayed on the host computer's operating interface. Before the step of sending the upgrade package to the master speaker based on the information of the slave speaker to be upgraded, the method further includes: Based on the user's selection operation on the operation interface to select the speaker to be upgraded from the target speakers, information about the speaker to be upgraded is obtained.
[0010] Thirdly, the present invention provides an OTA upgrade device for use in a main speaker in a home theater system. The main speaker is communicatively connected to a host computer, and the main speaker is also connected to multiple slave speakers via a star connection. The device includes: A receiving module is used to receive upgrade commands sent by the host computer; The detection module is used to detect the target speakers that are online among the plurality of speakers based on the upgrade command; The determination module is used to determine the speaker to be upgraded based on the target speaker; The return module is used to return the information of the slave speaker to be upgraded to the host computer, so that the host computer can send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
[0011] Fourthly, the present invention provides an OTA upgrade device applied to a host computer communicating with a home theater system, the home theater system including a main speaker and multiple slave speakers connected to the main speaker via a star-flash connection, the device comprising: The sending module is used to send an upgrade command to the main speaker, so that the main speaker can detect the target slave speaker that is online among the multiple slave speakers based on the upgrade command, and return the information of the slave speaker to be upgraded based on the target slave speaker to the host computer. The sending module is further configured to send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
[0012] Fifthly, the present invention provides an electronic device, including a processor and a memory, the memory being used to store a program, and the processor being used to implement the OTA upgrade method as described in the first aspect, or the OTA upgrade method as described in the second aspect, when executing the program.
[0013] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the OTA upgrade method as described in the first aspect, or implements the OTA upgrade method as described in the second aspect.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The main speaker of this invention detects multiple target slave speakers that are online based on the upgrade command sent by the host computer, and returns the information of the slave speakers to be upgraded based on the target slave speakers to the host computer. This enables the host computer to send an upgrade package to the main speaker based on the information of the slave speakers to be upgraded, thereby realizing OTA collaborative batch upgrade of the master and slave speakers. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is an example diagram illustrating an application scenario provided in this embodiment.
[0017] Figure 2 This is a block diagram of the electronic device provided in this embodiment.
[0018] Figure 3 This is a flowchart illustrating the OTA upgrade method for the main speaker provided in this embodiment.
[0019] Figure 4 This is a flowchart illustrating the OTA upgrade method applied to a host computer provided in this embodiment.
[0020] Figure 5 This is an example of the architecture of the OTA upgrade method provided in this embodiment.
[0021] Figure 6 This is a block diagram illustrating an OTA upgrade device applied to the main speaker, as provided in this embodiment.
[0022] Figure 7 This is a block diagram illustrating an OTA upgrade device applied to a host computer, as provided in this embodiment.
[0023] Icons: 10-Main speaker; 20-Slave speaker; 30-Host computer; 40-Electronic device; 41-Processor; 42-Memory; 43-Bus; 100-OTA upgrade device for the main speaker; 110-Receiver module; 120-Detection module; 130-Determination module; 140-Return module; 150-Upgrade module; 200-OTA upgrade device for the host computer; 210-Send module; 220-Acquisition module. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0025] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0026] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0027] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0028] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0029] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0030] Please refer to Figure 1 , Figure 1 This is an example diagram illustrating an application scenario provided in this embodiment. Figure 1 In the middle, the main speaker 10 is connected to the host computer 30 via wired or wireless communication, and the main speaker 10 is also connected to multiple slave speakers 20 via a star connection.
[0031] The host computer 30 can be a mobile terminal such as a mobile phone, tablet, or laptop. The host computer 30 runs upgrade tools and applications for upgrading the speaker system. The connection channel between the host computer 30 and the main speaker 10 is also called the uplink channel, which includes wired or wireless methods such as serial port, Bluetooth, Starlink, Wi-Fi, and Universal Serial Bus. The host computer 30 interacts with the main speaker 10 via the uplink channel. For example, it sends upgrade commands and upgrade packages to the main speaker 10 via a wired or wireless uplink channel.
[0032] The connection channel between the main speaker 10 and the slave speaker 20 is also called the downlink channel.
[0033] The main speaker 10 relays commands from the host computer to the slave speaker 20. The main speaker 10 is responsible for command parsing, uplink adaptation, whitelisting and response statistics, writing local firmware, distributing commands / upgrade packages to the slave speaker 20 via StarFlash, handling upgrade requests and initiation after transmission, and summarizing the results of command execution or upgrade package reception.
[0034] The speaker 20 receives commands and upgrade packages distributed by the main speaker 10 via StarSpark, performs local preparation, writing, verification, startup, and returns a response.
[0035] In this embodiment, Figure 1 It can cover individual upgrades of the main speaker, upgrades of the main speaker, and upgrades of one or more slave speakers from a specified set of slave speakers.
[0036] This embodiment of the invention also provides a block diagram of an electronic device 40, which may be... Figure 1 In the main speaker 10, the electronic device 40 implements the OTA upgrade method applied to the main speaker in this embodiment. The electronic device 40 can also be... Figure 1 In the host computer 30, the electronic device 40 implements the OTA upgrade method applied to the host computer in this embodiment. Please refer to [reference needed]. Figure 2 , Figure 2 This is a block diagram of the electronic device 40 provided in this embodiment. The electronic device 40 includes a processor 41, a memory 42, and a bus 43. The processor 41 and the memory 42 are connected through the bus 43.
[0037] The processor 41 can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the OTA upgrade method applied to the main speaker or the host computer in this embodiment can be completed by the integrated logic circuitry in the processor 41 or by software instructions. The processor 41 can be a general-purpose processor, including a CPU (Central Processing Unit), NP (Network Processor), GPU (Graphics Processing Unit), etc.; it can also be a DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Logic Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0038] The memory 42 is used to store the program that implements the OTA upgrade method applied to the main speaker or the OTA upgrade method applied to the host computer in this embodiment. The program can be a software function module stored in the memory 42 in the form of software or firmware or embedded in the OS (Operating System) of the electronic device 40.
[0039] After receiving the execution instruction, the processor 41 executes the program to implement the OTA upgrade method applied to the main speaker or the OTA upgrade method applied to the host computer in this embodiment.
[0040] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating an OTA upgrade method for the main speaker provided in this embodiment. The method includes the following steps: Step S101: Receive the upgrade command sent by the host computer.
[0041] In this embodiment, if the host computer is a serial port tool, an upgrade command can be sent to the main speaker when the serial port tool is connected to the main speaker. If the host computer is a mobile phone, the user can trigger the upgrade command through the operation interface of the application running on the mobile phone. The upgrade command is sent to the main speaker via Bluetooth or wireless LAN.
[0042] Step S102: Based on the upgrade command, detect multiple target speakers that are online.
[0043] In this embodiment, based on the upgrade command, the main speaker establishes an upgrade whitelist using the set of slave speakers that are currently connected, and all slave speakers in the upgrade whitelist are target slave speakers.
[0044] Step S103: Determine the speaker to be upgraded based on the target speaker.
[0045] In this embodiment, the speakers to be upgraded can be all target speakers, or one or more target speakers. When no speaker needs to be upgraded and only the main speaker needs to be upgraded, the number of speakers to be upgraded can also be 0. The speakers to be upgraded can be specified by the user from the target speakers. When the user does not specify, all target speakers are used as speakers to be upgraded by default.
[0046] Step S104: Return the information of the slave speaker to be upgraded to the host computer, so that the host computer can send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
[0047] In this embodiment, the information of the slave speakers to be upgraded includes, but is not limited to, the number of slave speakers to be upgraded, the operating parameters of each slave speaker to be upgraded, and the status parameters. When the number of slave speakers to be upgraded is 0, the host computer can confirm that only the main speaker is being upgraded via OTA. When the number of slave speakers to be upgraded is greater than 0, the host computer can confirm that the OTA upgrade includes both the main speaker and the slave speakers.
[0048] The method provided in this embodiment involves the main speaker detecting target slave speakers that are online among multiple slave speakers based on the upgrade command sent by the host computer, and returning the information of the slave speakers to be upgraded based on the target slave speakers to the host computer. This enables the host computer to send an upgrade package to the main speaker based on the information of the slave speakers to be upgraded, thereby realizing OTA collaborative batch upgrade of master and slave speakers.
[0049] In an optional implementation, when the number of speakers to be upgraded is not zero, in order to reduce the storage pressure on the main speaker when the main speaker's Flash capacity is limited and to lower the minimum Flash capacity requirement for the main speaker, this embodiment provides a processing method: First, receive the upgrade package sent by the host computer based on the information of the speaker to be upgraded; Secondly, the upgrade package will be sent to each speaker to be upgraded via StarFlash connection; In this embodiment, when the host computer determines that the number of slave speakers to be upgraded is not zero, it first sends a slave upgrade package to the master speaker. The master speaker then sends the upgrade package to the slave speaker to be upgraded via a StarFlash connection. Alternatively, when the host computer sends the slave upgrade package, if it also sends an identifier to uniquely identify the slave speaker, it means that the user has pre-specified slave speakers to be upgraded through the host computer. In this case, the identifier of the slave speaker carried by the host computer when sending the upgrade package represents the slave speaker to be upgraded, and the master speaker only needs to send the upgrade package to the slave speaker to be upgraded. Alternatively, the host computer can send the upgrade package without including the slave speaker identifier. In this case, all online slave speakers are slave speakers to be upgraded, and the master speaker needs to send the upgrade package to each online slave speaker. As another implementation, if multiple slave speakers require different upgrade package versions for this upgrade, the host computer can sequentially send the upgrade package for each slave speaker to the main speaker. The main speaker then uses a flashing mechanism to send the corresponding upgrade package to the corresponding slave speaker. For example, if the slave speakers to be upgraded include speaker 1, speaker 2, and speaker 3, and their required upgrade package versions are A, B, and C respectively, the host computer first sends the upgrade package of version A, carrying the identifier of speaker 1. The main speaker then sends the upgrade package of version A to speaker 1 via flashing. Speakers 2 and 3 are sent similarly, until all upgrade packages have been sent. At this point, each slave speaker has received all the upgrade packages required for its upgrade. Therefore, regardless of the number of upgrade package versions required for this upgrade, each upgrade package can be sent sequentially to the corresponding slave speaker. The Flash capacity required by the main speaker only needs to be the size of the main speaker's upgrade package and the maximum value in the largest upgrade package.
[0050] Third, after receiving all the response messages from the speakers indicating successful reception of the upgrade package, return a successful reception response message to the host computer. In this embodiment, when the main speaker sends an upgrade package to all the slave speakers to be upgraded, each slave speaker to be upgraded will return a successful reception response message to the main speaker after receiving and successfully storing the upgrade package. In order to ensure the consistency of the upgrade startup of all slave speakers to be upgraded, the main speaker will only return a successful reception response message to the host computer after receiving the reception response messages of all the slave speakers to be upgraded. If any slave speaker to be upgraded returns a response indicating failure to receive the upgrade package, the main speaker will send a response message indicating failure to receive the upgrade package to the host computer.
[0051] Fourth, receive and store the main upgrade package sent by the host computer based on the response message; In this embodiment, after receiving the successful reception response message from the main speaker indicating that the upgrade package has been successfully received, the host computer sends the main upgrade package to the main speaker and stores it. This sending order prevents the main speaker from completely caching both the main upgrade package and the upgrade package at the same time, which helps to reduce the minimum Flash storage requirement of the main speaker.
[0052] It should be noted that if the main speaker has sufficient Flash storage capacity, the upgrade package and the main upgrade package can be transmitted in parallel or overlapped to adapt to application scenarios with high transmission efficiency requirements and achieve efficient collaborative upgrade of the main and slave speakers.
[0053] Finally, the upgrade processing command for the main speaker is triggered to enable the main speaker to perform an OTA upgrade. At the same time, an upgrade processing command is sent to each of the slave speakers to be upgraded, so that each of the slave speakers to be upgraded can perform its own OTA upgrade based on the upgrade processing command.
[0054] In this embodiment, the main speaker and all the slave speakers to be upgraded trigger the upgrade processing command simultaneously, ensuring the coordinated and consistent upgrade of the main speaker and all the slave speakers to be upgraded.
[0055] In an optional implementation, when the number of speakers to be upgraded is 0, only the main speaker is upgraded. One implementation method is as follows: Receive and store the main upgrade package sent by the host computer based on the received response message; Trigger the upgrade command for the main speaker to perform an OTA upgrade.
[0056] In this embodiment, according to the actual upgrade process, the upgrade processing command may also include two processes: upgrade request and upgrade initiation. First, the upgrade request command of the main speaker is triggered, and at the same time, an upgrade request command is sent to each of the slave speakers to be upgraded. The upgrade request command is used to enable the main speaker and the slave speakers to be upgraded to prepare for the upgrade initiation.
[0057] For the main speaker, processing based on the upgrade request command includes, but is not limited to, setting an upgrade-pending flag, a complete checksum of the upgrade package (such as a SHA-256 digest), and a whitelist of devices in the preset area of Flash. Simultaneously, the main speaker can broadcast the upgrade request command to all slave speakers awaiting upgrade, start an independent timeout timer (e.g., 3 seconds), and wait for all slave speakers to return a success acknowledgment (ACK) message. If any slave speaker times out or fails to upgrade, the process terminates and enters a unified failure handling phase.
[0058] For the slave speaker, processing based on the upgrade request command includes, but is not limited to, verifying the integrity and validity of the command (such as message authentication codes or serial numbers to prevent replay), and synchronously setting the upgrade-ready flag in local non-volatile memory. Once all preparations are complete, an ACK response is sent back to the master speaker; if verification fails or the status is abnormal, a NACK is returned with a specific error code.
[0059] After the upgrade request commands from both the main speaker and the slave speakers are successfully executed, the upgrade execution command is first broadcast to all slave speakers to be upgraded. The upgrade execution command can carry a timestamp or a unique serial number to prevent command replay. Then, the main speaker itself starts the firmware update engine, erases the Flash area where the old firmware is located according to the erase range agreed upon in the preparation phase, writes the cached main speaker upgrade package to the target address, and performs a full package integrity verification (such as SHA-256 comparison). After the verification passes, a temporary upgrade completion marker is set. If all slave speakers also synchronously report successful startup, the main speaker finally triggers a system restart. If any step fails, the local upgrade marker is immediately erased, the upgrade state machine is reset, and the host computer is notified to display the reason for the failure.
[0060] The processing of upgrade startup commands by the speaker includes, but is not limited to: verifying the validity of the timestamp or serial number to ensure the command is fresh and has not been intercepted and replayed; after successful verification, comparing the locally stored upgrade flag, version number, and checksum with the information carried in the command; if they match, proceeding to the irreversible upgrade process: erasing the corresponding area of its own Flash memory, writing the cached upgrade package from the speaker segment by segment, verifying each segment written, and performing a full package verification after the entire package is written; if the verification is successful, setting a local upgrade completion flag and sending the final state back to the main speaker; if the verification fails or a writing error occurs, actively clearing the upgrade flag, restoring the initial running state, and sending back a failure response with an error code. Since the processing by the speaker is entirely based on local execution and does not rely on remote control of the Flash memory by the main speaker, it conforms to the lightweight communication positioning of the StarFlash protocol and ensures the independence and robustness of multi-device upgrades.
[0061] In optional implementations, to adapt to different application scenarios, triggering the main speaker's upgrade processing command can include at least the following two methods: Method 1: The main speaker actively triggers the upgrade processing command; Method 2: The main speaker receives the upgrade processing command sent by the host computer to trigger the upgrade processing command of the main speaker.
[0062] In this embodiment, Method 1 employs a self-driven approach by the main speaker after the upgrade package is transmitted, reducing reliance on secondary commands from the host computer during the upgrade process. This method is suitable for scenarios where the main speaker has strong control capabilities. For scenarios where the main speaker has weak control capabilities or limited configuration, Method 2 can be used. In this method, the host computer triggers the upgrade processing command from the main speaker, which then sends the upgrade processing command to the slave speaker to be upgraded via a flashing light, thus enabling the upgrade processing of the slave speaker.
[0063] In an optional implementation, to ensure the reliability of the upgrade package transmission from the host computer, the main speaker performs the following preprocessing before receiving the upgrade package sent by the host computer based on the information of the slave speaker to be upgraded: First, receive the upgrade preprocessing request sent by the host computer; Secondly, in response to the upgrade preprocessing request, upgrade preparation processing is performed, and the upgrade preprocessing request is sent to each speaker to be upgraded, so that each speaker to be upgraded responds to the upgrade preprocessing request and performs its own upgrade preparation processing.
[0064] In this embodiment, the upgrade preprocessing request includes, but is not limited to, three stages: version number query, upgrade status check, and space preparation. Each stage of the process involves the host computer initiating a processing command, and the main speaker performs the corresponding stage of processing based on the processing command. At the same time, the processing command is sent to each slave speaker to be upgraded for its respective corresponding stage of processing.
[0065] The version number lookup process primarily involves retrieving and verifying the current version number of the speaker that needs upgrading. Only if the version number is verified will the subsequent process continue; otherwise, no upgrade is required, and the current process terminates. The verification rules can be determined based on actual needs. For example, the verification rule could be that the current version number of the main speaker matches the current version number of all the secondary speakers to be upgraded.
[0066] The upgrade status check process includes, but is not limited to, whether the speaker battery level is greater than the preset battery level, whether the available upgrade space meets the requirements, whether it is in a locked state, and whether it is at the required upgrade permission level. When the upgrade status check of the main speaker or any slave speaker fails, the main speaker will uniformly reply to the host computer that the upgrade status check has failed. It can also return the reason for the failure and uniformly notify the slave speakers to be upgraded to handle the failure.
[0067] Space preparation includes erasing the space used to store the upgrade package and checking whether the erased space meets the requirements of the upgrade package. If the space preparation of the main speaker or any slave speaker fails, the main speaker will uniformly reply to the host computer that the space preparation has failed. It can also return the reason for the failure and uniformly notify the slave speakers to be upgraded to handle the failure.
[0068] Therefore, in any stage of the above-mentioned upgrade preprocessing, if the main speaker and all the slave speakers to be upgraded are successfully processed, the host computer will be notified that the stage was successfully processed. If the processing fails, the main speaker will uniformly reply to the host computer that the stage was unsuccessful. It can also return the reason for the failure and uniformly notify the slave speakers to be upgraded to handle the failure, so that the host computer can uniformly know the overall result.
[0069] In this embodiment, to complement the main speaker, an OTA upgrade method on the host computer side is also provided. Please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart illustrating the OTA upgrade method applied to a host computer provided in this embodiment. The method includes the following steps: Step S201: Send an upgrade command to the main speaker so that the main speaker can detect the target slave speaker that is online among multiple slave speakers based on the upgrade command, and return the information of the slave speaker to be upgraded based on the target slave speaker to the host computer.
[0070] Step S202: Based on the information of the speaker to be upgraded, send an upgrade package to the main speaker to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the speaker to be upgraded.
[0071] In an optional implementation, to provide flexibility in upgrading from the speaker, this embodiment also provides a method that allows users to specify the speaker to be upgraded from: Based on the user's selection operation on the operation interface to select the speaker to be upgraded from the target speakers, information about the speaker to be upgraded is obtained.
[0072] In this embodiment, the host computer's operating interface displays the online target slave speakers. The user can select slave speakers to be upgraded from the target slave speakers on the operating interface. For example, if there are four target slave speakers, the user can select two from these four as slave speakers to be upgraded. The host computer can count the number of slave speakers to be upgraded based on the user's selections.
[0073] It should be noted that when the user does not make a selection, the default method can be used to determine the speakers to be upgraded, that is, all target slave speakers can be identified as slave speakers to be upgraded. In addition, the priority of these two methods of determining slave speakers to be upgraded can be set. For example, the default method used by the host computer to determine slave speakers to be upgraded has lower priority than the method of counting the user-selected slave speakers to be upgraded. When the user selects slave speakers to be upgraded through the interface, the slave speakers to be upgraded are those selected by the user, and the number of them is also the number of slave speakers selected by the user. If the user does not select any slave speakers to be upgraded, then the online target slave speakers detected by the main speaker are used as the slave speakers to be upgraded, and the number of target slave speakers is used as the number of slave speakers to be upgraded.
[0074] In this embodiment, to illustrate the OTA upgrade method from the perspective of the overall architecture of the host computer, main speaker, and slave speaker, please refer to... Figure 5 , Figure 5 This is an architectural example diagram illustrating the specific implementation of the OTA upgrade method provided in this embodiment. Figure 5 In this system, the host computer communicates with the main speaker via wired or wireless means. Wireless connections can be Bluetooth, Wi-Fi, or a satellite flash, while wired connections can be serial or USB. The host computer runs an upgrade tool; alternatively, if the host computer is a mobile phone, an application with upgrade functionality runs on the phone; or if the host computer is a personal computer, a program with upgrade tools runs on the personal computer. The main speaker acts as the OTA master controller, acting as a proxy between the host computer and the slave speakers. The main speaker transmits the upgrade command and upgrade package sent from the host computer to the main speaker via satellite flash downlink, and then distributes them to the slave speakers via satellite flash connection. N represents the number of slave speakers actually participating in this upgrade, and N is an integer ≥ 0. When N = 0, it means no slave speakers are currently participating, and only the main speaker is being upgraded; when N ≥ 1, the main speaker acts as an upgrade proxy, collaboratively completing the upgrade of both the main speaker and each slave speaker. In practice, the maximum number of supported slave speakers can be configured (e.g., a maximum of one to three, i.e., N can be up to 3), but each upgrade process is based on the actual number of slave speakers participating, N. The master speaker is responsible for command distribution and OTA upgrades of this speaker, verification of the master upgrade package, and setting of upgrade flags. Simultaneously, the master speaker is also responsible for whitelist management of online slave speakers, aggregation of response messages from slave speakers, distribution of upgrade packages to slave speakers, and triggering local upgrades for slave speakers. The whitelist of online slave speakers can be established by the master speaker at the start of the upgrade using the set of slave speakers already connected at that time. N can be the number of speakers in the slave speaker set. During subsequent upgrade processes, the preprocessing and upgrade stages are statistically analyzed based on this whitelist; when N=0, slave speaker-related group sending and aggregation are skipped. If a device in the whitelist experiences a timeout, disconnection, write failure, or verification failure at any stage, the master speaker stops the timer, sends a stop command to the online slave speakers, erases the upgrade flag if necessary, resets the state, and notifies the interface layer of the failure.
[0075] To perform the corresponding steps in the above embodiments and various possible implementations, an implementation of an OTA upgrade device 100 applied to a main speaker is given below. Please refer to... Figure 6 , Figure 6 This is a block diagram of an OTA upgrade device for a main speaker provided in this embodiment. It should be noted that the basic principle and technical effects of the OTA upgrade device 100 for a main speaker provided by this invention are the same as those of the corresponding embodiments described above. For the sake of brevity, some parts of this embodiment are not mentioned.
[0076] The OTA upgrade device 100 applied to the main speaker includes a receiving module 110, a detection module 120, a determination module 130, and a return module 140.
[0077] The receiving module 110 is used to receive upgrade commands sent by the host computer.
[0078] The detection module 120 is used to detect multiple target speakers that are online based on the upgrade command.
[0079] The determination module 130 is used to determine the speaker to be upgraded based on the target speaker.
[0080] The return module 140 is used to return information about the slave speaker to be upgraded to the host computer, so that the host computer can send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
[0081] In an optional implementation, the OTA upgrade device 100 applied to the main speaker further includes an upgrade module 150. If the number of secondary speakers to be upgraded is not zero, the upgrade module 150 is used for: Receive upgrade package sent by the host computer based on the information of the speaker to be upgraded; The upgrade package will be sent to each speaker to be upgraded via StarFlash connection; After receiving all the response messages from the speakers indicating successful reception of the upgrade package, return a successful reception response message to the host computer. Receive and store the main upgrade package sent by the host computer based on the response message; Trigger the upgrade processing command for the main speaker to perform OTA upgrade processing, and at the same time send upgrade processing commands to each slave speaker to be upgraded, so that each slave speaker to be upgraded can perform its own OTA upgrade processing based on the upgrade processing command. or, If the number of speakers to be upgraded is 0, upgrade module 150 is used for: Receive and store the main upgrade package sent by the host computer based on the received response message; Trigger the upgrade command for the main speaker to perform an OTA upgrade.
[0082] In an optional implementation, the upgrade module 150 is specifically used to: trigger the upgrade processing command for the main speaker. The upgrade processing command is actively triggered by the main speaker. or, Specifically, it is used to: receive upgrade processing commands sent by the host computer through the main speaker, so as to trigger the upgrade processing command of the main speaker.
[0083] In an optional implementation, the receiving module 110 is further configured to: Receive upgrade preprocessing requests sent by the host computer; In response to the upgrade preprocessing request, upgrade preparation processing is performed, and the upgrade preprocessing request is sent to each slave speaker to be upgraded, so that each slave speaker to be upgraded responds to the upgrade preprocessing request and performs its own upgrade preparation processing.
[0084] To perform the corresponding steps in the above embodiments and various possible implementations, an implementation of an OTA upgrade device 200 applied to a host computer is given below. Please refer to... Figure 7 , Figure 7 This is a block diagram of an OTA upgrade device applied to a host computer provided in this embodiment. It should be noted that the basic principle and technical effects of the OTA upgrade device 200 applied to a host computer provided by the present invention are the same as those of the corresponding embodiments described above. For the sake of brevity, some parts of this embodiment are not mentioned.
[0085] The OTA upgrade device 200 applied to the host computer includes a sending module 210.
[0086] The sending module 210 is used to send an upgrade command to the main speaker, so that the main speaker can detect multiple target slave speakers that are online based on the upgrade command, and return the information of the slave speakers to be upgraded based on the target slave speakers to the host computer. The sending module 210 is also used to send an upgrade package to the main speaker based on the information of the speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the speaker to be upgraded.
[0087] In an optional implementation, the target speaker is displayed on the host computer's operating interface. The OTA upgrade device 200 applied to the host computer also includes an acquisition module 220, which is used for: Based on the user's selection operation on the operation interface to select the speaker to be upgraded from the target speakers, information about the speaker to be upgraded is obtained.
[0088] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the OTA upgrade method applied to the main speaker in this embodiment, or implements the OTA upgrade method applied to the host computer in this embodiment.
[0089] In summary, this invention provides an OTA upgrade method, apparatus, electronic device, and computer-readable storage medium, applied to a main speaker in a home theater system. The main speaker is communicatively connected to a host computer, and the main speaker is also connected to multiple slave speakers via a star-flash connection. The method includes: receiving an upgrade command sent by the host computer; detecting a target slave speaker that is online among the multiple slave speakers based on the upgrade command; determining the slave speaker to be upgraded based on the target slave speaker; and returning information about the slave speaker to be upgraded to the host computer, so that the host computer sends an upgrade package to the main speaker based on the information about the slave speaker to be upgraded, thereby realizing a wireless OTA firmware upgrade of the main speaker or an OTA upgrade between the main speaker and the slave speaker to be upgraded. Compared with the prior art, this embodiment has at least the following advantages: (1) The main speaker detects the target slave speaker that is online among multiple slave speakers based on the upgrade command sent by the host computer, and returns the information of the slave speaker to be upgraded based on the target slave speaker to the host computer, so that the host computer sends the upgrade package to the main speaker based on the information of the slave speaker to be upgraded, thus realizing the master-slave speaker OTA collaborative batch upgrade; (2) It realizes the compatibility of the main speaker's individual upgrade and the master-slave speaker collaborative upgrade; (3) The uplink between the host computer and the main speaker can use wired communication or wireless communication, and the downlink between the main speaker and the slave speaker uses star flash communication. (4) The main speaker acts as the sole agent to aggregate the results, thus decoupling the uplink and downlink; (5) The connection snapshot at the start of the upgrade is used as a whitelist, and the upgrade is only pushed to the host computer after all responses are received, reducing the risk of partial upgrade success; (6) When there are more than or equal to 1 slave speakers that need to be upgraded, the upgrade package of the slave speakers is transmitted first, and then the upgrade package of the main speaker is transmitted. The serial double-packet transmission saves the Flash of the main speaker; (7) The upgrade request and upgrade start are initiated by the main speaker, reducing the dependence of the host computer on secondary commands; (8) Timeout, disconnection, verification failure, etc. are centrally stopped, marked and reset, realizing the unified and consistent handling of failure termination.
[0090] The above descriptions are merely various embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An OTA upgrade method, characterized in that, A main speaker used in a home theater system, the main speaker being communicatively connected to a host computer, and the main speaker also being connected via a star connection to multiple slave speakers, the method comprising: Receive the upgrade command sent by the host computer; Based on the upgrade command, detect the target slave speakers whose status is online among the plurality of slave speakers; Based on the stated objective, the speaker to be upgraded is determined; The host computer returns information about the slave speaker to be upgraded, so that the host computer can send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
2. The method according to claim 1, characterized in that, If the number of speakers to be upgraded is not 0, the method further includes: Receive the upgrade package sent by the host computer based on the information of the speaker to be upgraded; The upgrade package is sent to each of the speakers to be upgraded via StarFlash connection; After receiving all the response messages from the speakers indicating successful reception of the upgrade package, a response message indicating successful reception of the upgrade package is returned to the host computer. Receive and store the main upgrade package sent by the host computer based on the received response message; The upgrade processing command of the main speaker is triggered to enable the main speaker to perform OTA upgrade processing. At the same time, the upgrade processing command is sent to each of the slave speakers to be upgraded so that each of the slave speakers to be upgraded can perform its own OTA upgrade processing based on the upgrade processing command. or, If the number of speakers to be upgraded is 0, the method further includes: Receive and store the main upgrade package sent by the host computer based on the received response message; Trigger the upgrade processing command for the main speaker to enable OTA upgrade processing for the main speaker.
3. The method according to claim 2, characterized in that, The steps for triggering the upgrade command for the main speaker include: The main speaker actively triggers the upgrade processing command; or, The main speaker receives the upgrade processing command sent by the host computer to trigger the upgrade processing command of the main speaker.
4. The method according to claim 2, characterized in that, Before the step of receiving the upgrade package sent by the host computer based on the information of the speaker to be upgraded, the method further includes: Receive the upgrade preprocessing request sent by the host computer; In response to the upgrade preprocessing request, upgrade preparation processing is performed, and the upgrade preprocessing request is sent to each of the slave speakers to be upgraded, so that each of the slave speakers to be upgraded responds to the upgrade preprocessing request and performs its own upgrade preparation processing.
5. An OTA upgrade method, characterized in that, A host computer is used for communication with a home theater system, the home theater system including a main speaker and multiple slave speakers connected via a star-flash connection to the main speaker, the method comprising: An upgrade command is sent to the main speaker, so that the main speaker can detect the target slave speaker that is online among the multiple slave speakers based on the upgrade command, and return the information of the slave speaker to be upgraded based on the target slave speaker to the host computer. Based on the information of the slave speaker to be upgraded, an upgrade package is sent to the main speaker to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
6. The method according to claim 5, characterized in that, The target slave speaker is displayed on the host computer's operating interface. Before the step of sending the upgrade package to the master speaker based on the information of the slave speaker to be upgraded, the following steps are also included: Based on the user's selection operation on the operation interface to select the speaker to be upgraded from the target speakers, information about the speaker to be upgraded is obtained.
7. An OTA upgrade device, characterized in that, A main speaker for use in a home theater system, the main speaker being communicatively connected to a host computer, and the main speaker also being connected via a star connection to multiple slave speakers; the device includes: The receiving module is used to receive the upgrade command sent by the host computer; The detection module is used to detect the target speakers that are online among the plurality of speakers based on the upgrade command; The determination module is used to determine the speaker to be upgraded based on the target speaker; The return module is used to return the information of the slave speaker to be upgraded to the host computer, so that the host computer can send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
8. An OTA upgrade device, characterized in that, A host computer used for communication connection with a home theater system, the home theater system including a main speaker and multiple slave speakers connected to the main speaker via a star-flash connection, the device comprising: The sending module is used to send an upgrade command to the main speaker, so that the main speaker can detect the target slave speaker that is online among the multiple slave speakers based on the upgrade command, and return the information of the slave speaker to be upgraded based on the target slave speaker to the host computer. The sending module is further configured to send an upgrade package to the main speaker based on the information of the slave speaker to be upgraded, so as to realize the firmware wireless OTA upgrade of the main speaker or the OTA upgrade of the main speaker and the slave speaker to be upgraded.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory being used to store a program, and the processor being used to implement the OTA upgrade method as described in any one of claims 1-4, or the OTA upgrade method as described in any one of claims 5-6, when executing the program.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the OTA upgrade method as described in any one of claims 1-4, or implements the OTA upgrade method as described in any one of claims 5-6.
