Calibration data processing method and device of test machine and test machine

CN122964044APending Publication Date: 2026-10-23HANGZHOU CHANGCHUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610923634.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]然而,商业数据库软件对Windows操作系统及微软Office组件版本有严格依赖,需要购买相应数据库授权,成本较高

Benefits of technology

[0048]上述测试机的校准数据处理方法、装置、测试机、计算机可读存储介质和计算机程序产品中,不再依赖需要花费授权费用的商业数据库,而是基于开源数据库专门定制了用于管理测试机的校准数据的数据库——即定制化数据库,基于该定制化数据库对测试机的校准数据进行访问处理。具体地,测试机上电后,对定制化数据库进行初始化,该定制化数据库具有定制化的操作管理类,因而也实现了操作管理类的初始化。该操作管理类提供基于开源数据库的数据库引擎封装得到的操作接口;操作接口包括校准数据的访问接口,例如,数据查询接口和数据更新接口,因而,当访问接口被调用时,可基于操作管理类针对定制化数据库所管理的校准数据执行对应的访问操作。如此,基于定制化数据库实现了对测试机的校准数据的管理处理,节省了购买商业数据库的授权费用,降低了成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964044A_ABST
    Figure CN122964044A_ABST
Patent Text Reader

Abstract

The application relates to a calibration data processing method and device of a test machine and the test machine, and the method comprises the following steps: after the test machine is powered on, a customized database is initialized; wherein the customized database is a database customized based on an open source database and used for managing calibration data of the test machine; the customized database has a customized operation management class, the operation management class provides an operation interface obtained by encapsulating a database engine based on the open source database; the operation interface comprises an access interface of the calibration data; when the access interface is called, corresponding access operations are performed on the calibration data managed by the customized database based on the operation management class. The method realizes the management and processing of the calibration data of the test machine based on the customized database, and reduces the cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor testing technology, and in particular to a calibration data processing method, apparatus and testing machine for a testing machine. Background Technology

[0002] In the field of semiconductor testing, testing machines are used to test semiconductor devices. To ensure testing accuracy, calibration data is generally required for calibration. The calibration data of the testing machine is typically stored and managed using commercial database software; for example, it is usually stored in an Access database in Microsoft Access (.mdb / .accdb) format. Therefore, reading and writing calibration data in the commercial database is necessary.

[0003] However, commercial database software has strict dependencies on the Windows operating system and Microsoft Office component versions, requiring the purchase of corresponding database licenses, which is costly. Summary of the Invention

[0004] Therefore, it is necessary to provide a calibration data processing method, apparatus, testing machine, computer-readable storage medium, and computer program product for the aforementioned technical problems.

[0005] In a first aspect, this application provides a method for processing calibration data of a testing machine, the method comprising:

[0006] After the test machine is powered on, a customized database is initialized. This customized database is a database customized based on an open-source database and used to manage the calibration data of the test machine. The customized database has a customized operation management class, which provides an operation interface encapsulated from the database engine of the open-source database. The operation interface includes an access interface for the calibration data.

[0007] When the access interface is invoked, the corresponding access operation is performed on the calibration data managed by the customized database based on the operation management class.

[0008] In one embodiment, the customized database is adapted to a first programming language; the open-source database is adapted to a second programming language different from the first programming language; the open-source database is the underlying foundation of the customized database; the database engine of the underlying open-source database has a wrapper library that supports the syntax features of the first programming language.

[0009] When the operation interface encapsulated in the operation management class is invoked, the operation management class accesses the engine kernel written in the second programming language in the database engine of the open-source database by calling the encapsulation library to execute the corresponding operation.

[0010] In one embodiment, before performing the corresponding access operation on the calibration data managed by the customized database based on the operation management class when the access interface is invoked, the method further includes:

[0011] Based on the operation management class, an in-memory database is created in memory, and the calibration data is loaded into the in-memory database;

[0012] When the access interface is invoked, the corresponding access operation is performed based on the operation management class for the calibration data managed by the customized database, including:

[0013] When the access interface is invoked, the corresponding calibration data is accessed from the memory database.

[0014] In response to a target operation that triggers persistent storage, the current calibration data in the memory database is updated to the database file corresponding to the customized database; the database file is located in non-volatile memory.

[0015] In one embodiment, the testing machine includes at least one type of measurement unit that needs to be calibrated; each type of measurement unit has a corresponding set of calibration data;

[0016] Loading the calibration data into the memory database includes:

[0017] Based on the operation management class, determine whether the first database version to be accessed is consistent with the second database version corresponding to the calibration data in the database file;

[0018] If there is a discrepancy, based on the database table configuration information corresponding to each type of measurement unit, a table structure corresponding to each type of measurement unit is created in the memory database, and the calibration data of each type of measurement unit under the first database version is filled into the table structure to obtain the data table corresponding to each type of measurement unit.

[0019] If they match, the calibration data in the database file is loaded into the memory database.

[0020] In one embodiment, creating a table structure corresponding to each type of measurement unit in the memory database based on the database table configuration information corresponding to each type of measurement unit includes:

[0021] For each type of measurement unit, multiple combinations are generated based on the maximum number of physical channels supported by the measurement unit, the type of the output parameters of the measurement unit, and the gain value vector of the output parameters in the corresponding database table configuration information.

[0022] Based on the multiple combinations, a table structure corresponding to the measurement unit is created in the memory database, and each row in the table structure corresponds to one of the combinations.

[0023] The step of filling the table structure with calibration data for each type of measurement unit under the first database version to obtain a data table corresponding to each type of measurement unit includes:

