Bluetooth sound box upgrading and updating method and system, computer equipment and storage medium

Through the encrypted handshake verification between the PC and the speaker and the resumable transmission of the upgrade package partition data, the problem of slow Bluetooth speaker upgrade speed and transmission interruption loss is solved, achieving fast and accurate speaker upgrade and data integrity.

CN118733072APending Publication Date: 2024-10-01SHENZHEN 3NOD DIGITAL TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310340874.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing Bluetooth speaker upgrade method is slow, requires driver installation, and cannot be resumed after the transmission is interrupted, resulting in troublesome operation and data loss.

Method used

Read the speaker device information through the PC for encrypted handshake verification, request and parse the upgrade package header information, split the upgrade package partition data into block data for transmission, and realize breakpoint resuming when the transmission is interrupted, and ensure the data through the check value Integrity.

Benefits of technology

It implements a method of quickly upgrading speakers without installing drivers, ensuring the integrity and accuracy of data transmission, supporting breakpoint resumption, and improving the efficiency and reliability of the upgrade operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733072A_ABST
    Figure CN118733072A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the technical field of sound box equipment, and relates to a Bluetooth sound box upgrading and updating method, which comprises the following steps: carrying out encrypted handshake verification between a PC (Personal Computer) end and a sound box; requesting upgrade package header information from the PC end and analyzing the upgrade package header information, and performing comparison verification on the analyzed upgrade package version information and the version information of the loudspeaker box; requesting for upgrade package partition data from the PC terminal, splitting the upgrade package partition data into block data, and sending the block data into the sound box; recombining the block data received by the sound box into upgrade patch partition data, writing the upgrade patch partition data into a corresponding partition position in the sound box, verifying the received upgrade patch partition data, and calculating a verification value; and comparing the partition data verification value with the partition data verification value obtained after analysis to complete updating and upgrading of the sound box. The invention further provides a Bluetooth loudspeaker box upgrading and updating system, computer equipment and a storage medium. According to the invention, the Bluetooth sound box can be upgraded and updated conveniently and quickly without installing a driver, and meanwhile, breakpoint resume of data can be effectively realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of speaker equipment, and in particular to a method, system, computer equipment and storage medium for upgrading and updating a Bluetooth speaker. Background Art

[0002] Existing Bluetooth speakers are generally updated through Bluetooth wireless or USB private driver methods. The Bluetooth wireless update method is slow in terms of update speed, takes a long time to complete the update, and is also easily affected by the Bluetooth connection signal; while the USB private driver method has a faster update speed, but requires the installation of the USB driver to enter the chip upgrade and downgrade mode before the upgrade can be performed, which is more troublesome to operate. At the same time, the above two methods require continuous data transmission during the upgrade. When the transmission is interrupted, re-upgrading will cause the previously transmitted upgrade data to be lost, and it is impossible to achieve breakpoint resume, which brings trouble to the upgrade of the speaker. Summary of the invention

[0003] The purpose of the embodiments of the present application is to propose a Bluetooth speaker upgrade and update method, device, computer equipment and storage medium to solve the problems of slow Bluetooth speaker upgrade and update speed, the need to install drivers and the inability to resume transmission after interruption.

[0004] In order to solve the above technical problems, the embodiment of the present application provides a method for upgrading and updating a Bluetooth speaker, which adopts the following technical solution:

[0005] The device information of the speaker is read through the PC, and encrypted handshake verification is performed between the PC and the speaker based on the read device information;

[0006] Requesting the upgrade package header information from the PC through the speaker, parsing the obtained upgrade package header information, and comparing and verifying the parsed upgrade package version information with the version information of the speaker;

[0007] When the comparison result is inconsistent, the upgrade package partition data is requested from the PC, the upgrade package partition data is split into block data of a preset size and sent to the speaker;

[0008] Reorganize the block data received by the speaker into upgrade package partition data and write them into the corresponding partition position in the speaker storage area, detect in real time whether the upgrade package partition data in the partition position has been received, and verify the upgrade package partition data in the partition position and calculate the verification value when the reception is completed; and

[0009] The partition data verification value in the speaker is compared with the partition data verification value obtained after parsing the upgrade package header information. When the comparison results are consistent, the update and upgrade of the speaker is completed.

[0010] Furthermore, after the step of reading the device information of the speaker through the PC and performing encryption handshake verification between the PC and the speaker according to the read device information, the following steps are also included:

[0011] Check whether the encryption handshake verification is successful;

