Data processing method, device, storage medium and electronic device

By introducing a database access module into the adaptive platform automotive open system architecture and using a relational database to store data, the problem of memory usage and data loss caused by large amounts of key-value storage data is solved, and stable writing and persistent storage of data are achieved. .

CN115062012BActive Publication Date: 2024-10-25CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210570993.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2024-10-25
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

In the adaptive platform automotive open system architecture, when the amount of key-value storage data is large, it takes up a large amount of memory resources, resulting in the problem that all data may be lost when writing data to a file.

Method used

The database access module is introduced to store data through a relational database, and provides an interface between the key-value storage module and the database access module to achieve stable data writing, modification and deletion operations to ensure data persistence.

Benefits of technology

It solves the memory occupation problem caused by the large amount of key-value storage data and ensures the stability of applications when writing, modifying and deleting data and the persistent storage of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115062012B_ABST
    Figure CN115062012B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method, device, storage medium and electronic device, which are applied to a persistent storage module, which is applied to an adaptive platform automobile open system architecture, and the persistent storage module includes a key-value storage module and a database access module. The method includes: the key-value storage module receives an operation instruction generated based on a data table access handle sent by an application; the key-value storage module sends the operation instruction to the database access module; the database access module performs corresponding operations on the target data table based on the operation instruction to generate an operation result; the database access module sends the operation result to the key-value storage module; the key-value storage module sends the operation result to the application. The present disclosure uses a database to store the data of an application in an adaptive platform automobile open system architecture, which ensures the persistent storage of data and the stability of the application's operation on the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of autonomous driving, and in particular to a data processing method, device, storage medium and electronic device. Background Art

[0002] The persistent storage module of Adaptive Autosar (AP) provides a mechanism for AP applications and other feature sets to store information in non-volatile memory. The persistent storage module provides two storage methods: key-value storage and file storage. AP applications and other programs can use a combination of multiple key-value storage and file storage at the same time. Different key-value storages are independent of each other and stored separately. Figure 1 The timing diagram of the existing system using key-value storage is shown. It can be seen that each time a new key-value storage file is opened, a piece of memory space is requested to store the data, and the data is synchronized from the local initial file to the memory. When reading data, it is read directly from the memory. When writing data, modifying data, and deleting data, the data in the memory is directly modified. When the application calls the synchronization interface, the data in the internal storage is synchronized to the key-value storage file. Since the data is read directly from the memory, the reading efficiency is very high. However, if a lot of data is stored, the program will occupy a large amount of memory resources, and the data is stored in a lightweight data exchange format JavaScript Object Notation (Json) file. Each time the data is synchronized to the file, the data in the memory will be rewritten to the file. This process will directly overwrite the original data, so if the write fails, all data may be lost. Summary of the invention

[0003] In order to solve at least one of the technical problems mentioned above, the present disclosure proposes a data processing method, a device, a storage medium and an electronic device.

[0004] According to one aspect of the present disclosure, a data processing method is provided, which is applied to a persistent storage module, wherein the persistent storage module is applied to an adaptive platform automotive open system architecture, wherein the persistent storage module includes a key-value storage module and a database access module, and wherein the method includes:

[0005] The key-value storage module receives an operation instruction generated based on a data table access handle sent by an application, wherein the data table access handle points to a target data table corresponding to the application;

[0006] The key-value storage module sends the operation instruction to the database access module;

[0007] The database access module performs corresponding operations on the target data table based on the operation instruction to generate an operation result;

[0008] The database access module sends the operation result to the key-value storage module;

[0009] The key-value storage module sends the operation result to the application program.

[0010] In some possible implementations, before the key-value storage module receives the operation instruction generated based on the data table access handle sent by the application, the method further includes:

[0011] In response to receiving a data table creation instruction sent by the application, the key-value storage module determines whether a target data table corresponding to the application exists;

[0012] If the target data table exists, the key-value storage module sends the data table access handle to the application;

