An automobile diagnostic instrument data management method, system, medium and program product
By dividing the functional data into partitions, setting priorities and buffers in the automotive diagnostic tool, constructing a circular storage linked list, adjusting the partition positions, and splitting and merging, the resource consumption problem of the automotive diagnostic tool when accessing data from different vehicle models is solved, improving operating efficiency and real-time performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CHAOYUE TECH DEV CO LTD
- Filing Date
- 2025-02-10
- Publication Date
- 2026-04-28
AI Technical Summary
Existing automotive diagnostic tools consume excessive file system resources when frequently accessing data from different vehicle models, resulting in reduced operating efficiency and real-time performance.
By partitioning functional data based on vehicle identification information, setting priority identifiers and data buffers, constructing a circular storage linked list, setting data checkpoints in the linked list, adjusting the positions of high-priority partitions, triggering partition splitting and merging operations, and optimizing data access paths.
It improves data access efficiency, reduces system resource consumption, enhances the reliability and real-time performance of data management, and optimizes storage space utilization.
Smart Images

Figure CN120071467B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of diagnostic data management, and in particular relates to a data management method, system, medium and program product for automotive diagnostic instruments. Background Technology
[0002] As the automotive aftermarket services become increasingly sophisticated, automotive diagnostic tools need to support a growing number of vehicle models, leading to frequent access to large amounts of data during operation. Existing diagnostic equipment typically employs its own proprietary data reading technology for data management. This technology can experience data reading delays when dealing with a large number of vehicle models from various brands and large volumes of data. This not only affects the device's response speed but also degrades the user experience.
[0003] In related technologies, encapsulated file systems are typically used for data storage and management. This approach encapsulates the file system and establishes a file index structure, enabling the target data to be located quickly during data retrieval, thus reducing the time overhead of data search.
[0004] However, when it is necessary to frequently access and read data from different vehicle models, the file system needs to repeatedly open, read, and close files, which can lead to excessive system resource consumption and reduce the operating efficiency and real-time performance of the vehicle diagnostic tool. Summary of the Invention
[0005] This application provides a data management method, system, medium, and program product for automotive diagnostic instruments, which reduces data access latency, decreases system resource occupancy, and thereby improves the operating efficiency and real-time performance of automotive diagnostic instruments.
[0006] In the first aspect, this application provides a data management method for an automotive diagnostic instrument, which receives vehicle identification information and divides diagnostic data into several functional data partitions based on the vehicle identification information. The functional data partitions are divided according to the vehicle system module type.
[0007] Assign a priority identifier to each functional data partition and set up a data buffer between adjacent functional data partitions. The data buffer is used to temporarily store data during the partition switching process.
[0008] Construct a circular storage linked list and set several data checkpoints in the circular storage linked list. The data checkpoints are used to record the data access status and data integrity information.
[0009] Adjust the storage location of the functional data partitions in the circular storage list according to the priority identifier, so that the high-priority functional data partitions are located in the preset active area of the circular storage list;
[0010] When the amount of data in any functional data partition exceeds the preset storage threshold, the functional data partition splitting operation is triggered;
[0011] Based on the access frequency and data volume of functional data partitions, a merging operation is performed on adjacent functional data partitions. The merging operation combines functional data partitions with a data volume less than a preset data volume and an access feature similarity greater than a preset similarity.
[0012] By adopting the above technical solution, diagnostic data is divided into functional data partitions based on vehicle identification information. Combined with priority identifiers and data buffer settings, the data has a clear organizational structure and priority distinction during storage. The data buffer prevents data loss during partition switching, ensuring data continuity and integrity. Data checkpoints in the circular storage linked list can promptly detect data access anomalies and data corruption, improving data reliability. By adjusting high-priority functional data partitions to preset active areas, data access addressing time is reduced, improving data read / write efficiency. Partition splitting operations triggered when data volume exceeds a threshold prevent performance degradation caused by excessive data volume in a single partition. Partition merging operations based on access frequency and data volume reduce storage fragmentation, improve storage space utilization, and optimize data access paths by merging partitions with similar access characteristics, reducing data access latency, decreasing system resource consumption, and thus improving the operating efficiency and real-time performance of the automotive diagnostic tool.
[0013] Based on some examples from the first aspect, in these examples, a priority identifier is assigned to each functional data partition, and a data buffer is set up between adjacent functional data partitions, specifically including:
[0014] Establish a priority scoring matrix based on the real-time requirements of vehicle system modules, data reliability levels, and system importance;
[0015] The comprehensive priority score for each functional data partition is calculated based on the priority scoring matrix, and the comprehensive priority score is mapped to a discrete priority identifier.
[0016] Set up data buffers between adjacent functional data partitions.
[0017] By adopting the above technical solution and establishing a priority scoring matrix that includes real-time requirements, data reliability levels, and system importance, a comprehensive assessment of the importance of functional data partitions is achieved. The comprehensive priority score calculated based on the scoring matrix accurately reflects the importance of different functional data partitions, avoiding biases caused by subjective judgment. Mapping the comprehensive priority score to discrete priority identifiers simplifies the representation of priorities, facilitating rapid system processing and identification. Data buffers set up between adjacent functional data partitions act as relay stations for data exchange, reducing the risk of data loss during transmission. This enables the system to more accurately identify and protect critical data, improving the accuracy and reliability of data management, while also optimizing the efficiency of system resource allocation.
[0018] Based on some examples from the first aspect, the splitting operation of functional data partitioning in these examples specifically includes:
[0019] Obtain the data structure information and data correlation information of the functional data partition to be split. The data correlation information includes the access relationship between data items and the data flow direction. The functional data partition to be split is a functional data partition whose data volume exceeds the preset storage threshold.
[0020] Based on data structure information and data correlation information, identify data subsets in the functional data partitions to be split whose data correlation degree is higher than the preset correlation degree, and calculate the data interaction frequency between data subsets;
[0021] Based on the data interaction frequency, the data partitions of the function to be split are divided to generate several sub-data partitions, so that the data correlation within each sub-data partition is maximized and the data interaction frequency between sub-data partitions is minimized.
[0022] Assign a new priority identifier to the sub-data partition. The new priority identifier is the same as the priority identifier of the functional data partition to be split.
[0023] The performance parameters of the statistical sub-data partitions include access latency, storage space utilization, and data throughput.
[0024] When performance parameters exceed the preset range, a boundary adjustment operation for the sub-data partition is triggered. The boundary adjustment operation includes re-dividing the data range of the sub-data partition or merging sub-data partitions with data access efficiency lower than the preset efficiency.
[0025] By adopting the above technical solution and analyzing the data structure and correlation information of the functional data partitions to be split, the system can identify the inherent relationships between data. Partitioning based on the interaction frequency between data subsets ensures high cohesion within each sub-partition and low coupling between sub-partitions. Assigning the same priority identifier to sub-partitions as the original partitions maintains the continuity and consistency of data management. By statistically analyzing the performance parameters of sub-partitions and performing boundary adjustments, the system can promptly identify and resolve performance bottlenecks. When performance parameters such as access latency, storage space utilization, or data throughput exceed preset ranges, the triggered boundary adjustment operation optimizes data distribution, improves overall system performance, and enhances storage space utilization while ensuring data access efficiency, thus giving the system better scalability and adaptability.
[0026] In conjunction with some examples from the first aspect, in these examples, after performing a merge operation on adjacent functional data partitions based on the access frequency and data volume of the functional data partitions, the method further includes:
[0027] Retrieve the timestamps and spatial location information of each data record in the functional data partition;
[0028] The functional data is partitioned into several consecutive and non-overlapping time segments based on the timestamp.
[0029] Calculate the spatial reference distance between data records within each time segment;
[0030] The data records within each time segment are rearranged based on spatial reference distance;
[0031] Construct a multi-level index structure, which includes a time index and a spatial index. The time index points to each time segment, and the spatial index points to the rearranged data record.
[0032] Count the access frequency of multi-level index structures and store index structures with access frequency higher than the preset frequency in the cache;
[0033] When the remaining cache space is less than a preset value, remove the index structure with the lowest access frequency.
[0034] By adopting the above technical solutions, the system achieves time-series management of data by acquiring the timestamps and spatial location information of data records and performing data sharding based on the time dimension. Calculating spatial reference distances and rearranging data records optimizes the distribution of data on physical storage media, reducing the physical addressing overhead during data access. The constructed multi-level index structure combines time and spatial indexes, providing multi-dimensional fast access paths for data queries. By statistically analyzing the access frequency of index structures and storing frequently accessed index structures in the cache, the access latency of frequently used data is significantly reduced. When cache space is insufficient, the strategy of removing the least frequently accessed index structure ensures efficient use of cache space, improves data retrieval efficiency, reduces system resource consumption, and enables the system to better adapt to complex data access patterns.
[0035] Based on some examples from the first aspect, in these examples, the spatial reference distance between data records within each time segment is calculated, specifically including:
[0036] Establish a data record access sequence and use the data record access sequence to record the access order of data records;
[0037] Calculate the difference in physical storage location between data records accessed in adjacent order;
[0038] Calculate the average of the differences in physical storage locations and use the average as the spatial reference distance.
[0039] By employing the above technical solution, a data record access sequence is established to record the access order of data records. The physical storage location differences between data records with adjacent access sequences are statistically analyzed, and the average value of these differences is calculated as the spatial reference distance. This allows for accurate quantification of the physical storage location relationships between data records. When the physical storage location of a data record does not match its access order, a large spatial reference distance leads to increased addressing overhead in the storage system. Calculating the spatial reference distance can identify this unreasonable storage layout. The calculated spatial reference distance can serve as a basis for data rearrangement. By adjusting the physical storage location of data records, frequently accessed adjacent data records are stored adjacently in physical storage space, thereby reducing the number of addressing attempts and addressing time in the storage system, improving data access efficiency and the overall performance of the storage system.
[0040] In conjunction with some examples from the first aspect, in these examples, the method further includes, before constructing the multi-level index structure:
[0041] Calculate the data access density for each time segment and classify the time segments according to the data access density;
[0042] Allocate different index resources to time segments of different levels;
[0043] Establish a dynamic adjustment mechanism for time segments.
[0044] By adopting the above technical solution, differentiated index resource configuration is achieved by classifying and allocating different index resources based on the data access density of statistical time segments. Data access density reflects the number of data accesses per unit time. Time segments with high access density often contain more hot data and require more index resources to support frequent data query operations. By classifying time segments, limited index resources can be prioritized for allocation to time segments with higher access density, ensuring fast access to hot data, while allocating fewer index resources to time segments with lower access density, reducing the waste of index resources.
[0045] Based on some examples from the first aspect, a dynamic adjustment mechanism for time segments is established in these examples, specifically including:
[0046] Real-time monitoring of changes in access frequency for time segments;
[0047] When the access frequency changes beyond the preset range, the level of the time segment is reallocated;
[0048] Adjust index resources based on the reassigned levels.
[0049] By adopting the above technical solution, and by monitoring the changes in access frequency of time segments in real time and dynamically adjusting the level and index resources, the index structure can adapt to changes in data access patterns. Changes in access frequency indicate a change in the importance of data in a certain time segment. When the access frequency increases significantly, the existing index resources may not be able to meet the more frequent data access needs, while when the access frequency decreases significantly, excessive index resources will waste system resources, thus improving the efficiency of system resource utilization.
[0050] Secondly, this application provides an automotive diagnostic tool data management system, which includes: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the system to perform the methods described in the first aspect and any possible implementation thereof.
[0051] Thirdly, this application provides a computer-readable storage medium including instructions that, when executed on a system, cause the system to perform the method described in the first aspect and any possible implementation thereof.
[0052] Fourthly, this application provides a computer program product, characterized in that, when the computer program product is run on a system, it causes the system to execute the method described in any possible implementation of the first aspect.
[0053] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0054] 1. This application provides a data management method for automotive diagnostic instruments. By dividing diagnostic data into functional data partitions based on vehicle identification information, and combining priority identifiers and data buffer settings, the data has a clear organizational structure and priority distinction during storage. The data buffer prevents data loss during partition switching, ensuring data continuity and integrity. Data checkpoints in the circular storage linked list can promptly detect data access anomalies and data corruption, improving data reliability. By adjusting high-priority functional data partitions to preset active areas, data access addressing time is reduced, improving data read / write efficiency. Partition splitting operations triggered when the data volume exceeds a threshold avoid performance degradation caused by excessive data volume in a single partition. Partition merging operations based on access frequency and data volume reduce storage fragmentation, improve storage space utilization, and optimize data access paths by merging partitions with similar access characteristics, reducing data access latency, reducing system resource consumption, and thus improving the operating efficiency and real-time performance of the automotive diagnostic instrument.
[0055] 2. This application provides a data management method for automotive diagnostic instruments. By analyzing the data structure and data correlation information of the functional data partitions to be split, the system can identify the inherent relationships between data. Partitioning is based on the interaction frequency between data subsets, ensuring high cohesion within each sub-partition and low coupling between sub-partitions. Assigning the same priority identifier to each sub-partition as the original partition maintains the continuity and consistency of data management. By statistically analyzing the performance parameters of the sub-partitions and performing boundary adjustments, the system can promptly identify and resolve performance bottlenecks. When performance parameters such as access latency, storage space utilization, or data throughput exceed preset ranges, the triggered boundary adjustment operation can optimize data distribution, improve overall system performance, and enhance storage space utilization while ensuring data access efficiency, thus providing better scalability and adaptability.
[0056] 3. This application provides a data management method for automotive diagnostic instruments. By acquiring the timestamps and spatial location information of data records and performing data sharding based on the time dimension, the system achieves time-series management of data. Calculating spatial reference distances and rearranging data records optimizes the distribution of data on physical storage media, reducing physical addressing overhead during data access. The constructed multi-level index structure combines time and spatial indexes, providing multi-dimensional fast access paths for data queries. By statistically analyzing the access frequency of index structures and storing frequently accessed index structures in the cache, the access latency of frequently used data is significantly reduced. When cache space is insufficient, the strategy of removing the least frequently accessed index structure ensures efficient use of cache space, improves data retrieval efficiency, reduces system resource consumption, and enables the system to better adapt to complex data access patterns. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating a data management method for an automotive diagnostic instrument according to an embodiment of this application.
[0058] Figure 2 This is another flowchart illustrating a data management method for an automotive diagnostic instrument in an embodiment of this application.
[0059] Figure 3 This is a schematic diagram of the physical device structure of an automotive diagnostic instrument data management system provided in an embodiment of this application. Detailed Implementation
[0060] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0061] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0062] The following example is used in conjunction with Figure 1 The present application describes a data management method for an automotive diagnostic instrument in its embodiments:
[0063] Please see Figure 1 This is a flowchart illustrating a data management method for an automotive diagnostic instrument in an embodiment of this application.
[0064] S101. Receive vehicle identification information and divide the diagnostic data into several functional data partitions based on the vehicle identification information.
[0065] The system receives vehicle identification information and divides the diagnostic data into several functional data partitions based on the vehicle identification information. The functional data partitions are divided according to the vehicle system module type.
[0066] In this step, the system first receives the vehicle identification information. This information can include various unique identifiers such as the vehicle's brand, model, year, and VIN code. The system can obtain this information in several ways, such as reading it from the vehicle's electronic control unit (ECU), obtaining it from the vehicle's diagnostic interface, or obtaining it from user input.
[0067] After acquiring vehicle identification information, the system divides the diagnostic data into several functional data partitions based on a pre-established vehicle model function data mapping table. These functional data partitions are based on different functional systems or modules of the vehicle, such as the engine system, transmission system, braking system, and airbag system. Each functional data partition contains diagnostic data related to that specific functional system.
[0068] When partitioning functional data, the system can employ either a rule-based approach or a machine learning-based approach. The rule-based approach maps diagnostic data items to corresponding functional data partitions according to predefined rules; the machine learning-based approach trains a model of the mapping relationship between data items and functional partitions using a large amount of historical diagnostic data, and then uses this model to partition new diagnostic data.
[0069] S102. Assign a priority identifier to each functional data partition and set up a data buffer between adjacent functional data partitions;
[0070] The system assigns a priority identifier to each functional data partition and sets up a data buffer between adjacent functional data partitions. This data buffer is used to temporarily store data during partition switching. Specifically, this includes:
[0071] Establish a priority scoring matrix based on the real-time requirements of vehicle system modules, data reliability levels, and system importance;
[0072] The comprehensive priority score for each functional data partition is calculated based on the priority scoring matrix, and the comprehensive priority score is mapped to a discrete priority identifier.
[0073] Set up data buffers between adjacent functional data partitions.
[0074] In this step, the system assigns a priority identifier to each functional data partition. The priority identifier reflects the importance and access frequency of the functional data partition. The system can calculate the priority score of each functional data partition based on factors such as the type of functional module, the probability of failure, and the degree of impact of failure, and then map the score to discrete priority identifiers, such as high, medium, and low levels.
[0075] When assigning priority identifiers, the system can employ various calculation methods, such as weighted summation, analytic hierarchy process (AHP), and fuzzy comprehensive evaluation. Furthermore, the system can incorporate actual vehicle operating data, such as fault code frequency and fault code type distribution, to dynamically adjust priority scores, thereby more accurately reflecting the importance of functional data partitions.
[0076] To improve data access efficiency and avoid data conflicts between partitions, the system sets up data buffers between adjacent functional data partitions. A data buffer is a temporary storage space used to temporarily store data that cannot be processed in time during partition switching, preventing data loss or overwriting. Simultaneously, the data buffer also serves to synchronize and asynchronously process data, allowing functional data partitions of different priorities to access data in parallel.
[0077] When setting up a data buffer, the system needs to determine the buffer capacity and refresh strategy based on factors such as the size of the functional data partition, access frequency, and real-time requirements. For example, for functional data partitions with large data volumes and frequent access, a larger buffer capacity can be set, and a first-in-first-out (FIFO) refresh strategy can be adopted; for functional data partitions with high real-time requirements, a smaller buffer capacity can be set, and a priority queuing refresh strategy can be adopted.
[0078] In practical implementation, the data buffer can be based on high-speed storage media such as memory and flash memory, or on high-capacity storage media such as hard disks. The system can select appropriate storage media and access interfaces according to different application scenarios and performance requirements to optimize the read and write performance and reliability of the data buffer.
[0079] S103. Construct a circular storage linked list and set several data checkpoints in the circular storage linked list;
[0080] The system constructs a circular storage linked list and sets several data checkpoints in the circular storage linked list. The data checkpoints are used to record the data access status and data integrity information.
[0081] In this step, the system constructs a circular linked list to store and manage functional data partitions. A circular linked list is a special type of linked list structure where the last node points to the first node, forming a closed loop. Compared to traditional linear linked lists, circular linked lists offer higher storage efficiency and access flexibility.
[0082] When constructing a circular linked list, the system can use either static or dynamic allocation. Static allocation pre-allocates a fixed amount of storage space during system initialization, with each functional data partition occupying one node. Dynamic allocation dynamically requests and releases storage space based on the actual size of the functional data partitions, and the number and position of nodes can be adjusted as needed.
[0083] To ensure data consistency and recoverability, the system sets up several data checkpoints in the circular storage linked list. A data checkpoint is a special linked list node used to record the current data state and access progress. The system can periodically insert checkpoint nodes into the circular linked list based on preset time intervals or data volume thresholds.
[0084] When setting up data checkpoints, the system can use either full checkpoints or incremental checkpoints. A full checkpoint saves a complete snapshot of all current functional data partitions to the checkpoint node; an incremental checkpoint only saves the data changes since the last checkpoint, which can reduce storage overhead and recovery time.
[0085] During the operation of a circular linked list, if an abnormal situation occurs, such as a system crash or power outage, the system can recover data from the most recent checkpoint, reducing the risk of data loss and corruption. Simultaneously, the system can also utilize checkpoints for version control and historical backtracking, facilitating fault diagnosis and problem localization.
[0086] In its implementation, the system can construct circular linked lists based on various technologies such as pointers and indexes, providing flexible interfaces for insertion, deletion, and search operations. For different data types and access modes, the system can select different data encoding and compression algorithms, reducing storage overhead while improving data transmission and processing efficiency.
[0087] S104. Adjust the storage location of the functional data partition in the circular storage list according to the priority identifier, so that the high-priority functional data partition is located in the preset active area of the circular storage list.
[0088] In this step, the system adjusts the position of functional data partitions in the circular storage linked list according to priority identifiers. The purpose is to store high-priority partitions in the active area of the linked list, thereby improving data access efficiency. The active area refers to the region in the linked list that is accessed frequently and updated rapidly.
[0089] When adjusting the location of functional data partitions, the system can use either a statistical method based on access frequency or a sorting method based on priority. The access frequency-based method calculates the access frequency by recording the number of times each partition is accessed and the time interval, and then sorts the partition locations according to the frequency. The priority-based method directly sorts the partition locations in descending order based on their priority identifier.
[0090] To minimize the impact of partition relocation adjustments on system performance, the system can employ incremental or batch adjustment strategies. Incremental adjustment involves moving only one or a small number of partitions at a time, gradually optimizing partition positions; batch adjustment involves moving multiple partitions at once after a certain time interval or after reaching a certain threshold, quickly optimizing partition positions.
[0091] When adjusting partition locations, the system also needs to consider the principle of locality of reference, storing highly relevant partitions in adjacent locations to reduce the span and latency of data access. For example, storing multiple sub-partitions of the same functional module in consecutive linked list nodes improves the spatial locality of data.
[0092] In practical implementation, the system can be designed with efficient partition movement algorithms and data synchronization mechanisms to minimize the impact of partition adjustments on system performance. For example, double buffering can be used to copy data to a backup buffer before moving a partition, thus avoiding data overwriting and loss. Furthermore, the system can introduce concurrency control and locking mechanisms to ensure data consistency in multi-threaded or multi-process environments.
[0093] S105. When the amount of data in any functional data partition exceeds the preset storage threshold, the functional data partition splitting operation is triggered.
[0094] When the amount of data in any functional data partition exceeds the preset storage threshold, the system triggers a functional data partition splitting operation. The functional data partition splitting operation is as follows:
[0095] Obtain the data structure information and data correlation information of the functional data partition to be split. The data correlation information includes the access relationship between data items and the data flow direction. The functional data partition to be split is a functional data partition whose data volume exceeds the preset storage threshold.
[0096] Based on data structure information and data correlation information, identify data subsets in the functional data partitions to be split whose data correlation degree is higher than the preset correlation degree, and calculate the data interaction frequency between data subsets;
[0097] Based on the data interaction frequency, the data partitions of the function to be split are divided to generate several sub-data partitions, so that the data correlation within each sub-data partition is maximized and the data interaction frequency between sub-data partitions is minimized.
[0098] Assign a new priority identifier to the sub-data partition. The new priority identifier is the same as the priority identifier of the functional data partition to be split.
[0099] The performance parameters of the statistical sub-data partitions include access latency, storage space utilization, and data throughput.
[0100] When performance parameters exceed the preset range, a boundary adjustment operation for the sub-data partition is triggered. The boundary adjustment operation includes re-dividing the data range of the sub-data partition or merging sub-data partitions with data access efficiency lower than the preset efficiency.
[0101] In this step, the system monitors the data volume of each functional data partition. When the data volume of any partition exceeds a preset storage threshold, the partition is split. The storage threshold is preset based on the system's performance requirements and resource limitations, representing the maximum data storage capacity of a single partition.
[0102] When a partition splitting operation is triggered, the system first obtains the data structure information and data relationship information of the partition to be split. The data structure information describes the type, length, format, and other attributes of the data items within the partition; the data relationship information describes the logical relationships and access order between data items, such as function call relationships and data dependencies.
[0103] Based on the data structure and correlation information, the system divides the partition to be split into several sub-partitions. The principle of partitioning is to maximize the correlation of data within each sub-partition and minimize the correlation of data between sub-partitions, i.e., high cohesion and low coupling. This reduces the number of cross-partition data accesses and latency, and improves the system's parallel processing capabilities.
[0104] When partitioning into sub-partitions, the system can employ either graph-based clustering algorithms or tree-based hierarchical partitioning algorithms. Graph-based algorithms treat data items as nodes in a graph and relationships as edges, using graph theory algorithms such as maximum flow / minimum cut to cluster the nodes. Tree-based algorithms construct a tree structure based on the logical hierarchy and nesting relationships of the data items, and then recursively partition the tree nodes.
[0105] After partitioning, the system assigns each subpartition the same priority identifier as the original partition, maintaining the priority of the functional partitions. Simultaneously, the system needs to update the partition nodes and pointers in the circular storage linked list to maintain the correctness and integrity of the linked list structure.
[0106] To evaluate the effectiveness of partitioning, the system performs performance statistics and analysis on each sub-partition, including metrics such as data access latency, storage space utilization, and data throughput. If the performance of some sub-partitions is found to be significantly lower than expected, the system can trigger dynamic adjustments to partition boundaries, such as merging sub-partitions with too small a data volume or splitting sub-partitions with low access efficiency, to further optimize the utilization efficiency of storage and computing resources.
[0107] In practical implementation, the system can flexibly select different data structures and algorithms, such as hash tables, B+ trees, and LSM trees, based on the characteristics of data partitions and business requirements, to balance data read / write performance and storage overhead. Simultaneously, the system can also incorporate technologies such as data compression, indexing, and caching to further improve data storage efficiency and access speed.
[0108] S106. Based on the access frequency and data volume of the functional data partition, perform a merge operation on adjacent functional data partitions.
[0109] The system performs a merging operation on adjacent functional data partitions based on the access frequency and data volume of the functional data partitions. The merging operation combines functional data partitions with a data volume less than a preset data volume and an access feature similarity greater than a preset similarity.
[0110] In this step, the system merges adjacent partitions based on their access frequency and data volume. The purpose of this merging operation is to reduce the number of partitions, improve data aggregation and access efficiency, and save storage and computing resources.
[0111] When performing partition merging, the system first calculates the access frequency and data volume of each functional data partition. Access frequency refers to the number of reads and writes to the partition per unit time; data volume refers to the total amount of data currently stored in the partition. Based on preset frequency and data volume thresholds, the system filters out candidate partitions for merging, namely adjacent partitions with similar access frequencies and smaller data volumes.
[0112] For candidate partitions to be merged, the system further calculates their similarity in dimensions such as function, time, and space. The function dimension refers to the similarity of the vehicle function modules to which the partitions belong; the time dimension refers to the similarity of the generation time and update cycle of the partition data; and the spatial dimension refers to the similarity of the physical location of the partition data on the storage medium.
[0113] If the similarity of candidate partitions exceeds a preset threshold across multiple dimensions, the system performs a merge operation, combining the data from these partitions into a new partition. The merged new partition inherits the priority identifier of the original partition and recalculates the allocation of storage and computing resources based on the merged data volume and access frequency.
[0114] When merging partitions, the system needs to handle potential data conflicts and consistency issues. For duplicate or redundant data in different partitions, the system can perform data cleaning and deduplication; for data items with the same name in different partitions, the system can determine the latest valid value based on timestamps or version numbers; for cross-partition transactions or atomic operations, the system needs to use two-phase commit or compensation mechanisms to ensure data integrity and consistency.
[0115] In practical implementation, the system can design efficient partition merging algorithms and data migration mechanisms to reduce the impact of merging operations on system performance. For example, by using copy-on-write technology, a new partition copy is created first when merging partitions, and modification operations are redirected to the copy. After the merge is complete, the original partition is atomically replaced. Another example is using data sharding technology, which divides the data of a large partition into multiple small shards and performs the merge operation in parallel, thereby improving the efficiency of data migration.
[0116] In the above embodiments, diagnostic data is divided into functional data partitions based on vehicle identification information. Combined with priority identifiers and data buffers, this ensures a clear organizational structure and priority distinction during data storage. The data buffers prevent data loss during partition switching, guaranteeing data continuity and integrity. Data checkpoints in the circular storage list promptly detect data access anomalies and data corruption, improving data reliability. By adjusting high-priority functional data partitions to preset active areas, data access addressing time is reduced, improving data read / write efficiency. Partition splitting operations triggered when data volume exceeds a threshold prevent performance degradation caused by excessively large data volumes in individual partitions. Partition merging operations based on access frequency and data volume reduce storage fragmentation, improve storage space utilization, and optimize data access paths by merging partitions with similar access characteristics. This reduces data access latency, decreases system resource consumption, and ultimately improves the operating efficiency and real-time performance of the automotive diagnostic tool.
[0117] Based on the vehicle diagnostic instrument data management method in the above embodiments, although efficient organization and access of diagnostic data are achieved through mechanisms such as functional data partitioning, priority management, partition splitting and merging, in practical applications, due to the obvious temporal characteristics of vehicle diagnostic data and the fact that the distribution of data records in physical storage space directly affects data access performance, it is also necessary to consider the spatiotemporal characteristics of the data and establish a more granular data management mechanism. The following section combines... Figure 2 Another method for managing automotive diagnostic instrument data in the embodiments of this application is described below:
[0118] Please see Figure 2 This is another flowchart illustrating a data management method for an automotive diagnostic instrument in an embodiment of this application.
[0119] S201. Obtain the timestamp and spatial location information of each data record in the functional data partition;
[0120] In this step, the system extracts the timestamp and spatial location information of each data record from the functional data partition. The timestamp is the point in time when the data record was generated or updated, reflecting the freshness and timeliness of the data; the spatial location information is the physical address of the data record on the storage medium, reflecting the storage location and adjacency relationship of the data.
[0121] To efficiently retrieve timestamps and spatial location information from data records, the system can store this metadata along with the main data during data writing, avoiding additional parsing and extraction overhead. For example, a fixed field for timestamps and location information can be reserved in the header of the data record, or the metadata can be stored in key-value pairs in association with the main data.
[0122] Furthermore, the system can select different timestamp formats and spatial location encoding methods based on the characteristics of the data records and application requirements. For example, for data with high real-time requirements, high-precision timestamps, such as those at the millisecond or microsecond level, can be used; for spatial location information, absolute or relative addresses can be used to save storage space.
[0123] S202. Divide the functional data partition into several continuous and non-overlapping time segments according to the timestamp;
[0124] In this step, the system divides the entire functional data partition into multiple time segments based on the timestamps of the data records. Each time segment contains data records within a continuous time interval, and there is no time overlap between different time segments. The granularity of the time segment division can be flexibly set according to the system's performance requirements and data characteristics, such as by day, by hour, or by minute.
[0125] To quickly divide time segments, the system can use either incremental time windows or equal-interval sampling. Incremental time windows refer to dividing data records into different time segments sequentially according to a fixed time span, such as 1 hour or 1 day; equal-interval sampling refers to sampling data records at fixed time intervals, such as every 5 minutes or 10 minutes, using the sampling points as the boundaries of the time segments.
[0126] When dividing time segments, the system needs to handle cases where timestamps are discontinuous or missing. For data records with discontinuous timestamps, the system can estimate the timestamp of the record based on the time difference between adjacent records and assign it to the corresponding time segment. For data records with missing timestamps, the system can assign them to adjacent time segments based on their location on the storage medium, or place them in a separate special time segment.
[0127] The division of time segments can be represented by a time segment table, where each entry contains attributes such as the start time, end time, and number of data records for that time segment. The time segment table can serve as part of a time index, stored and managed separately from the main data, improving the efficiency of time-related queries. Furthermore, the system can dynamically adjust the granularity and storage strategy of time segment divisions based on data distribution and access frequency, such as migrating data from frequently accessed time segments to a cache or compressing and storing less frequently accessed time segments.
[0128] S203. Calculate the spatial reference distance between data records within each time segment;
[0129] The system calculates the spatial reference distance between data records within each time segment, specifically including:
[0130] Establish a data record access sequence and use the data record access sequence to record the access order of data records;
[0131] Calculate the difference in physical storage location between data records accessed in adjacent order;
[0132] Calculate the average of the differences in physical storage locations and use the average as the spatial reference distance.
[0133] In this step, the system calculates the spatial reference distance between data records within each time segment. The spatial reference distance reflects the degree of adjacency of data records in physical storage locations; the smaller the distance, the more concentrated the data records are in space, and the better the locality of access.
[0134] To calculate spatial reference distance, the system first needs to establish an access sequence for data records, recording the order in which data records are accessed. This access sequence can be obtained through log analysis or online monitoring, or it can be predicted based on the timestamps of the data records and application semantics.
[0135] With the access sequence, the system can calculate the difference in physical location of adjacent accessed data records on the storage medium, that is, the absolute value of the difference in the storage addresses of two data records. The smaller the physical location difference, the closer the two data records are in space, and the higher the locality of access.
[0136] To quantify spatial reference distance, the system can calculate the average of the physical location differences of all adjacent accessed data records within a time segment, using this average as the spatial reference distance for that time segment. The average can be calculated using methods such as arithmetic mean or geometric mean, or it can consider the access frequency of different data records, giving higher weight to frequently accessed data.
[0137] The spatial reference distance can reflect the spatial distribution characteristics of data records within a time segment. The smaller the distance, the more compact the data records are in space, the better the locality of access, and the better the effect of data prefetching and caching. The larger the distance, the more dispersed the data records are in space, the worse the locality of access, and the worse the effect of data prefetching and caching.
[0138] In practical applications, the system can set different spatial reference distance thresholds based on different storage media and data types to determine the spatial locality of data. For example, a larger distance threshold can be set for disk storage that is primarily sequential read / write, while a smaller distance threshold can be set for memory storage that is primarily random read / write. The system can also dynamically adjust the data storage layout and access strategy based on the changing trend of spatial reference distance, such as storing data records with small spatial reference distances contiguously or re-clustering data records with large spatial reference distances.
[0139] S204. Rearrange the data records within each time segment based on spatial reference distance;
[0140] In this step, the system uses the spatial reference distance calculated in the previous step to rearrange the data records within each time segment. The purpose of this rearrangement is to group data records with small spatial reference distances together as much as possible, improving the spatial locality of data access and reducing overhead such as disk seeks or memory page faults.
[0141] Specifically, the system can use distance-based clustering algorithms, such as K-means clustering or hierarchical clustering, to aggregate data records with similar spatial reference distances into a single cluster. Each cluster can be viewed as a spatially compact data block, where the spatial reference distance between data records within a cluster is small, while the spatial reference distance between data records between clusters is larger.
[0142] During clustering, the system can dynamically determine the number and size of clusters based on the size of the time segment and the data distribution. For example, time segments with a large amount of data and a relatively uniform distribution can be divided into multiple small clusters; time segments with a small amount of data or a relatively concentrated distribution can be divided into a few large clusters.
[0143] After clustering, the system stores the data records within each cluster sequentially according to the cluster order, ensuring that adjacent clusters are also physically adjacent in storage. For data records within the same cluster, the system can use different arrangement methods, such as sorting by timestamp or by popularity, to further optimize the temporal locality of data access.
[0144] The rearranged data records can be written back to their original storage location, or they can be written to a new storage area, stored separately from the original data. Writing to a new storage area can avoid the impact of data migration on online services, but it requires additional storage space and data synchronization overhead.
[0145] S205. Construct a multi-level index structure, count the access frequency of the multi-level index structure, and store the index structure with an access frequency higher than the preset frequency into the cache.
[0146] The system constructs a multi-level index structure, which includes time indexes and spatial indexes. The time indexes point to various time segments, and the spatial indexes point to the rearranged data records. The system also counts the access frequency of the multi-level index structure and stores the index structures with access frequencies higher than the preset frequency into the cache.
[0147] In this step, the system builds a multi-level index structure based on the rearranged data to accelerate data retrieval and access. Multi-level index structures typically employ a tree topology, such as B+ trees or LSM trees, where each level of index node points to the next level of index node or the final data node. Compared to single-level indexes, multi-level indexes have slightly higher storage space and maintenance costs, but offer significant advantages in query efficiency and concurrency performance, making them particularly suitable for large-scale, frequently accessed data.
[0148] When constructing multi-level indexes, the system adopts a divide-and-conquer approach, first building a time index and then a spatial index, forming a two-level index structure. The key of the time index is the timestamp or time interval of the data, and the value is a pointer to the corresponding time segment; the key of the spatial index is the spatial location or spatial range of the data, and the value is a pointer to the specific data record.
[0149] Time indexes can employ range-based indexing methods, such as range trees and segment trees, to merge and store overlapping time ranges, avoiding backtracking searches. The granularity of time indexes can be flexibly set according to query patterns, such as creating indexes by day or by hour, improving the filtering efficiency of the time dimension.
[0150] Spatial indexes can employ distance-based indexing methods, such as R-trees and KD-trees, to group spatially proximate data together, accelerating spatial dimension searches. The granularity of spatial indexes can be dynamically adjusted based on data distribution; for example, fine-grained indexes can be created for dense regions, while coarse-grained indexes can be created for sparse regions, balancing index space overhead and query efficiency.
[0151] After the multi-level index is built, the system continuously tracks the access frequency of each index node, including the number of read and write requests. The access frequency reflects the popularity of the index node; the higher the frequency, the greater the probability that the index node is accessed, and the greater the benefit of caching.
[0152] The system caches index nodes whose access frequency exceeds a preset threshold in memory, accelerating index lookups and updates. Cached index nodes can be evicted using LRU, LFU, or other eviction policies, dynamically adjusting the cached content based on changes in access frequency. For index nodes with low access frequency, the system can remove them from the cache, freeing up memory space.
[0153] S206. When the remaining cache space is less than a preset value, remove the index structure with the lowest access frequency.
[0154] In this step, the system ensures efficient utilization and continuous optimization of the index cache through dynamic management of the cache space. Specifically, the system monitors the usage of the cache space in real time, and triggers the eviction operation of the cached index when the remaining space is less than a preset threshold.
[0155] The cache eviction targets the least frequently accessed index nodes, that is, the index nodes accessed the fewest times within a certain time window. These index nodes usually correspond to cold data or infrequent queries, so the benefits of caching are small, and the impact on query performance after eviction is also small.
[0156] To accurately identify low-frequency index nodes, the system needs to maintain an index list sorted by access frequency. Each time the cache is accessed or updated, the index node's position in the list is adjusted accordingly. When an index node needs to be evicted, the system starts from the end of the list and evicts the least frequently accessed index nodes sequentially until enough cache space is freed up.
[0157] When evicting an index node, the system needs to synchronously update the related index structure and cache mapping relationships. For example, the pointers of the parent or child nodes of the evicted node may be set to null, or the key-value range of the evicted node may be merged into adjacent nodes. These update operations may involve local adjustments and rebalancing of the index structure, requiring concurrency control mechanisms to ensure the atomicity and consistency of the updates.
[0158] In addition to passive eviction, the system can also introduce an active cache optimization mechanism to analyze cache access patterns and efficiency periodically or irregularly, and proactively adjust cache content and configuration. For example, for index nodes whose access frequency suddenly decreases, the system can evict them from the cache as early as possible to avoid occupying valuable cache space; for index nodes whose access frequency continues to increase, the system can add them to the cache in advance to improve the cache hit rate.
[0159] In the above embodiments, by acquiring the timestamps and spatial location information of data records and performing data sharding based on the time dimension, the system achieves time-series management of data. Calculating spatial reference distances and rearranging data records optimizes the distribution of data on the physical storage medium, reducing the physical addressing overhead during data access. The constructed multi-level index structure combines time and spatial indexes, providing multi-dimensional fast access paths for data queries. By statistically analyzing the access frequency of index structures and storing frequently accessed index structures in the cache, the access latency of frequently used data is significantly reduced. When cache space is insufficient, the strategy of removing the least frequently accessed index structure ensures efficient utilization of cache space, improves data retrieval efficiency, reduces system resource consumption, and enables the system to better adapt to complex data access patterns.
[0160] Furthermore, before constructing the hierarchical index structure in the above embodiments, the method further includes:
[0161] Calculate the data access density for each time segment and classify the time segments according to the data access density;
[0162] Allocate different index resources to time segments of different levels;
[0163] Establish a dynamic adjustment mechanism for time segments, specifically: monitor changes in the access frequency of time segments in real time;
[0164] When the access frequency changes beyond the preset range, the level of the time segment is reallocated;
[0165] Adjust index resources based on the reassigned levels.
[0166] In this embodiment, before constructing the multi-level index structure, the system introduces a time-segment hierarchical mechanism. Time segments are classified according to data access density, and different index resources are allocated to time segments of different levels. This hierarchical indexing approach can further optimize the storage and query efficiency of the index. Based on the data's popularity characteristics, the granularity and allocation of the index are dynamically adjusted, improving the index's adaptability and accuracy.
[0167] Specifically, the system first calculates the data access density for each time segment, which is the number of times the data within that time segment is accessed per unit of time. Data access density reflects the popularity of a time segment; the higher the access density, the more frequently the data within that time segment is accessed, and the higher its weight in the index should be.
[0168] Based on the data access density, the system divides time segments into different levels, such as hot spot, warm spot, and cold spot. The level division can be done using fixed thresholds or dynamic thresholds. For example, the top 20% of time segments with the highest access density can be classified as hot spot, the bottom 50% as cold spot, and the rest as warm spot; or the threshold boundaries for each level can be dynamically adjusted according to the distribution of access density.
[0169] After classifying the time segments into different levels, the system allocates different index resources to each segment according to its level. Index resources include index space overhead, index update frequency, and index cache space; the higher the level, the more index resources are allocated. For example, for hot time segments, the system can build finer-grained indexes to improve data retrieval efficiency; for cold time segments, the system can build coarser-grained indexes to reduce index storage and maintenance costs.
[0170] Considering that data access patterns may change over time, the system also needs to establish a dynamic adjustment mechanism for time segments. The system monitors the access frequency changes of each time segment in real time, and triggers the adjustment operation of the time segment when the change in access frequency exceeds a preset threshold range.
[0171] The adjustment operation is divided into two types: upgrade and downgrade. Upgrading refers to raising the time segment with a significant increase in access frequency to a higher level, while downgrading refers to lowering the time segment with a significant decrease in access frequency to a lower level. The adjustment operation can be triggered according to a fixed adjustment cycle, such as checking access frequency changes every hour; or it can be triggered according to real-time access frequency monitoring, such as triggering immediately if the access frequency exceeds a threshold for 3 consecutive minutes.
[0172] When the level of a time segment changes, the system needs to adjust its allocated index resources accordingly. For upgraded time segments, the system increases the allocation of index resources, such as building finer-grained indexes, increasing the index update frequency, and expanding the index cache space; for downgraded time segments, the system reduces the allocation of index resources, such as building coarser-grained indexes, reducing the index update frequency, and shrinking the index cache space.
[0173] In the above embodiments, differentiated index resource configuration is achieved by classifying and allocating different index resources based on the data access density of statistical time segments. Data access density reflects the number of data accesses per unit time. Time segments with high access density often contain more hot data and require more index resources to support frequent data query operations. By classifying time segments, limited index resources can be prioritized for allocation to time segments with higher access density, ensuring fast access to hot data, while allocating fewer index resources to time segments with lower access density, reducing the waste of index resources.
[0174] The system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 3 This is a schematic diagram of the physical device structure of an automotive diagnostic instrument data management system provided in an embodiment of this application.
[0175] It should be noted that, Figure 3 The structure of the system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0176] like Figure 3 As shown, the system includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on a program stored in Read-Only Memory (ROM) 302 or a program loaded from storage portion 308 into Random Access Memory (RAM) 303, such as executing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0177] The following components are connected to I / O interface 305: input section 306 including a camera, infrared sensor, etc.; output section 307 including a liquid crystal display (LCD) and speakers, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card and a modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0178] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.
[0179] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. The transmitted data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0181] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the system described in the above embodiments; or it may exist independently and not assembled into the system. The storage medium carries one or more computer programs that, when executed by a processor of a system, cause the system to implement the methods provided in the above embodiments.
[0182] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0183] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0184] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0185] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A data management method for an automotive diagnostic instrument, characterized in that, include: Receive vehicle identification information and divide diagnostic data into several functional data partitions based on the vehicle identification information, wherein the functional data partitions are divided according to the vehicle system module type; A priority identifier is assigned to each of the functional data partitions, and a data buffer is set between adjacent functional data partitions. The data buffer is used to temporarily store data during the partition switching process. Construct a circular storage linked list, and set several data checkpoints in the circular storage linked list. The data checkpoints are used to record data access status and data integrity information. The storage location of the functional data partition in the circular storage list is adjusted according to the priority identifier, so that the high-priority functional data partition is located in the preset active area of the circular storage list; When the data volume of any of the functional data partitions exceeds a preset storage threshold, a partition splitting operation is triggered. The partition splitting operation specifically includes: Obtain the data structure information and data correlation information of the functional data partition to be split. The data correlation information includes the access relationship between data items and the data flow direction. The functional data partition to be split is the functional data partition whose data volume exceeds the preset storage threshold. Based on the data structure information and the data correlation information, identify the data subsets in the functional data partition to be split whose data correlation degree is higher than the preset correlation degree, and calculate the data interaction frequency between the data subsets; The data partition to be split is divided based on the data interaction frequency to generate several sub-data partitions, so that the data correlation within each sub-data partition is maximized and the data interaction frequency between the sub-data partitions is minimized. Assign a new priority identifier to the sub-data partition, the new priority identifier being the same as the priority identifier of the functional data partition to be split; The performance parameters of the sub-data partition are statistically analyzed, including access latency, storage space utilization, and data throughput. When the performance parameter exceeds the preset range, the boundary adjustment operation of the sub-data partition is triggered. The boundary adjustment operation includes re-dividing the data range of the sub-data partition or merging sub-data partitions with data access efficiency lower than the preset efficiency. Based on the access frequency and data volume of the functional data partition, a merging operation is performed on adjacent functional data partitions. The merging operation is to combine functional data partitions whose data volume is less than a preset data volume and whose access feature similarity is greater than a preset similarity.
2. The method according to claim 1, characterized in that, The step of assigning a priority identifier to each functional data partition and setting up a data buffer between adjacent functional data partitions specifically includes: A priority scoring matrix is established based on the real-time requirements, data reliability level, and system importance of the vehicle system modules; Calculate the comprehensive priority score for each functional data partition based on the priority scoring matrix, and map the comprehensive priority score to a discrete priority identifier; Set up a data buffer between adjacent functional data partitions.
3. The method according to claim 1, characterized in that, After performing the merging operation of adjacent functional data partitions based on the access frequency and data volume of the functional data partitions, the method further includes: Obtain the timestamp and spatial location information of each data record in the functional data partition; The functional data partition is divided into several continuous and non-overlapping time segments based on the timestamp; Calculate the spatial reference distance between the data records within each time segment; The data records within each time segment are rearranged based on the spatial reference distance; Construct a multi-level index structure, which includes a time index and a spatial index, wherein the time index points to each time segment and the spatial index points to the rearranged data record; The access frequency of the multi-level index structure is counted, and the index structures with access frequencies higher than a preset frequency are stored in the cache; When the remaining cache space is less than a preset value, the index structure with the lowest access frequency is removed.
4. The method according to claim 3, characterized in that, The calculation of the spatial reference distance between the data records within each time segment specifically includes: Establish a data record access sequence, and use the data record access sequence to record the access order of the data records; Calculate the difference in physical storage location between data records accessed in adjacent sequences; Calculate the average value of the physical storage location differences and use the average value as the spatial reference distance.
5. The method according to claim 3, characterized in that, Before constructing the multi-level index structure, the method further includes: The data access density of each time segment is calculated, and the time segments are classified according to the data access density. Different index resources are allocated to the time segments at different levels; Establish a dynamic adjustment mechanism for the aforementioned time segment.
6. The method according to claim 5, characterized in that, The dynamic adjustment mechanism for establishing the time segment specifically includes: Monitor the changes in the access frequency of the time segment in real time; When the access frequency changes beyond a preset range, the level of the time segment is reallocated; The index resources are adjusted according to the reassigned level.
7. A data management system for an automotive diagnostic instrument, characterized in that, The system includes: One or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the system to perform the method as described in any one of claims 1-6.
8. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the system, the system performs the method as described in any one of claims 1-6.
9. A computer program product, characterized in that, When the computer program product is run on the system, the system performs the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Fault information processing method and device
CN113077563A
Exception monitoring method based on multi-level cache
CN114546786A