[0012] If successful, a request to obtain the header information of the upgrade package is sent to the PC via the Bluetooth speaker; and

[0013] If unsuccessful, exit the upgrade program and re-perform encryption handshake verification.

[0014] Further, the step of requesting the upgrade package header information from the PC through the speaker, parsing the acquired upgrade package header information, and comparing and verifying the parsed upgrade package version information with the version information of the speaker specifically includes:

[0015] Request the upgrade package header information from the PC. After receiving the request, the PC sends the upgrade package header information data to the speaker;

[0016] Parse the packet header information data in the speaker, obtain the corresponding packet header parsing data, and detect whether the packet header parsing data is complete, the packet header parsing data includes: device name, version information, partition information, partition address, partition size and partition data check value;

[0017] If complete, compare the version information in the packet header parsed data with the version information of the speaker; and

[0018] If incomplete, exit the upgrade process.

[0019] Furthermore, before the step of reorganizing the block data received by the speaker into upgrade package partition data and writing the partition data into the corresponding partition position in the speaker storage area, detecting in real time whether the upgrade package partition data at the partition position has been received, and verifying the upgrade package partition data in the partition position when the reception is completed and calculating the verification value, the following steps are also included:

[0020] Verifying the received block data and determining whether the block data is transmitted correctly;

[0021] If it is correct, then check whether the block data in the Bluetooth speaker has been received; and

[0022] If incorrect, exit the upgrade program.

[0023] Further, the step of reorganizing the block data received by the speaker into upgrade package partition data and writing the partition data into the corresponding partition position in the speaker storage area, detecting in real time whether the upgrade package partition data at the partition position has been received, and verifying the upgrade package partition data in the partition position and calculating the verification value when the reception is completed specifically includes:

[0024] Check whether the block data in the Bluetooth speaker has been received;

[0025] If completed, the block data is stored in the Flash of the speaker;

[0026] Reading the block data in the Flash and reorganizing the block data into upgrade package partition data;

[0027] Detect whether the upgrade package partition data has been received, and allocate the received upgrade package partition data to the corresponding partition position; and

[0028] The upgrade package partition data in each partition position is verified in sequence, and the partition data verification value of each partition position after the verification is completed is calculated.

[0029] Furthermore, the partition data check value in the speaker is compared with the partition data check value obtained after parsing the header information of the upgrade package. When the comparison results are consistent, the step of completing the update and upgrade of the speaker specifically includes:

[0030] Obtain the partition data verification value of each partition position in the Bluetooth speaker and the partition data verification value of each partition position after the upgrade package information is parsed;

[0031] Calculate the sum of the partition data check values ​​of the Bluetooth speaker and the sum of the partition data check values ​​of the upgrade package information and compare them; and

[0032] When the sum of the partition data check values ​​of the Bluetooth speaker is equal to the sum of the partition data check values ​​of the upgrade package information, the update of the Bluetooth speaker is completed and the upgrade program is exited.

[0033] Furthermore, before the step of comparing the partition data check value in the speaker with the partition data check value obtained after parsing the header information of the upgrade package, when the comparison results are consistent, completing the step of updating and upgrading the speaker, the following steps are also included:

[0034] When the upgrade is completed, the upgrade completion flag on the PC is updated;

[0035] Restart the PC and load the new Bluetooth speaker.

[0036] In order to solve the above technical problems, the embodiment of the present application also provides a Bluetooth speaker upgrade and update system, including:

[0037] The verification module is used to read the device information of the speaker through the PC, and perform an encrypted handshake verification between the PC and the speaker based on the read device information;

[0038] A request module, used to request the upgrade package header information from the PC through the speaker, parse the acquired upgrade package header information, and compare and verify the parsed upgrade package version information with the version information of the speaker;

[0039] The sending module is used to request the upgrade package partition data from the PC when the comparison results are inconsistent, split the upgrade package partition data into block data of a preset size and send them to the speaker;

[0040] A verification module, used to reorganize the block data received by the speaker into upgrade package partition data and write it into the corresponding partition position in the speaker storage area, and detect in real time whether the upgrade package partition data at the partition position has been received. When the reception is completed, the upgrade package partition data in the partition position is verified and a verification value is calculated; and

[0041] The judgment module is used to compare the partition data verification value in the speaker with the partition data verification value obtained after parsing the header information of the upgrade package. When the comparison results are consistent, the update and upgrade of the speaker is completed.

[0042] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0043] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned Bluetooth speaker upgrade and update method when executing the computer program.

[0044] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0045] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned Bluetooth speaker upgrade and update method are implemented.

