Vehicle-mounted system protection method and system, electronic equipment, storage medium and program product
By real-time monitoring of the virtual machine operating system of the vehicle system and identifying and repairing abnormal states, the system unavailability problem caused by operating system software exceptions in the prior art is solved, and storage space is saved, achieving efficient system repair and functional expansion.
Patent Information
- Application Number
- CN202411558427.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-11
AI Technical Summary
Existing on-board systems are prone to critical process exceptions, data loss or errors during the use of operating system software, resulting in unavailability of system functions, and the backup partitioning strategy requires double storage space, which increases the problem of equipment cost and insufficient storage space.
Through the detection module, the operating status of the virtual machine operating system is monitored in real time, the abnormal status is identified, the corresponding recovery image is obtained, the backup partition is read and flushed into the partition of the abnormal system, the recovery operation is performed, and the recovery results are verified to ensure the system Repair was successful.
It effectively saves the storage space of the backup partition, ensures that the system can be repaired quickly when abnormalities occur, and avoids the problem of limited functional scalability caused by insufficient storage space.
Smart Images

Figure CN119415321A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart cockpit technology, and in particular to a vehicle-mounted system operation protection method, system, storage medium and electronic equipment. Background Art
[0002] Virtualization technology is a technology that abstracts computing resources into multiple virtual instances, allowing multiple operating systems to share the same hardware platform. The application of this technology in automotive system-on-chip (SOC) can improve system security and resource utilization, while simplifying system design and maintenance.
[0003] Currently, multiple operating systems are installed on the vehicle SOC through virtualization to realize different functions, including system modules responsible for entertainment display, system modules responsible for virtual machine management and instrument display, system modules responsible for upgrade management, etc. However, serious problems may occur in the use of the operating system software, resulting in system functions being unavailable, such as abnormal key processes of the system causing the system to fail to boot or repeatedly restart, and key data loss or errors in the system causing the vehicle system to run disorderly or specific functions to be unavailable.
[0004] The current maintenance strategy is to protect the system through backup partitions. For example, using AB partitions, when the user uses system A, system B is used as a backup. If system A fails or cannot be used, the device will quickly switch to system B, thereby ensuring that the user can continue to use the device and repair system A in the process. However, this backup strategy requires double the system storage space, so that the device must allocate storage resources for two complete systems, which increases the demand for storage capacity and manufacturing costs, and limits the implementation of functions. The development team has to face the problem of insufficient storage space when designing and integrating new functions, and needs to strike a balance between system stability and functional scalability. Summary of the invention
[0005] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0006] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a vehicle system operation protection method, system, storage medium and electronic equipment.
[0007] In order to achieve the above object, in a first aspect, the present invention provides a vehicle system protection method, comprising:
[0008] The virtual machine operating system is monitored through the detection module to identify the virtual machine operating system in an abnormal state;
[0009] Acquire a recovery image corresponding to the virtual machine operating system in the abnormal state from a backup partition;
[0010] Flashing the acquired recovery image to the partition of the virtual machine operating system in the abnormal state to perform a recovery operation;
[0011] Verifying the flashing result, and if the result is consistent with the preset result, the repair is completed;
[0012] If they are inconsistent, repeat the two steps of obtaining the recovery image and performing the recovery operation until the result is consistent with the preset result.
[0013] Optionally, the step of identifying the virtual machine operating system in the abnormal state includes:
[0014] The detection module continuously monitors the running state of the virtual machine operating system to determine whether an abnormal state occurs. If the virtual machine operating system is not running or is powered off abnormally, it is determined that an abnormal state occurs, and then the duration of the abnormal state is further obtained;
[0015] Based on the duration of the abnormal state monitored by the detection module, it is determined whether the duration of the abnormal state exceeds a set duration threshold. If it exceeds the set duration threshold, it is determined that the virtual operating system is in an abnormal state.
[0016] Optionally, the virtual machine operating system includes an entertainment display system and an instrument display system, the entertainment display system is used to provide a multimedia entertainment display interface, and the instrument display system is used to display a vehicle instrument operation interface.
[0017] Optionally, the virtual machine operating system running status includes a startup status, a running status, and an update status.
[0018] Optionally, the set duration threshold is the sum of the maximum historical startup duration of the virtual machine and a set additional duration protection value.
[0019] Optionally, the steps of performing the recovery operation include:
[0020] The detection module detects that the running state of the virtual machine operating system is abnormal, and sends a signal to the abnormal management and recovery module;
[0021] The abnormal management recovery module reads the recovery image file in the operating system backup module, erases the system data of the virtual machine operating system partition to be recovered, decompresses the recovery image file system data and writes it into the virtual machine operating system partition to be recovered.
[0022] Optionally, the recovery result verification step includes:
[0023] The abnormal management recovery module calculates the hash value in the backup image file and the hash value of the system data of the virtual machine operating system partition to be restored after the operating system recovery operation is completed;
[0024] The abnormal management and recovery module sequentially compares the hash value in the backup image file with the hash value of the system data of the virtual machine operating system partition to be recovered;
[0025] Determine whether the hash values are the same. If they are the same, send a recovery success signal; if they are different, send a recovery failure signal.
[0026] In a second aspect, the present invention provides a vehicle-mounted system protection system, comprising:
[0027] The detection module is used to manage and monitor the operating resources and operating status of multiple virtual machine operating systems in the system;
[0028] Abnormal management and recovery module, used for system recovery and system update of virtual machine operating system;
[0029] The operating system backup module is used to store the backup image files of the virtual machine operating system.
[0030] In a third aspect, the present invention provides an electronic device, comprising:
[0031] one or more processors; memory; and
[0032] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the vehicle system operation protection method as described in any one of the above.
[0033] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program for running a vehicle-mounted system operation protection method, wherein the computer program enables a computer to execute the vehicle-mounted system operation protection method as described in any one of the above items.
[0034] In a fifth aspect, the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned vehicle system operation protection methods.
[0035] The present invention has the following beneficial effects:
[0036] The present invention separates a partition in the system storage space to store backup image files, monitors the operating status in real time through a detection module, and when an abnormality occurs in the vehicle-mounted system, reads the backup image in the operating system backup module through the abnormality management recovery module to actively repair the problematic system, thereby effectively saving backup partition storage space. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 1 ;
[0038] Figure 2 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 2 ;
[0039] Figure 3 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 3 ;
[0040] Figure 4 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 4 ;
[0041] Figure 5 Schematic diagram of the vehicle system protection system provided for this application;
[0042] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.
[0043] Legend:
[0044] 1. Detection module; 2. Abnormal management and recovery module; 3. Operating system backup module; 4. Virtual machine operating system; 41. Entertainment display system; 42. Instrument display system; 5. Electronic equipment; 501. Communication interface; 502. Processor; 503. Memory; 504. Bus. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Virtualization technology is an advanced technology that abstracts computing resources and converts them into multiple virtual instances. Its core function is to enable multiple operating systems to share on the same hardware platform. The application of this technology in the vehicle-mounted system-on-chip (System on Chip, SOC) has many significant advantages. It can not only greatly improve the security of the system and effectively prevent external malicious attacks and internal errors from causing serious impact on the entire system, but also significantly improve resource utilization and avoid idleness and waste of hardware resources. At the same time, it can simplify the process in system design, reduce the difficulty of design, make the design more reasonable and efficient, and reduce maintenance costs and time in maintenance, and improve maintenance efficiency.
[0047] At present, the in-vehicle SOC has successfully installed multiple operating systems with the help of virtualization technology to achieve a variety of different functions. Among them, the system module responsible for entertainment display brings users a wonderful audio-visual experience. Whether it is high-definition video playback or smooth game operation, it is inseparable from its support; the system module responsible for virtual machine management and instrument display ensures the stable operation of the system while accurately and clearly displaying various key information of the vehicle to the driver, ensuring safety and convenience during driving; the system module responsible for upgrade management always pays attention to the update and optimization of the system, and introduces new functions and fixes potential vulnerabilities to the system in a timely manner.
[0048] However, in actual use, operating system software will inevitably encounter some serious problems, which will cause the system functions to become unavailable. For example, once an abnormality occurs in the key process of the system, it may cause the system to fail to boot normally, or cause the system to restart repeatedly, seriously affecting the user experience and the normal operation of the vehicle. In addition, if key data in the system is lost or wrong, it will cause the operation of the vehicle system to be disordered. For example, the vehicle's navigation function may have positioning deviations, route planning errors, or certain specific functions may be directly unavailable, causing great inconvenience and safety hazards to the driver.
[0049] The current maintenance strategy for this situation is mostly to protect the system through backup partitions. A common example is the use of AB partitions. When the user is using system A, system B is on standby as a backup. Once system A fails or becomes unusable, the device can switch to system B at a very fast speed, ensuring that the user can continue to use the device stably, and the technician can repair system A while the user is using system B. However, although this backup strategy has a significant effect in ensuring system continuity, it also has certain disadvantages. It requires double the system storage space, which means that the device must allocate storage resources for two complete systems. This not only increases the demand for storage capacity, causing the hardware cost of the device to increase, but also limits the function implementation. When designing and integrating new functions, the development team often has to face the problem of insufficient storage space. In this case, the development team needs to make a difficult balance between system stability and functional scalability, ensuring that the system can run stably and will not affect user use due to failures, and providing users with more rich and practical new functions as much as possible to meet the ever-changing market needs and user expectations.
[0050] Reference Figure 1 The present application provides an embodiment of a vehicle system operation protection method, comprising:
[0051] S100, monitoring the virtual machine operating system 4 through the detection module 1, and identifying the virtual machine operating system 4 in an abnormal state;
[0052] S200, obtaining a recovery image corresponding to the virtual machine operating system 4 in the abnormal state described in step S100 from the backup partition;
[0053] S300, flashing the recovery image obtained in step S200 to the partition of the virtual machine operating system 4 in the abnormal state, and performing a recovery operation;
[0054] S400, verifying the flashing result in step S300, and if the result is consistent with the preset result, the repair is completed;
[0055] If not, the steps of obtaining the recovery image in step S200 and performing the recovery operation in step S300 are repeated until the result is consistent with the preset result.
[0056] Figure 2 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 2 ,like Figure 2 As shown, in this embodiment Figure 1Based on the embodiment, the vehicle system protection method is described in detail. In step S100, the step of identifying the virtual machine operating system 4 in the abnormal state includes:
[0057] S101, the detection module 1 continuously monitors the running state of the virtual machine operating system 4 to determine whether an abnormal state occurs. If the virtual machine operating system 4 is not running or is powered off abnormally, it is determined that an abnormal state occurs, and then the abnormal state duration is further obtained, and the process proceeds to S102;
[0058] S102, based on the duration of the abnormal state monitored by the detection module 1, it is determined whether the duration of the abnormal state exceeds a set duration threshold, and if it exceeds the set duration threshold, it is determined that the virtual operating system is in an abnormal state.
[0059] The set duration threshold is the sum of the maximum historical startup duration of the virtual machine and the set additional duration protection value.
[0060] Figure 3 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 3 ,like Figure 3 As shown, in this embodiment Figure 1 Based on the embodiment, the vehicle system protection method is described in detail. In step S300, the recovery operation step includes:
[0061] S301, the detection module 1 detects that the running state of the virtual machine operating system 4 is abnormal, and sends a signal to the abnormal management and recovery module 2;
[0062] S302, the abnormal management and recovery module 2 reads the recovery image file in the operating system backup module 3, erases the system data of the virtual machine operating system 4 partition to be recovered, decompresses the recovery image file system data and writes it into the virtual machine operating system 4 partition to be recovered.
[0063] Exemplarily, the detection module 1 continuously monitors the running status of the virtual machine operating system 4, including whether the key processes of the monitoring system are running normally, memory usage, disk read and write status, network connection status, and the response of various system services, etc.: the detection module 1 checks the key process list of the system once every certain period of time (such as 5 seconds) to ensure that all important system processes are running normally and there is no abnormal resource occupation or unresponsiveness; at the same time, it monitors the memory usage in real time. When it is found that the memory usage rate is too high and continues to rise, and may be close to the dangerous threshold set by the system (such as 80%), it will further check which programs or services are causing the abnormal memory usage.
[0064] If any situation that does not meet the normal operating standards is detected, the detection module 1 will determine that the system operation status is abnormal: when it is detected that a key system process suddenly disappears or stops responding, or serious errors are found in disk reading and writing, such as frequent read and write failures or timeouts, or the network connection is suddenly interrupted and cannot be automatically restored in a short time, the detection module 1 will determine that the system is in an abnormal state.
[0065] Once the system operation is determined to be abnormal, the detection module 1 will immediately send a specific signal to the abnormal management and recovery module 2. This signal can be a predefined digital code or character string, which is used to inform the abnormal management and recovery module 2 of the specific abnormality type or urgency and other information: the signal sent can be "0x001", indicating a general system operation abnormality, which may require regular recovery operations; if it is "0x002", it may indicate a more serious system failure and more urgent recovery measures need to be taken.
[0066] After receiving the abnormal signal sent by the detection module 1, the abnormal management and recovery module 2 will first communicate with the operating system backup module 3, and then find the corresponding recovery image file from the operating system backup module 3 according to the pre-set path and file name: the recovery image file may be stored in a dedicated backup storage device with the path " / backup / vm_os_recovery_image.img". The abnormal management and recovery module 2 will use the appropriate file reading interface or command to open and read this image file, which contains all the configurations of the operating system, the file system structure, and application information.
[0067] While reading the recovery image file, the exception management recovery module 2 will prepare to operate on the virtual machine operating system 4 partition to be restored, and first send instructions to the relevant disk management tool or system interface to erase the existing system data on the partition. This is to ensure that during the recovery process, the recovery effect will not be affected by old erroneous data or inconsistent system status: by calling the disk formatting command or a specific partition erasing tool, the virtual machine operating system 4 partition to be restored is quickly formatted, and the original file system structure, data, and possible erroneous configurations are all cleared. Assuming that the partition to be restored is " / dev / sda1", the exception management recovery module 2 will perform an operation similar to "format / dev / sda1" (the specific command may vary depending on the operating system) to erase the system data of the partition.
[0068] After completing the partition data erasure, the exception management recovery module 2 will decompress the system data in the read recovery image file. The decompression process will restore the compressed data in the image file to the original system file and directory structure, and then write the decompressed system data block by block into the virtual machine operating system 4 partition to be restored through the disk write operation: Use a special disk writing tool or system function to write the decompressed operating system files, configuration files, application data, etc. into the " / dev / sda1" partition according to the correct file system structure, and gradually restore the system to its previous normal state. During the writing process, the integrity and correctness of the data will be ensured, and some verification and verification operations will be performed to prevent data writing errors.
[0069] Figure 4 Schematic diagram of the process of the vehicle system protection method provided in this application Figure 4 ,like Figure 4 As shown, in this embodiment Figure 1 Based on the embodiment, the vehicle system protection method is described in detail. In S400, the recovery result verification step includes:
[0070] S401, the abnormal management and recovery module 2 calculates the hash value in the backup image file and the hash value of the system data of the virtual machine operating system 4 partition to be restored after the operating system recovery operation is completed;
[0071] S402, the abnormal management and recovery module 2 sequentially compares the hash value in the backup image file with the hash value of the system data of the virtual machine operating system 4 partition to be recovered;
[0072] S403, determining whether the hash values are the same, if they are the same, sending a recovery success signal, if they are different, sending a recovery failure signal.
[0073] Exemplarily, the abnormal management and recovery module 2 first obtains the recovery image file in the operating system backup module 3. This image file is a complete system backup created previously, which contains all the configuration, files, data and other information of the operating system, and then uses a hash algorithm (such as MD5, SHA-1 or the more secure SHA-256, etc.) to calculate the entire image file: Taking the SHA-256 algorithm as an example, the module will read the image file block by block according to a certain data block size (for example, 1GB), and perform complex mathematical operations and processing on each block of data; these operations will generate a unique fixed-length hash value according to the content of the data (for SHA-256, the hash value length is 256 bits); after combining and further processing the hash values of all data blocks, the hash value of the entire backup image file is finally obtained: the abnormal management and recovery module 2 uses the relevant hash calculation function or tool to calculate the file and obtain the hash value.
[0074] After the operating system recovery operation is completed, the exception management recovery module 2 will perform the same hash value calculation operation on the system data in the virtual machine operating system 4 partition to be restored, that is, it will traverse all files and data on the partition and calculate according to the same hash algorithm and data block processing method: the partition contains operating system files, application files, user data, etc. The module will read these data in turn and perform hash calculations and then proofread and verify them.
[0075] The abnormal management recovery module 2 compares the hash value of the backup image file and the hash value of the partition system data to be restored bit by bit, that is, starting from the highest bit of the hash value, compares each bit of the two hash values in turn to see if they are the same: first compare the highest bit (assuming counting from left to right) to see if they are the same, then compare the next bit in turn, until all 256 bits are compared (taking SHA-256 as an example). During the comparison process, if any bit is found to be different, the difference position will be recorded, and the subsequent bits will continue to be compared to determine whether there are other different bits.
[0076] According to the comparison result, if the hash value of the backup image file and the hash value of the system data of the partition to be restored are exactly the same in all bits, then the abnormal management and recovery module 2 determines that the recovery operation is successful, that is, the data restored to the virtual machine operating system 4 partition is completely consistent with the data in the original backup image file, and there is no problem of data loss, damage or erroneous writing;
[0077] If any difference is found during the comparison process, the recovery operation is considered to have failed. This may be due to network failure, disk write error, image file damage, or other unknown problems that cause the recovered data to be inconsistent with the original backup.
[0078] If the recovery is judged to be successful, the abnormal management recovery module 2 will send a "successful recovery" signal to the relevant monitoring system or other modules to notify other parts of the system that the recovery operation has been successfully completed and the virtual machine operating system 4 can be used normally: the signal sent may be "SUCCESS_RECOVERY", indicating that the recovery is successful. After receiving this signal, the system status record can be updated and the user can be notified that the system has returned to normal and the user can continue to operate normally;
[0079] If the recovery is judged to have failed, the abnormal management recovery module 2 will send a "recovery failure" signal to notify other parts of the system that the recovery operation has not been successfully completed and the virtual machine operating system 4 cannot be used normally: the signal sent may be "FAILURE_RECOVERY", and after receiving this signal, the recovery operation can be automatically retried, the administrator can be notified for manual intervention, and a detailed error log can be recorded for subsequent analysis.
[0080] Reference Figure 5 , and also includes a vehicle system operation protection system, including:
[0081] The detection module 1 is used to manage and monitor the operating resources and operating status of multiple virtual machine operating systems 4 in the system;
[0082] The abnormal management recovery module 2 is used for system recovery and system update of the virtual machine operating system 4;
[0083] The operating system backup module 3 is used to store the backup image file of the virtual machine operating system 4.
[0084] In this embodiment, a partition is separated in the system storage space to store the backup image file, and the detection module 1 monitors the running status in real time. When an abnormality occurs in the vehicle system, the abnormality management and recovery module 2 reads the backup image in the operating system backup module 3 to actively repair the problematic system. The specific operations include:
[0085] A specific partition is separated from the storage device of the vehicle-mounted S0C and divided into a system backup module for storing backup image files. The image of the operating system is usually about 1G in size, and the backup partition of the operating system requires tens of G memory space, so the present application can save a lot of storage space. The detection module 1 can monitor the running state of each virtual machine operating system 4 in real time, and judge whether a certain operating system is successfully started or crashes during operation by monitoring the startup and operation data of the operating system, so as to judge whether the operation of the operating system is good.
[0086] When the detection module 1 detects that a certain operating system is running abnormally, the detection module 1 obtains the backup image file corresponding to the target virtual machine operating system 4 from the operating system backup module 3, and uses the system upgrade tool to write the system data in the backup image file into the system partition of the target virtual machine operating system 4 to perform the operating system recovery operation.
[0087] Exemplarily, the detection module 1 periodically checks the running status of each virtual machine operating system 4. If a virtual machine is found to be running abnormally and powered off abnormally, the detection is continued after recording the current time point. When the monitoring time exceeds the set threshold (the maximum historical startup time of the virtual machine plus the set additional time protection value), it is determined that the virtual machine operating system 4 is running abnormally and a recovery process needs to be executed.
[0088] Specifically, the detection module 1 obtains the recovery image from the backup partition according to the recovery image storage path and name predefined by the virtual machine, then erases the disk data of the target virtual machine operating system 4 partition, decompresses the backup image file, and writes the system data in the image to the system partition of the target virtual machine that has been erased. After the recovery process is completed, the flashing result is verified. The verification here refers to whether the hash values such as md5 and CRC of the files written to the partition are consistent with the preset. After the verification is passed, the entire vehicle-mounted S0C is restarted to complete the repair process. It should be noted that md5 and CRC are both calculated by calculating the data to generate a check value, i.e., a hash value, and the consistency of the check value is used to compare whether the result is consistent with the preset result.
[0089] It should be noted that the backup image source is written into the device during the first software flash or upgrade process of the device. During the first flash or upgrade, the same system image file or system image compressed file used in this solution. After the system level is completed, the backup image file storage space is cleaned up and all system image files are stored in the storage space.
[0090] Figure 5 The schematic diagram of the virtual machine operating system 4 provided in this application is as follows: Figure 5 As shown, the virtual machine operating system 4 includes an entertainment display system 41 and an instrument display system 42. The entertainment display system 41 is used to provide a multimedia entertainment display interface, and the instrument display system 42 is used to display a vehicle instrument operation interface.
[0091] The entertainment display system 41 may adopt the Android system, through which users may play music, watch videos, and use various applications (such as navigation, social media, and games), etc. It may support touch screen and other operations, so that users can quickly access required functions; the instrument display system 42 may adopt the Linus system, which is responsible for real-time display of key driving information, such as speed, fuel level, navigation status, etc., to improve the readability of information and user convenience of operation.
[0092] Furthermore, the running status of the virtual machine operating system 4 includes a startup status, a running status, and an update status.
[0093] Exemplarily, by real-time monitoring of the startup and running status of the operating system, its running status can be classified, specifically including:
[0094] (1) Successful startup: The operating system successfully starts within the scheduled time without any errors, crashes, deadlocks or other abnormalities during operation, and all functions are normal;
[0095] For example, when the vehicle is started, the vehicle operating system successfully starts within 30 seconds, that is, after startup, the entertainment system can play music and videos normally, the navigation system can quickly locate and plan routes, and the instrument display accurately displays vehicle information such as vehicle speed and engine speed. During the entire driving process, the operating system continues to run stably without any freezes, freezes or abnormal errors, and all functions can be used normally;
[0096] (2) Boot failure: The operating system encounters an error during the boot process (for example, a key file or driver is missing) and fails to complete the boot within the specified time, resulting in a boot failure;
[0097] For example, after the vehicle is started, the operating system stays on a certain interface during the startup process, that is, "the system key file xxx.dll cannot be found" may be displayed, and the usual 40-second startup time limit is exceeded, eventually resulting in a startup failure. This may be caused by the system file being accidentally deleted, damaged, or the storage medium failing, so that the operating system cannot load the required key files normally, and thus cannot complete the startup process;
[0098] (3) Runtime crash: The operating system crashes unexpectedly during operation, including the operating system failing to release unused memory during operation, resulting in system performance degradation and crash;
[0099] For example, when the vehicle is driving, the operating system originally runs normally, but as the usage time increases, the memory usage continues to increase, and the operating system fails to release the unused memory in time. When the memory usage reaches a certain limit, the system suddenly freezes, and then the entire operating system crashes, the entertainment system screen stops updating, the navigation system loses response, and the instrument display also flashes abnormally or freezes. This situation where the system performance deteriorates and eventually crashes due to poor memory management;
[0100] (4) Security issues: The operating system detects potential security threats, attack behaviors, or unauthorized access attempts;
[0101] For example, during the operation of the vehicle operating system, it is detected that a network connection from an unknown source attempts to access the system's key files and databases multiple times, and at the same time the firewall prompts that a large number of abnormal network data packets have poured in. This indicates that the operating system has detected a potential security threat or unauthorized access attempt. The system will immediately activate the security protection mechanism, such as cutting off the suspicious network connection, issuing an alarm to notify users and related maintenance personnel, and encrypting and protecting key data to prevent possible attacks from damaging the system;
[0102] (5) Automatic recovery: The operating system can automatically recover to a stable state when certain errors occur, ensuring operational continuity;
[0103] For example, when the operating system is running, a temporary error occurs in a software module, causing some functions to be unable to be used normally. However, when the system's built-in automatic recovery mechanism quickly detects the problem, it will try to reinitialize the software module and then restore the relevant configuration files and data from the backup, ensuring the continuity of various vehicle functions;
[0104] (6) Update status: operating system version update or patch installation;
[0105] For example, when the vehicle is connected to a wireless network, the vehicle operating system detects that a new version update is available. The system will automatically download the update package and perform version updates or patch installations at an appropriate time (such as when the vehicle is parked and charging). During the update process, the system will display an update progress bar and prompt the user after the update is complete, "The operating system has been updated to version xxx, and some functions may be optimized or adjusted. Please pay attention to the experience." After the update is completed, the system may make some configuration adjustments and optimizations at startup to ensure the normal operation of the new functions and the stability of the system.
[0106] In a possible embodiment, in an in-vehicle system or other scenarios using a virtual machine, in order to accurately determine whether the startup of the virtual machine is normal, a reasonable threshold duration needs to be set. This threshold duration is determined based on the historical startup of the virtual machine and certain additional protection considerations.
[0107] Exemplarily, the threshold duration is the maximum value of the historical startup duration of the virtual machine plus the set additional duration protection value, and the steps include:
[0108] (1) Collect historical startup data: Monitor the virtual machines in the vehicle system for a period of time and record the startup time in different time periods. For example, in the past week, the startup time data of the virtual machines are as follows (unit: seconds): first startup: 45 seconds; second startup: 50 seconds; third startup: 55 seconds; fourth startup: 60 seconds; fifth startup: 52 seconds; determine the maximum historical startup time. From the above data, it can be seen that the maximum historical startup time is 60 seconds.
[0109] (2) Setting an extra time protection value: Considering that the system may have a slightly longer startup time due to various factors (such as temporary increase in system load, slight hardware aging, etc.), an extra time protection value can be set. This value is usually determined based on experience or system stability requirements. If you want the system to be more strict in judging startup anomalies, you can appropriately reduce this value. If you want the system to have a certain degree of fault tolerance to avoid misjudgment, you can appropriately increase this value.
[0110] (3) Calculate the threshold duration: According to the formula "threshold duration = maximum historical startup duration of the virtual machine + set additional duration protection value", the threshold duration is 60 seconds + 10 seconds = 70 seconds.
[0111] (4) Applying the threshold duration to make judgments When the virtual machine is started again, if the startup time is within 70 seconds, the system considers that this startup is normal; if the startup time exceeds 70 seconds, the system considers that this startup is abnormal; at this time, the system will take some self-checking measures, such as issuing an alarm to notify maintenance personnel to check, or automatically try some recovery operations, such as restarting certain key services, to ensure that the virtual machine can operate normally or resume normal operation as soon as possible.
[0112] By setting the threshold duration in this way, it is possible to promptly discover and handle possible startup abnormalities while ensuring the normal operation of the system, thereby improving the stability and reliability of the system. At the same time, the maximum historical startup duration and the additional duration protection value can be reasonably adjusted according to actual conditions, thereby better adapting to the operating characteristics and needs of different systems.
[0113] It can be understood that the vehicle system operation protection system provided in the embodiment of the present invention corresponds to the above-mentioned vehicle system operation protection method. The explanations, examples, beneficial effects and other parts of its relevant contents can refer to the corresponding contents in the vehicle system operation protection method, and will not be repeated here.
[0114] Reference Figure 6 , further comprising an electronic device 5, comprising:
[0115] One or more processors 502; memory 503; and
[0116] One or more programs, wherein the one or more programs are stored in the memory 503 and configured to be executed by the one or more processors 502, the programs comprising for performing the following steps:
[0117] S100, the detection module 1 continuously monitors the running state of the virtual machine operating system 4 to determine whether the running state of the virtual machine operating system 4 is abnormal;
[0118] S200, the detection module 1 determines that the virtual machine operating system 4 runs abnormally, and the abnormal management and recovery module 2 performs an operating system recovery operation;
[0119] S300, the detection module 1 executes the system verification process of the virtual machine operating system 4 to determine whether the operating system recovery operation is successfully executed.
[0120] like Figure 6 As shown, the electronic device 5 provided in this embodiment includes: a communication interface 501, a processor 502, a memory 503 and a bus 504; wherein the communication interface 501, the processor 502 and the memory 503 communicate with each other through the bus 504. The processor 502 can execute the method described above by reading and executing the machine executable instructions corresponding to the control logic of the question prompt method in the memory 503. The specific content of the method is referred to the above embodiment, which will not be repeated here.
[0121] Among them, the memory 503 is used to store programs, and the processor 502 executes the program after receiving the execution instruction. The memory 503 mentioned in this application can be any electronic, magnetic, optical or other physical storage device, which can contain storage information, such as executable instructions, data, etc. Specifically, the memory 503 can be RAM (Random Access Memory), flash memory, storage drive (such as hard disk drive), any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 501 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0122] In some embodiments, the processor 502 may include one or more communication interfaces 501. The communication interface 501 may include an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI) interface, a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc. The bus 504 may be divided into an address bus, a data bus, a control bus, etc.
[0123] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 5. In other embodiments of the present application, the electronic device 5 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0124] The processor 502 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 502 or an instruction in the form of software. The above processor 502 can be an application processor (Application Processor, AP), a modem processor, a graphics processor (Graphics Processing Unit, GPU), an image signal processor (Image Signal Proessor, ISP), a controller, a video codec, a digital signal processor (Digital Signal Processor, DSP), a baseband processor, and / or a neural network processor (Neural-network Processing Unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors 502. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0125] The electronic device 5 provided in the embodiment of the present application and the method provided in the embodiment of the present application are based on the same technical concept and have the same beneficial effects as the method adopted, operated or implemented by them.
[0126] Also included is a computer-readable storage medium storing a computer program for running the vehicle system operation protection method, wherein the computer program enables a computer to execute the following steps:
[0127] S100, the detection module 1 continuously monitors the running state of the virtual machine operating system 4 to determine whether the running state of the virtual machine operating system 4 is abnormal;
[0128] S200, the detection module 1 determines that the virtual machine operating system 4 runs abnormally, and the abnormal management and recovery module 2 performs an operating system recovery operation;
[0129] S300, the detection module 1 executes the system verification process of the virtual machine operating system 4 to determine whether the operating system recovery operation is successfully executed.
[0130] Among them, the computer-readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a computer-readable storage medium is coupled to a processor so that the processor 502 can read information from the computer-readable storage medium and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be a component of the processor 502. The processor 502 and the computer-readable storage medium can be located in an application-specific integrated circuit (ASIC). In addition, the ASIC can be located in a user device. Of course, the processor 502 and the computer-readable storage medium can also exist in a communication device as discrete components.
[0131] Specifically, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0132] The present application also provides a computer program product, including a computer program, which implements the above method when executed by the processor 502. The computer program includes one or more computer instructions, and when the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0133] It should be noted that, through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment. In this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
Claims
1. A vehicle system protection method, characterized in that: include: The virtual machine operating system is monitored through the detection module to identify the virtual machine operating system in an abnormal state; Acquire a recovery image corresponding to the virtual machine operating system in the abnormal state from a backup partition; Flashing the acquired recovery image to the partition of the virtual machine operating system in the abnormal state to perform a recovery operation; Verifying the flashing result, and if the result is consistent with the preset result, the repair is completed; If they are inconsistent, repeat the two steps of obtaining the recovery image and performing the recovery operation until the result is consistent with the preset result.
2. A vehicle system protection method according to claim 1, characterized in that: The step of identifying the virtual machine operating system in the abnormal state includes: The detection module continuously monitors the running state of the virtual machine operating system to determine whether an abnormal state occurs. If the virtual machine operating system is not running or is powered off abnormally, it is determined that an abnormal state occurs, and then the duration of the abnormal state is further obtained; Based on the duration of the abnormal state monitored by the detection module, it is determined whether the duration of the abnormal state exceeds a set duration threshold. If it exceeds the set duration threshold, it is determined that the virtual operating system is in an abnormal state.
3. A vehicle system protection method according to claim 2, characterized in that: The virtual machine operating system includes an entertainment display system and an instrument display system. The entertainment display system is used to provide a multimedia entertainment display interface, and the instrument display system is used to display a vehicle instrument operation interface.
4. A vehicle system protection method according to claim 2, characterized in that: The virtual machine operating system running status includes startup status, running status, and update status.
5. The vehicle system protection method according to claim 2, characterized in that: The set duration threshold is the sum of the maximum historical startup duration of the virtual machine and the set additional duration protection value.
6. A vehicle system protection method according to claim 1, characterized in that: The steps to perform the recovery operation include: The detection module detects that the running state of the virtual machine operating system is abnormal, and sends a signal to the abnormal management and recovery module; The abnormal management recovery module reads the recovery image file in the operating system backup module, erases the system data of the virtual machine operating system partition to be recovered, decompresses the recovery image file system data and writes it into the virtual machine operating system partition to be recovered.
7. The vehicle system protection method according to claim 1, characterized in that: The recovery result verification steps include: The abnormal management recovery module calculates the hash value in the backup image file and the hash value of the system data of the virtual machine operating system partition to be restored after the operating system recovery operation is completed; The abnormal management and recovery module sequentially compares the hash value in the backup image file with the hash value of the system data of the virtual machine operating system partition to be recovered; Determine whether the hash values are the same. If they are the same, send a recovery success signal; if they are different, send a recovery failure signal.
8. A vehicle system protection system, characterized in that: include: The detection module is used to manage and monitor the operating resources and operating status of multiple virtual machine operating systems in the system; Abnormal management and recovery module, used for system recovery and system update of virtual machine operating system; The operating system backup module is used to store the backup image files of the virtual machine operating system.
9. An electronic device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include programs for executing the vehicle system operation protection method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: It stores a computer program for running the vehicle system operation protection method, wherein the computer program enables a computer to execute the vehicle system operation protection method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the vehicle-mounted system operation protection method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method and system for recovering long-term storage failure of mobile terminal
CN121210211A