[0024] For each combination in the table structure, the corresponding calibration data under the first database version is filled in to obtain a data table corresponding to each type of measurement unit.

[0025] In one embodiment, when the access interface is invoked, performing a corresponding access operation based on the calibration data managed by the customized database according to the operation management class includes:

[0026] When an access request to call the access interface is received, the target channel and target gain value of the target measurement unit specified in the access request are obtained;

[0027] Determine whether the target channel and the target gain value are located in the target data table corresponding to the target measurement unit. If yes, perform the corresponding access operation for the target data table; otherwise, reject the access request.

[0028] In one embodiment, after the test machine is powered on, it initializes the customized database, including:

[0029] After the test machine is powered on, it responds to the database initialization request issued by the application layer and initializes the customized database; the database initialization request includes the first database version, the access path of the database file, and the database table configuration information;

[0030] The step of determining whether the first database version to be accessed, based on the operation management class, is consistent with the second database version corresponding to the calibration data in the database file includes:

[0031] Based on the operation management class, the second database version is obtained from the database file according to the access path;

[0032] Determine whether the first database version and the second database version are consistent.

[0033] In one embodiment, the access interface includes a data update interface; the data update interface is provided with a modification counting function; the modification counting function is used to count the number of modifications to the calibration data in the memory database;

[0034] The step of responding to the target operation that triggers persistent storage by updating the current calibration data in the memory database to the database file corresponding to the customized database includes:

[0035] In response to a target operation that triggers persistent storage, the number of modifications counted by the modification counting function is obtained;

[0036] If the number of modifications is not zero, the current calibration data in the memory database is updated to the database file, and the modification count function is reset.

[0037] In one embodiment, the testing machine includes at least one type of measurement unit that needs to be calibrated; the customized database contains data tables corresponding to each type of measurement unit.

[0038] The access interface provided by the operation management class includes at least one of a single record access interface, a single table access interface, or a full database access interface.

[0039] When the single record access interface is invoked, it is used to indicate access to a single calibration data in a specified data table;

[0040] When the single-table access interface is invoked, it is used to indicate access to all calibration data in the specified data table;

[0041] When the full database access interface is invoked, it is used to indicate access to all calibration data managed by the customized database.

[0042] Secondly, this application also provides a calibration data processing device for a testing machine, the device comprising:

[0043] An initialization module is used to initialize a customized database after the test machine is powered on. This customized database is based on an open-source database and is used to manage the calibration data of the test machine. The customized database has a customized operation management class, which provides an operation interface encapsulated from the database engine of the open-source database. The operation interface includes an access interface for the calibration data.

[0044] The data processing module is used to perform corresponding access operations on the calibration data managed by the customized database based on the operation management class when the access interface is invoked.

[0045] Thirdly, this application also provides a testing machine. The testing machine includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in the first aspect above.

[0046] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0047] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0048] The calibration data processing method, apparatus, testing machine, computer-readable storage medium, and computer program product for the aforementioned testing machine no longer rely on commercial databases that require licensing fees. Instead, a customized database—specifically designed for managing the calibration data of the testing machine—is built upon an open-source database. This customized database is used to access and process the calibration data of the testing machine. Specifically, after the testing machine is powered on, the customized database is initialized. This customized database has a customized operation management class, thus also initializing the operation management class. This operation management class provides operation interfaces encapsulated from a database engine based on the open-source database. These operation interfaces include calibration data access interfaces, such as data query interfaces and data update interfaces. Therefore, when an access interface is called, the corresponding access operation can be performed on the calibration data managed by the customized database based on the operation management class. In this way, the management and processing of the testing machine's calibration data is achieved based on the customized database, saving the licensing fees for purchasing commercial databases and reducing costs. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating the calibration data processing method of the test machine in one embodiment;

[0050] Figure 2 This is a schematic diagram of the operation interface in one embodiment;

[0051] Figure 3 This is a schematic diagram of the system architecture in one embodiment;

[0052] Figure 4 This is a schematic diagram of the database table configuration information corresponding to the measurement unit in one embodiment;

[0053] Figure 5 This is a schematic diagram of the data table corresponding to the measurement unit in one embodiment;

[0054] Figure 6This is a schematic diagram of a Log file in one embodiment;

[0055] Figure 7 This is a timing diagram of the calibration data processing method for the test machine in one embodiment;

[0056] Figure 8 This is a structural block diagram of the calibration data processing device for a test machine in one embodiment;

[0057] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by those skilled in the art. The technical terms used herein are for the purpose of describing specific examples and are not intended to limit the scope of protection of this application.

[0059] like Figure 1 As shown, in some embodiments, a calibration data processing method for a testing machine is provided. This method is executed by a computer device, which is the testing machine or an electronic device with simulation testing capabilities. Specifically, it includes the following steps:

[0060] S11, After the test machine is powered on, the customized database is initialized; wherein, the customized database is a database customized based on an open source database and used to manage the calibration data of the test machine; the customized database has a customized operation management class, which provides an operation interface encapsulated based on the database engine of the open source database; the operation interface includes the access interface for the calibration data.

[0061] The open-source database serves as the underlying foundation for the customized database. Customization is performed based on the open-source database to create the customized database used in this case for managing calibration data of the test machine. For example, the open-source database can be an SQLite database or other open-source databases; there is no limitation on this.