[0046] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0047] The Bluetooth speaker upgrade and update method described in the embodiment of the present application reads the device information of the speaker through the PC end, and performs encrypted handshake verification between the PC end and the speaker, which can effectively determine that data can be transmitted between the PC end and the speaker, and by requesting the upgrade package header information stored in the PC end, and comparing the upgrade package header information with the read speaker device information, it can confirm whether the current device version of the speaker needs to be upgraded and updated, thereby improving the accuracy of the upgrade operation. By requesting the upgrade package partition data in the PC end, and splitting the upgrade package partition data into block data of a preset size, it is possible to facilitate the data transmission of the upgrade package, and when the transmission is interrupted, the block data can also start transmission from a specified position to achieve breakpoint continuation of data transmission. By verifying the upgrade package partition data, it is possible to effectively ensure that the data transmission is correct, and by comparing the verified check value with the check value in the upgrade package, it is further determined that the upgrade data transmission is completed and correct, thereby accurately judging the completion of the update and upgrade of the speaker. This method can conveniently and quickly upgrade and update the Bluetooth speaker without installing a driver, and can also effectively achieve breakpoint continuation of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 A flowchart of an embodiment of a method for upgrading and updating a Bluetooth speaker according to the present application;

[0050] Figure 2 yes Figure 1 A flowchart of a specific implementation method after step S10;

[0051] Figure 3 yes Figure 1 A flowchart of a specific implementation of step S20;

[0052] Figure 4 yes Figure 1 A flowchart of a specific implementation of step S40;

[0053] Figure 5 yes Figure 1 A flowchart of a specific implementation of step S50;

[0054] Figure 6 yes Figure 1 A flowchart of a specific implementation method after step S50;

[0055] Figure 7 It is a structural schematic diagram of an embodiment of a Bluetooth speaker upgrade and update system according to the present application;

[0056] Figure 8 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0058] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0059] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0060] refer to Figure 1 , shows a flow chart of an embodiment of a method for upgrading and updating a Bluetooth speaker according to the present application. The method for upgrading and updating a Bluetooth speaker comprises the following steps:

[0061] S10, reading the device information of the speaker through the PC, and performing an encrypted handshake verification between the PC and the speaker according to the read device information;

[0062] S20, requesting the upgrade package header information from the PC through the speaker, parsing the obtained upgrade package header information, and comparing and verifying the parsed upgrade package version information with the version information of the speaker;

[0063] S30, when the comparison result is inconsistent, requesting the upgrade package partition data from the PC, splitting the upgrade package partition data into block data of a preset size and sending the block data to the speaker;

[0064] S40, reorganizing the block data received by the speaker into upgrade package partition data and writing the partition data into the corresponding partition position in the speaker storage area, detecting in real time whether the upgrade package partition data at the partition position has been received, and verifying the upgrade package partition data at the partition position and calculating the verification value when the reception is completed; and

[0065] S50, comparing the partition data check value in the speaker with the partition data check value obtained after parsing the header information of the upgrade package, and when the comparison results are consistent, the update and upgrade of the speaker is completed.

[0066] The Bluetooth speaker upgrade and update method described in the embodiment of the present application reads the device information of the speaker through the PC end, and performs encrypted handshake verification between the PC end and the speaker, which can effectively determine that data can be transmitted between the PC end and the speaker. By requesting the upgrade package header information saved in the PC end, and comparing the header information of the upgrade package with the read speaker device information, it can be confirmed whether the current device version of the speaker needs to be upgraded and updated, thereby improving the accuracy of the upgrade operation. By requesting the upgrade package partition data in the PC end, and splitting the upgrade package partition data into block data of a preset size, it is possible to facilitate the data transmission of the upgrade package. In this embodiment, the preset size of the block data is 2k bytes, which can be adjusted accordingly according to the transmission efficiency and data size of the actual data. At the same time, when the transmission is interrupted, the block data can also be transmitted from the specified position to realize the breakpoint continuation of data transmission. By verifying the upgrade package partition data, it can effectively ensure that the data transmission is correct. At the same time, by comparing the verified check value with the check value in the upgrade package, it is further determined that the upgrade data transmission is completed and correct, thereby accurately judging the completion of the update and upgrade of the speaker. This method can conveniently and quickly upgrade the Bluetooth speaker without installing a driver, and can also effectively realize breakpoint resume of data.

[0067] In this embodiment, the above method can be implemented by connecting a USB between the PC and the Bluetooth speaker, and then transmitting data through the USBHID protocol.

