Module upgrading method and system for portable first-aid equipment
By performing fragmented checksum key identification of portable first aid equipment, configuring hot backup modules to upgrade non-critical modules in parallel, and using blockchain to record logs, the problem of low upgrade efficiency and reliability of portable first aid equipment is solved, and efficient and reliable module upgrades are achieved.
Patent Information
- Application Number
- CN202510562473.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-11
AI Technical Summary
The module upgrade of existing portable first aid equipment has problems of low upgrade efficiency and reliability, especially during the upgrade process, it is easy to cause service interruption and unreasonable resource scheduling, resulting in upgrade conflicts and inefficiency.
The shard verification mechanism is used to perform dual-verified upgrade package integrity verification, identify the keyity of the module and divide the key and non-critical functional modules, configure the hot backup module to take over key functional services, perform parallel upgrade task scheduling of non-critical functional modules, and record the key logs to the blockchain network for processing.
It improves the upgrade efficiency and reliability of portable first aid equipment, ensures that key functional modules are uninterrupted during the upgrade process, optimizes resource utilization, and enhances the fault tolerance and transparency of the upgrade process.
Smart Images

Figure CN120299662A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical devices, and particularly to a method and system for module upgrading of a portable first-aid device. Background Art
[0002] The reliability and efficiency of module upgrading of portable first-aid devices are crucial for ensuring the continuity and accuracy of first-aid services. Currently, the main methods to solve this problem include overall upgrading, simple sub-module upgrading, or parallel upgrading, etc., aiming to improve the upgrading efficiency and device availability through different upgrading strategies. However, the existing methods lack fine-grained identification and effective protection mechanisms for modules during the upgrading process, resulting in possible service interruptions when key function modules are upgraded, and unreasonable resource scheduling during parallel upgrading, which easily causes upgrading conflicts and low efficiency.
[0003] In the current related technologies, there are technical problems of low upgrading efficiency and reliability in the module upgrading of portable first-aid devices. Summary of the Invention
[0004] By providing a method and system for module upgrading of a portable first-aid device, the present application adopts integrity verification of the upgrade package under double verification by slicing the device, and after the verification passes, identifies the criticality of the modules and divides the critical and non-critical function modules, configures a hot backup module for the critical function modules to take over the service, optimizes the task scheduling for parallel upgrading of non-critical function modules, performs upgrade management, records and writes the key logs of the upgrade process to a blockchain network for processing, etc. The technical problems of low upgrading efficiency and reliability existing in the module upgrading of the existing portable first-aid devices are solved, and the technical effects of improving the upgrading efficiency and reliability are achieved.
[0005] The present application provides a method for module upgrading of a portable first-aid device, including: slicing the portable first-aid device by module, and performing integrity verification of the upgrade package under double verification by using a slicing verification mechanism; if the verification passes, identifying the criticality of the modules of the portable first-aid device, and dividing the critical function modules and non-critical function modules under the current upgrade by using the criticality identification result; configuring a hot backup module for the critical function modules, where the hot backup module is used to take over the critical function service during the upgrade of the critical function modules; performing optimization of the task scheduling for parallel module upgrading of non-critical function modules, determining an upgrade strategy by using the task scheduling optimization result, and performing upgrade management; recording the key logs of the upgrade process, and writing the key logs to a blockchain network, and performing upgrade processing by using the blockchain network.
[0006] In a possible implementation, the criticality identification of the modules of the portable first-aid device is performed as follows: Obtain all the module functions of the portable first-aid device, perform a functional importance analysis based on the all module functions, and establish a first criticality score for the modules; Read the current scenario mode of the portable first-aid device, and establish a second criticality score for the modules by using the current scenario mode; Obtain the retrospective usage window of the portable first-aid device, and establish a third criticality score by using the retrospective usage window; Complete the criticality identification according to the first criticality score, the second criticality score, and the third criticality score.
[0007] In a possible implementation, the integrity verification of the upgrade package under double verification by using the sharding verification mechanism is performed as follows: After equally sharding the upgrade package according to a preset size, calculate the MD5 hash value and the SHA-256 hash value for each shard respectively, and establish a shard digest pair; Call the shard digest table in the upgrade package, and perform a traversal comparison by using the shard digest table and the shard digest pair; If the traversal comparison passes, the integrity verification of the upgrade package passes.
[0008] In a possible implementation, the task scheduling optimization for the parallel module upgrade of the non-critical function modules is performed, and the upgrade strategy is determined by using the task scheduling optimization result. The following processing is performed: Use the critical function modules to construct a reserved resource load; Configure resource requirement constraints with the reserved resource load, and use the non-critical function modules as task nodes to construct a task graph, where the resource requirements, estimated time consumption, and dependency relationships of each task node are marked on the task graph; Use the task graph to perform task scheduling optimization through a multi-objective scheduling optimization algorithm, and establish a task scheduling optimization result, and the task scheduling optimization process satisfies the resource requirement constraints, the maximum interruption time constraint, and the parallel quantity constraint.
[0009] In a possible implementation, the following processing is performed: The scheduling objectives of the multi-objective scheduling optimization algorithm include an upgrade time objective, an upgrade stability objective, and a priority sorting objective.
[0010] In a possible implementation, the upgrade processing by using the blockchain network is performed as follows: Determine whether an upgrade failure operation occurs; If an upgrade failure operation occurs, call the blockchain log in the blockchain network, and perform a stable version rollback to restore the running state of the corresponding module.
[0011] In a possible implementation, the following processing is performed: The critical log includes an upgrade timestamp, a module identifier, an upgrade result, and hash verification data.
[0012] The present application also provides a module upgrade system for a portable first aid device, including: an upgrade package integrity verification module, which is used to slice the portable first aid device by module and then use the slice verification mechanism to perform integrity verification of the upgrade package under double verification; a criticality identification module, which is used to, if the verification passes, identify the criticality of the modules of the portable first aid device and use the criticality identification result to divide the critical function modules and non-critical function modules under the current upgrade; a hot backup configuration module, which is used to configure a hot backup module for the critical function modules, and the hot backup module is used to take over the critical function services during the upgrade of the critical function modules; an upgrade strategy determination module, which is used to perform task scheduling optimization for parallel module upgrades of non-critical function modules, determine the upgrade strategy using the task scheduling optimization result, and perform upgrade management; a log recording module, which is used to record the key logs of the upgrade process, write the key logs into the blockchain network, and perform upgrade processing using the blockchain network.
[0013] It is intended to, through a module upgrade method and system for a portable first aid device proposed in the present application, first slice the portable first aid device by module, then use the slice verification mechanism to perform integrity verification of the upgrade package under double verification. If the verification passes, identify the criticality of the modules of the portable first aid device, use the criticality identification result to divide the critical function modules and non-critical function modules under the current upgrade. Then, configure a hot backup module for the critical function modules, and the hot backup module is used to take over the critical function services during the upgrade of the critical function modules. Then, perform task scheduling optimization for parallel module upgrades of non-critical function modules, determine the upgrade strategy using the task scheduling optimization result, and perform upgrade management. Finally, record the key logs of the upgrade process, write the key logs into the blockchain network, and perform upgrade processing using the blockchain network. It achieves the technical effects of improving the upgrade efficiency and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments of the present invention will be briefly introduced below. Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the operations in the front or below do not necessarily need to be executed precisely in sequence. On the contrary, according to the need, they can be executed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or one or several operations can be removed from these processes.
[0015] Figure 1 It is a schematic flowchart of a module upgrade method for a portable first aid device provided by an embodiment of the present application.
[0016] Figure 2 It is a schematic structural diagram of a module upgrade system for a portable first aid device provided by an embodiment of the present application.
[0017] Description of the reference numerals: upgrade package integrity verification module 10 , criticality identification module 20 , hot backup configuration module 30 , upgrade strategy determination module 40 , log recording module 50 . DETAILED DESCRIPTION
[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
[0019] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0020] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict, and the terms "first\second" involved are merely to distinguish similar objects and do not represent a specific ordering of objects. The terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server 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 modules that are not clearly listed or inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of this application. The terms used herein are for the purpose of describing the embodiments of the present application only.
[0021] The present application embodiment provides a method for upgrading a module of a portable emergency device, such as Figure 1 As shown, the method includes:
[0022] Step S100, after the portable emergency equipment is segmented into modules, the upgrade package integrity check under double verification is performed using the segmentation verification mechanism.
[0023] Specifically, the software upgrade package of the portable first-aid device is fragmented according to module functions (such as defibrillation module, respiration module, monitoring module, etc.), and each fragment contains the code of an independent functional module. The double-hash algorithm is used to generate hash values for each fragment respectively. That is, before the upgrade package is transmitted to the device, two hash values of each fragment are pre-calculated, and these hash values are stored in the trusted storage area of the device (such as a secure chip or an encrypted storage area). After the device receives the upgrade package, the double-hash algorithm is used to recalculate the hash values for each fragment respectively, and then the calculation results are compared with the pre-stored hash values. Only when both hash values match, the fragment is considered to pass the verification. If the hash values of all fragments pass the verification, it is considered that the integrity of the entire upgrade package has been verified and the next operation can be entered; if the hash value of any one fragment does not match, it is determined that the integrity verification of the upgrade package fails and the upgrade is rejected. Among them, the fragment verification mechanism refers to splitting the software package into multiple small fragments and performing separate integrity verification on each fragment to ensure that the entire software package has not been tampered with or damaged during transmission and storage. The double-hash algorithm refers to calculating the hash value of data using two different hash algorithms simultaneously, and improving the verification reliability of data integrity and security by comparing the results of the two algorithms.
[0024] In a possible implementation manner, for the integrity verification of the upgrade package under double verification using the fragment verification mechanism, step S100 further includes step S110 of equally fragmenting the upgrade package according to a preset size and then calculating the MD5 hash value and the SHA-256 hash value for each fragment respectively to establish a fragment digest pair. Specifically, the upgrade package is equally fragmented according to a preset fixed size (for example, each fragment size is 1MB), and the equal-fragmentation method is used to facilitate subsequent hash calculation and comparison operations. The MD5 hash value and the SHA-256 hash value are calculated for each fragment respectively. Among them, the MD5 hash value is used for quick preliminary verification, and the SHA-256 hash value is used for a higher level of security verification. The MD5 hash value and the SHA-256 hash value of each fragment are combined into a fragment digest pair and stored in a structured data table, which is called a fragment digest table.
[0025] Step S120: Invoke the shard digest table in the upgrade package and traverse and compare using the shard digest table and the shard digests. Specifically, a shard digest table is pre-embedded in the upgrade package, which contains the MD5 and SHA-256 hash values of all shards. After the device receives the upgrade package, it reads the hash value of each shard from the shard digest table and compares it one by one with the hash value calculated locally on the device. The comparison process uses dual-hash value verification, that is, both the MD5 and SHA-256 hash values are compared. If the hash value of a certain shard fails the comparison, the system will record the shard number and attempt to re-download the shard, or prompt the user to check the network connection or the integrity of the upgrade package.
[0026] For example, after the device receives the upgrade package, it reads the MD5 hash value of shard 1 from the shard digest table as abc123..., and the SHA-256 hash value as def456.... The device recalculates the MD5 and SHA-256 hash values of shard 1, and the results are abc123... and def456... respectively, which are the same as the values in the shard digest table. Therefore, shard 1 passes the verification. The comparison is performed on all shards in turn until the hash values of all shards pass the verification.
[0027] Step S130: If the traversal and comparison pass, the integrity verification of the upgrade package passes. Specifically, if the MD5 and SHA-256 hash values of all shards pass the comparison, it is considered that the integrity verification of the entire upgrade package passes. Record the verification result in the device's log system and notify the user that the integrity verification of the upgrade package is successful and the subsequent upgrade process can continue. This shard verification mechanism combined with the design of the dual-hash algorithm and the shard digest table not only improves the accuracy of data verification but also enhances the fault tolerance and efficiency of the upgrade process.
[0028] Step S200: If the verification passes, identify the criticality of the modules of the portable first aid device, and use the criticality identification result to split the critical function modules and non-critical function modules under the current upgrade.
[0029] Specifically, based on the importance of the device functions and the impact on the first aid tasks, design a criticality assessment algorithm. For example, according to factors such as the function type of the module (such as life support function, auxiliary function, etc.), usage frequency, and failure risk, assign a criticality score to each module. Divide the modules into critical function modules and non-critical function modules according to the criticality score. For example, set a criticality threshold (such as 80 points), and the modules with a score higher than this threshold are classified as critical function modules, and the modules with a score lower than this threshold are non-critical function modules. Generate a list of critical function modules and a list of non-critical function modules, and according to the criticality identification result, divide the modules into different categories so as to adopt different upgrade strategies for different categories of modules.
[0030] In a possible implementation, the criticality identification of the modules of the portable first aid device, step S200 further includes step S210, obtaining all the module functions of the portable first aid device, performing a function importance analysis based on the all module functions, and establishing a first criticality score for the modules. Specifically, obtain the function descriptions of all the modules of the portable first aid device, including their roles in first aid scenarios (such as life support, monitoring, auxiliary functions, etc.). Score each module according to the importance of the function and the degree of direct impact on the patient's life safety.
[0031] For example, the scoring rules are as follows: Life support functions (such as the defibrillation module) are given a relatively high base score (such as 90 points), and auxiliary functions (such as the recording module) are given a relatively low base score (such as 60 points).
[0032] According to the results of the function importance analysis, generate a first criticality score for each module, reflecting its basic importance in the device function system.
[0033] Step S220, read the current scenario mode of the portable first aid device, and establish a second criticality score for the modules by using the current scenario mode. Specifically, read the scenario mode in which the portable first aid device is currently located, such as "Adult First Aid Mode", "Child First Aid Mode" or "Wilderness First Aid Mode". Adjust the importance of the modules according to the scenario mode. For example, in the "Child First Aid Mode", the breathing module becomes more important due to the particularity of the child's respiratory system. Generate a second criticality score for each module according to the adjustment of the importance of the modules based on the current scenario mode.
[0034] For example, assume that the device is currently in the "Child First Aid Mode", the importance of the breathing module is increased, and its second criticality score is increased from the base score of 85 points to 95 points, while the scores of other modules remain unchanged.
[0035] Step S230, obtain the retrospective usage window of the portable first aid device, and establish a third criticality score by using the retrospective usage window. Specifically, obtain the usage records of the device in the past period of time (such as the past 30 days), and analyze the usage frequency and usage scenarios of each module. Adjust the criticality of the modules according to the importance of the usage frequency and usage scenarios of the modules. For example, if a certain module has been frequently used in the past 30 days, it indicates that it has a relatively high importance in the actual first aid scenario. Generate a third criticality score for each module according to the analysis results of the retrospective usage window.
[0036] For example, assume that in the past 30 days, the monitoring module has been frequently used, and its third criticality score is increased from the base score of 70 points to 80 points, while the scores of other modules are adjusted according to the actual usage situation.
[0037] Step S240: Complete criticality identification based on the first criticality score, the second criticality score, and the third criticality score. Specifically, perform weighted averaging or comprehensive calculation on the first criticality score, the second criticality score, and the third criticality score to obtain the final criticality score for each module. According to the final criticality score, divide the modules into critical function modules and non-critical function modules. For example, set a threshold (such as 80 points), and modules with scores higher than this threshold are classified as critical function modules, while modules with scores lower than this threshold are non-critical function modules. For example, the comprehensive scoring calculation formula can be: Final criticality score = (First criticality score + Second criticality score + Third criticality score) / 3. This implementation method evaluates the criticality of modules from multiple dimensions by combining function importance analysis, scenario mode impact, and actual usage frequency, avoiding the deviation that may be brought by single-dimensional evaluation and achieving the effect of accurately identifying critical function modules.
[0038] Step S300: Configure a hot backup module for the critical function module, and the hot backup module is used to take over the critical function service during the upgrade of the critical function module.
[0039] Specifically, design a hot backup module for each critical function module. The hot backup module has the same function interface and data interaction protocol as the main module, and can seamlessly take over its function when the main module is upgraded, ensuring the continuity of critical functions. During the upgrade of the critical function module, monitor the status of the main module in real time. Once the main module enters the upgrade state, the hot backup module immediately starts and takes over the function service of the main module to ensure that the critical functions of the device run uninterruptedly. Before the upgrade of the main module, synchronize the current status data of the main module to the hot backup module to ensure that the hot backup module can continue to provide consistent services after taking over.
[0040] Taking the defibrillation module as an example, both its main module and hot backup module have the same defibrillation function interface. Before the upgrade, the main module synchronizes data such as the current patient's shock parameters and device status to the hot backup module. When the main module starts to upgrade, the hot backup module immediately starts and takes over the defibrillation function to ensure that the device can respond to defibrillation requirements at any time during the upgrade.
[0041] Step S400: Perform task scheduling optimization for the parallel module upgrade of the non-critical function module, determine the upgrade strategy using the task scheduling optimization result, and execute upgrade management.
[0042] Specifically, an optimized task scheduling algorithm (such as dynamic priority scheduling algorithm, shortest job first algorithm, etc.) is adopted to determine the upgrade order and schedule of each module according to factors such as the size, complexity, and dependency relationship of non-critical function modules. Multiple non-critical function modules are allowed to be upgraded simultaneously, and by reasonably allocating the computing resources of the device (such as CPU, memory, etc.), the upgrade efficiency is improved. By optimizing the task scheduling algorithm, ensure that the interruption time of the device during the upgrade process is controlled within 3 seconds. For example, by reasonably arranging the upgrade order of the modules, avoid upgrading multiple modules that have a greater impact on the device performance simultaneously.
[0043] For example, assume that there are three non-critical function modules in the device that need to be upgraded, namely the respiration module, the monitoring module, and the anesthesia module. The task scheduling algorithm sorts according to the module size and complexity, and gives priority to upgrading the monitoring module (because it has a smaller impact on the device performance), and then upgrades the respiration module and the anesthesia module in parallel. In this way, the interruption time of the device during the upgrade process is effectively controlled within 3 seconds.
[0044] In a possible implementation manner, for the task scheduling optimization of performing parallel module upgrades of non-critical function modules, using the task scheduling optimization result to determine the upgrade strategy, step S400 further includes step S410 of constructing a reserved resource load using the critical function modules. Specifically, analyze the resources that the critical function modules (such as the defibrillation module, the respiration support module) may occupy during the upgrade process, including CPU, memory, storage, etc. According to the maximum resource requirements of the critical function modules, calculate the resource load that the device needs to reserve to ensure that the critical function modules can operate normally during the upgrade and will not be interrupted due to insufficient resources. Allocate sufficient resources for the critical function modules while ensuring the maximization of the overall resource utilization rate of the device.
[0045] For example, assume that the critical function module (defibrillation module) needs to occupy 50% of the CPU resources and 30% of the memory resources during the upgrade process. The device reserves these resources before the upgrade to ensure that the critical function module can operate normally.
[0046] Step S420: Configure resource requirement constraints based on the reserved resource load, and use non-critical functional modules as task nodes to construct a task graph, where each task node in the task graph is labeled with resource requirements, estimated time consumption, and dependency relationships. Specifically, according to the reserved resource load, configure resource requirement constraints for non-critical functional modules to ensure that non-critical functional modules do not occupy the resources required by critical functional modules during the upgrade process. Use non-critical functional modules as task nodes to construct a task graph, and each task node in the task graph is labeled with the following information: resource requirements (CPU, memory, storage, etc. resources required by the module during the upgrade process), estimated time consumption (time required for module upgrade), and dependency relationships (dependency relationships between modules, for example, some modules need to start upgrading after other modules have been upgraded).
[0047] For example, assume that the non-critical functional modules include a monitoring module, a recording module, and a communication module. The task graph is as follows: Module A (monitoring module) - Resource requirements: CPU 15%, memory 10% - Estimated time consumption: 3 minutes - Dependency relationship: None. Module B (recording module) - Resource requirements: CPU 10%, memory 5% - Estimated time consumption: 2 minutes - Dependency relationship: None. Module C (communication module) - Resource requirements: CPU 20%, memory 15% - Estimated time consumption: 4 minutes - Dependency relationship: Depends on Module B to complete.
[0048] Step S430: Use the task graph to perform task scheduling optimization through a multi-objective scheduling optimization algorithm to establish a task scheduling optimization result. The task scheduling optimization process satisfies the resource requirement constraints, maximum interruption time constraints, and parallel quantity constraints. Among them, the scheduling objectives of the multi-objective scheduling optimization algorithm include an upgrade time objective, an upgrade stability objective, and a priority sorting objective. Specifically, use the multi-objective scheduling optimization algorithm to schedule the task nodes in the task graph. The scheduling objectives include: an upgrade time objective (try to shorten the total time of the entire upgrade process), an upgrade stability objective (ensure the stability of the upgrade process and avoid interruptions caused by resource competition or task conflicts), and a priority sorting objective (sort the modules according to the importance of the modules or user requirements, and upgrade high-priority modules first). The constraint conditions include: resource requirement constraints (ensure that the resource requirements of each task node do not exceed the available resources of the device), maximum interruption time constraints (ensure that the interruption time of the device during the upgrade process does not exceed the set maximum value, such as 3 seconds), and parallel quantity constraints (reasonably arrange the number of parallel tasks according to the resource capabilities of the device and the complexity of the tasks).
[0049] Suppose the available resources of the device are 50% for CPU, 70% for memory, and 80% for storage (after deducting the reserved resources for critical functional modules). Based on the task graph and constraints, the scheduling algorithm generates the following scheduling strategy: In the first stage (parallel upgrade), Module A (monitoring module) and Module B (recording module). Among them, Module A (monitoring module): 15% of CPU, 10% of memory, and takes 3 minutes; Module B (recording module): 10% of CPU, 5% of memory, and takes 2 minutes. In the second stage (serial upgrade), Module C (communication module). Among them, Module C (communication module): 20% of CPU, 15% of memory, and takes 4 minutes (depends on Module B to complete). Through this scheduling strategy, the device can make full use of the available resources during the upgrade process while ensuring the normal operation of critical functional modules.
[0050] This implementation method uses a multi-objective scheduling optimization algorithm to reasonably arrange the parallel upgrade of non-critical functional modules, significantly shortening the total upgrade time. On the premise of meeting the reserved resource requirements of critical functional modules, it maximizes the use of the device's available resources and improves resource utilization. Through resource demand constraints, it ensures that the resource requirements of each task node do not exceed the device's available resources, avoiding upgrade failures caused by resource competition. It strictly controls the interruption time of the device during the upgrade process, ensuring that the device can quickly resume operation during the upgrade process and improving the user experience. According to the importance of the modules and user requirements, it prioritizes the modules and upgrades high-priority modules first, improving the flexibility and adaptability of the upgrade process.
[0051] Step S500, record the key logs of the upgrade process, write the key logs into the blockchain network, and use the blockchain network for upgrade processing.
[0052] Specifically, embed a log recording module in the device to record key information during the upgrade process in real time, such as module upgrade time, upgrade status, error information, etc. Store the recorded key log data through the blockchain network, and use the immutable and traceable characteristics of the blockchain to ensure the authenticity and integrity of the log data. Among them, the key logs are the logs that record important events and status information during the upgrade process and are used for subsequent fault troubleshooting and auditing. The blockchain network is a decentralized distributed ledger technology with immutable and traceable characteristics and is used to store and verify data.
[0053] In a possible implementation, the key logs include upgrade timestamps, module identifiers, upgrade results, and hash verification data.
[0054] Specifically, record the specific time points when each upgrade operation occurs, including the date and time, for tracking the chronological order of upgrade operations, facilitating subsequent analysis of the time intervals and potential problems during the upgrade process. Uniquely identify the name or number of each module, such as "defibrillation module", "monitoring module", etc., to clarify the module corresponding to each log entry for quickly locating the problem module. Record the result of each module upgrade operation, such as "success", "failure", "interruption", etc., to intuitively reflect the upgrade status of each module for quickly determining whether the upgrade is completed as expected. Record the hash value (such as MD5, SHA-256) of each module upgrade package for verifying the integrity and consistency of the upgrade package, ensuring that the upgrade package has not been tampered with during transmission and storage, and enhancing the security and reliability of the upgrade process. During the upgrade process, the device will record the above key log information in real time: use the system clock of the device to record the timestamp of each log entry, extract the module name or number from the metadata of the module, record the upgrade result according to the return status code of the upgrade operation, and record the hash value of each module upgrade package during the integrity verification step of the upgrade package.
[0055] This implementation method provides a detailed audit trail and problem location support for the module upgrade process of the portable first aid device by recording the upgrade timestamp, module identification, upgrade result, and hash verification data. This not only improves the traceability and transparency of the upgrade process but also enhances the security and maintenance efficiency of the device, ensuring the stability and reliability of the device during the upgrade process.
[0056] In a possible implementation method, when using the blockchain network for upgrade processing, step S500 further includes step S510 of determining whether an upgrade failure operation occurs. Specifically, during the upgrade process, the upgrade result of each module is monitored in real time. The upgrade status of the module (such as success, failure, interruption, etc.) is recorded through key logs. After each module upgrade is completed, check its upgrade result. If the upgrade result of any module is found to be "failure" or "interruption", trigger the upgrade failure detection mechanism and record the detailed error information of the failed module, including the module identification and the reason for failure (such as hash verification failure, insufficient resources, network problems, etc.).
[0057] For example, assume that during the upgrade process, the upgrade of the monitoring module fails, and the device records the following key logs: Timestamp: 2025-04-23 10:05; Module identification: Monitoring module; Upgrade result: Failure; Error information: Hash verification failure. The device detects that the upgrade of the monitoring module fails and triggers the upgrade failure detection mechanism.
[0058] Step S520, if an upgrade failure operation occurs, call the blockchain log within the blockchain network and perform a stable version rollback to restore the running state of the corresponding module. Specifically, the device queries the blockchain network for the blockchain log related to the failed module. The blockchain log records the stable version information of the module before the upgrade, including the version number, hash value, configuration parameters, etc. Based on the information in the blockchain log, the device rolls back the version of the failed module to the stable version before the upgrade. The rollback process includes: data restoration (obtaining the module data and configuration parameters before the upgrade from the blockchain log), version switching (switching the current version of the module to the stable version), state restoration (restoring the running state of the module to ensure normal operation), and rollback verification (after the rollback is completed, the device verifies the module to ensure it is restored to a stable state).
[0059] For example, the device queries the blockchain log and obtains the stable version information of the monitoring module before the upgrade: Timestamp: 2025-04-23 09:50; Module identifier: Monitoring module; Stable version number: 1.2.3; Hash value: abc123def456; Configuration parameters: {Parameter 1: Value 1, Parameter 2: Value 2}. Based on this information, the device rolls back the version of the monitoring module to 1.2.3 and restores its running state. After the rollback is completed, the device verifies the hash value and configuration parameters of the monitoring module to ensure it is restored to a stable state.
[0060] This implementation method realizes the stable version rollback through the blockchain log. The device can quickly restore to the stable state before the upgrade after the upgrade fails, reducing the device downtime and improving the reliability and stability of the portable first aid device.
[0061] The embodiments of this application adopt technical means such as fragmenting the device and performing integrity verification of the upgrade package under double verification, identifying the criticality of the module after passing the verification, splitting the critical and non-critical function modules, configuring a hot backup module for the critical function module to take over the service, optimizing the task scheduling for parallel upgrade of the non-critical function modules, and performing upgrade management, recording and writing the key logs of the upgrade process to the blockchain network for processing, etc., to solve the technical problems of low upgrade efficiency and reliability existing in the module upgrade of the existing portable first aid device, and achieve the technical effect of improving the upgrade efficiency and reliability.
[0062] In the above text, with reference to Figure 1 a module upgrade method of a portable first aid device according to an embodiment of the present invention is described in detail. Next, with reference to Figure 2 a module upgrade system of a portable first aid device according to an embodiment of the present invention will be described.
[0063] A module upgrade system for a portable first-aid device according to an embodiment of the present invention is used to solve the technical problems of low upgrade efficiency and reliability existing in the module upgrade of existing portable first-aid devices, and achieve the technical effect of improving upgrade efficiency and reliability. A module upgrade system for a portable first-aid device includes: an upgrade package integrity verification module 10, a criticality identification module 20, a hot backup configuration module 30, an upgrade strategy determination module 40, and a log recording module 50.
[0064] The upgrade package integrity verification module 10 is used to slice the portable first-aid device by module and perform integrity verification of the upgrade package under double verification using a slice verification mechanism; the criticality identification module 20 is used to, if the verification passes, identify the criticality of the modules of the portable first-aid device, and use the criticality identification result to divide the critical function modules and non-critical function modules under the current upgrade; the hot backup configuration module 30 is used to configure a hot backup module for the critical function modules, and the hot backup module is used to take over the critical function services during the upgrade of the critical function modules; the upgrade strategy determination module 40 is used to perform task scheduling optimization for parallel module upgrades of non-critical function modules, determine the upgrade strategy using the task scheduling optimization result, and perform upgrade management; the log recording module 50 is used to record the key logs of the upgrade process, write the key logs into the blockchain network, and perform upgrade processing using the blockchain network.
[0065] Next, the specific configuration of the criticality identification module 20 will be described in detail. As described above, for criticality identification of the modules of the portable first-aid device, the criticality identification module 20 may further include: a function importance analysis unit for obtaining all module functions of the portable first-aid device, performing function importance analysis based on the all module functions, and establishing a first criticality score for the modules; a current scenario mode reading unit for reading the current scenario mode of the portable first-aid device and establishing a second criticality score for the modules using the current scenario mode; a retrospective usage window obtaining unit for obtaining the retrospective usage window of the portable first-aid device and establishing a third criticality score for the modules using the retrospective usage window; a criticality identification unit for completing criticality identification according to the first criticality score, the second criticality score, and the third criticality score.
[0066] Next, the specific configuration of the upgrade package integrity verification module 10 will be described in detail. As described above, the upgrade package integrity verification using the sharding verification mechanism for dual verification, the upgrade package integrity verification module 10 may further include: a hash value calculation unit for equally dividing the upgrade package into shards of a preset size, calculating the MD5 hash value and the SHA-256 hash value for each shard respectively, and establishing a shard digest pair; a traversal comparison unit for calling the shard digest table in the upgrade package and performing traversal comparison using the shard digest table and the shard digest pair; a judgment unit for passing the upgrade package integrity verification if the traversal comparison passes.
[0067] Next, the specific configuration of the upgrade policy determination module 40 will be described in detail. As described above, performing task scheduling optimization for parallel module upgrades of non-critical function modules, and determining the upgrade policy using the task scheduling optimization result, the upgrade policy determination module 40 may further include: a reserved resource load construction unit for constructing a reserved resource load using the critical function module; a task graph construction unit for configuring resource requirement constraints with the reserved resource load, and using the non-critical function modules as task nodes to construct a task graph, where each task node in the task graph is labeled with resource requirements, estimated time consumption, and dependency relationships; a task scheduling optimization unit for using the task graph to perform task scheduling optimization through a multi-objective scheduling optimization algorithm, and establishing a task scheduling optimization result, where the task scheduling process satisfies the resource requirement constraints, the maximum interruption time constraint, and the parallel quantity constraint.
[0068] Among them, the task scheduling optimization unit may further include: the scheduling objectives of the multi-objective scheduling optimization algorithm include an upgrade time objective, an upgrade stability objective, and a priority sorting objective.
[0069] Next, the specific configuration of the log recording module 50 will be described in detail. As described above, using the blockchain network for upgrade processing, the log recording module 50 may further include: an upgrade failure operation judgment unit for judging whether an upgrade failure operation occurs; a stable version rollback unit for, if an upgrade failure operation occurs, calling the blockchain log in the blockchain network and performing a stable version rollback to restore the running state of the corresponding module.
[0070] Among them, the log recording module 50 may further include: the key logs include an upgrade timestamp, a module identifier, an upgrade result, and hash verification data.
[0071] The module upgrade system of a portable first aid device provided by the embodiments of the present invention can execute the module upgrade method of a portable first aid device provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0072] Although the present application makes various references to certain modules in the system according to embodiments of the present application, however, any number of different modules can be used and run on the user terminal and / or the server. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other and do not limit the protection scope of the present invention.
[0073] The above specific embodiments do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present application shall be included within the protection scope of the present application. In some cases, the actions or steps recited in the present application can be executed in a different order from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for module upgrade of a portable first-aid device, characterized in that, The method includes: After slicing the portable first-aid device by module, use the slicing verification mechanism to perform integrity verification of the upgrade package under dual verification; If the verification passes, identify the criticality of the modules of the portable first-aid device, and use the criticality identification results to divide the critical function modules and non-critical function modules under the current upgrade; Configure a hot backup module for the critical function module, and the hot backup module is used to take over the critical function service during the upgrade of the critical function module; Execute task scheduling optimization for parallel module upgrade of non-critical function modules, use the task scheduling optimization results to determine the upgrade strategy, and execute upgrade management; Record the key logs of the upgrade process, write the key logs into the blockchain network, and use the blockchain network for upgrade processing.
2. The module upgrade method of a portable first aid device according to claim 1, characterized in that The identification of the criticality of the modules of the portable first-aid device includes: Obtain all the module functions of the portable first-aid device, perform function importance analysis based on all the module functions, and establish the first criticality score of the module; Read the current scenario mode of the portable first-aid device, and use the current scenario mode to establish the second criticality score of the module; Obtain the retrospective usage window of the portable first-aid device, and use the retrospective usage window to establish the third criticality score of the module; Complete the criticality identification according to the first criticality score, the second criticality score, and the third criticality score.
3. The module upgrade method of a portable first aid device according to claim 1, characterized in that The integrity verification of the upgrade package under dual verification using the slicing verification mechanism includes: After equally slicing the upgrade package according to a preset size, calculate the MD5 hash value and SHA-256 hash value for each slice respectively, and establish a slice digest pair; Call the slice digest table in the upgrade package, and use the slice digest table and the slice digest pair for traversal comparison; If the traversal comparison passes, the integrity verification of the upgrade package passes.
4. The module upgrade method of a portable first aid device according to claim 1, characterized in that, The execution of task scheduling optimization for parallel module upgrade of non-critical function modules, and using the task scheduling optimization results to determine the upgrade strategy includes: Use the critical function module to construct a reserved resource load; Configure resource requirement constraints with the reserved resource load, and use the non-critical function modules as task nodes to construct a task graph, and the task graph is marked with the resource requirements, estimated time consumption, and dependency relationships of each task node; Use the task graph to perform task scheduling optimization through a multi-objective scheduling optimization algorithm, establish the task scheduling optimization results, and the task scheduling optimization process satisfies the resource requirement constraints, maximum interruption time constraints, and parallel quantity constraints.
5. The module upgrade method of a portable first aid device according to claim 4, characterized in that The scheduling objectives of the multi-objective scheduling optimization algorithm include upgrade time objective, upgrade stability objective, and priority sorting objective.
6. The module upgrade method of a portable first aid device according to claim 1, characterized in that, The use of the blockchain network for upgrade processing includes: Judge whether there is an upgrade failure operation; If there is an upgrade failure operation, call the blockchain logs in the blockchain network, execute a stable version rollback to restore the running state of the corresponding module.
7. The module upgrade method of a portable first aid device according to claim 1, characterized in that The key logs include upgrade timestamps, module identifiers, upgrade results, and hash verification data.
8. A module upgrade system for a portable first aid device, characterized in that, The system is used to implement the module upgrade method of a portable first-aid device according to any one of claims 1-7, and the system includes: Upgrade package integrity verification module, which is used to slice the portable first-aid device by module and then use the slice verification mechanism to perform the integrity verification of the upgrade package under double verification; Criticality identification module, which is used to, if the verification passes, identify the criticality of the modules of the portable first-aid device, and use the criticality identification result to split the critical function modules and non-critical function modules under the current upgrade; Hot backup configuration module, which is used to configure a hot backup module for the critical function module, and the hot backup module is used to take over the critical function service during the upgrade of the critical function module; Upgrade strategy determination module, which is used to execute the task scheduling optimization for the parallel module upgrade of the non-critical function module, determine the upgrade strategy using the task scheduling optimization result, and execute the upgrade management; Log recording module, which is used to record the key logs of the upgrade process, write the key logs into the blockchain network, and perform the upgrade process using the blockchain network.