[0062] Specifically, the database engine of an open-source database can be encapsulated to create an abstract encapsulation layer—essentially a data access middleware—located between the application layer and the database engine layer. This layer includes an operation management class. The operation management class manages operations related to the customized database. For example, a singleton pattern can be used to ensure that the operation management class has a unique instance globally. This can be achieved by creating a unique instance of the operation management class using the static method `GetInstance()`. Subsequently, all operations on the customized database are processed by calling this unique instance. It should be understood that concurrent writes across multiple instances may lead to lock contention or dirty data; a singleton (i.e., a unique instance) serializes all operations, making them easier to control. In other examples, the singleton pattern may not be used.

[0063] The operation management class employs the strategy pattern to isolate the underlying open-source database implementation. That is, after encapsulating the open-source database engine, the encapsulated operation interface is adapted to the programming language of the upper-layer application. The operation management class only provides the encapsulated operation interface to the upper layer (such as the upper-layer application). In this way, the upper layer can directly call the operation interface provided in the operation management class without considering the original interface characteristics of the open-source database engine.

[0064] In some embodiments, the customized database is adapted to a first programming language; the open-source database is adapted to a second programming language different from the first programming language. For example, the open-source database is SQLite, and the customized database created based on SQLite (e.g., SQLite3 platform) can be called TrimDb. The operation management class can be called TrimDbManager. The first programming language adapted by TrimDb is C++, and the second programming language adapted by SQLite is C. TrimDbManager uses the strategy pattern to isolate the underlying SQLite implementation. Thus, the operation interface provided by the operation management class to the upper-layer application is a standardized C++ API interface. The SQLite3 platform has ACID transaction characteristics, is small in size, and can be used to create customized databases. The ACID transaction characteristics include: Atomicity, Consistency, Isolation, and Durability.

[0065] The operation management class provides operation interfaces, including access interfaces. For example, access interfaces include at least one of a data query interface (equivalent to a read interface) or a data update interface (equivalent to a write interface). A data query interface is an interface used to query data; for example, Figure 2In the table, `GetRecord()` and `GetRecords()` are both data query interfaces. `GetRecord()` is used to query a single record, while `GetRecords()` is used to read entire records in batches. `SetRecord()` is a data update interface used to set / update records. Figure 2 It can be seen that the operation interface may also include a singleton acquisition interface, an interface for opening / initializing the database, and an interface for closing and persistently saving data.

[0066] S12, when the access interface is invoked, the corresponding access operation is performed on the calibration data managed by the customized database based on the operation management class.

[0067] In some embodiments, the underlying open-source database engine has a wrapper library that supports syntax features adapted to the first programming language. When an operation interface in the operation management class is invoked, the operation management class accesses the engine kernel written in a second programming language within the open-source database engine by calling the wrapper library to execute the corresponding operation. Thus, when an access interface in the operation management class is invoked, the operation management class accesses the engine kernel within the open-source database engine by calling the wrapper library to execute the corresponding access operation for the calibration data of the customized database management.

[0068] In some embodiments, before executing step S12, an in-memory database is created based on the operation management class, and calibration data can be loaded into the in-memory database. When the access interface in the operation management class is invoked, the corresponding calibration data is accessed in the in-memory database; in response to a target operation that triggers persistent storage, the current calibration data in the in-memory database is updated to the database file corresponding to the customized database; the database file is located in non-volatile storage (e.g., disk). That is, the calibration data managed by the customized database can adopt a memory-file dual-mode storage mechanism, that is, a working mode combining in-memory database and file persistence. See Table 1 for details.

[0069] Table 1

[0070]

[0071] As shown in Table 1, in memory mode, during the database initialization phase, calibration data is pre-loaded into the memory database (for example, calibration data in the database file can be synchronized to the memory database). Subsequent access operations on the calibration data (such as read and write operations) are performed in the memory database, resulting in superior read and write performance and eliminating the need for disk I / O operations, achieving zero disk I / O overhead. After a user performs a manual save operation or an exit / close operation (or other operation that triggers persistent storage), the system enters file mode, saving the current calibration data from the memory database to the database file (i.e., data is written to disk), thus achieving persistent storage.

[0072] In the above scheme, a memory database-first working mechanism is adopted. All real-time read and write operations are completed without generating disk I / O. Only when a target operation that triggers persistent storage, such as normal shutdown or forced save, is performed, the current calibration data in the memory database is backed up to the database file through the backup mechanism.

[0073] To facilitate understanding, let's take an example where the first programming language is C++ and the second is C, combined with... Figure 3 The system architecture illustrated in the diagram illustrates the memory-file dual-mode storage mechanism. From... Figure 3 As can be seen, both the application layer and the database engine layer contain data access middleware. The application layer includes a schema common module (equivalent to the user interface for driver engineers), through which interaction with lower layers is possible. The data access middleware includes an operation management class (TrimDbManager). Both the application layer and the operation management class use C++ as their programming language.

[0074] The database engine layer includes the SQLiteCPP wrapper library (supporting C++11 / C++17 / C++20 / C++23 syntax features) and the SQLite3 Core (the engine kernel), written in C. The physical storage layer comprises the database files on disk (also known as file databases) and memory, with an in-memory database created in memory. An encrypted connection is pre-established between the SQLite3 Core and the physical storage layer. For example, AES-256 encryption can be implemented based on a PRAGMA key to establish the encrypted connection. The PRAGMA key is a dedicated instruction in SQLite database encryption extensions (such as SQLCipher), primarily used to set the encryption key (password). AES-256 is a symmetric encryption algorithm with a 256-bit key length. All subsequent database read and write operations will be based on this encrypted connection, ensuring data security during reading / storage and preventing or mitigating unauthorized access.