[0068] Continue to refer Figure 2 , after step S10, further comprising the following steps:

[0069] S101, detecting whether the encryption handshake verification is successful;

[0070] S102, if successful, sending a request to obtain the header information of the upgrade package to the PC via the Bluetooth speaker; and

[0071] S103, if unsuccessful, exit the upgrade program and perform encryption handshake verification again.

[0072] This embodiment can effectively determine whether the handshake between the PC and the Bluetooth speaker is successful by detecting the encryption handshake verification between the PC and the Bluetooth speaker, so as to achieve effective transmission of data between the PC and the Bluetooth speaker.

[0073] Continue to refer Figure 3 , shows a flowchart of a specific embodiment of step S20, comprising the following steps:

[0074] S201, requesting the PC end for the header information of the upgrade package, and after receiving the request, the PC end sends the header information data of the upgrade package to the speaker;

[0075] S202, parsing the packet header information data in the speaker to obtain corresponding packet header parsing data;

[0076] S203, and detecting whether the packet header parsing data is complete, the packet header parsing data including: device name, version information, partition information, partition address, partition size and partition data check value;

[0077] S204, if complete, compare the version information in the packet header parsed data with the version information of the speaker; and

[0078] S205: If it is incomplete, exit the upgrade program.

[0079] This embodiment requests and parses the upgrade package header information stored in the PC, and compares the parsed header parsed data with the version information of the speaker itself, so as to effectively determine whether the current upgrade package corresponds to the version of the Bluetooth speaker, thereby ensuring that the Bluetooth speaker is effectively upgraded.

[0080] Before step S40, the method further includes the following steps:

[0081] Verifying the received block data and determining whether the block data is transmitted correctly;

[0082] If it is correct, then check whether the block data in the Bluetooth speaker has been received; and

[0083] If incorrect, exit the upgrade program.

[0084] This embodiment can effectively determine whether the block data is correctly transmitted by verifying the block data received by the Bluetooth speaker, so as to avoid interruption or error in block data transmission. When the above situation occurs, the transmitted block data is deleted, the upgrade program is exited, and the upgrade steps are repeated.

[0085] Continue to refer Figure 4 , shows a flowchart of a specific embodiment of step S40, comprising the following steps:

[0086] S401, detecting whether the block data in the Bluetooth speaker has been received;

[0087] S402, if completed, the block data is stored in the Flash of the speaker;

[0088] S403, reading the block data in the Flash and reorganizing the block data into upgrade package partition data;

[0089] S404, detecting whether the upgrade package partition data has been received, and allocating the received upgrade package partition data to the corresponding partition position; and

[0090] S405, verifying the partition data of the upgrade package in each partition position in turn, and calculating the partition data verification value of each partition position after the verification is completed.

[0091] This embodiment can effectively determine whether the block data in the Bluetooth speaker has been received by detecting the block data in the Bluetooth speaker. If it is not completed, the upgrade package partition data in the PC end is re-split and sent again. By storing the block data in the Flash of the speaker, the data can be conveniently saved and the data reorganization operation can be performed in the area. After the data reorganization is completed, the upgrade package partition data is allocated, the upgrade package partition data is written to the corresponding partition position, and the written partition data is verified in turn. In this step, the partition data of the next partition position can be verified only after the partition data of one partition position is verified. If the partition data of the current partition position fails to be verified, the current upgrade package partition data is deleted, and the block data is resent for data reorganization.

[0092] Continue to refer Figure 5 , shows a flowchart of a specific embodiment of step S50, comprising the following steps:

[0093] S501, obtaining the partition data verification value of each partition position in the Bluetooth speaker and the partition data verification value of each partition position after the upgrade package information is parsed;

[0094] S502, calculating the sum of the partition data check values ​​of the Bluetooth speaker and the sum of the partition data check values ​​of the upgrade package information and comparing them; and

[0095] S503, when the sum of the partition data check values ​​of the Bluetooth speaker is equal to the sum of the partition data check values ​​of the upgrade package information, the update of the Bluetooth speaker is completed and the upgrade program is exited.

[0096] This embodiment can effectively obtain the partition data verification value corresponding to each partition position in the speaker by calculating the partition data verification value in the Bluetooth speaker. By summing the partition data verification value of the speaker and the partition data verification value of the upgrade package information, it is convenient to compare the two. When the values ​​of the two are consistent, it indicates that the partition data in the speaker is the same as the partition data in the upgrade package, thereby completing the upgrade and update of the Bluetooth speaker.