[0013] If the target data table does not exist, the key-value storage module sends the instruction to create a data table to the database access module;

[0014] The database access module creates the target data table in response to receiving the instruction to create the data table, and sends a data table access handle corresponding to the target data table to the key-value storage module if the creation is successful;

[0015] The key-value storage module sends the data table access handle to the application.

[0016] In some possible implementations, the method further includes:

[0017] In response to receiving the initialization database instruction sent by the application, the key-value storage module sends a configuration database type instruction to the database access module;

[0018] The database access module receives the instruction to configure the database type and configures the type of the target database, where the target database is the database corresponding to the application program;

[0019] The database access module obtains the database access handle according to the type of the target database;

[0020] The database access module determines whether the type of the target database is the same as the type of the database stored last time;

[0021] If they are different, migrating all data in the last stored database to the target database based on the database access handle;

[0022] The database access module sends the database access handle to the key-value storage module.

[0023] In some possible implementations, the operation instruction includes a write data operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, including:

[0024] Acquire first target data and a first key corresponding to the first target data, wherein the first target data is data to be written into a target data table by the application program;

[0025] Determine whether the first key exists in the target data table;

[0026] If it exists, update the key value corresponding to the first key in the target data table based on the first target data;

[0027] If not present, write the first key and the first target data into the target data table.

[0028] In some possible implementations, the operation instruction further includes a read data operation instruction, and the database access module performs a corresponding operation on the target data table based on the operation instruction further includes:

[0029] Acquire a second key, where the second key is a key corresponding to second target data to be read by the application program;

[0030] Determine whether the second key exists in the target data table;

[0031] If it exists, return the second target data corresponding to the second key in the target data table;

[0032] If it does not exist, a read failure message is returned.

[0033] In some possible implementations, the operation instruction further includes a data deletion operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction further includes:

[0034] Obtaining a third key, where the third key is a key corresponding to the third target data to be deleted by the application;

[0035] The third target data corresponding to the third key in the target data table is deleted.

[0036] In some possible implementations, the operation instruction further includes a key value deletion operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, further including:

[0037] Delete all keys and their corresponding key values ​​in the target data table;

[0038] The operation instructions also include a data table deletion operation instruction;

[0039] The database access module performs corresponding operations on the target data table based on the operation instruction, and further includes:

[0040] Delete the target data table.

[0041] According to a second aspect of the present disclosure, a data processing device is provided, which is applied to a persistent storage module, the persistent storage module is applied to an adaptive platform automotive open system architecture, the persistent storage module includes a key-value storage module and a database access module, and the device includes:

[0042] An operation instruction receiving module, used for the key-value storage module to receive an operation instruction generated based on a data table access handle sent by an application, wherein the data table access handle points to a target data table corresponding to the application;

[0043] An operation instruction forwarding module, used for the key-value storage module to send the operation instruction to the database access module;

[0044] An operation execution module, used for the database access module to perform corresponding operations on the target data table based on the operation instruction and generate an operation result;

[0045] An operation result sending module, used for the database access module to send the operation result to the key-value storage module;

[0046] The operation result forwarding module is used for the key-value storage module to send the operation result to the application.

[0047] According to a third aspect of the present disclosure, an electronic device is provided, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements a data processing method as described in any one of the first aspects by executing the instructions stored in the memory.

[0048] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the data processing method as described in any one of the first aspects.

[0049] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

[0050] The implementation of this disclosure has the following beneficial effects:

[0051] The applications in the adaptive platform automotive open system architecture use databases to store data, which can solve the problem in the persistent storage module that when the amount of key-value storage data is large, it occupies a large amount of memory resources, resulting in the possibility of losing all data when writing data to files. This ensures that the application can stably write, modify and delete data.

[0052] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions and advantages in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 A schematic diagram showing a flow chart of a data processing method in the prior art;