[0075] In in-memory mode, SQLite3 Core can send synchronization operations to the physical storage layer via an encrypted connection to instruct the loading of calibration data (i.e., historical calibration data) stored in the database file into the in-memory database. Furthermore, when the common module in the application layer makes access interface calls (including read / write calls) to the operation management class TrimDbManager, TrimDbManager accesses SQLite3 Core in the SQLite database engine by calling the SQLiteCPP wrapper library. SQLite3 Core, based on a pre-established encrypted connection with the physical storage layer, encrypts the data carried by the access operation and sends it to the in-memory database in the physical storage layer, thereby performing the corresponding access operations in the in-memory database.

[0076] When a user performs a manual save operation or exits / closes the TrimDbManager management class, they can enter file mode. In file mode, SQLite3 Core can send a backup operation to the physical storage layer based on an encrypted connection, instructing the latest calibration data in the in-memory database to be saved to the database file to achieve disk persistence.

[0077] In other embodiments, the memory-file dual-mode storage mechanism may not be adopted. Instead, the calibration data is persistently stored only in a database file in non-volatile memory. In this case, corresponding access operations can be performed on the database file. This scheme can be referred to as Scheme 1, and the memory-file dual-mode storage mechanism in this application can be referred to as Scheme 2. The differences between the two schemes are as follows:

[0078] Option 1: Load (create) a database file containing calibration data → Open the database file → Perform multiple random read / write operations → Close → Submit;

[0079] Option 2: After power-on, the calibration data is loaded into the memory database → direct memory read / write (R / W) is performed → when the user manually saves or shuts down, the latest calibration data in the memory database is saved to the database file at once.

[0080] It should be understood that since each disk access involves verification, Solution 2 reduces the number of accesses to the database files on the disk compared to Solution 1, reducing transactional verification overhead by more than 90%, while also ensuring data validity.

[0081] The above method decouples the device from commercial binary interfaces such as Microsoft ADO / OLE DB and instead uses a custom database specifically designed to manage the calibration data of the test machine based on an open-source database. This custom database is used to access and process the calibration data of the test machine, saving the cost of purchasing commercial database licenses and reducing overall costs.

[0082] Furthermore, traditional methods load data into memory one record at a time for each access, while this approach loads all calibration data directly into the in-memory database. Therefore, this approach is more efficient, significantly reducing cold start time. Additionally, the latency of a single read / write operation based on the in-memory database is also effectively reduced. Consequently, the performance of the customized database is significantly superior.

[0083] In some embodiments, the testing machine includes at least one type of measurement unit that needs to be calibrated, such as a check board, a test board, a floating voltage and current source module, a high current test module, a leakage current measurement module, etc. Each type of measurement unit has a corresponding set of calibration data.

[0084] In the above solution, a customized database enables centralized management and persistent storage of calibration data for measurement units with different hardware configurations.

[0085] It should be understood that the database version may be updated, and the calibration data stored in the database files created on disk may not be the latest database version. Therefore, a version control mechanism, or a PRAGMA user_version user-defined version number mechanism, can be introduced. Based on this mechanism, version comparison can be performed during the database initialization phase (i.e., the OpenDb phase) to determine whether a schema migrate upgrade is needed (i.e., whether the database structure needs to be upgraded), and to perform version upgrade verification.

[0086] Specifically, during the database initialization phase, before loading the calibration data from the database file into the in-memory database, the operation management class can first determine whether the first database version to be accessed (i.e., the database version to be initialized and accessed later) is consistent with the second database version corresponding to the calibration data in the database file.

[0087] If they match, it means that the calibration data in the database file is the data that actually needs to be accessed, and the calibration data in the database file can be loaded into the in-memory database.

[0088] If there is a discrepancy, it indicates that the calibration data in the database file is not the data that actually needs to be accessed. Therefore, it is not suitable to load the calibration data from the database file into the in-memory database. Instead, based on the database table configuration information corresponding to each type of measurement unit, the calibration data for the specified first database version can be stored in the in-memory database. For example, the database table configuration information corresponding to each type of measurement unit can be obtained. Based on this configuration information, a table structure corresponding to each type of measurement unit can be created in the in-memory database, and the calibration data for each type of measurement unit under the first database version can be populated into the table structure, resulting in a data table corresponding to each type of measurement unit. In other words, after the data is populated, the in-memory database contains a data table corresponding to each type of measurement unit, and each data table records the accurate calibration data for its corresponding measurement unit under the first database version. For example, the calibration data in the newly created data table in the in-memory database can be backed up to the database file; subsequent access operations for the calibration data of the first database version are then performed in the in-memory database.

[0089] In some embodiments, the first database version to be accessed and the database table configuration information corresponding to each type of measurement unit can be obtained from the database initialization request.

[0090] Specifically, after the test machine is powered on, it may receive a database initialization request from the application layer, thus entering the database initialization phase. During this phase, in response to the application layer's database initialization request, a customized database can be initialized. This database initialization request includes a specified first database version, the access path to the database file, and database table configuration information corresponding to each type of measurement unit. Therefore, the specified first database version can be obtained from the database initialization request. Furthermore, based on the operation management class, a second database version is obtained from the database file according to the access path mentioned above in the database initialization request. This second database version represents the database version to which the calibration data in the database file belongs. Then, it is determined whether the first and second database versions are consistent. If they are inconsistent, based on the database table configuration information corresponding to each type of measurement unit in the database initialization request, a table structure corresponding to each type of measurement unit can be created in the in-memory database, and the table structure can be filled with the calibration data for each type of measurement unit under the first database version.

