A device management system and data access control method based on sqlite3
By using the sqlite3 database in the device management system, local storage and management of device information is realized, the shortcomings of existing systems in data storage and management are solved, the rapid deployment of the system and data consistency are improved, and the precise management needs of military testing equipment are met.
Patent Information
- Application Number
- CN202210246116.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-03-14
AI Technical Summary
The existing equipment management system has problems such as relying on external processes in terms of data storage and management, cumbersome installation and configuration, and difficult to ensure data consistency, which is difficult to meet the precise management needs of military testing equipment.
Using a device management system based on sqlite3, it provides functions such as user login and permission verification, device information entry, query and maintenance, test record entry and query through components such as database storage layer, storage interaction layer, and functional module layer to realize local storage and management of data.
It realizes the rapid deployment, lightweight, independent and cross-platform use of the equipment management system, simplifies the installation and configuration process, improves data consistency and management efficiency, and meets the precise management needs of military testing equipment.
Smart Images

Figure CN114625810B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of inertial navigation systems, and in particular relates to a device management system based on sqlite3 and a data access control method. Background Art
[0002] In order to improve the precise use and comprehensive management of military test equipment, improve the level of system automation and the ability to quickly execute tasks, in order to more accurately control the technical status of the navigation products in the production, delivery and after-sales support stages, improve the efficiency and quality of after-sales support work, and combine the specific conditions of pre-research, production and other work, a set of equipment management service systems are designed and developed. At present, there are various types of equipment management software in the industry. However, most management systems use SQL Server or MySQL as a data storage module. The disadvantage of this method is that its storage module depends on another process, and the installation and configuration are cumbersome, making software distribution difficult. Other storage solutions based on Microsoft Access have no transaction support, which will greatly affect the consistency of data when updating and inserting data. From the perspective of use, the installation and configuration of most management systems require a relatively high technical level of users and maintenance personnel. The technical level of most equipment management and maintenance professionals is difficult to meet the requirements of proficient database operation.
[0003] In order to improve the precise use and comprehensive management of military test equipment, improve the level of system automation and the ability to quickly execute tasks, in order to more accurately control the technical status of navigation products in the production, delivery and after-sales support stages, improve the efficiency and quality of after-sales support, and at the same time combine the specific circumstances of pre-research, production and other work, it is urgently necessary to develop an equipment management service system that can achieve accurate control. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a device management system based on sqlite3 that can meet the requirements of local operation, rapid deployment, and repeatable distribution.
[0005] The present invention also aims to provide a data access control method for a device management system based on sqlite3.
[0006] The present invention solves the technical problem by the following technical solutions:
[0007] A device management system based on sqlite3, the device management system comprises: a database storage layer, a storage interaction layer, a functional module layer, an input processing layer, a user interaction layer and a client layer, the functional module layer comprises:
[0008] 1) User login and permission verification module: used for login and permission management of different user roles. User account, password and permission identification are stored in a table in sqlite3;
[0009] 2) Equipment information entry module: for equipment administrators and equipment developers to enter equipment information and corresponding parameters, including:
[0010] Manual input unit: reads the user input fields on the graphical interface as the device table insertion fields of the SQL statement, and passes the spliced SQL statement to the SQL interpreter and query execution engine of sqlite3 to implement the input operation;
[0011] File entry unit: Through the file management system call of the operating system, the user first selects the file to be entered, and then uses the content in the file as the parameter of the SQL INSERT INTO statement, and passes the spliced SQL statement and execution parameters to the SQL interpreter and query execution engine of sqlite3, thereby realizing the batch entry operation of data;
[0012] 3) In-stock equipment query module: allows users to query equipment types, equipment component types, parameters, modification records and other information, including:
[0013] Equipment query unit: connected with the equipment information entry module and the equipment maintenance module in stock to query the equipment information of the specified equipment number;
[0014] Component query unit: connected with the equipment information entry module and the in-stock equipment maintenance module to query the component information of the specified component number;
[0015] Record query unit: query the modification record of the device or component with the specified device number or component number;
[0016] 4) In-library equipment maintenance module: used to edit equipment and its component information, record all editing operations, and generate modification logs, including:
[0017] Device modification unit: reads the device number and device parameters to be modified entered by the user on the graphical interface, splices parameterized SQL statements in the callback function of the interface buttons, and then passes the statements to the query API of sqlite3 to implement the modification operation. At the same time, it records the device number and parameters of the operation, generates modification logs and writes them into the log file;
[0018] Component modification unit: reads the component number and the component parameters to be modified entered by the user on the graphical interface, assembles the parameterized SQL statement, and then passes the statement to the query API of sqlite3 to implement the modification operation. At the same time, it records the component number and parameters of the operation, generates a modification log and writes it into the log file;
[0019] 5) Test record entry module: used to enter a single test result of a device or component, read the device or component and its test record and result entered by the user on the graphical interface as parameters of the SQL INSERT INTO statement, and pass the spliced statement as a parameter to the query API of sqlite3, thereby realizing the function of inserting the test record into sqlite3;
[0020] 6) Test record query module: used to query the results of a certain test and the devices involved. First, read the identification number of the test record to be queried in the callback function, splice it into an SQL SELECT statement, and pass the statement to the query API of sqlite3 to realize the function of querying test records.
[0021] Furthermore, the test record entry module includes a record input unit, which requires the user to specify the equipment and components used for the test record, and to fill in the test record, the problems generated, and the solutions to the problems.
[0022] Furthermore, the test record query module includes a record query unit, which first lists all tests related to the device or component according to the device and component number specified by the user, and the user can further select a test record to query the detailed test result record.
[0023] A data access control method for a device management system based on sqlite3, comprising the following steps:
[0024] 1) User login and permission verification: Login and permission management of different user roles are performed through the user login and permission verification module;
[0025] 2) Equipment information entry: Equipment administrators and equipment developers enter equipment information and corresponding parameters through the equipment information entry module, including:
[0026] Manual entry: The manual entry unit reads the user input fields on the graphical interface, and then splices the INSERT INTO statement, where the values of each field recorded by the device are determined by the values entered by the user. Finally, the spliced SQL statement is passed to the SQL interpreter and query execution engine of sqlite3 to implement the entry operation;
[0027] File entry: Through the file management system call of the operating system of the file entry unit, the user first selects the file to be entered, and then uses the content in the file as the parameter of the SQL INSERT INTO statement, and passes the spliced SQL statement to the SQL interpreter and query execution engine of sqlite3, thereby realizing the batch entry operation of data;
[0028] 3) In-library device query: In the in-library device query module, users query the device type, the component type, parameters and modification records of the device, including:
[0029] Equipment query: connect the equipment information entry module and the equipment maintenance module in the library through the equipment query unit, and execute the SELECT statement of sqlite3 to query the equipment information of the specified equipment number;
[0030] Component query: connect the component query unit with the device information entry module and the in-stock device maintenance module, and execute the SELECT statement of sqlite3 to query the component information of the specified component number;
[0031] Record query: Through the record query unit, execute the SELECT statement of sqlite3 to query the modification record of the device or component with the specified device number or component number.
[0032] In the above three types of queries, the device number or component number will be spliced into the SQL statement as the WHERE condition;
[0033] 4) In-library equipment maintenance: Edit the equipment and its component information in the library equipment maintenance module, record all editing operations, and generate a modification log, including:
[0034] Device modification: The device modification unit reads the device number and device parameters to be modified entered by the user on the graphical interface, and uses these parameters to splice the UPDATE statement in sqlite3 to implement the modification operation. At the same time, it records the device number and parameters of the operation, generates a modification log and writes it to the log file.
[0035] Component modification: The component modification unit reads the component number and the component parameters to be modified entered by the user on the graphical interface, and uses these parameters to splice the UPDATE statement in sqlite3 to implement the modification operation. At the same time, the component number and parameters of the operation are recorded, and the modification log is generated and written into the log file;
[0036] 5) Test record entry: Read a single test result of a device or component through the test record entry module, use the test result as the value of the field to be inserted in the INSERT INTO statement, and enter the test record into sqlite3.
[0037] 6) Test record query: Read the test number and device number to be queried through the test record query module, splice the SELECT statement in sqlite3, in which the device number and test number are used as WHERE conditions to realize the query of test records.
[0038] The advantages and beneficial effects of the present invention are:
[0039] 1. The device management system based on sqlite3 of the present invention supports manual or file entry of device and component information; adding or modifying parameters of devices and components; recording device and component modification logs; recording device and component test and fault analysis results; Sqlite3 database has the characteristics of lightweight, independence, isolation, cross-platform, etc. This system is a new method of light, strict and reliable device management; the results show that the terminal program runs stably, responds quickly, and completes data recording and query functions. Compared with other databases, it is easy to realize linking and meets the requirements of military test equipment.
[0040] 2. The device management system based on sqlite3 of the present invention has data storage based on Sqlite3. The database is completely open source, which is convenient for configuration and source code level optimization. Secondly, it is relatively lightweight and has no external dependencies. After full configuration, the size is at the KB level, which is convenient for integration into the software and then as a distributable storage system. Finally, Sqlite3 uses a single cross-platform disk file as the database physical model, which is convenient for backup and multi-platform use.
[0041] 3. The device management system based on sqlite3 of the present invention has irreplaceable advantages compared with popular databases such as MySQL and PostgreSQL. The software based on Sqlite3 can be installed and used or unzipped and used without additional configuration, which simplifies the traditional PC software publishing process and facilitates data backup and recovery.
[0042] 4. The sqlite3-based equipment management system and data access control method of the present invention solve the problems of difficult configuration and high management complexity of traditional database equipment management software, effectively improve the efficiency of data access, query, statistics and other operations, and at the same time, with the help of database security checks, integrity checks and other security measures, it can ensure that the military test equipment system has good security performance.
[0043] 5. The sqlite3-based device management system and data access control method of the present invention utilizes its lightweight, no external dependency, and easy integration into the software to achieve convenient software installation and ready-to-use or unzip and ready-to-use, thereby enabling managers to more accurately manage the technical status of the navigation products they undertake during the production, delivery, and after-sales support stages. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a block diagram of the device management system based on sqlite3 of the present invention;
[0045] Figure 2It is a technical status management process principle diagram of the device management system based on sqlite3 of the present invention;
[0046] Figure 3 It is a block diagram of a technical status management module of a device management system based on sqlite3 of the present invention;
[0047] Figure 4 The present invention is a flow chart of a data access control method for a device management system based on sqlite3. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below through specific examples. The following examples are only illustrative and not restrictive, and the protection scope of the present invention cannot be limited thereto.
[0049] A device management system based on sqlite3, such as Figure 1 As shown in the figure, it includes: database storage layer, storage interaction layer, functional module layer, input processing layer, user interaction layer and client layer. The database storage layer is used to store data such as technical status, email information, user permissions, etc. The storage interaction layer is a data interaction layer that uses sqlite3. The input processing layer is used to check user permissions and input legitimacy. The user interaction layer sets the key event processing function. The client layer uses a web desktop client.
[0050] The functional module layer includes the following modules: Figure 2 As shown:
[0051] 1) User login and permission verification module: used for login and permission management of different user roles. User account, password and permission identification are stored in a table in sqlite3;
[0052] 2) Equipment information entry module: for equipment administrators and equipment developers to enter equipment information and corresponding parameters, used to add technical status as technical status management, used to add project information, add equipment information, add component information, including:
[0053] Manual input unit: reads the user input fields on the graphical interface as the device table insertion fields of the SQL statement, and passes the spliced SQL statement to the SQL interpreter and query execution engine of sqlite3 to implement the input operation;
[0054] File entry unit: Through the file management system call of the operating system, the user first selects the file to be entered, and then uses the content in the file as the parameter of the SQL INSERT INTO statement, and passes the spliced SQL statement and execution parameters to the SQL interpreter and query execution engine of sqlite3, thereby realizing the batch entry operation of data;
[0055] 3) In-stock equipment query module: allows users to query equipment types, component types, parameters, modification records and other information contained in the equipment, and is used for querying technical status as a technical status management, including:
[0056] Equipment query unit: connected with the equipment information entry module and the equipment maintenance module in stock to query the equipment information of the specified equipment number;
[0057] Component query unit: connected with the equipment information entry module and the in-stock equipment maintenance module to query the component information of the specified component number;
[0058] Record query unit: query the modification record of the device or component with the specified device number or component number;
[0059] The equipment includes the types and parameters of structural component information, circuit board and module information, inertial components, electromechanical components, etc. in the component library module.
[0060] 4) In-library equipment maintenance module: used to edit equipment and its component information, record all editing operations, and generate modification logs, including:
[0061] Device modification unit: reads the device number and device parameters to be modified entered by the user on the graphical interface, splices parameterized SQL statements in the callback function of the interface buttons, and then passes the statements to the query API of sqlite3 to implement the modification operation. At the same time, it records the device number and parameters of the operation, generates modification logs and writes them into the log file;
[0062] Component modification unit: reads the component number and the component parameters to be modified entered by the user on the graphical interface, assembles the parameterized SQL statement, and then passes the statement to the query API of sqlite3 to implement the modification operation. At the same time, it records the component number and parameters of the operation, generates a modification log and writes it into the log file;
[0063] 5) Test record entry module: used to enter a single test result of a device or component, read the device or component and its test record and result entered by the user on the graphical interface as parameters of the SQL INSERT INTO statement, and pass the spliced statement as a parameter to the query API of sqlite3, thereby realizing the function of inserting the test record into sqlite3;
[0064] 6) Test record query module: used to query the results of a certain test and the devices involved. First, read the identification number of the test record to be queried in the callback function, splice it into an SQL SELECT statement, and pass the statement to the query API of sqlite3 to realize the function of querying test records.
[0065] The test record entry module includes a record input unit, which requires the user to specify the equipment and components used for the test record, and fill in the test record, the problems generated, and the solutions to the problems.
[0066] The test record query module includes a record query unit. Through the device and component number specified by the user, all tests related to the device or component are first listed. The user can further select a test record to query the detailed test result record.
[0067] A data access control method for a device management system based on sqlite3, such as Figure 4 As shown, it includes the following steps:
[0068] 1) User login and permission verification: Login and permission management of different user roles are performed through the user login and permission verification module;
[0069] 2) Equipment information entry: Equipment administrators and equipment developers enter equipment information and corresponding parameters through the equipment information entry module, including:
[0070] Manual entry: The manual entry unit reads the user input fields on the graphical interface, and then splices the INSERT INTO statement, where the values of each field recorded by the device are determined by the values entered by the user. Finally, the spliced SQL statement is passed to the SQL interpreter and query execution engine of sqlite3 to implement the entry operation;
[0071] File entry: Through the file management system call of the operating system of the file entry unit, the user first selects the file to be entered, and then uses the content in the file as the parameter of the SQL INSERT INTO statement, and passes the spliced SQL statement to the SQL interpreter and query execution engine of sqlite3, thereby realizing the batch entry operation of data;
[0072] 3) In-library device query: In the in-library device query module, users query the device type, the component type, parameters and modification records of the device, including:
[0073] Equipment query: connect the equipment information entry module and the equipment maintenance module in the library through the equipment query unit, and execute the SELECT statement of sqlite3 to query the equipment information of the specified equipment number;
[0074] Component query: connect the component query unit with the device information entry module and the in-stock device maintenance module, and execute the SELECT statement of sqlite3 to query the component information of the specified component number;
[0075] Record query: Through the record query unit, execute the SELECT statement of sqlite3 to query the modification record of the device or component with the specified device number or component number.
[0076] In the above three types of queries, the device number or component number will be spliced into the SQL statement as the WHERE condition;
[0077] 4) In-library equipment maintenance: Edit the equipment and its component information in the library equipment maintenance module, record all editing operations, and generate a modification log, including:
[0078] Device modification: The device modification unit reads the device number and device parameters to be modified entered by the user on the graphical interface, and uses these parameters to splice the UPDATE statement in sqlite3 to implement the modification operation. At the same time, it records the device number and parameters of the operation, generates a modification log and writes it to the log file.
[0079] Component modification: The component modification unit reads the component number and the component parameters to be modified entered by the user on the graphical interface, and uses these parameters to splice the UPDATE statement in sqlite3 to implement the modification operation. At the same time, the component number and parameters of the operation are recorded, and the modification log is generated and written into the log file;
[0080] 5) Test record entry: Read a single test result of a device or component through the test record entry module, use the test result as the value of the field to be inserted in the INSERT INTO statement, and enter the test record into sqlite3.
[0081] 6) Test record query: Read the test number and device number to be queried through the test record query module, splice the SELECT statement in sqlite3, in which the device number and test number are used as WHERE conditions to realize the query of test records.
[0082] Although the embodiments and drawings of the present invention are disclosed for illustrative purposes, those skilled in the art will appreciate that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the scope of the present invention is not limited to the contents disclosed in the embodiments and drawings.
Claims
1. A device management system based on sqlite3, characterized in that: The device management system includes: a database storage layer, a storage interaction layer, a functional module layer, an input processing layer, a user interaction layer and a client layer. The functional module layer includes: 1) User login and permission verification module: used for login and permission management of different user roles. User account, password and permission identification are stored in a table in sqlite3; 2) Equipment information entry module: for equipment administrators and equipment developers to enter equipment information and corresponding parameters, including: Manual input unit: reads the user input fields on the graphical interface as the device table insertion fields of the SQL statement, and passes the spliced SQL statement to the SQL interpreter and query execution engine of sqlite3 to implement the input operation; File entry unit: Through the file management system call of the operating system, the user first selects the file to be entered, and then uses the content in the file as the parameter of the SQL INSERT INTO statement, and passes the spliced SQL statement and execution parameters to the SQL interpreter and query execution engine of sqlite3, thereby realizing the batch entry operation of data; 3) In-stock equipment query module: allows users to query equipment types, equipment component types, parameters, modification records and other information, including: Equipment query unit: connected with the equipment information entry module and the equipment maintenance module in stock to query the equipment information of the specified equipment number; Component query unit: connected with the equipment information entry module and the in-stock equipment maintenance module to query the component information of the specified component number; Record query unit: query the modification record of the device or component with the specified device number or component number; 4) In-library equipment maintenance module: used to edit equipment and its component information, record all editing operations, and generate modification logs, including: Device modification unit: reads the device number and device parameters to be modified entered by the user on the graphical interface, splices parameterized SQL statements in the callback function of the interface buttons, and then passes the statements to the query API of sqlite3 to implement the modification operation. At the same time, it records the device number and parameters of the operation, generates modification logs and writes them into the log file; Component modification unit: reads the component number and the component parameters to be modified entered by the user on the graphical interface, assembles the parameterized SQL statement, and then passes the statement to the query API of sqlite3 to implement the modification operation. At the same time, it records the component number and parameters of the operation, generates a modification log and writes it into the log file; 5) Test record entry module: used to enter a single test result of a device or component, read the device or component and its test record and result entered by the user on the graphical interface as parameters of the SQL INSERT INTO statement, and pass the spliced statement as a parameter to the query API of sqlite3, thereby realizing the function of inserting the test record into sqlite3; 6) Test record query module: used to query the results of a certain test and the devices involved. First, read the identification number of the test record to be queried in the callback function, splice it into an SQL SELECT statement, and pass the statement to the query API of sqlite3 to realize the function of querying test records.
2. The device management system based on sqlite3 according to claim 1, characterized in that: The test record entry module includes a record input unit, which requires the user to specify the equipment and components used for the test record, and fill in the test record, the problems generated and the solutions to the problems.
3. The device management system based on sqlite3 according to claim 1, characterized in that: The test record query module includes a record query unit, which first lists all tests related to the device or component according to the device and component number specified by the user. The user can further select a test record to query the detailed test result record.
4. A data access control method for a device management system based on sqlite3 according to claim 1, characterized in that: The steps include: 1) User login and permission verification: Login and permission management of different user roles are performed through the user login and permission verification module; 2) Equipment information entry: Equipment administrators and equipment developers enter equipment information and corresponding parameters through the equipment information entry module, including: Manual entry: The manual entry unit reads the user input fields on the graphical interface, and then splices the INSERT INTO statement, where the values of each field recorded by the device are determined by the values entered by the user; finally, the spliced SQL statement is passed to the SQL interpreter and query execution engine of sqlite3 to implement the entry operation; File entry: Through the file management system call of the operating system of the file entry unit, the user first selects the file to be entered, and then uses the content in the file as the parameter of the SQL INSERT INTO statement, and passes the spliced SQL statement to the SQL interpreter and query execution engine of sqlite3, thereby realizing the batch entry operation of data; 3) In-library device query: The user queries the device type, the component type, parameters and modification records of the device in the in-library device query module, including: Equipment query: connect the equipment information entry module and the equipment maintenance module in the library through the equipment query unit, and execute the SELECT statement of sqlite3 to query the equipment information of the specified equipment number; Component query: connect the component query unit with the device information entry module and the in-stock device maintenance module, and execute the SELECT statement of sqlite3 to query the component information of the specified component number; Record query: Through the record query unit, execute the SELECT statement of sqlite3 to query the modification record of the device or component with the specified device number or component number; In the above three types of queries, the device number or component number will be spliced into the SQL statement as the WHERE condition; 4) In-library equipment maintenance: Edit the equipment and its component information in the library equipment maintenance module, record all editing operations, and generate a modification log, including: Device modification: The device modification unit reads the device number and the device parameters to be modified entered by the user on the graphical interface, and uses these parameters to splice the UPDATE statement in sqlite3 to implement the modification operation. At the same time, the device number and parameters of the operation are recorded, and the modification log is generated and written into the log file; Component modification: The component modification unit reads the component number and the component parameters to be modified entered by the user on the graphical interface, and uses these parameters to splice the UPDATE statement in sqlite3 to implement the modification operation. At the same time, the component number and parameters of the operation are recorded, and the modification log is generated and written into the log file; 5) Test record entry: Read a single test result of a device or component through the test record entry module, use the test result as the value of the field to be inserted in the INSERT INTO statement, and enter the test record into sqlite3; 6) Test record query: Read the test number and device number to be queried through the test record query module, splice the SELECT statement in sqlite3, in which the device number and test number are used as WHERE conditions to realize the query of test records.
Citation Information
Patent Citations
Storing and processing JSON documents in a SQL database table
US20190102389A1
Method and Apparatus for Determining Feature Usage on a Set of Storage Systems Deployed Across Multiple Customer Sites
US20210392186A1