[0055] Figure 2 A schematic diagram showing a flow chart of a data processing method according to an embodiment of the present disclosure;

[0056] Figure 3 A schematic diagram showing a process of creating a data table according to an embodiment of the present disclosure;

[0057] Figure 4 A schematic diagram showing a process of initializing a database according to an embodiment of the present disclosure;

[0058] Figure 5 A schematic diagram showing a structure of an application accessing a database according to an embodiment of the present disclosure;

[0059] Figure 6 A schematic diagram showing the structure of a data processing device according to an embodiment of the present disclosure is shown;

[0060] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0061] Figure 8 A block diagram of another electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0064] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0065] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0066] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0067] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0068] According to one aspect of the present disclosure, a data processing method is provided, which is applied to a persistent storage module. The persistent storage module is applied to an adaptive platform automotive open system architecture. The persistent storage module includes a key-value storage module and a database access module.

[0069] The middleware for autonomous driving and intelligent connected vehicles, the persistent storage module of the adaptive platform automotive open system architecture, adds a database access module. The persistent storage module of the adaptive platform automotive open system architecture includes a key-value storage module and a database access module. Using a database to store the data of the adaptive platform automotive development system architecture can avoid storing too much data and the application will occupy a large amount of memory resources. Databases are mainly divided into relational databases and non-relational databases. The format of relational databases is relatively fixed. Each two-dimensional table can correspond to a key-value storage, which is consistent with the key-value storage design idea of ​​the persistent storage module. Therefore, a relational database is chosen. The mainstream relational databases include the relational database management system MySQL, the lightweight relational database system SQLite, and the Oracle relational database management system Oracle. There are certain differences between different databases. Different systems may install different databases. When implementing, it is necessary to consider the compatibility of multiple databases.

[0070] Figure 2 A flow chart of a data processing method according to an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the above method includes:

[0071] S101, a key-value storage module receives an operation instruction generated based on a data table access handle sent by an application, where the data table access handle points to a target data table corresponding to the application;

[0072] The application receives the data table access handle sent by the key-value storage module, and generates operation instructions based on the data table access handle. The operation instructions include write data operation instructions, read data operation instructions, delete data operation instructions, delete data table operation instructions, delete key value operation instructions, and modify data operation instructions. The generation of operation instructions is mainly that the application calls related operation functions according to user needs. The data table access handle specifies the target data table that the application is going to operate. The application sends the operation instruction to the key-value storage module, and the key-value storage module receives the operation instruction.

[0073] S102, the key-value storage module sends the operation instruction to the database access module;

[0074] After receiving the operation instruction sent by the application, the key-value storage module forwards the operation instruction to the database access module.

[0075] S103, the database access module performs corresponding operations on the target data table based on the operation instruction and generates an operation result;

[0076] The database access module receives the operation instruction sent by the key-value storage module, and performs corresponding operations on the target data table based on the operation instruction. When the operation instruction is a write data table operation instruction, the database access module performs a write operation on the data table. If the write is successful, the write success is used as the operation result, and if the write fails, the write failure is used as the operation result; when the operation instruction is a read data table operation instruction, if the read is successful, the read data is used as the returned operation result, and if the read fails, the read failure is used as the operation result; when the operation instruction is a delete data operation instruction, if the data is deleted successfully, the data is deleted successfully as the operation result, and if the data is deleted failed, the data is deleted failed as the operation result; when the operation instruction is a delete data table operation instruction, if the data table is deleted successfully, the data table is deleted successfully as the operation result, and if the data table is deleted failed, the data table is deleted failed as the operation result; when the operation instruction is a delete key value operation instruction, if all keys are deleted successfully, the key deletion success is used as the operation result, and if the key deletion fails, the key deletion failure is used as the operation result.

[0077] S104, the database access module sends the operation result to the key-value storage module;

[0078] After the database access module generates the operation result, it feeds the operation result back to the key-value storage module.

[0079] S105. The key-value storage module sends the operation result to the application.