[0091] It should be understood that the database table configuration information corresponding to each type of measurement unit is the configuration information used to create the corresponding table structure. Figure 4 This illustrates the database table configuration information corresponding to each type of measurement unit. Figure 4The "Maximum number of physical channels" refers to the maximum number of channels supported by each type of measurement unit. The voltage type identifier / current type identifier is used to characterize the type of output parameters of the measurement unit. It should be understood that each type of measurement unit has multiple voltage gain / current gain values; therefore, the voltage gain vector includes a set of voltage gain values ​​across multiple ranges, and the current gain vector includes a set of current gain values ​​across multiple ranges.

[0092] In some examples, for each type of measurement unit, multiple combinations are generated based on the maximum number of physical channels supported by the measurement unit, the type of the output parameters of the measurement unit, and the gain value vector of the output parameters in the corresponding database table configuration information; a table structure corresponding to the measurement unit is created in the memory database based on the multiple combinations, with each row in the table structure corresponding to one of the combinations; the calibration data corresponding to the first database version is filled into each combination in the table structure to obtain a data table corresponding to each type of measurement unit.

[0093] To facilitate understanding, we will now combine Figure 5 This illustrates the data table corresponding to the measurement unit created based on the database table configuration information. Figure 5 The dashed box 501 in the diagram illustrates the table names for each measurement unit (i.e., Measurement Unit 1, Measurement Unit 2, etc., represent table names). There are 14 types of measurement units, resulting in 14 data tables. The dashed box 502 illustrates the data table corresponding to "Measurement Unit 8". The second column, "Channel", represents the specific channels supported by "Measurement Unit 8". "0" and "1" under "Channel" represent different physical channels. The third column, "ChType", represents the type of output parameters for "Measurement Unit 8". "0" and "1" under "ChType" represent voltage and current, respectively. The fourth column, "Gain", represents the gain values ​​for different levels. For example, "ChType"=0 represents the voltage parameter, and the set of different voltage gain values ​​(i.e., the voltage gain value vector) corresponding to physical channel 0 (Channel=0) includes "0.1,1,5,20,100,0"; "ChType"=1 represents the current parameter, and the set of different current gain values ​​(i.e., the current gain value vector) corresponding to physical channel 0 includes "0.01,0.1,1,10,100,1000,5000".

[0094] The three parameters—physical channel, output parameter type (ChType), and gain value (Gain, also known as gain level)—form different combinations. Each row in the data table corresponds to one combination, and each combination / each row of records corresponds to an index.

[0095] A measurement unit is a circuit with multiple functions, for example, Figure 5 The "Measurement Unit 8" includes a drive circuit, a measurement circuit, a clamping circuit, and a negative clamping circuit. Therefore, in the data table corresponding to the measurement unit, each combination contains calibration data for each circuit. For example, the data table for "Measurement Unit 8" includes calibration data for the output voltage / current corresponding to the drive circuit, measurement circuit, clamping circuit, and negative clamping circuit, respectively. The calibration data includes the gain coefficient and zero-point offset value. Therefore, as... Figure 5 As shown, each combination corresponds to calibration data such as "DGain / DOffset" (i.e., the calibration data of the output voltage / current of the drive circuit - including the gain coefficient DGain and the zero offset value DOffset), "MGain / MOffset" (i.e., the calibration data of the output voltage / current of the measurement circuit - including the gain coefficient MGain and the zero offset value MOffset), "QGain / QOffset" (i.e., the calibration data of the output voltage / current of the clamping circuit - including the gain coefficient QGain and the zero offset value QOffset), and "FGain / FOffset" (i.e., the calibration data of the output voltage / current of the negative clamping circuit - including the gain coefficient FGain and the zero offset value FOffset).

[0096] It should be noted that the "3" under "ChType" in column 3 does not represent a specific output parameter type; it acts as a stop sign, indicating that the combination corresponding to physical channel 0 (Channel=0) has ended, and the combination corresponding to physical channel 1 (Channel=1) is next. For example... Figure 5 As shown, physical channel 1 (Channel=1) also corresponds to the two types of output parameters, voltage and current, and also has its own corresponding gain values ​​at different levels, which will not be elaborated here.

[0097] In the above solution, the required physical channels and gain levels are dynamically generated through database table configuration information, so that the same code can be adapted to various power measurement submodules without recompilation, which significantly reduces the size of the compiled SDK.

[0098] In some embodiments, the customized database also supports Log file export. Using the Log file export function (DumpTrimDbToLog) and the SQLiteStudio open-source software, the database file of the customized database can be opened, allowing technical engineers to view it offline or use third-party tools to further process the data table content (i.e., the calibration data recorded in the data tables) in the database file. This facilitates on-site debugging and verification by technical engineers, enhancing usability. Figure 6The Log file used to illustrate the export process is shown in the image. Each line in the Log file represents a line of calibration data.

[0099] In some embodiments, when the access interface is invoked in step S12, the corresponding access operation is performed on the calibration data managed by the customized database based on the operation management class, including: when an access request invoking the access interface is received, obtaining the target channel and target gain value of the target measurement unit specified in the access request; determining whether the target channel and the target gain value are located in the target data table corresponding to the target measurement unit; if so, performing the corresponding access operation on the target data table; if not, rejecting the access request.