[0097] Continue to refer Figure 6 , after step S50, further comprising the following steps:

[0098] S504, when the upgrade is completed, updating the upgrade completion flag of the PC;

[0099] S505, restart the PC and load the new Bluetooth speaker.

[0100] This embodiment can effectively record the upgrade status of the Bluetooth speaker by updating the upgrade completion flag of the upgraded Bluetooth speaker on the PC side, so as to avoid duplication when upgrading multiple Bluetooth speakers. At the same time, by restarting the PC side and loading a new Bluetooth speaker, it can effectively avoid the upgrade and update of the previous speaker The data saved can affect the upgrade and update of the next speaker, thereby improving the effectiveness of the method.

[0101] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0102] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0103] Further references Figure 7 , as a response to the above Figure 1 The present application provides an embodiment of a Bluetooth speaker upgrade and update system, and the device embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0104] like Figure 7 As shown, the Bluetooth speaker upgrade and update system 6 described in this embodiment includes: a verification module 601, a request module 602, a sending module 603, a verification module 604, and a judgment module 605. Among them:

[0105] Verification module 601, used to read the device information of the speaker through the PC, and perform encrypted handshake verification between the PC and the speaker according to the read device information;

[0106] The request module 602 is used to request the upgrade package header information from the PC through the speaker, parse the acquired upgrade package header information, and compare and verify the parsed upgrade package version information with the version information of the speaker;

[0107] The sending module 603 is used for requesting the upgrade package partition data from the PC when the comparison result is inconsistent, splitting the upgrade package partition data into block data of a preset size and sending the block data to the speaker;

[0108] Verification module 604, used to reorganize the block data received by the speaker into upgrade package partition data and write it into the corresponding partition position in the speaker storage area, and detect in real time whether the upgrade package partition data at the partition position has been received. When the reception is completed, verify the upgrade package partition data in the partition position and calculate the verification value; and

[0109] The judgment module 605 is used to compare the partition data verification value in the speaker with the partition data verification value obtained after parsing the header information of the upgrade package. When the comparison results are consistent, the update and upgrade of the speaker is completed.

[0110] In this embodiment, by setting a system module corresponding to the Bluetooth speaker upgrade and update method, the Bluetooth speaker can be upgraded and updated conveniently and quickly without installing a driver, and data breakpoint resumption can also be effectively achieved.

[0111] To solve the above technical problems, the present application also provides a computer device. Figure 8 , Figure 8 This is a basic structural block diagram of the computer device in this embodiment.

[0112] The computer device 7 includes a memory 71, a processor 72, and a network interface 73 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 7 with components 71-73, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0113] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0114] The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 71 can be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 can also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 7. Of course, the memory 71 can also include both the internal storage unit of the computer device 7 and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the computer device 7, such as the program code of the Bluetooth speaker upgrade and update method, etc. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or are to be output.

[0115] The processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 72 is generally used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is used to run the program code stored in the memory 71 or process data, such as running the program code of the Bluetooth speaker upgrade and update method.

[0116] The network interface 73 may include a wireless network interface or a wired network interface. The network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.

[0117] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores a Bluetooth speaker upgrade and update program, and the Bluetooth speaker upgrade and update program can be executed by at least one processor to enable the at least one processor to perform the steps of the Bluetooth speaker upgrade and update method as described above.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0119] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for upgrading a Bluetooth speaker, characterized in that: The steps include: The device information of the speaker is read through the PC, and encrypted handshake verification is performed between the PC and the speaker based on the read device information; Requesting the upgrade package header information from the PC through the speaker, parsing the obtained upgrade package header information, and comparing and verifying the parsed upgrade package version information with the version information of the speaker; When the comparison result is inconsistent, the upgrade package partition data is requested from the PC, the upgrade package partition data is split into block data of a preset size and sent to the speaker; Reorganize the block data received by the speaker into upgrade package partition data and write them into the corresponding partition position in the speaker storage area, detect in real time whether the upgrade package partition data at the partition position has been received, and verify the upgrade package partition data in the partition position and calculate the verification value when the reception is completed; and The partition data verification value in the speaker is compared with the partition data verification value obtained after parsing the upgrade package header information. When the comparison results are consistent, the update and upgrade of the speaker is completed.

2. The method for upgrading the Bluetooth speaker according to claim 1, characterized in that: After the step of reading the device information of the speaker through the PC and performing encryption handshake verification between the PC and the speaker according to the read device information, the following steps are also included: Check whether the encryption handshake verification is successful; If successful, a request to obtain the header information of the upgrade package is sent to the PC via the Bluetooth speaker; and If unsuccessful, exit the upgrade program and re-perform encryption handshake verification.