[0080] After receiving the operation result, the key-value storage module feeds back the operation result to the application, and the application receives the operation result. When the application process ends, it sends a request to close the database connection to the key-value storage, and the key-value storage forwards the request to close the database connection to the database access module, and the database access module closes the database connection.

[0081] The applications in the adaptive platform automotive open system architecture use databases to store data, which can solve the problem in the persistent storage module that when the amount of key-value storage data is large, it occupies a large amount of memory resources, resulting in the possibility of losing all data when writing data to files. This ensures that the application can stably write, modify and delete data.

[0082] See also Figure 3 In one embodiment, before the key-value storage module receives the operation instruction generated based on the data table access handle sent by the application, the method further includes:

[0083] S201, in response to receiving a data table creation instruction sent by an application, the key-value storage module determines whether a target data table corresponding to the application exists;

[0084] S202: If the target data table exists, the key-value storage module sends a data table access handle to the application program;

[0085] S203, if the target data table does not exist, the key-value storage module sends a create data table instruction to the database access module;

[0086] S204, the database access module creates a target data table in response to receiving the instruction to create a data table, and sends a data table access handle corresponding to the target data table to the key-value storage module if the creation is successful;

[0087] S205. The key-value storage module sends a data table access handle to the application.

[0088] The application sends a data table creation instruction to the key-value storage module according to the demand. The data table creation instruction includes the table name of the target data table to be created. The key-value storage receives the data table creation instruction sent by the application. The key-value storage module queries whether the target data table exists in the target database according to the table name of the target data table. If the target data table exists, the data table access handle is returned to the application; if the target data table does not exist, the key-value storage module sends the data table creation instruction to the database access module. After receiving the data table creation instruction, the database access module creates the target data table. If the creation is successful, the creation result of successful creation is returned to the key-value storage module. If the creation fails, the creation result of failed creation is returned to the key-value storage module; if the key-value storage module receives the creation result of failed creation, the creation failure is sent to the application; if the key-value storage module receives the creation result of successful creation sent by the database access module, the data table access handle is sent to the application, and the application performs corresponding operations on the target data table according to the data table access handle. When the application performs corresponding operations on the target database, it is necessary to ensure that the corresponding target data table exists, so as to facilitate writing data and performing other corresponding operations on the target data table.

[0089] See also Figure 4 In one embodiment, the method further comprises:

[0090] S301, in response to receiving an initialization database instruction sent by an application, the key-value storage module sends a configuration database type instruction to the database access module;

[0091] S302, the database access module receives a configuration database type instruction and configures the type of the target database, where the target database is the database corresponding to the application program;

[0092] S303, the database access module obtains a database access handle according to the type of the target database;

[0093] S304, the database access module determines whether the type of the target database is the same as the type of the database stored last time;

[0094] S305: If they are different, based on the database access handle, migrate all the data in the last stored database to the target database;

[0095] S306: The database access module sends the database access handle to the key-value storage module.