[0100] Specifically, the access request carries the target channel and target gain value of the target measurement unit to be accessed. Before executing the corresponding access operation in response to each access request, a precondition verification is performed. For example, it verifies whether the target channel and target gain value are pre-stored / set in the target data table of the target measurement unit. If so, the verification of the channel range's legality and the gain interval's rationality passes; otherwise, the verification fails. After all the above verifications pass, it indicates that the precondition verification has passed, and the corresponding access operation is executed on the target data table. If any of the above verifications fail, it is determined that the precondition verification has failed, and the access request is rejected. In this way, only read and write permissions are allowed for the configured channel and gain value, avoiding unauthorized operations such as adding new data.

[0101] In some examples, the access request also carries the target index. Therefore, in addition to verifying the validity of the Channel range and the reasonableness of the Gain interval, index validity verification can also be performed, that is, verifying whether the target index effectively points to a row of records (i.e., a row of calibration data) in the target data table. If all three verifications pass, the precondition verification is considered successful, and the corresponding access operation is executed on the target data table. In other examples, precondition verification may also include verification of other dimensions, which is not limited here.

[0102] In some embodiments, the access interface includes a data update interface (i.e., a SetRecord interface); the data update interface includes a modification counting function (m_iSetRecordCnt); the modification counting function is used to count the number of modifications to the calibration data in the memory database. Upon receiving a target operation that triggers persistent storage (i.e., a SaveMemDbToDbFile operation), in response to the target operation, the modification count counted by the modification counting function can be obtained first. If the modification count is not 0, it indicates that the current calibration data in the memory database has been modified compared to the calibration data stored in the database file. Therefore, the current calibration data in the memory database can be updated to the database file (i.e., the latest calibration data is written to disk), and the modification counting function can be reset to start counting again. If the modification count is 0, it indicates that the current calibration data in the memory database has not been modified compared to the calibration data stored in the database file, and the calibration data in the database file does not need to be updated.

[0103] For example, the target operation that triggers persistent storage may include at least one of the following: a user-manual save operation or an exit operation, without limitation.

[0104] The above solution, by setting a modification counting function in the data update interface, effectively identifies differences in calibration data without performing field comparisons. Based on these differences, it triggers a forced disk write, thus optimizing the efficiency of in-memory database disk writes. Furthermore, it reduces development and maintenance complexity and prevents issues such as omissions and data inconsistencies.

[0105] In some embodiments, the testing machine includes at least one type of measurement unit requiring calibration; the customized database contains data tables corresponding to each type of measurement unit; the access interface provided by the operation management class includes at least one of a single record access interface, a single table access interface, or a full database access interface. When the single record access interface is invoked, it indicates access to a single calibration data record in a specified data table; when the single table access interface is invoked, it indicates access to all calibration data in a specified data table; when the full database access interface is invoked, it indicates access to all calibration data managed by the customized database.

[0106] It should be understood that traditional methods are based on cursor-based line-by-line navigation, meaning that queries can only be performed on a specific type of calibration data within a single record, such as a specific gain and offset (e.g., DGain / DOffset), and cannot query an entire record (i.e., a single record). This application encapsulates multi-level access interfaces; for example, Table 2 shows three levels of batch access interfaces. Users can flexibly specify the required interface level through the upper application layer, thereby calling the corresponding access interface to access the corresponding calibration data. Regardless of the selected batch access interface level, efficient batch data access can be achieved, reducing the number of context switches compared to traditional methods. As shown in Table 2, the multi-level access interface in this application effectively improves performance; for example, performance can be improved by approximately 29 times.

[0107] Table 2

[0108]

[0109] For example, after querying data, the returned data type uses modern C++ smart pointers and STL containers to avoid the risks of manual memory management.

[0110] like Figure 7 As shown, in some embodiments, a timing diagram of a calibration data processing method for a test machine is provided, specifically including the following steps:

[0111] (1) The application layer sends a database initialization request to the operation management class.

[0112] The database initialization request includes specifying the first database version to access, the access path to the database file, and the database table configuration information.

[0113] (2) The operation management class begins to execute the customized database initialization.

[0114] (3) The operation management class creates an in-memory database.

[0115] (4) The operation management class reads the second database version from the database file based on the access path in the database initialization request.

[0116] (5) The operation management class performs database version comparison.

[0117] Database version comparison refers to comparing whether the first database version specified in the database initialization request is consistent with the second database version. If they are inconsistent, proceed to step (6); if they are consistent, proceed to step (9).

[0118] (6) The operation management class creates table structures in the in-memory database based on the database table configuration information.

[0119] (7) The operation management class fills the calibration data under the first database version in the table structure.

[0120] (8) Calibration data backup.

[0121] That is, the calibration data in the memory database is backed up to the database file through operation management instructions.

[0122] (9) Load the calibration data from the database file into the in-memory database.

[0123] In some embodiments, a built-in mutex can be used to protect critical sections. Specifically, when loading calibration data into the in-memory database, a built-in mutex can be used to ensure that only one thread is allowed to write calibration data to the in-memory database at a time, thereby supporting multi-threaded safety protection.

[0124] In some embodiments, before loading calibration data from a database file into the in-memory database, the calibration data in the database file can be checked for integrity and consistency based on CRC check and data consistency check mechanisms (e.g., PRAGMA integrity_check mechanism). If the check passes, it means that the calibration data in the database file is correct, and it can then be loaded into the in-memory database, thereby avoiding the problem of incorrect loading due to file corruption.

[0125] It should be understood that steps (1) to (9) belong to the database initialization phase.

[0126] (10) The application layer can instruct the operation management class to read data items.

[0127] That is, call the read interface in the operation management class to instruct the reading of calibration data.

