Data management method and related device
By using interface signatures to associate data reading and writing interfaces in cars, the problem of interface association complexity during personalized data storage and recovery is solved, and accurate data recovery and program stability are achieved.
Patent Information
- Application Number
- CN202411353262.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-17
AI Technical Summary
In the process of saving and restoring personalized data in the prior art, the correlation mapping control of the read and write interfaces is complex, which easily leads to data recovery to the wrong position and causes program exceptions.
By using the same interface signature to associate the data read and write interfaces in the data management method, we ensure that the data read and write interfaces are one-to-one correspondence, avoid judging the interface through a separate data identifier, and use preset interface association tables Determine the target interface signature for data recovery.
Improve the accuracy of data reading and writing, avoid write recovery location disorders, and ensure program stability and data consistency.
Smart Images

Figure CN119149305A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data management method and related devices. Background Art
[0002] With the rapid development of automobile technology, people pay more and more attention to the experience of intelligence and personalization in car use. Intelligent and personalized functions will involve the preservation and recovery of some user habits and personalized settings data. The ability to efficiently and accurately save and restore user habits, personalized settings and other data plays a very important role in the intelligence of automobiles.
[0003] The common practice for personalized data preservation and recovery is that when reading and restoring data, it is necessary to determine the data reading interface and data writing interface to be called based on the data identifier. More association mapping controls can easily result in the read data being restored to the wrong location when restoring, making the implementation of reading and recovery in the program complicated. Summary of the invention
[0004] In view of the above problems, the present application provides a data management method and related devices to achieve the purpose of ensuring the accuracy of data writing. The specific scheme is as follows:
[0005] The first aspect of the present application provides a data management method, comprising:
[0006] In response to a read operation on target data content, determining a data reading interface of the target data content;
[0007] According to the data reading interface, determining a target interface signature associated with the data reading interface from a preset interface association table;
[0008] The source data read according to the data reading interface is associated with the target interface signature and stored, so that when the source data is written and restored, the data writing interface corresponding to the data reading interface determined from the preset interface association table according to the target interface signature is used to perform writing and restoration of the source data.
[0009] In a possible implementation, the process of obtaining the preset interface association table includes:
[0010] The characteristic data that uniquely represents the data content is used as the interface signature;
[0011] The interface signature is associated with the data reading interface and the data writing interface corresponding to the data content respectively to obtain the preset interface association table.
[0012] In a possible implementation, the method of using characteristic data that uniquely represents data content as an interface signature includes:
[0013] A signature operation is performed on the data type and data source location corresponding to the data content to obtain the interface signature.
[0014] In a possible implementation, the signing operation is performed on the data type and data source location corresponding to the data content to obtain the interface signature, including:
[0015] The data type and the data source are concatenated to obtain a character string, which is encrypted using a preset encryption algorithm to obtain the interface signature.
[0016] In a possible implementation, the signing operation is performed on the data type and data source location corresponding to the data content to obtain the interface signature, including:
[0017] Extracting a first preset number of characters from a preset position in the first character string representing the data type to obtain a second character string;
[0018] Extracting a second preset number of characters from a preset position in a third character string representing the data source position to obtain a fourth character string;
[0019] The second character string and the fourth character string are concatenated to obtain the interface signature.
[0020] In a possible implementation, in response to a read operation on target data content, determining a data reading interface of the target data content includes:
[0021] The key identifier in the target data content is used as a key, and a data reading interface corresponding to the key identifier is determined from a preset interface database.
[0022] A second aspect of the present application provides a data management method, comprising:
[0023] In response to a write operation on target data content, determining a data write interface for the target data content;
[0024] According to the data writing interface, determining a target interface signature associated with the data writing interface from a preset interface association table;
[0025] The source data written from the data write interface is associated with the target interface signature and stored so that when the source data is read, the source data is read and restored using the data read interface corresponding to the data write interface determined from the preset interface association table according to the target interface signature.
[0026] A third aspect of the present application provides a data management device, including:
[0027] A data reading interface determination module, configured to determine a data reading interface of the target data content in response to a read operation on the target data content;
[0028] an interface signature determination module, configured to determine, according to the data reading interface, a target interface signature associated with the data reading interface from a preset interface association table; and
[0029] A data write interface determination module is used to associate and store the source data read according to the data read interface with the target interface signature, so that when the source data is written and restored, the data write interface corresponding to the data read interface determined from the preset interface association table according to the target interface signature is used to perform write restoration of the source data.
[0030] A fourth aspect of the present application provides a computer program product, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the data management method of the first aspect or any implementation of the first aspect.
[0031] A fifth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0032] The memory is used to store computer programs;
[0033] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned first aspect or any implementation manner of the first aspect or the data management method of the second aspect.
[0034] In a sixth aspect of the present application, a computer storage medium is provided, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the above-mentioned first aspect or any implementation method of the first aspect or the data management method of the second aspect.
[0035] A seventh aspect of the present application provides a vehicle, which includes the electronic device according to the fifth aspect.
[0036] By means of the above technical scheme, the data management method provided by the present application can determine the data reading interface of the target data content in response to the read operation of the target data content. According to the data reading interface, the target interface signature associated with the data reading interface is determined from the preset interface association table. The source data read according to the data reading interface is associated with the target interface signature and stored, so that when the source data is written and recovered, the data writing interface corresponding to the data reading interface determined from the preset interface association table according to the target interface signature is used to perform write recovery of the source data. By associating the interfaces for reading and writing data with the same interface signature, and then using the interface signature to determine the write interface, it is ensured that the program read and write interfaces of the same data correspond one-to-one, so that the reading and writing of data are more accurate, and it is avoided that the reading and writing interfaces of the data are judged separately by simple data identifiers, thereby causing the reading interface and the writing interface of the data to be mismatched during the program development and use, and avoiding the disorder of the write recovery position causing the program to be abnormal. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0038] Figure 1 A structural diagram of a remote data management system provided by this application;
[0039] Figure 2 A structural diagram of a terminal provided for this application;
[0040] Figure 3 A structural diagram of a server provided for this application;
[0041] Figure 4 A flowchart of the data management method provided for this application;
[0042] Figure 5 A structural diagram of the association table provided for this application;
[0043] Figure 6 A specific application flow chart of the data management method provided in this application;
[0044] Figure 7 Another flow chart of the data management method provided by this application;
[0045] Figure 8 A structural diagram of the data management device provided by this application;
[0046] Fig. 9This is a structural diagram of the electronic device provided for this application. DETAILED DESCRIPTION
[0047] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0048] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0049] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0050] The current method for saving and restoring data is usually to use the data key identifier to determine which data reading interface should be called to obtain the data when the data needs to be saved; and to write the data by also using the data key identifier to determine which data writing interface should be called to write the data when the data needs to be restored.
[0051] The inventors have discovered that existing solutions require the data read and write interface to be called based on the data identifier when reading and restoring data. Controls with more association mappings can easily result in the read data being restored to the wrong location when being restored because the key identifiers are the same, and this complicates the implementation of reading and restoring data in the program.
[0052] After further research, the inventor proposed a data management method of the present application, which is applied in Figure 1 On the terminal in the remote data management system architecture shown, by associating the data reading and writing interfaces using the same interface signature, and then using the interface signature to determine the writing interface, it is ensured that the program reading and writing interfaces of the same data correspond one-to-one, thereby solving the problem of restoring data to the wrong location.
[0053] See also Figure 1 , Figure 1 A system architecture for remote data management shown in FIG. 1 may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.
[0054] Among them, an application for selecting data management content can be installed on the terminal 100. The above application and web page can provide an interface. The terminal 100 can receive relevant parameters entered by the user on the parameter setting interface and send the above parameters to the server 200. The server 200 can obtain processing results based on the received parameters and return the processing results to the terminal 100.
[0055] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.
[0056] Next describe Figure 1 The product form of the mid-terminal 100;
[0057] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.
[0058] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.
[0059] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.
[0060] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0061] Among them, the input device 132 can receive input data and the like.
[0062] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display and / or playback of any multimedia file. In the embodiment of the present application, the display unit 140 can be used to display the interface of parameter setting, processing results, etc.
[0063] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.
[0064] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.
[0065] Among them, the memory 120 can be used to store software codes related to the data management method, the processor 170 can execute the steps of the data management method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.
[0066] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0067] Among them, in an embodiment of the present application, the RF unit 110 can send data content that needs to be read from the server 200 or data content that needs to be written to the server 200 to the server 200. The server 200 can first determine the interface signature corresponding to the data content based on the received data content, and then determine the data reading interface and data writing interface corresponding to the interface signature in the interface association table based on the obtained interface signature. Then, the server 200 returns the interface corresponding to the read operation or the write operation to the RF unit 110 for use by the terminal.
[0068] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
[0069] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.
[0070] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .
[0071] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.
[0072] Next describe Figure 1 The product form of the server 200;
[0073] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.
[0074] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0075] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0076] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).
[0077] The memory 204 may be used to store software codes related to the data management method, and the processor 202 may execute the steps of the chip data management method and may also schedule other units to implement corresponding functions.
[0078] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0079] The data management method of the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0080] Reference Figure 4 , Figure 4 A data management method according to an embodiment of the present invention is shown in FIG. Figure 4 As shown, a data management method provided in an embodiment of the present application may include steps 401 to 403, and these steps are described in detail below.
[0081] 401. In response to a read operation on target data content, determine a data reading interface for the target data content.
[0082] Specifically, when a read operation for the corresponding data content is received, such as when a user uses the seat memory function of a vehicle, after the user sets the seat position, the read operation for the data content will be triggered. When determining the data reading interface, the key identifier in the target data content can be used as a key to determine the data reading interface corresponding to the key identifier from the preset interface database. The key identifier is the key information in the original data that represents the data content.
[0083] For example, the target data content is the volume of the vehicle's media sound, and its corresponding string is represented by "media-voice-value". This string can be used as a key identifier and as the primary key for the query to search for the corresponding data reading interface in the preset interface database.
[0084] It is understandable that those skilled in the art may also use other means to determine the data reading interface of the target data content, which is not limited here.
[0085] 402. According to the data reading interface, determine a target interface signature associated with the data reading interface from a preset interface association table.
[0086] Specifically, refer to Figure 5 As shown, the data read and recovery of the same source location and data type usually corresponds to two program interfaces, which correspond to the read and write recovery capabilities of the data respectively. Therefore, the relevant characteristic data that uniquely characterizes the data content can be used as a unique interface signature. Then, a one-to-two association relationship mapping table is formed between the unique interface signature and the read and write program interfaces corresponding to the data content, that is, one interface signature corresponds to one read program interface and one write recovery program interface.
[0087] When reading and saving data, the program reading interface that needs to be called is determined based on the data's key identifier to read the data. When the program reading interface is called to obtain data, the data returned by the program interface carries the target interface signature of the program interface in addition to the original data.
[0088] 403. The source data read according to the data reading interface is associated with the target interface signature and stored, so that when the source data is written and recovered, the data writing interface corresponding to the data reading interface determined from the preset interface association table according to the target interface signature is used to perform writing and recovery of the source data.
[0089] Specifically, when data needs to be written, that is, when the read and saved data is restored to a specific location (such as the vehicle's seat memory function), the data writing interface for write recovery corresponding to the signature can be determined based on the target interface signature associated with the source data, and then the data writing interface can be called to write the recovery data.
[0090] This data management method generates signatures of read and write functions according to data sources and data types, strictly ensuring one-to-one correspondence between program read and write interfaces of the same data, avoiding the use of simple data identifiers to determine the read and write interfaces of data separately, thereby causing mismatches in the use of data read and write interfaces during program development and use. At the same time, it can ensure that data of any format read from any place can be correctly restored to the corresponding original position, avoiding program abnormalities caused by confusion in the write and restore positions.
[0091] In a possible implementation, in order to facilitate accurate interface association and improve the efficiency of data reading and writing, the process of obtaining the preset interface association table specifically includes:
[0092] Step 1: Use the characteristic data that uniquely represents the data content as the interface signature.
[0093] Specifically, in order to ensure the one-to-one correspondence between the data reading interface and the data writing interface, the uniqueness of the interface signature can be used to associate the data reading interface and the corresponding data writing interface. The interface signature used can be an interface signature that generates exclusive ciphertext data based on the characteristics of the data content through a signature algorithm, encryption algorithm, etc.
[0094] Step 2: Associating the interface signature with the data reading interface and the data writing interface corresponding to the data content respectively to obtain the preset interface association table.
[0095] Specifically, the interface signatures can be stored in the form of an association table corresponding to the data reading interface and the data writing interface. For details, please refer to Figure 5 As shown in the association table, each signature corresponds to a data reading interface and a data writing interface. The interface signature can be used as the primary key, and the corresponding data reading interface and data writing interface can be used as the value to store them in a key-value storage manner, so as to realize the association search of the data reading interface and the data writing interface according to the interface signature.
[0096] As a feasible implementation of the above step 1, the specific process of using the characteristic data that uniquely represents the data content as the interface signature may include:
[0097] Sign the data type and data source location corresponding to the data content.
[0098] Specifically, data types may include integer (i.e., whole number type), floating point type, etc., and the data source is the storage location of the data content in the vehicle system. The data type and data source are generally represented by a string of English letters. For example, "int" indicates that the data type is integer, and "system-setting" indicates that the data source is the system database.
[0099] When performing a signature operation, the string obtained by concatenating the data type and the data source can be signed. As mentioned above, the string obtained by concatenating the data source and the data type is "system-setting-int". In order to ensure the uniqueness of the corresponding relationship between the interface represented by the string and the data content, the concatenated string can be signed. The signature here can be performed using an algorithm that can generate a unique representation of the string based on the concatenated string. For example, an encryption algorithm can be used to encrypt the string to obtain a fixed number of bits of data that can represent the string. The commonly used encryption algorithm can use md5 (Message-Digest Algorithm, cryptographic hash function) for encryption processing to transform the concatenated byte string into a 128-bit string.
[0100] It is understandable that those skilled in the art can select and adjust the concatenation method of the above character strings and the algorithm used for the signature as needed, which will not be elaborated here.
[0101] In some specific implementations, a binary number may also be used as an interface signature, and certain bits of value are specified to represent the data source, and certain bits of value represent the data type. Generating a binary number as an interface signature may specifically include the following steps:
[0102] Step 11, extracting a first preset number of characters from a preset position in the first character string representing the data type to obtain a second character string;
[0103] Specifically, considering that the length of the string representing the data type is relatively short, for example, the integer type is "int" and the floating point type is "float", the first two digits of the string can be used to represent the data type, such as extracting the first two digits of the string representing the integer as "in" and extracting the first two digits of the string representing the floating point as "fl". This can be adjusted as needed during the specific implementation, and will not be repeated here.
[0104] Step 12: extracting a second preset number of characters from a preset position in the third character string representing the data source position to obtain a fourth character string;
[0105] Specifically, the string representing the data source is generally composed of a long string with a separator. As mentioned above, the "-" in the string "system-setting" representing the system database is a separator. The string can be divided into multiple substrings according to the separator, and then the corresponding characters are extracted from each substring to form a new string. For example, after the system database string is divided, two substrings "system" and "setting" are obtained, and then the first three digits of each substring are taken and concatenated to obtain the fourth string mentioned above, namely "sysset".
[0106] Step 13: Concatenate the second character string and the fourth character string to obtain an interface signature.
[0107] Specifically, after obtaining the second character string "in" and the fourth character string "sysset", they are concatenated to obtain a character string "insysset", which is used as the interface signature.
[0108] It is understandable that the number of extracted digits and the extraction position of the above characters can be adjusted as needed, as long as each interface signature is not repeated with other interface signatures, that is, the uniqueness of the obtained interface signature is guaranteed, and this application does not impose any restrictions here.
[0109] As a specific application of the above data management method, the following will be combined with Figure 6 The data management method is described in detail using the data reading and writing process involved in the seat memory function:
[0110] Reference Figure 6 As shown, first, based on the integer seat angle data from the seat memory function, an interface signature uniquely associated with the seat angle reading interface and writing interface is generated, and then the interface signature is used as the primary key in the association table, and the corresponding data reading interface and data writing interface are stored as the values corresponding to the primary key. When the seat memory function is started, it is necessary to call the data reading interface to read data from the vehicle's local database. At this time, based on the key identifier of the data content, such as "seat memory function", a keyword search can be performed from the association table to determine the data reading interface to be used. Then, when the data content is read back from the database using the found data reading interface, the data writing interface corresponding to the interface signature of the data reading interface from the association table will also be carried. In this way, after the user readjusts the seat angle, the data writing interface can be directly called to write the data.
[0111] Based on the same design idea, refer to Figure 7As shown, the embodiment of the present application also provides a data management method, which can be applied in a scenario where the ultimate goal of data management is data reading, and specifically may include the following process:
[0112] 701. In response to a write operation on target data content, determine a data write interface for the target data content;
[0113] 702. According to the data writing interface, determine a target interface signature associated with the data writing interface from a preset interface association table;
[0114] 703. The source data written from the data write interface is associated with the target interface signature and stored so that when the source data is read, the source data is read and restored using the data read interface corresponding to the data write interface determined from the preset interface association table according to the target interface signature.
[0115] The specific implementation process of the data management during the above data reading can refer to the specific implementation example of the data management during the above data writing, which will not be repeated here.
[0116] A data management method provided by an embodiment of the present application is introduced above, and a device for executing the above data management method will be introduced below.
[0117] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of a data management device provided in an embodiment of the present application. Figure 8 As shown, the data management device comprises:
[0118] A data reading interface determination module 801 is used to determine a data reading interface of the target data content in response to a read operation on the target data content;
[0119] An interface signature determination module 802 is used to determine, according to the data reading interface, a target interface signature associated with the data reading interface from a preset interface association table; and
[0120] The data write interface determination module 803 is used to associate the source data read according to the data read interface with the target interface signature and store them so that when the source data is written and restored, the data write interface corresponding to the data read interface determined from the preset interface association table according to the target interface signature is used to perform write restoration of the source data.
[0121] In a possible implementation, the process of obtaining the preset interface association table in the interface signature determination module 802 includes:
[0122] The characteristic data that uniquely represents the data content is used as the interface signature;
[0123] The interface signature is associated with the data reading interface and the data writing interface corresponding to the data content respectively to obtain the preset interface association table.
[0124] In a possible implementation, the process of using the characteristic data that uniquely represents the data content as the interface signature in the interface signature determination module 802 includes:
[0125] Perform a signature operation on the data type and data source location corresponding to the data content to obtain an interface signature.
[0126] In a possible implementation, the interface signature determination module 802 performs a signature operation on the data type and data source location corresponding to the data content to obtain the interface signature, including:
[0127] The data type and the data source are concatenated to obtain a character string, which is encrypted using a preset encryption algorithm to obtain the interface signature.
[0128] In a possible implementation, the interface signature determination module 802 performs a signature operation on the data type and data source location corresponding to the data content to obtain the interface signature, including:
[0129] Extracting a first preset number of characters from a preset position in the first character string representing the data type to obtain a second character string;
[0130] Extracting a second preset number of characters from a preset position in a third character string representing the data source position to obtain a fourth character string;
[0131] The second character string and the fourth character string are concatenated to obtain the interface signature.
[0132] In a possible implementation, the process of the data reading interface determination module 801 determining the data reading interface of the target data content in response to the read operation of the target data content includes:
[0133] The key identifier in the target data content is used as a key, and a data reading interface corresponding to the key identifier is determined from a preset interface database.
[0134] The present application also provides an electronic device in an embodiment. Fig. 9 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Fig. 9The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0135] like Fig. 9 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0136] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a memory card, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0137] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any data management method provided in the embodiment of the present application.
[0138] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any data management method provided in the embodiment of the present application.
[0139] A vehicle is also provided in an embodiment of the present application, comprising the electronic device as described in the above embodiment.
[0140] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0141] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0142] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0143] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A data management method, characterized in that: include: In response to a read operation on target data content, determining a data reading interface of the target data content; According to the data reading interface, determining a target interface signature associated with the data reading interface from a preset interface association table; The source data read according to the data reading interface is associated with the target interface signature and stored, so that when the source data is written and restored, the data writing interface corresponding to the data reading interface determined from the preset interface association table according to the target interface signature is used to perform writing and restoration of the source data.
2. The data management method according to claim 1, characterized in that: The process of obtaining the preset interface association table includes: The characteristic data that uniquely represents the data content is used as the interface signature; The interface signature is associated with the data reading interface and the data writing interface corresponding to the data content respectively to obtain the preset interface association table.
3. The data management method according to claim 2, characterized in that: The method of using the characteristic data that uniquely represents the data content as the interface signature includes: A signature operation is performed on the data type and data source location corresponding to the data content to obtain the interface signature.
4. The data management method according to claim 3, characterized in that: The signing operation is performed on the data type and data source location corresponding to the data content to obtain the interface signature, including: The data type and the data source are concatenated to obtain a character string, which is encrypted using a preset encryption algorithm to obtain the interface signature.
5. The data management method according to claim 3, characterized in that: The signing operation is performed on the data type and data source location corresponding to the data content to obtain the interface signature, including: Extracting a first preset number of characters from a preset position in the first character string representing the data type to obtain a second character string; Extracting a second preset number of characters from a preset position in a third character string representing the data source position to obtain a fourth character string; The second character string and the fourth character string are concatenated to obtain the interface signature.
6. The data management method according to claim 1, characterized in that: The step of determining a data reading interface of the target data content in response to a read operation on the target data content includes: The key identifier in the target data content is used as a key, and a data reading interface corresponding to the key identifier is determined from a preset interface database.
7. A data management method, characterized in that: include: In response to a write operation on target data content, determining a data write interface for the target data content; According to the data writing interface, determining a target interface signature associated with the data writing interface from a preset interface association table; The source data written from the data write interface is associated with the target interface signature and stored so that when the source data is read, the source data is read and restored using the data read interface corresponding to the data write interface determined from the preset interface association table according to the target interface signature.
8. A data management device, characterized in that: include: A data reading interface determination module, configured to determine a data reading interface of the target data content in response to a read operation on the target data content; An interface signature determination module, used to determine, according to the data reading interface, a target interface signature associated with the data reading interface from a preset interface association table; as well as, A data write interface determination module is used to associate and store the source data read according to the data read interface with the target interface signature, so that when the source data is written and restored, the data write interface corresponding to the data read interface determined from the preset interface association table according to the target interface signature is used to perform write restoration of the source data.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the data management method as described in any one of claims 1 to 7.
10. A vehicle, characterized in that: Comprising the electronic device as claimed in claim 9.