3. The method for upgrading the Bluetooth speaker according to claim 1, characterized in that: The steps of requesting the upgrade package header information from the PC through the speaker, parsing the obtained upgrade package header information, and comparing and verifying the parsed upgrade package version information with the speaker version information specifically include: Request the upgrade package header information from the PC. After receiving the request, the PC sends the upgrade package header information data to the speaker; Parse the packet header information data in the speaker, obtain the corresponding packet header parsing data, and detect whether the packet header parsing data is complete, the packet header parsing data includes: device name, version information, partition information, partition address, partition size and partition data check value; If complete, compare the version information in the packet header parsed data with the version information of the speaker; and If incomplete, exit the upgrade process.

4. The method for upgrading the Bluetooth speaker according to claim 1, characterized in that: Before the step of reorganizing the block data received by the speaker into upgrade package partition data and writing the partition data into the corresponding partition position in the speaker storage area, detecting in real time whether the upgrade package partition data at the partition position has been received, and verifying the upgrade package partition data in the partition position when the reception is completed and calculating the verification value, the following steps are also included: Verifying the received block data and determining whether the block data is transmitted correctly; If it is correct, then check whether the block data in the Bluetooth speaker has been received; and If incorrect, exit the upgrade program.

5. The method for upgrading the Bluetooth speaker according to claim 1, characterized in that: The steps of reorganizing the block data received by the speaker into upgrade package partition data and writing the partition data into the corresponding partition position in the speaker storage area, detecting in real time whether the upgrade package partition data at the partition position has been received, and verifying the upgrade package partition data at the partition position and calculating the verification value when the reception is completed specifically include: Check whether the block data in the Bluetooth speaker has been received; If completed, the block data is stored in the Flash of the speaker; Reading the block data in the Flash and reorganizing the block data into upgrade package partition data; Detect whether the upgrade package partition data has been received, and allocate the received upgrade package partition data to the corresponding partition position; and The upgrade package partition data in each partition position is verified in sequence, and the partition data verification value of each partition position after the verification is completed is calculated.

6. The method for upgrading the Bluetooth speaker according to claim 1, characterized in that: The step of comparing the partition data check value in the speaker with the partition data check value obtained after parsing the header information of the upgrade package, and when the comparison results are consistent, completing the update and upgrade of the speaker specifically includes: Obtain the partition data verification value of each partition position in the Bluetooth speaker and the partition data verification value of each partition position after the upgrade package information is parsed; Calculate the sum of the partition data check values ​​of the Bluetooth speaker and the sum of the partition data check values ​​of the upgrade package information and compare them; and When the sum of the partition data check values ​​of the Bluetooth speaker is equal to the sum of the partition data check values ​​of the upgrade package information, the update of the Bluetooth speaker is completed and the upgrade program is exited.

7. The method for upgrading and updating a Bluetooth speaker according to claim 1, characterized in that: Before the step of comparing the partition data check value in the speaker with the partition data check value obtained after parsing the header information of the upgrade package, when the comparison results are consistent, completing the update and upgrade of the speaker, the following steps are also included: When the upgrade is completed, the upgrade completion flag on the PC is updated; Restart the PC and load the new Bluetooth speaker.

8. A Bluetooth speaker upgrade and update system, characterized in that: include: The verification module is used to read the device information of the speaker through the PC, and perform an encrypted handshake verification between the PC and the speaker based on the read device information; A request module, used to request the upgrade package header information from the PC through the speaker, parse the acquired upgrade package header information, and compare and verify the parsed upgrade package version information with the version information of the speaker; The sending module is used to request the upgrade package partition data from the PC when the comparison results are inconsistent, split the upgrade package partition data into block data of a preset size and send them to the speaker; A verification module is used to reorganize the block data received by the speaker into upgrade package partition data and write it into the corresponding partition position in the speaker storage area, and detect in real time whether the upgrade package partition data at the partition position has been received. When the reception is completed, the upgrade package partition data in the partition position is verified and a verification value is calculated; and The judgment module is used to compare the partition data verification value in the speaker with the partition data verification value obtained after parsing the header information of the upgrade package. When the comparison results are consistent, the update and upgrade of the speaker is completed.

9. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the Bluetooth speaker upgrade and update method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the Bluetooth speaker upgrade and update method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Transmitter parameter configuration method and device, readable storage medium and electronic equipment

    CN120800440A