[0128] (11) The operation management class performs database condition queries from the in-memory database.

[0129] That is, the calibration data to be read is retrieved from the memory database according to the query conditions.

[0130] (12) The in-memory database returns the calibration data that meets the conditions to the operation management class.

[0131] (13) The operation management class returns calibration data to the application layer.

[0132] (14) The application layer can instruct the operation management class to write data items.

[0133] That is, call the write interface in the operation management class to instruct the writing of calibration data.

[0134] (15) The operation management class writes the calibration data to be written according to the specified conditions into the memory database.

[0135] (16) The in-memory database sends the write results back to the operation management class.

[0136] It should be understood that steps (10) to (16) belong to the data reading and writing stage.

[0137] (17) The application layer sends a manual save or exit command to the operation management class.

[0138] (18) The operation management class checks whether the calibration data in the memory database has been modified.

[0139] (19) If so, update the current calibration data in the memory database to the database file to achieve data write to disk.

[0140] It should be understood that if the calibration data in the memory database has not been modified, the process can be exited directly without the need for invalid backups.

[0141] It should be noted that the customized database (i.e., the TrimDb database) in this application embodiment not only reduces costs but also significantly improves performance compared to traditional commercial databases. Table 3 shows the performance comparison data between Access database and TrimDb database obtained by the inventors of this application through testing. As can be seen from Table 3, the multi-table access speed of the customized TrimDb database in this application is significantly higher than that of the Access database. Moreover, the customized TrimDb database in this application does not require multi-table synchronization and can directly access the in-memory database. Therefore, compared to the Access database, the performance advantage of the customized TrimDb database in this application is very significant.

[0142] Table 3

[0143]

[0144] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. At least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps.

[0145] Based on the same inventive concept, this application also provides a calibration data processing apparatus for implementing the aforementioned testing machine. The solution provided by this apparatus is similar to the implementation described in the above method. Therefore, the specific limitations of one or more calibration data processing apparatus embodiments for testing machines provided below can be found in the limitations of the calibration data processing method for testing machines described above, and will not be repeated here.

[0146] In one embodiment, such as Figure 8 As shown, a calibration data processing device for a testing machine is provided. The device includes:

[0147] An initialization module 802 is used to initialize a customized database after the test machine is powered on. The customized database is a database customized based on an open-source database and used to manage the calibration data of the test machine. The customized database has a customized operation management class, which provides an operation interface encapsulated from the database engine of the open-source database. The operation interface includes an access interface for the calibration data.

[0148] The data processing module 804 is used to perform corresponding access operations on the calibration data managed by the customized database based on the operation management class when the access interface is called.

[0149] In some embodiments, the initialization module 802 is further configured to create a memory database in memory based on the operation management class, and load the calibration data into the memory database;

[0150] The data processing module 804 is also used to access the corresponding calibration data in the memory database when the access interface is invoked; in response to a target operation that triggers persistent storage, update the current calibration data in the memory database to the database file corresponding to the customized database; the database file is located in non-volatile memory.

[0151] In some embodiments, the testing machine includes at least one type of measurement unit that needs to be calibrated; each type of measurement unit has a corresponding set of calibration data; the initialization module 802 is further configured to determine, based on the operation management class, whether the first database version to be accessed is consistent with the second database version corresponding to the calibration data in the database file; if they are inconsistent, based on the database table configuration information corresponding to each type of measurement unit, a table structure corresponding to each type of measurement unit is created in the memory database, and the calibration data of each type of measurement unit under the first database version is filled into the table structure to obtain a data table corresponding to each type of measurement unit; if they are consistent, the calibration data in the database file is loaded into the memory database.

[0152] In some embodiments, the initialization module 802 is further configured to generate multiple combinations for each type of measurement unit based on the maximum number of physical channels supported by the measurement unit, the type of the output parameters of the measurement unit, and the gain value vector of the output parameters in the corresponding database table configuration information; create a table structure corresponding to the measurement unit in the memory database based on the multiple combinations, wherein each row in the table structure corresponds to one combination; and fill the calibration data corresponding to the first database version into each combination in the table structure to obtain a data table corresponding to each type of measurement unit.

[0153] In some embodiments, the data processing module 804 is further configured to, when receiving an access request that invokes the access interface, obtain the target channel and target gain value of the target measurement unit specified in the access request; determine whether the target channel and the target gain value are located in the target data table corresponding to the target measurement unit; if so, perform the corresponding access operation for the target data table; if not, reject the access request.

[0154] In some embodiments, the initialization module 802 is further configured to, after the test machine is powered on, respond to a database initialization request issued by the application layer and initialize a customized database; the database initialization request includes the first database version, the access path of the database file, and the database table configuration information; based on the operation management class, obtain the second database version from the database file according to the access path; and determine whether the first database version and the second database version are consistent.

[0155] In some embodiments, the access interface includes a data update interface; the data update interface is provided with a modification counting function; the modification counting function is used to count the number of modifications of the calibration data in the memory database; the data processing module 804 is further used to obtain the number of modifications counted by the modification counting function in response to a target operation that triggers persistent storage; if the number of modifications is not 0, the current calibration data in the memory database is updated to the database file, and the modification counting function is reset.

[0156] Each module in the calibration data processing device of the aforementioned testing machine can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0157] In one embodiment, a computer device is provided, which may be a testing machine or other electronic device with calibration data processing capabilities. The internal structure diagram of the computer device may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external devices via a network connection. When the computer program is executed by the processor, it implements a calibration data processing method for a testing machine.

[0158] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0159] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the embodiments of this application.