[0096] Before storing key-value data, the application of the adaptive platform automotive open system architecture will call the initialization database interface and pass the database type parameter to perform the operation. Figure 5, the application sends an initialization database instruction to the key-value storage module. After receiving the initialization database instruction, the key-value storage module sends the configuration database type to the database access module. The database access module configures the type of the target database corresponding to the application. The target database type is a mainstream relational database, including the relational database management system MySQL, the lightweight relational database system SQLite and Oracle's relational database management system Oracle. MySQL is a relational database management system. The relational database stores data in different tables instead of putting all data in a large warehouse, which increases speed and flexibility. SQLite is a lightweight database that complies with the relational database management system. The design goal is embedded, and it has been used in many embedded products. It occupies very low resources. In embedded devices, only a few hundred K of memory is needed. The processing speed is faster than that of the MySQL database management system. Oracle is a relational database management system of Oracle Corporation. The system has good portability, is easy to use, and has powerful functions. It is suitable for various large, medium and small microcomputer environments. It is an efficient, reliable and high-throughput database solution. After the database access module configures the database type, it obtains the database access handle from the key-value storage module according to the database type. The database access module compares the type of the last stored database with the type of the target database. If they are the same, the type of the target database is stored and the database access handle is sent to the key-value storage module. If they are not the same, all the data in the last stored database is migrated to the target database based on the database access handle. After the migration is successful, the type of the target database is stored and the database access handle is sent to the key-value storage module. If the database access module fails to migrate all the data in the last stored database to the target database, the initialization failure is sent to the key-value storage module, and the key-value storage module forwards it to the application. Using the database to store data solves the problem that the persistent storage module occupies a large amount of memory resources when the key-value storage data volume is large, and all data may be lost when saving data to a file. In order to be compatible with the use of multiple databases, a database access module is added to the module. The database access module provides a unified interface for the key-value storage module to connect, create and operate the database. Different databases correspond to different implementations. When the applications and other programs of the adaptive platform automotive open system architecture use key-value storage, the database type can be configured to use. The database access module will be instantiated according to the configuration, provide a database access interface, have good scalability, and support more databases.The database access module will save the database type of the last configuration and determine whether to change the database based on the current configuration information. If the database is changed, the module will read all data from the last stored database file during initialization and store the data in the new configuration database file for continued maintenance, ensuring persistent storage of data.

[0097] In one embodiment, the operation instruction includes a write data operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, including:

[0098] Acquire first target data and a first key corresponding to the first target data, where the first target data is data to be written into a target data table by an application program;

[0099] Determine whether the first key exists in the target data table;

[0100] If it exists, update the key value corresponding to the first key in the target data table based on the first target data;

[0101] If it does not exist, write the first key and the first target data into the target data table.

[0102] When the application needs to write data to the target database, a write data operation instruction is generated based on the data table access handle, and the write data operation instruction is sent to the key value storage module. The key value storage module sends the write data operation instruction to the database access module. The database access module obtains the first target data to be written and its corresponding first key based on the write data operation instruction, and searches for the first key in the target data table based on the data table access handle. If the first key is found in the target data table, the first target data is written into the key value area corresponding to the first key, overwriting the original key value. If the corresponding key is not found in the target data table, the first key and its corresponding first target data are added to the target data table to form a new record. By using a database to store data, when the application writes data, the stability of the operation is guaranteed, and the persistent storage of data is guaranteed.

[0103] In one embodiment, the operation instruction further includes a data read operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, further including:

[0104] Obtaining a second key, where the second key is a key corresponding to the second target data to be read by the application program;

[0105] Determine whether the second key exists in the target data table;

[0106] If it exists, return the second target data corresponding to the second key in the target data table;

[0107] If it does not exist, a read failure message is returned.

[0108] When the application needs to read data from the target database, a read data operation instruction is generated based on the data table access handle, and the read data operation instruction is sent to the key value storage module. The key value storage module sends the read data operation instruction to the database access module. The database access module searches for the second key in the target data table based on the data table access handle based on the second key corresponding to the key value that needs to be read by the read data operation instruction. If the second key is found in the target data table, the key value corresponding to the second key, that is, the second target data, is obtained. The database access module sends the obtained second target data to the key value storage module, which is forwarded to the application by the key value storage module. If the second key is not found in the target data table, a read failure message is sent to the key value storage module, which is sent to the application by the key value storage module. By using the database to store data, when the application performs a read operation on the data, the stability of the operation is guaranteed, and the persistent storage of the data is guaranteed.

[0109] In one embodiment, the operation instruction further includes a data deletion operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, further including:

[0110] Obtain a third key, where the third key is a key corresponding to the third target data to be deleted by the application;

[0111] Delete the third target data corresponding to the third key in the target data table.

