Firmware upgrade method and storage medium for smart seat
The control application of the smart seat sends a firmware upgrade request with the seat identification to the application server. The server obtains the target upgrade package based on the identification and distributes it to each circuit board, which solves the problem of mismatched firmware updates in multi-module upgrades of smart seats. , achieving improved stability and compatibility.
Patent Information
- Application Number
- CN202410764310.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-14
AI Technical Summary
During the firmware upgrade process of smart seats, due to the differences in hardware solutions of different circuit boards, the firmware updates do not match, affecting stability and compatibility. The existing technical operation process is complex and does not support simultaneous upgrades of multiple modules, increasing the risk of incompatibility.
The control application of the smart seat sends a firmware upgrade request with the seat identification to the application server. The server obtains the target upgrade package and distributes it to the main control circuit board based on the seat model, communication architecture type and circuit board model combination of the identification. , ensure that each circuit board receives the corresponding firmware, and perform a unified upgrade after all circuit boards are confirmed.
It improves the stability and compatibility of smart seat firmware upgrades, simplifies the multi-module upgrade process, reduces the risk of incompatibility, and improves user experience and system maintainability.
Smart Images

Figure CN118363634B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a firmware upgrade method and storage medium for a smart seat. Background Art
[0002] Firmware upgrades for smart seats are essential to maintaining the functional stability and diversity of smart seats. Smart seats are generally equipped with multiple circuit boards, so sometimes multiple circuit boards need to be upgraded for firmware. In related technologies, due to different production batches, the same seat model may use different hardware circuit solutions, which may cause firmware mismatches when upgrading multiple circuit boards, affecting the stability of firmware upgrades. At the same time, the upgrade method is generally adopted in a preset order. In actual production, it is found that this approach is likely to lead to inconsistent firmware versions of different circuit boards during the upgrade process, and there is a risk of incompatibility. Summary of the invention
[0003] The following is a summary of the subject matter of the detailed description of the present disclosure. This summary is not intended to limit the scope of the claims.
[0004] The disclosed embodiments provide a firmware upgrade method and storage medium for a smart seat, which can improve the stability of the firmware upgrade of the smart seat while improving the compatibility of multiple circuit boards to be upgraded during the firmware upgrade process.
[0005] On the one hand, an embodiment of the present disclosure provides a method for upgrading firmware of a smart seat, comprising:
[0006] The control application of the smart seat sends a firmware upgrade request to the application server, wherein the firmware upgrade request carries the seat identification of the smart seat, and the seat identification is obtained by splicing the first sub-identifier, the second sub-identifier and the third sub-identifier, the first sub-identifier is used to indicate the seat model of the smart seat, the second sub-identifier is used to indicate the communication architecture type of the smart seat, and the third sub-identifier is used to indicate the circuit board model combination of multiple circuit boards in the smart seat;
[0007] The application server accesses a primary directory according to the first sub-identifier, determines a secondary directory in the primary directory according to the second sub-identifier, determines a tertiary directory in the secondary directory according to the third sub-identifier, obtains a target upgrade package in the tertiary directory, and sends the target upgrade package to the main control circuit board of the smart seat, wherein the target upgrade package includes upgrade firmware corresponding to multiple circuit boards to be upgraded in the smart seat;
[0008] The main control circuit board distributes the multiple upgraded firmwares to the corresponding circuit boards to be upgraded, and after receiving confirmation messages sent by all the circuit boards to be upgraded, sends an upgrade notification to each circuit board to be upgraded;
[0009] The plurality of circuit boards to be upgraded respond to the upgrade notification and simultaneously perform an upgrade operation based on the upgrade firmware.
[0010] On the other hand, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned firmware upgrade method.
[0011] The disclosed embodiment includes at least the following beneficial effects: the control application of the smart seat sends a firmware upgrade request to the application server. Since the firmware upgrade request carries the seat identification of the smart seat, the seat identification is obtained by splicing the first sub-identifier, the second sub-identifier and the third sub-identifier. The first sub-identifier is used to indicate the seat model of the smart seat, the second sub-identifier is used to indicate the communication architecture type of the smart seat, and the third sub-identifier is used to indicate the circuit board model combination of multiple circuit boards in the smart seat. Therefore, it is convenient for the application server to integrate the seat model, communication architecture type and circuit board model combination based on the seat identification, and then access the first-level directory according to the first sub-identifier, determine the second-level directory in the first-level directory according to the second sub-identifier, and access the second-level directory in the second-level directory according to the third sub-identifier. A third-level directory is determined in the first-level directory, a target upgrade package is obtained in the third-level directory, and the target upgrade package is sent to the main control circuit board of the smart seat. The main control circuit board then distributes multiple upgrade firmware to the corresponding circuit boards to be upgraded, so that multiple circuit boards to be upgraded can all receive their corresponding upgrade firmware, thereby ensuring the matching degree of the upgrade firmware and improving the stability of the firmware upgrade of the smart seat. On this basis, after receiving the confirmation message sent by all the circuit boards to be upgraded, an upgrade notification is sent to each circuit board to be upgraded. Multiple circuit boards to be upgraded respond to the upgrade notification and perform upgrade operations based on the upgrade firmware at the same time. The firmware version of the circuit boards to be upgraded can be kept unified as much as possible during the upgrade process, thereby improving the compatibility of multiple circuit boards to be upgraded during the firmware upgrade process.
[0012] Other features and advantages of the present disclosure will be set forth in the following description, and in part will be apparent from the description, or may be learned by practicing the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are used to provide further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure.
[0014] Figure 1A schematic diagram of an optional implementation environment provided for an embodiment of the present disclosure;
[0015] Figure 2 An optional flowchart of a firmware upgrade method for a smart seat provided in an embodiment of the present disclosure;
[0016] Figure 3 An optional schematic diagram of constructing a target directory provided by an embodiment of the present disclosure;
[0017] Figure 4 An optional schematic diagram of generating an upgrade firmware file name provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0019] It should be noted that in various specific embodiments of the present disclosure, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as the target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present disclosure needs to obtain the attribute information of the target object, the separate permission or separate consent of the target object will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the target object, the necessary target object-related data used to enable the normal operation of the embodiment of the present disclosure will be obtained.
[0020] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0021] To facilitate understanding of the technical solution provided by the embodiments of the present disclosure, some key terms used in the embodiments of the present disclosure are explained here:
[0022] Firmware: refers to the device driver stored inside the device. It is a program code embedded in the hardware device and is used to control the basic functions and operations of the device, such as the startup process, initializing the device, controlling hardware functions, and communicating with other devices.
[0023] Communication architecture: a system that uses switching equipment or transmission equipment to interconnect geographically dispersed user terminal devices to achieve communication and information exchange, including a variety of connection methods and communication protocols. Its types can be divided into local area networks, wide area networks and mobile communication networks according to network coverage, and can be divided into star structures, ring structures, bus structures, tree structures, mesh structures, etc. according to topological structures. Through reasonable communication architecture design, the stability, efficiency and security of the communication process can be ensured.
[0024] Signal frequency: refers to the number of times a signal changes in a unit of time. It is an important parameter that describes how fast a signal changes over time. It is widely used in the fields of communications, radar, audio processing, image processing, etc.
[0025] Temperature rise: It is used to measure the value of each component in electronic and electrical equipment above the ambient temperature. It is of great significance for evaluating the performance, stability and safety of various electronic and electrical equipment. It is mostly used in electronic and electrical equipment, motors, materials science, chemical industry and other fields.
[0026] Electromagnetic interference: refers to the impact of the interaction between electromagnetic fields and current, voltage, and charge on the performance of electronic equipment and transmission systems. This interaction can be manifested as the transmission, radiation, or induction of electromagnetic energy. By analyzing the causes, effects, and suppression methods of electromagnetic interference, we can better understand and control electromagnetic interference problems.
[0027] In actual production applications, firmware upgrades for smart seats are essential to maintaining the functional stability and diversity of smart seats. At present, most firmware upgrades for smart seats only support single-module upgrades. For situations where there are multiple circuit boards in smart seats, single-module upgrade solutions cannot adapt to such complex situations. A few firmware upgrade solutions support multi-module upgrades, but multiple modules cannot be upgraded at the same time, resulting in inconsistent firmware versions between multiple modules, increasing the risk of incompatibility. Secondly, although some solutions support multi-module upgrades, their operating procedures are complicated and require a lot of secondary development work. The system has poor maintainability and high maintenance costs, and cannot be put into actual production in large quantities. In addition, most of the current firmware upgrade solutions do not support confirmation of upgrades through applications (APPs), which limits the convenience and flexibility of users during use.
[0028] Based on this, the embodiments of the present disclosure provide a firmware upgrade method and storage medium for a smart seat, which can keep the firmware version of the circuit board to be upgraded as unified as possible during the upgrade process, and improve the compatibility of multiple circuit boards to be upgraded during the firmware upgrade process.
[0029] Reference Figure 1 , Figure 1 A schematic diagram of an optional implementation environment provided for an embodiment of the present disclosure, the implementation environment includes a smart chair 101 and a server 102. Specifically, the control application of the smart chair 101 sends a firmware upgrade request to the server 102, the server 102 accesses the primary directory according to the first sub-identifier, determines the secondary directory in the primary directory according to the second sub-identifier, determines the tertiary directory in the secondary directory according to the third sub-identifier, obtains the target upgrade package in the tertiary directory, and sends the target upgrade package to the main control circuit board of the smart chair 101, the main control circuit board distributes multiple upgrade firmware to the corresponding circuit boards to be upgraded, and after receiving confirmation messages sent by all the circuit boards to be upgraded, sends upgrade notifications to each circuit board to be upgraded, and multiple circuit boards to be upgraded respond to the upgrade notifications and perform upgrade operations based on the upgrade firmware at the same time, completing the circuit board upgrade.
[0030] Reference Figure 2 , Figure 2 An optional flowchart of a firmware upgrade method for a smart seat provided in an embodiment of the present disclosure may specifically include but not be limited to the following steps S201 to S204:
[0031] Step S201: The control application of the smart seat sends a firmware upgrade request to the application server.
[0032] Among them, the firmware upgrade request carries the seat identification of the smart seat, and the seat identification is obtained by splicing the first sub-identifier, the second sub-identifier and the third sub-identifier. The first sub-identifier, the second sub-identifier and the third sub-identifier can be composed of one or more combinations of letters, numbers and characters. The first sub-identifier is used to indicate the seat model of the smart seat, and the seat model can also be directly used to represent it. For example, for a certain smart seat, its first sub-identifier can be "A1" or the seat model "AIC15473"; the second sub-identifier is used to indicate the communication architecture type of the smart seat, and the communication architecture type includes local area network, wide area network, mobile communication network, etc. For example, when the second sub-identifier is "B1", its communication architecture type is local area network; the third sub-identifier is used to indicate the circuit board model combination of multiple circuit boards in the smart seat, and the multiple circuit boards include a main control circuit board or a node circuit board. The node circuit board is a circuit board that realizes the seat function, such as a massage module circuit board, a music playing circuit board, etc.
[0033] Among the multiple circuit boards of the smart seat, each circuit board has its own circuit board model, and the third sub-identifier indicates a combination of multiple circuit board models. For example, as shown in Table 1, Table 1 is an optional schematic table of the circuit board model combination corresponding to the third sub-identifier provided in the embodiment of the present disclosure. The model of the first circuit board is "T1", the model of the second circuit board is "T2", the model of the third circuit board is "T3", the model of the fourth circuit board is "T4", and the model of the fifth circuit board is "T5". When the third sub-identifier is "C1", the circuit board model combination it indicates is "T1-T2-T3-T4-T5"; when the third sub-identifier is "C2", the circuit board model combination it indicates is "T1-T2-T4"; when the third sub-identifier is "C5", the circuit board model combination it indicates is "T2-T3-T5".
[0034] Table 1 The third sub-identifier correspondence table
[0035]
[0036] After obtaining the first sub-identifier, the second sub-identifier, and the third sub-identifier, the first sub-identifier, the second sub-identifier, and the third sub-identifier are spliced to obtain the seat identification, as shown in Table 2, which is an optional schematic table of the seat identification of the smart seat provided in the embodiment of the present disclosure. Assuming that the seat model corresponding to the first sub-identifier A1 is "AIC02014", the first sub-identifier A2 corresponds to "AIC42918", the first sub-identifier A3 corresponds to "AIC93404", the communication architecture type corresponding to the second sub-identifier B1 is a local area network, B2 corresponds to a wide area network, and B3 corresponds to a mobile communication network, when the first sub-identifier is A1, the second sub-identifier is B1, and the third sub-identifier is C1, its seat identification is A1B1C1, and the seat identification indicates that the seat model of the smart seat is AIC02014, and the communication architecture type B1 adopted by the seat model is a local area network. Referring to Table 1, corresponding to the third sub-identifier C1, the circuit board model combination for realizing the smart seat function is "T1-T2-T3-T4-T5".
[0037] Table 2 Seat marking
[0038]
[0039] After determining the seat identification, the seat identification is saved in the firmware upgrade request, and the control application of the smart seat sends the firmware upgrade request to the application server, so that the application server can perform subsequent upgrade operations based on the firmware upgrade request.
[0040] Step S202: The application server accesses the first-level directory according to the first sub-identifier, determines the second-level directory in the first-level directory according to the second sub-identifier, determines the third-level directory in the second-level directory according to the third sub-identifier, obtains the target upgrade package in the third-level directory, and sends the target upgrade package to the main control circuit board of the smart seat.
[0041] Among them, the first-level directory contains the seat models of all smart seats, the second-level directory contains the communication architecture types corresponding to the seat models of smart seats, the third-level directory contains circuit board model combinations of multiple circuit boards corresponding to the communication architecture types, and the target upgrade package includes the upgrade firmware corresponding to multiple circuit boards to be upgraded in the smart seats.
[0042] Specifically, the application server constructs a target directory according to the relationship between the seat model of the smart seat, the communication architecture type corresponding to the seat model, and the circuit board model combination corresponding to the communication architecture type. The target directory can accurately obtain the corresponding relationship between multiple sub-directories under the current directory, thereby avoiding upgrade errors or conflicts caused by combination errors between different sub-identifiers. In the target directory, the application server accesses the first-level directory according to the first sub-identifier, obtains the seat model of the smart seat corresponding to the first sub-identifier, and each seat model corresponds to a different communication architecture type. According to the second sub-identifier, the communication architecture type of the seat model corresponding to the first sub-identifier is determined in the first-level directory, and a second-level directory based on the first sub-identifier under the first-level directory is obtained. Then, according to the third sub-identifier, the circuit board model combination corresponding to each communication architecture type is determined in the second-level directory, and a third-level directory based on the third sub-identifier under the second-level directory is obtained. Different upgrade parameters combined by the first-level directory, the second-level directory, and the third-level directory are obtained in the third-level directory. A target upgrade package is generated based on the combined upgrade parameters, and the target upgrade package is sent to the main control circuit board of the smart seat, waiting for the subsequent upgrade of multiple circuit boards in the smart seat.
[0043] For example, refer to Figure 3 , Figure 3 An optional schematic diagram of a target directory constructed for an embodiment of the present disclosure, wherein the first-level directory includes seat models of smart seats corresponding to first sub-identifiers A1, A2 and A3. Based on the first sub-identifier A1, it can be obtained that there are three types of communication architectures corresponding to the seat model corresponding to A1, namely B1, B2 or B3. The circuit board model combination corresponding to the communication architecture type B1 is C1 or C4, and the upgrade parameter in the target upgrade package can be "A1B1C1" or "A1B1C4"; the circuit board model combination corresponding to the communication architecture type B2 is C2, and the upgrade parameter in the target upgrade package is "A1B2C2"; the circuit board model combination corresponding to the communication architecture type B3 is C3, and the upgrade parameter in the target upgrade package is "A1B3C3".
[0044] In a possible implementation, before the application server accesses the primary directory according to the first sub-identifier, the management terminal may upload multiple upgrade firmwares to the application server, as well as a firmware mapping table for indicating the association between the upgrade firmwares and the circuit board identifiers of the corresponding circuit boards to be upgraded. The application server generates a file name according to the upgrade firmware corresponding to the circuit board identifier, and stores the upgrade firmware based on the file name. When the application server subsequently receives the upgrade firmware sent by the management terminal again, if the file name of the currently received upgrade firmware is the same as that of the stored upgrade firmware, the application server checks the whether to allow overwriting field corresponding to the stored upgrade firmware, and when the whether to allow overwriting field indicates that the upgrade firmware is allowed to be overwritten and stored, the currently received upgrade firmware is overwritten with the stored upgrade firmware for storage. The upgrade firmware is used to update the function of the circuit board, including newly created firmware and historical firmware; the circuit board identifier is used to distinguish different circuit boards to be upgraded, and a circuit board to be upgraded has a unique corresponding circuit board identifier. The length of the circuit board identifier is fixed and can be composed of one or more combinations of numbers, letters, and characters; the firmware mapping table is used to store the association between the upgrade firmware and the circuit board identifier, and a whether to allow overwriting field is set in the firmware mapping table, and the whether to allow overwriting field is used to indicate whether the upgrade firmware is allowed to be overwritten and stored.
[0045] Specifically, a firmware mapping table is created in the management terminal, a unique corresponding circuit board identifier is assigned to each circuit board to be upgraded, the upgrade firmware is obtained, the association relationship between the upgrade firmware and the circuit board identifier of the corresponding circuit board to be upgraded is determined, and a field whether to allow overwriting is generated for each upgrade firmware, for example, when the field whether to allow overwriting is "TRUE", it indicates that the upgrade firmware is not allowed to be forcibly overwritten by other firmware, and when the field whether to allow overwriting is "FALSE", it indicates that the upgrade firmware is allowed to be forcibly overwritten by other firmware, and the association relationship between the upgrade firmware and the circuit board identifier, as well as the association of the field whether to allow overwriting is saved in the firmware mapping table. Then, the management terminal uploads the upgrade firmware and the firmware mapping table to the application server, and the application server generates a file name for the corresponding upgrade firmware according to the circuit board identifier, wherein the file name generated by the application server is generated based on the circuit board identifier in a numerical order or an alphabetical order, and different upgrade firmwares correspond to different file names, and the upgrade firmware is stored in the application server's persistent database based on the file name, and at the same time, an upgrade firmware information storage table is created in the persistent database, and the upgrade firmware file name is associated with the firmware mapping table and saved in the upgrade firmware information storage table.
[0046] When the application server subsequently receives the upgrade firmware sent by the management terminal again, if the file name of the currently received upgrade firmware is the same as the file name of the stored upgrade firmware, first check the whether to allow overwriting field corresponding to the stored upgrade firmware, and retrieve the corresponding whether to allow overwriting field in the upgrade firmware information storage table based on the upgrade firmware file name. When the whether to allow overwriting field indicates that the upgrade firmware is allowed to be overwritten and stored, overwrite the stored upgrade firmware with the currently received upgrade firmware, inherit the whether to allow overwriting field information corresponding to the overwritten upgrade firmware, and associate the currently received upgrade firmware, the whether to allow overwriting field information, and the circuit board identifier corresponding to the currently received upgrade firmware with the associated storage. ; When the whether to allow overwriting field indicates that the upgrade firmware is not allowed to be overwritten and stored, the currently received upgrade firmware is deleted in the application server, or the application server renames the file name of the currently received upgrade firmware, determines the circuit board identifier of the circuit board to be upgraded associated with the upgrade firmware, sets the whether to allow overwriting field for the upgrade firmware, and then generates a pending identification for the upgrade firmware, and saves the upgrade firmware, circuit board identification, whether to allow overwriting field information and pending identification in an associated manner in the firmware mapping table, and sends these upgrade firmware with pending identification to the management terminal when the application server is idle, and the management terminal re-verifies and processes these firmware before uploading them.
[0047] For example, as shown in Table 3, Table 3 is an optional schematic table of the firmware mapping table provided in the embodiment of the present disclosure, and the firmware mapping table includes a circuit board identification, an upgrade firmware, and a field for whether to allow overwriting. There are three upgrade firmwares associated with the circuit board identification BOARD_0100, namely, the first upgrade firmware, the second upgrade firmware, and the third upgrade firmware, that is, the upgrade firmware that can be applied to the circuit board to be upgraded corresponding to the circuit board identification BOARD_0100 is the first upgrade firmware, the second upgrade firmware, or the third upgrade firmware, and the field for whether to allow overwriting generated for the first upgrade firmware is "FALSE", the field for whether to allow overwriting generated for the second upgrade firmware is "TRUE", and the field for whether to allow overwriting generated for the third upgrade firmware is "FALSE". There is one upgrade firmware associated with the circuit board identification BOARD_0102, which is the sixth upgrade firmware, and the field for whether to allow overwriting generated for the sixth upgrade firmware is "FALSE". After uploading the firmware mapping table to the application server, the application server generates a file name for the upgrade firmware based on the circuit board identifier, and associates the generated file name list with the firmware mapping table to save an upgrade firmware information storage table, as shown in Table 4. Table 4 is an optional schematic table of the upgrade firmware information storage table provided in an embodiment of the present disclosure. For the upgrade firmware associated with the circuit board identifier BOARD_0100, the file name generated for the first upgrade firmware is BOARD_0100A, the file name generated for the second upgrade firmware is BOARD_0100B, and the file name generated for the third upgrade firmware is BOARD_0100C; the file names generated for the fourth upgrade firmware and the fifth upgrade firmware associated with the circuit board identifier BOARD_0101 are BOARD_0101A and BOARD_0101B, respectively; the file name generated for the sixth upgrade firmware associated with the circuit board identifier BOARD_0102 is BOARD_0102A; the file name generated for the seventh upgrade firmware associated with the circuit board identifier BOARD_0103 is BOARD_0102A. When the application server receives the newly uploaded upgrade firmware with the file name BOARD_0100B, which is the same as the file name of the second upgrade firmware stored in the persistent database, the upgrade firmware information storage table retrieves the corresponding whether to allow overwriting field based on the upgrade firmware file name and finds that the field is "TRUE", indicating that the stored second upgrade firmware is allowed to be overwritten and saved, and the newly uploaded upgrade firmware is stored over the stored second upgrade firmware.
[0048] Table 3 Firmware mapping table
[0049]
[0050] Table 4 Upgrade firmware information storage table
[0051]
[0052] In a possible implementation, in order to prevent the application server from generating the same file name for the corresponding upgrade firmware according to the circuit board identifier, when generating the file name for the upgrade firmware, the application server may obtain the timestamp when the upgrade firmware is received, generate a first sequence according to the timestamp, randomly assign a second sequence to each upgrade firmware, and concatenate the circuit board identifier, the first sequence, and the second sequence to generate the corresponding upgrade firmware file name. The first sequence is used to record the timestamp when the application server receives the upgrade firmware, and the length of the first sequence is a preset fixed length. When the length of the content of the generated first sequence is shorter than the preset length of the first sequence, the insufficient part or the missing part may be filled with zeros. The first sequence may be in the form of "year-month-day-hour-minute-second-millisecond", using a 24-hour timing method. For example, when the first sequence is "2016012816490631", it indicates that the timestamp when the upgraded firmware was received was 16:49:06:31 on January 28, 2016. The second sequence is used to distinguish multiple upgraded firmware received at the time points corresponding to the timestamps. The values of the second sequence may be represented by different letters, numbers or characters, and may also be incremented starting from 0.
[0053] Specifically, when the management terminal uploads multiple upgrade firmwares containing the same circuit board identifier at the same time, the application server obtains the timestamp when the upgrade firmware is received, and the circuit board identifier of the circuit board to be upgraded corresponding to the upgrade firmware. A first sequence is generated based on the timestamp. If multiple upgrade firmwares are received simultaneously at the time point corresponding to the current timestamp, for any upgrade firmware, first check whether a file name has been generated at the time point corresponding to the current timestamp. If no upgrade firmware has generated a file name at the time point corresponding to the current timestamp, then the upgrade firmware is assigned a starting value of the second sequence, for example, the value of the second sequence is 0; if a file name has been generated for other upgrade firmware at the time point corresponding to the current timestamp, the application server will add 1 to the value of the previous second sequence as the second sequence of the current upgrade firmware. For example, if the value of the previous second sequence is 6, then the value of the second sequence of the current upgrade firmware is 7. The circuit board identifier, the first sequence, and the second sequence are concatenated to generate the corresponding upgrade firmware file name. For example, referring to Figure 4 , Figure 4An optional schematic diagram of generating an upgrade firmware file name provided in an embodiment of the present disclosure, there are three upgrade firmwares corresponding to the circuit board to be upgraded uploaded by the management terminal, wherein the circuit board identification of the circuit board to be upgraded is BOARD_0100, and since the timestamps of the three upgrade firmwares received by the application server are the same, the first sequences generated by the application server for the three upgrade firmwares according to the receiving timestamp are all 2020060110154609. In order to distinguish the three upgrade firmwares, the second sequence generated for the first upgrade firmware is 0, so the file name of the first upgrade firmware is BOARD_010020200601101546090, the second sequence generated for the second upgrade firmware is 1, so the file name of the second upgrade firmware is BOARD_010020200601101546091, and the second sequence generated for the third upgrade firmware is 2, so the file name of the third upgrade firmware is BOARD_010020200601101546092. Since the length of the circuit board identifier and the first sequence is fixed, the corresponding circuit board identifier, the first sequence and the second sequence can still be extracted from the file name of the upgrade firmware according to the length of the circuit board identifier and the length of the first sequence in subsequent operations. By using the combination of the circuit board identifier, the first sequence and the second sequence to generate a file name for the upgrade firmware, the file name is generated with a randomness that is highly irregular and unpredictable while ensuring the uniqueness of the file name, thereby enhancing the security of the upgrade firmware and effectively preventing malicious users from illegally accessing and downloading unauthorized upgrade firmware by guessing or scanning the Uniform Resource Locator (URL).
[0054] In addition, when the application server is unable to obtain the timestamp of receiving the upgraded firmware, the firmware mapping table is maliciously tampered with or deleted, or the application server crashes, if the upgraded firmware received by the application server has the same file name as the stored upgraded firmware, it refuses to store the upgraded firmware and returns an error message "the file name already exists" to the management terminal, avoiding data tampering or conflict with the stored upgraded firmware when the application server is unable to process the upgraded firmware with the same name.
[0055] Step S203: the main control circuit board distributes the multiple upgraded firmwares to the corresponding circuit boards to be upgraded, and after receiving confirmation messages sent by all the circuit boards to be upgraded, sends an upgrade notification to each circuit board to be upgraded.
[0056] Specifically, in any smart seat, the main control circuit board is used to distribute and schedule multiple upgrade firmwares. When distributing the upgrade firmware, the upgrade firmware is distributed to the corresponding circuit boards to be upgraded based on the firmware mapping table. After receiving the upgrade firmware, the circuit boards to be upgraded respond and send a confirmation upgrade message to the main control circuit board. When the main control circuit board receives the confirmation messages sent by all the circuit boards to be upgraded, it sends an upgrade notification to each circuit board to be upgraded. By allowing the circuit boards to be upgraded to send confirmation messages in response to the distributed upgrade firmware, it is ensured that all circuit boards to be upgraded are in normal working condition. At this time, the upgrade notification is sent to ensure that all circuit boards to be upgraded can be upgraded at the same time based on the upgrade notification, ensuring that the firmware versions of all circuit boards to be upgraded are unified during the upgrade process, thereby improving the compatibility of the circuit boards to be upgraded during the firmware upgrade process. Among them, the upgrade notification carries the upgrade parameters of the circuit boards to be upgraded during the upgrade process, and the upgrade parameters include the board power, signal frequency, and upgrade duration of the circuit boards to be upgraded.
[0057] In the process of upgrading multiple circuit boards to be upgraded at the same time, due to the differences in components and chips on each circuit board to be upgraded, their operating power is different. When all the circuit boards to be upgraded are closely arranged in the smart seat and upgraded at the same time, in order to improve the stability of the upgrade, it may be necessary to optimize the energy consumption of the circuit boards to be upgraded. In addition, external factors such as the electromagnetic field strength and frequency of the environment in which the smart seat is located may also affect the firmware upgrade of the circuit boards to be upgraded. In order for all circuit boards to be upgraded in the smart seat to complete the firmware upgrade smoothly and efficiently, it is necessary to analyze the power consumption, temperature changes and electromagnetic compatibility issues of each circuit board to be upgraded. Based on these analyses, the power of the actual power supply can be determined, appropriate heat dissipation measures can be taken, and electromagnetic interference can be reduced by strengthening filtering and other measures.
[0058] In a possible implementation, in the process of sending upgrade notifications to each circuit board to be upgraded, specifically, the total power of multiple circuit boards to be upgraded is determined according to the board power of the multiple circuit boards to be upgraded, a first evaluation factor is constructed according to the ratio of the total power to the preset power, the total temperature rise of the multiple circuit boards to be upgraded is determined according to the board power of the multiple circuit boards to be upgraded, a second evaluation factor is constructed according to the ratio of the total temperature rise to the preset temperature rise, the board electromagnetic interference between the multiple circuit boards to be upgraded is determined according to the signal frequency of the multiple circuit boards to be upgraded, a third evaluation factor is determined according to the ratio of the board electromagnetic interference to the preset electromagnetic interference, the first evaluation factor, the second evaluation factor and the third evaluation factor are weightedly summed to obtain a target evaluation function, the actual values of the board power and the signal frequency are determined according to the target evaluation function, an upgrade notification is generated based on the actual values of the board power and the signal frequency, and the upgrade notification is sent to each circuit board to be upgraded. Among them, the preset power, preset temperature rise and preset electromagnetic interference are all pre-set parameters. The preset power is used to indicate the energy consumption budget of all circuit boards to be upgraded, the preset temperature rise is used to indicate the temperature limit of thermal management of all circuit boards to be upgraded when they generate heat during the upgrade process, and the preset electromagnetic interference is used to indicate that all circuit boards to be upgraded are subject to interference limitations of electromagnetic compatibility during the upgrade process; the evaluation factor is used to understand the relative relationship between the calculated value and the predicted value, and the parameters involved in the calculation can be adjusted and optimized based on the evaluation factor.
[0059] Specifically, the board power of each circuit board to be upgraded is obtained, and the power of all the boards is added up to obtain the total power of the multiple circuit boards to be upgraded. It can be expressed by the following formula, where For the i The board power of the circuit board to be upgraded, n The total number of circuit boards to be upgraded.
[0060]
[0061] According to the total power and preset power The ratio of constructs the first evaluation factor, which can be expressed as ; Determine the total temperature rise of multiple boards based on total power , based on the total temperature rise and the preset temperature rise The ratio of constructs the second evaluation factor, which can be expressed as ; Get the signal frequency of each circuit board to be upgraded, based on the
[0062] Calculate the electromagnetic interference between multiple circuit boards to be upgraded by card power and signal frequency. It can be obtained by the following formula, where For thei The signal frequency of the circuit board to be upgraded, k is the proportionality constant.
[0063]
[0064] According to the board electromagnetic interference and the preset electromagnetic interference The ratio of constructs the third evaluation factor, which can be expressed as . Get the weights corresponding to the first evaluation factor, the second evaluation factor, and the third evaluation factor respectively, and convert the first evaluation factor
[0065] The objective evaluation function is obtained by weighted summing the factor, the second evaluation factor, and the third evaluation factor with their corresponding weights. F It can be expressed by the following formula, where is the weight of the first evaluation factor, is the weight of the second evaluation factor, is the weight of the third evaluation factor.
[0066]
[0067] Based on the objective evaluation function F The calculated results are for the board power of each circuit board to be upgraded. And the signal frequency of each circuit board to be upgraded Make adjustments to determine the board power of each circuit board to be upgraded And the signal frequency of each circuit board to be upgraded The final actual value is based on the board power And the signal frequency The actual value of generates an upgrade notification and sends the upgrade notification to each upgrade circuit board.
[0068] When obtaining the weights corresponding to the first evaluation factor, the second evaluation factor, and the third evaluation factor, the weight values can be preset according to the total power, the total temperature rise, and the degree of influence of electromagnetic interference on the circuit board to be upgraded. Alternatively, a deep learning model can be constructed, and the state space information and action space information of the smart seat are used as parameter input values in the deep learning model, wherein the state space information includes all relevant state information of the smart seat, including the current total power, the current total temperature rise, the current electromagnetic interference level, the smart seat usage rate, the ambient temperature of the smart seat, user-set preferences (such as temperature preference, total power preference, etc.), etc.; the action space information defines all possible actions that the smart seat can perform, including adjusting the power of the smart seat heating / cooling system, adjusting the speed of the fan inside the smart seat, adjusting the energy management strategy of the smart seat, adjusting the firmware upgrade strategy of the smart seat, etc. Next, the reward function is defined based on the total power, total temperature rise, electromagnetic interference control, user satisfaction and other aspects of the smart seat. Through the reward mechanism, the total power of the smart seat is minimized, the total temperature rise is controlled within a safe range, and the electromagnetic interference level is controlled below the standard to maximize user satisfaction. In the deep learning model, the reward function is mapped to a specific value, which represents the performance of the deep learning model at a certain iteration. The weights corresponding to the first evaluation factor, the second evaluation factor, and the third evaluation factor are used as parameters of the model to balance the different parts of the reward function. The reward function can be expressed by the following formula, where: R Represents the reward value, P is the current total power, T is the current total temperature rise, is the electromagnetic interference level, and are the preset target values for total power and total temperature rise respectively.
[0069]
[0070] Further, the deep learning model is trained based on parameters such as state space information, action space information, and reward function. The deep learning model learns the actions that should be taken and executed in various states by interacting with the environment space where the smart seat is located, and how to adjust the weights for different states to maximize the long-term cumulative rewards. During the training process, a set of initial weights are first initialized. These initial weights can be randomly generated or obtained based on a pre-trained model. Then, the initial gradients of each initial weight are calculated by a preset loss function, and the weights are updated in the reverse direction of the initial gradient to obtain the first weights. The performance of the deep learning model is evaluated based on the first weights to obtain a first evaluation result; the first gradient is recalculated based on the first weight, and the weights are updated in the reverse direction of the first gradient to obtain the second weights. The performance of the deep learning model is evaluated based on the second weights to obtain a second evaluation result. When the second evaluation result is better than the first evaluation result, a reward mechanism is implemented, such as increasing the training learning rate, changing the step size or direction of the gradient descent, etc. The loss function calculates the second gradient based on the second weight, and updates the weights in the reverse direction of the second gradient; when the second evaluation result fails to be optimized based on the first evaluation result, the reward mechanism may reduce the training learning rate or reinitialize the weights. Based on this, multiple iterations are performed, and the weights corresponding to the first evaluation factor, the second evaluation factor, and the third evaluation factor are continuously optimized in multiple iterations. When the value of the loss function reaches a preset threshold or the number of iterations reaches a preset upper limit, the weight corresponding to the iteration result with the smallest value of the loss function is found in the multiple rounds of iteration results as the weight corresponding to the first evaluation factor, the second evaluation factor, and the third evaluation factor, and the relationship between the total power, the total temperature rise, and the electromagnetic interference is balanced based on the weight. The evaluation results are used to evaluate the training effect of the deep learning model, including the value of the reward function, the value of the loss function, and the weight value corresponding to the first evaluation factor. , the weight value corresponding to the second evaluation factor , the weight value corresponding to the third evaluation factor etc.
[0071] It should also be noted that the deep learning model used in the embodiments of the present disclosure may be a reinforcement learning model, a semi-supervised learning model, an unsupervised learning model, etc. The method or module used to optimize weights in the deep learning model may be a stochastic gradient descent (SGD), an adaptive learning rate method (ADAM), a genetic module, an annealing module, etc., and this application does not make any specific limitations on this.
[0072] In a possible implementation, the upgrade parameters include not only the board power and signal frequency of the circuit board to be upgraded, but also the upgrade duration. In the process of determining the total temperature rise of the circuit board to be upgraded, the board mass and material specific heat capacity of each circuit board to be upgraded can be obtained, and the board energy consumption of each circuit board to be upgraded during the upgrade process can be obtained according to the product of the board power and the upgrade duration of the circuit board to be upgraded, and the total energy consumption can be determined according to the sum of the energy consumptions of multiple boards. The total mass can be obtained according to the sum of the masses of multiple boards, the total heat can be obtained according to the product of the total mass and the specific heat capacity of the material, the first temperature rise can be obtained according to the ratio of the total energy consumption to the total heat, the second temperature rise of the internal space of the smart seat can be obtained, and the total temperature rise of multiple circuit boards to be upgraded can be determined according to the sum of the first temperature rise and the second temperature rise. Among them, the board power represents the board power of any circuit board to be upgraded; the upgrade duration represents the time used by any circuit board to be upgraded from the start of the upgrade to the completion of the upgrade; the first temperature rise is used to indicate the value of all circuit boards to be upgraded that is higher than the ambient temperature during the upgrade process, and the second temperature rise is used to indicate the internal temperature of the space where the circuit board to be upgraded is located.
[0073] Specifically, obtain the board power of each circuit board to be upgraded and the upgrade time corresponding to the circuit board to be upgraded, calculate the product of the board power and the upgrade time, obtain the board energy consumption of each circuit board to be upgraded during the upgrade process, and add up the board energy consumption of each circuit board to be upgraded to obtain the total energy consumption. Next, obtain the board mass and the corresponding material specific heat capacity of each circuit board to be upgraded, add up the board mass of each circuit board to be upgraded to obtain the total mass, calculate the average value of the material specific heat capacity of each circuit board to be upgraded, multiply the total mass by the average value of the material specific heat capacity to obtain the total heat, and then obtain the first temperature rise according to the ratio of the total energy consumption to the total heat. Then, obtain the second temperature rise of the internal space of the smart seat, add the first temperature rise and the second temperature rise to obtain the total temperature rise of multiple circuit boards to be upgraded. According to the above description, the total temperature rise of multiple circuit boards to be upgraded can be expressed by the following formula: ,in, For the i The power of the board to be upgraded is related to the power of the circuit board to be upgraded.
[0074] How long does it take to upgrade the board? m is the total mass of all circuit boards to be upgraded, is the average specific heat capacity of the materials of each circuit board to be upgraded, is the second temperature rise, i.e., the temperature of the interior space of the smart seat.
[0075]
[0076] In a possible implementation, the actual values of the board power and signal frequency are determined by minimizing the result of the target evaluation function. Specifically, the data combination consisting of the actual values of the board power, upgrade duration, and signal frequency can be determined so that the value of the target evaluation function is minimized, and the total power is less than or equal to the preset power, the total temperature rise is less than or equal to the preset temperature rise, and the board electromagnetic interference is less than or equal to the preset electromagnetic interference. Specifically, a starting point is initialized, a threshold of the number of iterations is set, and the target evaluation function is iterated in the negative gradient direction of the current point. During the iteration process, the board power of the circuit board to be upgraded in the target evaluation function is continuously adjusted. , Upgrade duration And the signal frequency , as the number of iterations increases, the value of the target evaluation function gradually approaches the minimum value. When the gradient is small enough or the number of iterations reaches the iteration threshold, the board power, upgrade time and signal frequency are recorded. , Upgrade duration And the signal frequency , it is necessary to simultaneously meet the three constraints that the total power is less than or equal to the preset power, the total temperature rise is less than or equal to the preset temperature rise, and the board electromagnetic interference is less than or equal to the preset electromagnetic interference. When the target evaluation function obtains the minimum value and the upgrade parameters therein meet the constraints, the board power, upgrade time and signal frequency values at this time are determined as the actual value of the board power, the actual value of the upgrade time and the actual value of the signal frequency. It should also be noted that when the board power and signal frequency are adjusted, the upgrade time of the circuit board to be upgraded will be affected. The upgrade time changes with the change of the board power or signal frequency. Therefore, it is actually to adjust the board power and signal frequency in the target evaluation function. By adjusting the upgrade parameters to minimize the target evaluation function, the energy consumption, thermal management and electromagnetic compatibility of the firmware during the upgrade process can be evaluated as a whole, and the firmware upgrade process can be optimized based on the evaluation results, thereby improving the quality of the firmware upgrade.
[0077] After the main control circuit board distributes multiple upgrade firmwares to the corresponding circuit boards to be upgraded, in order to avoid the main control circuit board waiting for the confirmation message sent by the circuit boards to be upgraded for too long and affecting the subsequent upgrade operation, the maximum waiting time is set. If the confirmation message sent by all the circuit boards to be upgraded is not received within the maximum waiting time, the main control circuit board will redistribute the upgrade firmware until the confirmation message sent by all the circuit boards to be upgraded can be received. At the same time, in order to avoid the main circuit board being in the state of distributing the upgrade firmware continuously, the maximum number of distributions is limited. When the number of distributions of the main control circuit board is equal to the maximum number of distributions, the upgrade operation is stopped, and the circuit boards to be upgraded that have not responded to the upgrade firmware distributed by the main circuit board are manually checked. Alternatively, when the main control circuit board fails to receive the confirmation message sent by all the circuit boards to be upgraded within the maximum waiting time, all the circuit boards to be upgraded can also be restarted. The main circuit board redistributes the upgrade firmware after all the circuit boards to be upgraded are restarted. If there are still circuit boards to be upgraded that do not respond to the upgrade firmware after the restart, the circuit boards to be upgraded that have not responded are manually checked.
[0078] Step S204: multiple circuit boards to be upgraded respond to the upgrade notification and simultaneously perform an upgrade operation based on the upgraded firmware.
[0079] Specifically, after receiving the upgrade notification sent by the main control circuit board, the multiple circuit boards to be upgraded respond to the upgrade notification and enter the upgrade state, and perform the upgrade operation based on the previously distributed upgrade firmware to complete the firmware upgrade of the circuit boards.
[0080] When all the circuit boards to be upgraded in all smart seats are upgraded with firmware, in order to reduce the risk of firmware upgrade and improve the quality and stability of the upgraded firmware, the firmware of smart seats in a small range can be upgraded first. After ensuring that these smart seats can operate normally and stably, the firmware can be promoted to all smart seats for upgrading. Specifically, some test smart seats are selected, and the application server sends the upgraded firmware to the main control circuit board of the test smart seat. The circuit board to be upgraded performs the upgrade operation based on the upgraded firmware after responding to the upgraded firmware sent by the main control circuit board. After the circuit board upgrade is completed, the control terminal continuously monitors the test smart seat, collects user feedback, error logs and other information, evaluates the stability and performance of the upgraded firmware based on the collected information, and decides whether to promote the upgraded firmware to all smart seats for upgrading based on the evaluation results, or decides whether to roll back to the historical firmware based on the evaluation results. Among them, the test smart seat is a smart seat that has been put into use. As a functional experience sample after the firmware upgrade, feedback information is collected when the user actually uses it. The test smart seat can be selected according to the geographical location, the user's frequency of use, or the seat model of the smart seat.
[0081] Alternatively, when performing a firmware upgrade of the circuit board to be upgraded, the circuit board to be upgraded in a specific smart seat can be specified for firmware upgrade according to the seat model of the smart seat. Since different seat models correspond to different communication architecture types and circuit board model combinations, the functions that can be realized by different seat models are also different. By performing a firmware upgrade on the circuit board to be upgraded of a specified seat model, smart seats of different seat models can be personalized, retaining their characteristics and increasing the user experience. In addition, upgrade firmware can be formulated according to the geographical location of the smart seat and the needs of different regions to meet the specific needs of users in different regions. The use of a method of setting up a test smart seat, a method of specifying a seat model, or a regional customization method for firmware upgrades can flexibly control the firmware upgrade process, thereby improving the quality and reliability of the firmware upgrade.
[0082] In a possible implementation, when one of the circuit boards to be upgraded is a massage module circuit board of a smart seat, and the firmware in the massage module circuit board is running, the massage module circuit board records the massage parameters when the upgrade operation starts, and the massage module circuit board switches the currently running firmware to the target backup firmware. The massage module circuit board keeps running based on the target backup firmware and massage parameters during the upgrade operation based on the upgraded firmware. The firmware is the currently running firmware; the massage parameters are used to describe and control the characteristics of the massage function provided by the smart seat, including massage mode, auxiliary functions, etc.; the target backup firmware is determined based on the massage mode and auxiliary functions currently used by the massage module circuit board.
[0083] Specifically, during the use of the smart seat, the firmware in the massage module circuit board is running. When the firmware in the massage module circuit board needs to be upgraded, the massage module circuit board first records the massage parameters currently used during operation, downloads the corresponding target backup firmware from the backup database based on the massage parameters, and then switches the firmware currently running on the massage module circuit board to the target backup firmware. During the process of the current firmware performing the upgrade operation, the massage module circuit board keeps running based on the target backup firmware and the massage parameters to ensure that the smart seat can continue to run during the upgrade process of the current firmware, thereby enhancing the user experience.
[0084] In a possible implementation, before the massage module circuit board switches the currently running firmware to the target backup firmware, it can specifically determine the target massage mode and target auxiliary function currently used by the massage module circuit board. When the target massage mode is not empty and the target auxiliary function is empty, the candidate backup firmware associated with the target massage mode is determined as the target backup firmware. When both the target massage mode and the target auxiliary function are not empty, the candidate backup firmware associated with the target massage mode and the target auxiliary function is determined as the target backup firmware. Among them, the massage mode is used to describe the force or intensity of the massage, including standard, gentle, strong, etc.; the auxiliary function is used to increase the personalized experience of the user during the massage process, including playing music, watching videos, etc.; the target backup firmware is stored in the backup database, and multiple candidate backup firmware are stored in the backup database.
[0085] Specifically, when the user selects a massage mode but does not select an auxiliary function, the massage mode currently used by the massage module circuit board is determined as the target massage mode, and the candidate backup firmware associated with the target massage mode is determined as the target backup firmware. When the user selects a massage mode and an auxiliary function, the massage mode currently used by the massage module circuit board is determined as the target massage mode, the auxiliary function used is determined as the target auxiliary function, and the candidate backup firmware associated with the target massage mode and the target auxiliary function is determined as the target backup firmware.
[0086] In addition, the candidate backup firmware is simplified from the historical firmware of the circuit board to be upgraded based on the associated massage mode, or is simplified from the historical firmware based on the associated massage mode and auxiliary functions. The historical firmware is the firmware that has been used in the history of the circuit board to be upgraded, and can also be the firmware to be upgraded; the historical firmware is simplified, that is, other massage modes or auxiliary functions other than the target massage mode or target auxiliary function are removed. For example, the current target massage mode is the standard mode, and the historical firmware includes the standard mode and the gentle mode. The candidate backup firmware corresponding to the current target massage mode is simplified to only include the standard mode, that is, only the part that implements the standard mode function is retained in the target backup firmware determined based on the candidate backup firmware. By simplifying the candidate backup firmware, the loading speed of the target backup firmware determined by the candidate backup firmware on the circuit board to be upgraded can be accelerated, and the smoothness of firmware switching can be increased.
[0087] When the candidate backup firmware is associated with the target massage mode, or when the candidate backup firmware is associated with the target massage mode and the target auxiliary function at the same time, the association relationship can be stored in the form of a table. As shown in Table 5, Table 5 is an association relationship table between the target massage mode, the target auxiliary function and the candidate backup firmware provided by the embodiment of the present disclosure. The candidate backup firmware A1 retains the content of implementing the standard mode function, the candidate backup firmware A2 retains the content of implementing the standard mode function and the music playing function, the candidate backup firmware A3 retains the content of implementing the gentle mode function, and the candidate backup firmware A4 retains the content of implementing the strong mode function and the music playing function. When the user selects the standard massage mode in the smart seat, the corresponding candidate backup firmware A1 is matched in the association relationship table based on the massage mode, and the candidate backup firmware A1 is used as the target backup firmware to replace the firmware currently running in the massage module circuit board.
[0088] Table 5 Association table
[0089]
[0090] It should also be noted that the auxiliary function exists based on the massage mode, that is, the auxiliary function can only be selected after the user selects the massage mode.
[0091] In a possible implementation, before determining the target massage mode and target auxiliary function currently used by the massage module circuit board, the candidate backup firmware can be selected through user ratings. Specifically, the user rating information of multiple target historical firmwares can be obtained, and the number of installed seats corresponding to each target historical firmware can be counted. For any candidate massage mode, when the user score is the highest and the number of installed seats is greater than or equal to the preset number threshold, the corresponding target historical firmware is simplified to the candidate backup firmware corresponding to the candidate massage mode, and the candidate backup firmware is associated with the corresponding candidate massage mode and stored. Among them, the target historical firmware is used to run all candidate massage modes and all candidate auxiliary functions currently supported by the massage module circuit board; the user rating information includes the user ratings of each candidate massage mode and candidate auxiliary function. The user can score the massage parameters of the smart seat on the corresponding application (APP), that is, score the actual effects of the massage mode and the auxiliary function respectively; the number of installed seats is the number of smart seats that have used the target historical firmware and are put into use.
[0092] Specifically, a circuit board to be upgraded has run multiple target historical firmwares, which can be firmwares of different updated versions. Users score the smart seat according to the effect produced when running the target historical firmware, that is, each target historical firmware has its corresponding user rating information. Then, the number of installed seats that have used each target historical firmware is counted. For any candidate massage mode, the user ratings of the smart seats that use each target historical firmware are checked, and the target historical firmware version with the highest user rating is selected. When the number of installed seats using the target historical firmware version is greater than or equal to the preset number threshold, the target historical firmware is simplified to the candidate backup firmware corresponding to the candidate massage mode, and the candidate backup firmware is associated with the corresponding candidate massage mode and stored.
[0093] In addition, for any combination of a candidate massage mode and a candidate auxiliary function, when the weighted sum of the corresponding user scores of the candidate massage mode and the candidate auxiliary function is the highest, and the number of installed seats is greater than or equal to the number threshold, the corresponding target historical firmware is simplified to the candidate massage mode and the candidate backup firmware corresponding to the candidate auxiliary function, and the candidate backup firmware is associated with the corresponding candidate massage mode and the candidate auxiliary function for storage. Specifically, the user scores of the smart seats using each target historical firmware are checked, and the user scores include the scores of the candidate massage mode and the scores of the candidate auxiliary function. The scores of the candidate massage mode and the candidate auxiliary function are respectively set with corresponding weights, and the weighted sum is performed based on the weights and the scores corresponding to the candidate massage mode and the candidate auxiliary function to obtain the overall user score under the selection of the candidate massage mode and the candidate auxiliary function. The target historical firmware version with the highest overall user score is selected, and when the number of installed seats using the target historical firmware version is greater than or equal to the preset number threshold, the target historical firmware is simplified to the candidate backup firmware corresponding to the candidate massage mode and the candidate auxiliary function, and the candidate backup firmware is associated with the corresponding candidate massage mode and the candidate auxiliary function for storage. Filtering candidate backup firmware through user ratings can intuitively reflect user satisfaction with different versions of the target historical firmware, and further reflect the overall quality and performance of massage modes and auxiliary functions provided by smart seats using different versions of the target historical firmware, which helps to improve and optimize the quality and performance of smart seats.
[0094] In addition, when the user is using a smart seat, he can select massage mode and auxiliary functions through the application. Specifically, each smart seat is configured with a unique corresponding smart seat identity code. After the user uses the application on the mobile device to scan the smart seat identity code, the mobile device is connected to the smart seat to obtain the right to use the smart seat. The user can select the massage mode and auxiliary mode through the application, or change the massage mode and auxiliary mode. In addition, when the user is using a smart seat, if the firmware of the circuit board in the smart seat needs to be upgraded, the management terminal first sends an upgrade notification to the application in the mobile device connected to the smart seat. When the user agrees to the upgrade, the currently running firmware is switched to the target backup firmware, and then the current firmware is upgraded. When the upgrade is completed, an upgrade completion notification is sent to the application. At this time, when the user changes the massage parameters in the application, the currently running target backup firmware is switched to the upgraded firmware, and the smart seat implements the massage parameters selected by the user based on the upgraded firmware; if the user does not make any changes to the massage parameters after the application sends the upgrade completion notification, the smart seat will continue to run using the target backup firmware during the user's use. When the user has finished using it and the smart seat is in idle or standby state, the target backup firmware will be automatically switched to the upgraded firmware.
[0095] It should also be noted that when the management terminal uploads multiple upgrade firmwares to the application server, first, an initial firmware verification mark is generated in the management terminal based on the upgrade firmware, and the initial firmware verification mark is associated with the firmware to be upgraded and saved, and uploaded to the application server together. After receiving the upgrade firmware and its corresponding initial firmware verification mark, the application server needs to verify the integrity and authenticity of the upgrade firmware. The application server regenerates the firmware verification mark based on the upgrade firmware to obtain the target firmware verification mark, and compares the initial firmware verification mark with the target firmware verification mark. When the initial firmware verification mark is the same as the target firmware verification mark, the application server stores the uploaded upgrade firmware and the corresponding firmware verification mark in the persistent database; when the initial firmware verification mark is different from the target firmware verification mark, the application server refuses to store the uploaded upgrade firmware and returns the corresponding error prompt to the management terminal. Among them, the firmware verification mark is used to verify the integrity of the uploaded upgrade firmware, which can be an MD5 value, a hash value, etc.
[0096] In addition, in the process of uploading the upgrade firmware to the application server, in order to reduce the traffic pressure of the application server, the upgrade firmware can be uploaded to the application server by generating a method for uploading the firmware request. Specifically, the management terminal requests the application server to generate an upload firmware request, which carries the upgrade firmware. The application server generates an upload voucher according to the request information of the management terminal and sends it to the management terminal. The management terminal initiates an upload firmware request to the persistent database in the application server based on the upload voucher, and the upload firmware request carries the upgrade firmware and the upload voucher. After the persistent database in the application server receives the upload firmware request, it first verifies the validity of the upload voucher. When the verification is passed, the persistent database receives the uploaded upgrade firmware and stores it in a specified location. In order to facilitate the subsequent management and query of the upgrade firmware by the management terminal, the application server will return a response containing information such as the storage location of the upgrade firmware to the management terminal. The management terminal can send a query request based on the response to request the application server to query the relevant information of the upgrade firmware. By uploading the upgrade firmware in this way, the upload traffic of uploading the upgrade firmware will not pass through the application server, thereby reducing the traffic pressure of the application server. At the same time, by verifying the upgraded firmware through the firmware verification identifier, the integrity and authenticity of the upgraded firmware stored in the persistent database of the application server can be ensured.
[0097] The firmware upgrade method of the smart seat provided in the embodiment of the present disclosure is implemented by configuring a firmware mapping table, verifying the upgrade firmware, generating a unique file name for the upgrade firmware, confirming the working status of the circuit board to be upgraded, etc., which simplifies the information configuration and upgrade process. At the same time, by performing a firmware integrity check during the transmission of the upgrade firmware and confirming the working status of the circuit board to be upgraded during the firmware upgrade process, it is ensured that when a problem occurs during the upgrade process, the problem can be quickly located based on the verification result or confirmation information, which facilitates the management terminal to monitor and maintain the upgrade process, ensuring the efficiency and stability of the upgrade process.
[0098] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the firmware upgrade method of each of the aforementioned embodiments.
[0099] The embodiment of the present disclosure also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned firmware upgrade method.
[0100] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate to describe the embodiments of the present disclosure, such as being able to be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0101] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0102] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood as not including the number, and above, below, within, etc. are understood as including the number.
[0103] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0105] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0106] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0107] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.
[0108] The above is a specific description of the preferred implementation of the present disclosure, but the present disclosure is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present disclosure. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present disclosure.
Claims
1. A method for upgrading the firmware of a smart seat, characterized in that: include: The control application of the smart seat sends a firmware upgrade request to the application server, wherein the firmware upgrade request carries the seat identification of the smart seat, and the seat identification is obtained by splicing the first sub-identifier, the second sub-identifier and the third sub-identifier, the first sub-identifier is used to indicate the seat model of the smart seat, the second sub-identifier is used to indicate the communication architecture type of the smart seat, and the third sub-identifier is used to indicate the circuit board model combination of multiple circuit boards in the smart seat; The application server accesses a primary directory according to the first sub-identifier, determines a secondary directory in the primary directory according to the second sub-identifier, determines a tertiary directory in the secondary directory according to the third sub-identifier, obtains a target upgrade package in the tertiary directory, and sends the target upgrade package to the main control circuit board of the smart seat, wherein the target upgrade package includes upgrade firmware corresponding to multiple circuit boards to be upgraded in the smart seat; The main control circuit board distributes the multiple upgraded firmwares to the corresponding circuit boards to be upgraded, and after receiving confirmation messages sent by all the circuit boards to be upgraded, sends an upgrade notification to each circuit board to be upgraded; The plurality of circuit boards to be upgraded respond to the upgrade notification and simultaneously perform an upgrade operation based on the upgrade firmware; The upgrade notification carries the upgrade parameters of the circuit board to be upgraded during the upgrade process, and the upgrade parameters include the board power, signal frequency and upgrade duration of the circuit board to be upgraded. The sending of the upgrade notification to each circuit board to be upgraded includes: Determining the total power of the plurality of circuit boards to be upgraded according to the board power of the plurality of circuit boards to be upgraded, and constructing a first evaluation factor according to the ratio of the total power to a preset power; Determining a total temperature rise of the plurality of circuit boards to be upgraded according to the board power of the plurality of circuit boards to be upgraded, and constructing a second evaluation factor according to a ratio of the total temperature rise to a preset temperature rise; Determine the board electromagnetic interference between the multiple circuit boards to be upgraded according to the signal frequencies of the multiple circuit boards to be upgraded, and determine a third evaluation factor according to the ratio of the board electromagnetic interference to the preset electromagnetic interference; Performing weighted summation on the first evaluation factor, the second evaluation factor, and the third evaluation factor to obtain a target evaluation function; Determine the actual values of the board power and the signal frequency according to the target evaluation function, generate the upgrade notification based on the actual values of the board power and the signal frequency, and send the upgrade notification to each circuit board to be upgraded; The determining the total temperature rise of the plurality of circuit boards to be upgraded according to the board power of the plurality of circuit boards to be upgraded comprises: Obtaining the board quality and material specific heat capacity of each circuit board to be upgraded; According to the product of the board power and the upgrade time of the circuit board to be upgraded, the board energy consumption of each circuit board to be upgraded during the upgrade process is obtained, and the total energy consumption is determined according to the sum of the energy consumptions of multiple boards; Obtaining a total mass according to the sum of the masses of the plurality of boards, obtaining a total heat according to the product of the total mass and the specific heat capacity of the material, and obtaining a first temperature rise according to the ratio of the total energy consumption to the total heat; Acquire a second temperature rise of the inner space of the smart seat, and determine a total temperature rise of the plurality of circuit boards to be upgraded according to the sum of the first temperature rise and the second temperature rise; Determining the actual value of the board power and the signal frequency according to the target evaluation function includes: Determine a data combination consisting of the actual values of the board power, the upgrade duration, and the signal frequency so that the value of the target evaluation function is minimized, and the total power is less than or equal to the preset power, the total temperature rise is less than or equal to the preset temperature rise, and the board electromagnetic interference is less than or equal to the preset electromagnetic interference.
2. The firmware upgrade method according to claim 1, characterized in that: The firmware upgrade method further includes: When one of the circuit boards to be upgraded is a massage module circuit board of the smart seat, and the firmware in the massage module circuit board is running, the massage module circuit board records the massage parameters when the upgrade operation starts; The massage module circuit board switches the currently running firmware to the target backup firmware, wherein the target backup firmware is determined according to the massage mode and auxiliary function currently used by the massage module circuit board; The massage module circuit board keeps running based on the target backup firmware and the massage parameters during the process of performing the upgrade operation based on the upgrade firmware.
3. The firmware upgrade method according to claim 2, characterized in that: The target backup firmware is stored in a backup database, and a plurality of candidate backup firmware are stored in the backup database. Before the massage module circuit board switches the currently running firmware to the target backup firmware, the firmware upgrade method further includes: Determining a target massage mode and a target auxiliary function currently used by the massage module circuit board; When the target massage mode is not empty and the target auxiliary function is empty, determining the candidate backup firmware associated with the target massage mode as the target backup firmware; When both the target massage mode and the target auxiliary function are not empty, determining the candidate backup firmware simultaneously associated with the target massage mode and the target auxiliary function as the target backup firmware; The candidate backup firmware is simplified from the historical firmware of the circuit board to be upgraded based on the associated massage mode, or is simplified from the historical firmware based on the associated massage mode and auxiliary functions.
4. The firmware upgrade method according to claim 3, characterized in that: Before determining the target massage mode and target auxiliary function currently used by the massage module circuit board, the firmware upgrade method further includes: Obtaining user rating information of a plurality of target historical firmwares, and counting the number of installed seats corresponding to each of the target historical firmwares, wherein the target historical firmwares are used to run all candidate massage modes and all candidate auxiliary functions currently supported by the massage module circuit board, and the user rating information includes user ratings of each of the candidate massage modes and the candidate auxiliary functions; For any of the candidate massage modes, when the user score is the highest and the number of installed seats is greater than or equal to a preset number threshold, simplifying the corresponding target historical firmware to the candidate backup firmware corresponding to the candidate massage mode, and storing the candidate backup firmware in association with the corresponding candidate massage mode; For any combination of the candidate massage modes and the candidate auxiliary functions, when the weighted sum of the user scores corresponding to the candidate massage modes and the candidate auxiliary functions is the highest, and the number of installed seats is greater than or equal to the number threshold, the corresponding target historical firmware is simplified to the candidate backup firmware corresponding to the candidate massage mode and the candidate auxiliary function, and the candidate backup firmware is associated with the corresponding candidate massage mode and the candidate auxiliary function and stored.
5. The firmware upgrade method according to claim 1, characterized in that: Before the application server accesses the primary directory according to the first sub-identifier, the firmware upgrade method further includes: The management terminal uploads a plurality of the upgrade firmwares to the application server, as well as a firmware mapping table for indicating the association relationship between the upgrade firmwares and the corresponding circuit board identifiers of the circuit boards to be upgraded, wherein the firmware mapping table is provided with a field for allowing overwriting, and the field for allowing overwriting is used to indicate whether the upgrade firmware is allowed to be overwritten and stored; The application server generates a file name for the corresponding upgrade firmware according to the circuit board identifier, and stores the upgrade firmware based on the file name, wherein different upgrade firmwares correspond to different file names; When the application server subsequently receives the upgrade firmware sent by the management terminal again, if the file name of the currently received upgrade firmware is the same as that of the stored upgrade firmware, the whether to allow overwriting field corresponding to the stored upgrade firmware is checked. When the whether to allow overwriting field indicates that the upgrade firmware is allowed to be overwritten and stored, the currently received upgrade firmware is stored over the stored upgrade firmware.
6. The firmware upgrade method according to claim 5, characterized in that: The application server generates a file name for the corresponding upgrade firmware according to the circuit board identifier, including: The application server obtains a timestamp when the upgraded firmware is received, and generates a first sequence according to the timestamp; Randomly assigning a second sequence to each of the upgrade firmwares, wherein different upgrade firmwares are assigned different second sequences; The circuit board identifier, the first sequence and the second sequence are concatenated to generate a corresponding file name of the upgrade firmware.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the firmware upgrade method according to any one of claims 1 to 6 is implemented.