[0160] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the embodiments of this application.

[0161] 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. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited thereto.

Claims

1. A method for processing calibration data of a testing machine, characterized in that, The method includes: After the test machine is powered on, a customized database is initialized. This customized database is a database customized based on an open-source database and used to manage the calibration data of the test machine. The customized database has a customized operation management class, which provides an operation interface encapsulated from the database engine of the open-source database. The operation interface includes an access interface for the calibration data. When the access interface is invoked, the corresponding access operation is performed on the calibration data managed by the customized database based on the operation management class.

2. The method according to claim 1, characterized in that, The customized database is adapted to a first programming language; the open-source database is adapted to a second programming language different from the first programming language; the open-source database is the underlying foundation of the customized database; the database engine of the underlying open-source database has a wrapper library that supports the syntax features of the first programming language. When the operation interface encapsulated in the operation management class is invoked, the operation management class accesses the engine kernel written in the second programming language in the database engine of the open-source database by calling the encapsulation library to execute the corresponding operation.

3. The method according to claim 1, characterized in that, Before the method performs the corresponding access operation on the calibration data managed by the customized database based on the operation management class when the access interface is invoked, the method further includes: Based on the operation management class, an in-memory database is created in memory, and the calibration data is loaded into the in-memory database; When the access interface is invoked, the corresponding access operation is performed based on the operation management class for the calibration data managed by the customized database, including: When the access interface is invoked, the corresponding calibration data is accessed from the memory database. In response to a target operation that triggers persistent storage, the current calibration data in the memory database is updated to the database file corresponding to the customized database; the database file is located in non-volatile memory.

4. The method according to claim 3, characterized in that, The testing machine includes at least one type of measurement unit that needs to be calibrated; Each type of measurement unit has a corresponding set of calibration data; Loading the calibration data into the memory database includes: Based on the operation management class, determine whether the first database version to be accessed is consistent with the second database version corresponding to the calibration data in the database file; If there is a discrepancy, based on the database table configuration information corresponding to each type of measurement unit, a table structure corresponding to each type of measurement unit is created in the memory database, and the calibration data of each type of measurement unit under the first database version is filled into the table structure to obtain the data table corresponding to each type of measurement unit. If they match, the calibration data in the database file is loaded into the memory database.

5. The method according to claim 4, characterized in that, The step of creating a table structure in the memory database corresponding to each type of measurement unit based on the database table configuration information for each type of measurement unit includes: For each type of measurement unit, multiple combinations are generated based on the maximum number of physical channels supported by the measurement unit, the type of the output parameters of the measurement unit, and the gain value vector of the output parameters in the corresponding database table configuration information. Based on the multiple combinations, a table structure corresponding to the measurement unit is created in the memory database, and each row in the table structure corresponds to one of the combinations. The step of filling the table structure with calibration data for each type of measurement unit under the first database version to obtain a data table corresponding to each type of measurement unit includes: For each combination in the table structure, the corresponding calibration data under the first database version is filled in to obtain a data table corresponding to each type of measurement unit.

6. The method according to claim 5, characterized in that, When the access interface is invoked, the corresponding access operation is performed based on the operation management class for the calibration data managed by the customized database, including: When an access request to call the access interface is received, the target channel and target gain value of the target measurement unit specified in the access request are obtained; Determine whether the target channel and the target gain value are located in the target data table corresponding to the target measurement unit. If yes, perform the corresponding access operation for the target data table; otherwise, reject the access request.

7. The method according to claim 4, characterized in that, After the test machine is powered on, it initializes the customized database, including: After the test machine is powered on, it responds to the database initialization request issued by the application layer and initializes the customized database; the database initialization request includes the first database version, the access path of the database file, and the database table configuration information; The step of determining whether the first database version to be accessed, based on the operation management class, is consistent with the second database version corresponding to the calibration data in the database file includes: Based on the operation management class, the second database version is obtained from the database file according to the access path; Determine whether the first database version and the second database version are consistent.

8. The method according to claim 3, characterized in that, The access interface includes a data update interface; the data update interface is provided with a modification counting function; the modification counting function is used to count the number of times the calibration data in the memory database is modified; The step of responding to the target operation that triggers persistent storage by updating the current calibration data in the memory database to the database file corresponding to the customized database includes: In response to a target operation that triggers persistent storage, the number of modifications counted by the modification counting function is obtained; If the number of modifications is not zero, the current calibration data in the memory database is updated to the database file, and the modification count function is reset.

9. The method according to any one of claims 1 to 8, characterized in that, The testing machine includes at least one type of measurement unit that needs to be calibrated; the customized database contains data tables corresponding to each type of measurement unit. The access interface provided by the operation management class includes at least one of a single record access interface, a single table access interface, or a full database access interface. When the single record access interface is invoked, it is used to indicate access to a single calibration data in a specified data table; When the single-table access interface is invoked, it is used to indicate access to all calibration data in the specified data table; When the full database access interface is invoked, it is used to indicate access to all calibration data managed by the customized database.

10. A calibration data processing device for a testing machine, characterized in that, The device includes: An initialization module is used to initialize a customized database after the test machine is powered on. This customized database is based on an open-source database and is used to manage the calibration data of the test machine. The customized database has a customized operation management class, which provides an operation interface encapsulated from the database engine of the open-source database. The operation interface includes an access interface for the calibration data. The data processing module is used to perform corresponding access operations on the calibration data managed by the customized database based on the operation management class when the access interface is invoked.

11. A testing machine, characterized in that, The testing machine includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.