[0112] When the application needs to delete data from the target database, a delete data operation instruction is generated based on the data table access handle, and the delete data operation instruction is sent to the key value storage module. The key value storage module sends the delete data operation instruction to the database access module. The database access module searches for the third key in the target data table based on the data table access handle based on the third key corresponding to the key value to be deleted by the delete data operation instruction. If the third key is found in the target data table, the key value corresponding to the third key, that is, the third target data, is deleted. If the deletion is successful, the operation result of the successful deletion is returned. If the deletion fails, the operation result of the failed deletion is returned. If the second key is not found in the target data table, the deletion failure information is sent to the key value storage module, which is sent to the application by the key value storage module. By using the database to store data, when the application performs a deletion operation on the data, the stability of the operation is guaranteed, and the persistent storage of the data is guaranteed.

[0113] In one embodiment, the operation instruction further includes a key value deletion operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, further including:

[0114] Delete all keys and their corresponding key values ​​in the target data table;

[0115] The operation instructions also include a data table deletion operation instruction;

[0116] The database access module performs corresponding operations on the target data table based on the operation instruction, and further includes:

[0117] Delete the target data table.

[0118] When the application needs to delete key values ​​from the target database, it generates a delete key value operation instruction based on the data table access handle, sends the delete key value operation instruction to the key value storage module, and the key value storage module sends the delete key value operation instruction to the database access module. The database access module deletes the key values ​​corresponding to all keys in the target data table based on the delete key value operation instruction. If the deletion is successful, the operation result of the successful deletion is returned. If the deletion fails, the operation result of the failed deletion is returned. By using the database to store data, when the application deletes the key value of the data, the stability of the operation is guaranteed, and the persistent storage of the data is guaranteed.

[0119] When the application needs to delete a data table from the target database, it generates a delete data table operation instruction based on the data table access handle, sends the delete data table operation instruction to the key value storage module, and the key value storage module sends the delete data table operation instruction to the database access module. The database access module obtains the table name of the target data table to be deleted based on the delete data table operation instruction, deletes the target data table in the target database according to the table name of the target data table, and returns the result of the successful deletion operation if the deletion is successful, and returns the result of the failed deletion operation if the deletion fails. Using the database to store data ensures the stability of the operation and the persistent storage of data when the application deletes the data table.

[0120] See also Figure 6 According to a second aspect of the present disclosure, a data processing device is provided, which is applied to a persistent storage module, the persistent storage module is applied to an adaptive platform automotive open system architecture, the persistent storage module includes a key-value storage module and a database access module, and the device includes:

[0121] An operation instruction receiving module 10 is used for the key-value storage module to receive an operation instruction generated based on a data table access handle sent by an application, where the data table access handle points to a target data table corresponding to the application;

[0122] The operation instruction forwarding module 20 is used for the key-value storage module to send the operation instruction to the database access module;

[0123] The operation execution module 30 is used for the database access module to perform corresponding operations on the target data table based on the operation instruction and generate an operation result;

[0124] An operation result sending module 40 is used for the database access module to send the operation result to the key-value storage module;

[0125] The operation result forwarding module 50 is used for the key-value storage module to send the operation result to the application.

[0126] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0127] The present disclosure also provides a computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and when the at least one instruction or at least one program is loaded and executed by a processor, the method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.

[0128] The embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to perform the method.

[0129] The electronic device may be provided as a terminal, a server, or a device in other forms.

[0130] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.

[0131] Reference Figure 7 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0132] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0133] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0134] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0135] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0136] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0137] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0138] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0139] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0140] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0141] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above method.

[0142] Figure 8 1 is a block diagram of another electronic device according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. Figure 8, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0143] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0144] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0145] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0146] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0147] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0148] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C+, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0149] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0150] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0151] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0152] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the above-mentioned module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the standard function in the square box can also occur in a sequence different from the standard in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a special hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0153] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A data processing method is applied to a persistent storage module, the persistent storage module is applied to an adaptive platform automotive open system architecture, the persistent storage module includes a key-value storage module and a database access module, characterized in that: The method comprises: The key-value storage module sends a data table access handle corresponding to the target data table to the application; the target data table originates from the target database or is created by the database access module; The key-value storage module receives an operation instruction generated based on a data table access handle sent by an application, wherein the data table access handle points to a target data table corresponding to the application; The key-value storage module sends the operation instruction to the database access module; The database access module performs corresponding operations on the target data table based on the operation instruction to generate an operation result; The database access module sends the operation result to the key-value storage module; The key-value storage module sends the operation result to the application program.

2. The method according to claim 1, characterized in that The key-value storage module sends a data table access handle corresponding to the target data table to the application program, including: In response to receiving a data table creation instruction sent by the application, the key-value storage module determines whether a target data table corresponding to the application exists; If the target data table exists, the key-value storage module sends the data table access handle to the application; If the target data table does not exist, the key-value storage module sends the instruction to create a data table to the database access module; The database access module creates the target data table in response to receiving the instruction to create the data table, and sends a data table access handle corresponding to the target data table to the key-value storage module if the creation is successful; The key-value storage module sends the data table access handle to the application.

3. The method according to claim 1, characterized in that The method further comprises: In response to receiving the initialization database instruction sent by the application, the key-value storage module sends a configuration database type instruction to the database access module; The database access module receives the instruction to configure the database type and configures the type of the target database, where the target database is the database corresponding to the application program; The database access module obtains the database access handle according to the type of the target database; The database access module determines whether the type of the target database is the same as the type of the database stored last time; If they are different, migrating all data in the last stored database to the target database based on the database access handle; The database access module sends the database access handle to the key-value storage module.

4. The method according to claim 1, characterized in that The operation instruction includes a write data operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, including: Acquire first target data and a first key corresponding to the first target data, wherein the first target data is data to be written into a target data table by the application program; Determine whether the first key exists in the target data table; If it exists, update the key value corresponding to the first key in the target data table based on the first target data; If not present, write the first key and the first target data into the target data table.

5. The method according to claim 1, characterized in that The operation instruction further includes a data read operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, and further includes: Acquire a second key, where the second key is a key corresponding to second target data to be read by the application program; Determine whether the second key exists in the target data table; If it exists, return the second target data corresponding to the second key in the target data table; If it does not exist, a read failure message is returned.

6. The method according to claim 1, characterized in that The operation instruction further includes a data deletion operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, further including: Obtaining a third key, where the third key is a key corresponding to the third target data to be deleted by the application; The third target data corresponding to the third key in the target data table is deleted.

7. The method according to claim 1, characterized in that The operation instruction further includes a key value deletion operation instruction, and the database access module performs corresponding operations on the target data table based on the operation instruction, further including: Delete all keys and their corresponding key values ​​in the target data table; The operation instructions also include a data table deletion operation instruction; The database access module performs corresponding operations on the target data table based on the operation instruction, and further includes: Delete the target data table.

8. A data processing device, applied to a persistent storage module, the persistent storage module is applied to an adaptive platform automotive open system architecture, the persistent storage module includes a key-value storage module and a database access module, characterized in that: The device comprises: A data table access handle sending module, used for the key-value storage module to send a data table access handle corresponding to a target data table to an application; the target data table is derived from a target database or is created by the database access module; An operation instruction receiving module, used for the key-value storage module to receive an operation instruction generated based on a data table access handle sent by an application, wherein the data table access handle points to a target data table corresponding to the application; An operation instruction forwarding module, used for the key-value storage module to send the operation instruction to the database access module; An operation execution module, used for the database access module to perform corresponding operations on the target data table based on the operation instruction and generate an operation result; An operation result sending module, used for the database access module to send the operation result to the key-value storage module; The operation result forwarding module is used for the key-value storage module to send the operation result to the application.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the data processing method as described in any one of claims 1 to 7 by executing the instructions stored in the memory.