PER module and data processing method and device

By designing the interface layer, adaptation layer and resource layer in the AUTOSAR AP PER component, and dynamically loading processing resources using pre-stored mapping relationships, the problems of poor scalability of PER components and single data processing methods in the prior art are solved, and efficient and flexible data processing is achieved.

CN119536853APending Publication Date: 2025-02-28CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411611287.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing AUTOSAR AP PER components are not very scalable and have a single data processing method and cannot be flexibly processed according to different data needs.

Method used

A PER module is designed, including an interface layer, an adaptation layer and a resource layer. The corresponding processing resources are loaded dynamically through pre-stored mapping relationships to achieve flexible responses to different data processing requests.

Benefits of technology

It improves the flexibility and scalability of the PER module, and can dynamically load corresponding processing resources according to different data processing needs, enhancing the efficiency and adaptability of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536853A_ABST
    Figure CN119536853A_ABST
Patent Text Reader

Abstract

The invention relates to a PER module, a data processing method and device, storage equipment, a computer readable storage medium and a computer program product. The PER module comprises an interface layer, an adaptation layer and a resource layer, and the resource layer comprises a plurality of processing resources; the interface layer is used for acquiring processing keyword information carried in a data processing request under the condition that the data processing request is received, and transmitting the processing keyword information to the adaptation layer; the adaptation layer is used for loading a corresponding target processing resource in the resource layer according to a pre-stored first mapping relation under the condition that the processing keyword information is received; the first mapping relationship is used for representing a corresponding relationship between different processing keyword information and different processing resources in the resource layer. The adaptation layer of the PER module provided by the invention dynamically loads the corresponding processing resources in the resource layer by using the pre-stored first mapping relationship, so that the processing efficiency of processing the data request can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a PER module, a data processing method, an apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the continuous development of modern automobile technology, AUTOSAR (Automotive Open System Architecture) has emerged. Among them, AUTOSARAP PER (persistence) components are applied to the AUTOSAR architecture. The PER component provides AP (Adaptive Platform) applications with the ability to save data to non-volatile memory. These data can still be obtained and used after the machine is restarted, ensuring the continuity of the data. However, the current PER component has poor scalability and a relatively simple data processing method, and cannot process data according to the required processing method. Summary of the invention

[0003] Based on this, it is necessary to provide a PER module, data processing method, device, computer equipment, computer-readable storage medium and computer program product that can efficiently process data according to the required processing method to address the above technical problems.

[0004] In a first aspect, the present application provides a PER module, the PER module comprising an interface layer, an adaptation layer and a resource layer, wherein:

[0005] The resource layer includes a variety of processing resources;

[0006] The interface layer is used to, when receiving a data processing request, obtain processing keyword information carried in the data processing request and transmit the processing keyword information to the adaptation layer;

[0007] The adaptation layer is used to load the corresponding target processing resources in the resource layer according to a pre-stored first mapping relationship when receiving the processing keyword information; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

[0008] In the above-mentioned PER module, when the interface layer receives the data processing request, it obtains the processing keyword information carried in the data processing request, and transmits the processing keyword information to the adaptation layer; when the adaptation layer receives the processing keyword information, it loads the corresponding target processing resource in the resource layer according to the pre-stored first mapping relationship; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer. The present application efficiently processes data requests through the division of labor and cooperation among the interface layer, the adaptation layer and the resource layer. The resource layer contains a variety of processing resources, that is, different data processing requirements can be adapted by adding new processing resources without making large-scale changes to the entire PER module. Then, the adaptation layer dynamically loads the corresponding processing resources in the resource layer using the pre-stored first mapping relationship, so that the PER module can adapt to new data processing requirements by adjusting the mapping relationship stored in the adaptation layer without changing the interface layer, thereby improving the flexibility of the PER module.

[0009] In one of the embodiments, the first mapping relationship includes a mapping relationship between the processing keyword information and a constructor pointer for constructing a target processing subclass object;

[0010] The adaptation layer is also used to obtain a constructor pointer that matches the processing keyword information and is used to construct a target processing subclass object based on the first mapping relationship, call the constructor in the processing base class pointed to by the constructor pointer, instantiate the subclass through the constructor to obtain the target processing subclass object, obtain a base class pointer for referencing the target processing subclass object, use the base class pointer to call a specific processing function contained in the target processing subclass object, determine the corresponding target processing resources in the resource layer according to the specific processing function, and load the corresponding target processing resources in the resource layer.

[0011] In one of the embodiments, the adaptation layer is further used to obtain an initial base class pointer in the processing base class, associate the target processing subclass object with the initial base class pointer, and use the associated initial base class pointer as a base class pointer for referencing the target processing subclass object.

[0012] In one of the embodiments, the adaptation layer is further used to respond to a new request for a processing method, add a subclass corresponding to the processing method through the processing base class, obtain processing keyword information corresponding to the processing method from the new request, map the processing keyword information with a constructor pointer corresponding to the subclass corresponding to the processing method, and store the mapping relationship;

[0013] The resource layer is also used to store processing resources corresponding to the processing method.

[0014] In one embodiment, the processing resources include encryption resources;

[0015] The interface layer is further used to, when receiving a data processing request, obtain the encrypted keyword information carried in the data processing request and transmit the encrypted keyword information to the adaptation layer;

[0016] The adaptation layer is also used to load the corresponding target encrypted resource in the resource layer according to a pre-stored second mapping relationship when receiving the encrypted keyword information; the second mapping relationship is used to characterize the correspondence between different encrypted keyword information and different encrypted resources in the resource layer.

[0017] In one of the embodiments, the second mapping relationship includes a mapping relationship between the encryption keyword information and a constructor pointer for constructing a target encryption subclass object;

[0018] The adaptation layer is also used to obtain a constructor pointer for constructing a target encryption subclass object that matches the encryption keyword information according to the second mapping relationship, call the constructor in the encryption base class pointed to by the constructor pointer, instantiate the subclass through the constructor to obtain the target encryption subclass object, obtain a base class pointer for referencing the target encryption subclass object, use the base class pointer to call a specific encryption function contained in the target encryption subclass object, determine the corresponding target encryption resource in the resource layer according to the specific encryption function, and load the corresponding target encryption resource in the resource layer.

[0019] In one of the embodiments, the adaptation layer is also used to obtain an initial base class pointer in the encryption base class, associate the target encryption subclass object with the initial base class pointer, and use the associated initial base class pointer as a base class pointer for referencing the target encryption subclass object.

[0020] In one of the embodiments, the adaptation layer is further used to respond to a new request for an encryption method, add a subclass corresponding to the encryption method through the encryption base class, and obtain encryption keyword information corresponding to the encryption method from the new request; map the encryption keyword information to a constructor pointer corresponding to the subclass corresponding to the encryption method, and store the mapping relationship;

[0021] The resource layer is also used to store encryption resources corresponding to the encryption method.

[0022] In a second aspect, the present application also provides a data processing method, the method comprising:

[0023] When receiving a data processing request, obtaining processing keyword information carried in the data processing request;

[0024] The corresponding target processing resource in the resource layer is loaded according to a pre-stored first mapping relationship; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

[0025] In a third aspect, the present application further provides a data processing device, the device comprising: a keyword acquisition module, configured to acquire processing keyword information carried in the data processing request when receiving the data processing request;

[0026] The processing resource loading module is used to load the corresponding target processing resource in the resource layer according to a pre-stored first mapping relationship; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

[0027] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the second aspect when executing the computer program.

[0028] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the second aspect.

[0029] In a sixth aspect, the present application further provides a computer program product, comprising a computer program, which implements the steps of the method described in the second aspect when executed by a processor.

[0030] The above-mentioned data processing method, apparatus, computer device, computer-readable storage medium and computer program product can quickly determine the required specific processing resources through keyword information and the pre-stored first mapping relationship, thereby improving processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A schematic diagram of the structure of a PER module in one embodiment;

[0033] Figure 2is a flow chart of a data processing method in one embodiment;

[0034] Figure 3 A schematic diagram of a PER component in one embodiment;

[0035] Figure 4 A schematic diagram of the framework of AdaptionApplication (adaptive program) in one embodiment;

[0036] Figure 5 A schematic diagram of a Key-Value Storage framework in one embodiment;

[0037] Figure 6 A schematic diagram of a File Storage framework in one embodiment;

[0038] Figure 7 A schematic diagram of the framework of the relationship between FileStorage (file storage class), ReadAccessor / ReadWriteAccessor (read access class / read-write access class) and files in one embodiment;

[0039] Figure 8 A schematic diagram of the framework of FileManage (file management class) in one embodiment;

[0040] Fig. 9 A flowchart of the FileAction (file execution class) workflow in one embodiment;

[0041] Fig.10 The figure is a schematic diagram of the framework of CryptoManage (encryption management class) in one embodiment;

[0042] Fig.11 The figure is a flowchart of the CryptoAction (encryption execution class) workflow in one embodiment;

[0043] Fig.12 FIG. 4 is a structural block diagram of a data processing device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] In the prior art, the PER component has low scalability and a relatively simple data processing method. For example, in the data storage scenario, it only supports local storage of files, which is very limited and has a single usage scenario. The current technology does not support the selection and configuration of data storage methods, that is, the current technology cannot meet the requirements of selecting multiple storage methods to store data. Therefore, in order to be able to process data according to the required data processing method, a PER module that can process data according to the required data processing method is urgently needed.

[0046] Figure 1 A schematic diagram of the structure of the PER module in the embodiment of the present application is shown in FIG. Figure 1 As shown, the present application provides a PER module, and the PER (persistence) module can provide the AP (Adaptive Platform) application with the ability to save data to a non-volatile memory; the PER module includes an interface layer 101, an adaptation layer 102 and a resource layer 103, wherein:

[0047] The above resource layer includes a variety of processing resources.

[0048] Among them, the resource layer contains various resources that actually perform data processing tasks. These processing resources can be algorithms, functions, services or any other form of processing units; the resource layer can be composed of multiple dynamic libraries, each of which can contain a series of processing resources.

[0049] The interface layer is used to obtain the processing keyword information carried in the data processing request when receiving the data processing request, and transmit the processing keyword information to the adaptation layer.

[0050] Among them, the processing keyword information may refer to an identifier carried in the data processing request, and the identifier may be an ID, a code or number, or other symbols that serve as an identifier, and the present application does not make specific limitations on this; the above-mentioned processing keyword information may be used to indicate the specific processing method or processing type required for the data processing request. Exemplarily, the processing keyword information may be obtained by a preset processing configuration tool according to the type of vehicle data, for example, the preset processing configuration tool configures Class A processing keyword information for vehicle data type A; the preset processing configuration tool configures Class B processing keyword information for vehicle data type B, and so on. The specific correspondence relationship depends on actual needs and is not specifically limited here. The preset processing configuration tool may refer to a configuration tool that can set corresponding processing strategies and keyword information according to different types of vehicle data.

[0051] The adaptation layer is used to load the corresponding target processing resources in the resource layer according to a pre-stored first mapping relationship when receiving the processing keyword information; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

[0052] The first mapping relationship may refer to a predefined relationship table or rule set, which is used in this embodiment to characterize the relationship between different processing keyword information and different processing resources in the resource layer.

[0053] The interface layer in the present application receives a data processing request, parses processing keyword information in the request, and passes the information to the adaptation layer; the adaptation layer receives the processing keyword information, determines the corresponding target processing resource in the resource layer according to a pre-stored first mapping relationship, and then loads the corresponding target processing resource in the resource layer; illustratively, the adaptation layer can also load the target processing resource into the operating system corresponding to the PER module, and then the operating system executes the target processing resource to start processing data, and returns the processing result after the processing is completed.

[0054] The above-mentioned PER module efficiently processes data processing requests through the division of labor and cooperation among the interface layer, the adaptation layer and the resource layer. The resource layer contains a variety of processing resources, that is, different data processing requirements can be adapted by adding new processing resources without making large-scale changes to the entire PER module. Then, the adaptation layer dynamically loads the corresponding processing resources in the resource layer using the pre-stored first mapping relationship, so that the PER module can adapt to new data processing requirements by adjusting the mapping relationship stored in the adaptation layer without changing the interface layer, thereby improving the flexibility of the PER module.

[0055] In some exemplary embodiments, the first mapping relationship includes a mapping relationship between the processing keyword information and a constructor pointer for constructing a target processing subclass object;

[0056] The adaptation layer is also used to obtain a constructor pointer that matches the processing keyword information and is used to construct a target processing subclass object based on the first mapping relationship, call the constructor in the processing base class pointed to by the constructor pointer, instantiate the subclass through the constructor to obtain the target processing subclass object, obtain a base class pointer for referencing the target processing subclass object, use the base class pointer to call a specific processing function contained in the target processing subclass object, determine the corresponding target processing resources in the resource layer according to the specific processing function, and load the corresponding target processing resources in the resource layer.

[0057] Among them, the constructor may refer to a member function used to initialize an object; the constructor pointer may refer to a pointer to a constructor, which can be used to create an object of a specific type; the processing base class may refer to an abstract class or a basic class, which can define a general interface for processing resources and possible general implementations; the processing subclass may refer to a class derived from the processing base class, which can provide a specific implementation of the interface defined in the processing base class; the processing subclass may inherit from the processing base class and provide a specific implementation; the base class pointer may refer to a pointer to the base class, which can be used to reference an object of the base class or an object of a subclass associated with the base class (derived class object), and polymorphism can be achieved through the base class pointer; the specific processing function may refer to a function defined in the processing subclass, which is used to perform specific data processing tasks.

[0058] Exemplarily, in the adaptation layer, a processing base class can be defined first, including some virtual functions, which are used to be overridden in the processing subclass to provide specific processing logic; a mapping relationship can also be defined to associate the processing keyword information with the constructor pointer, and the constructor pointer is used to point to the constructor of the processing subclass, and the constructor of the processing subclass can be saved in the processing base class; the adaptation layer can obtain the constructor pointer from the first mapping relationship based on the processing keyword information, and then call the constructor to create an object of the target processing subclass, and reference the object of the target processing subclass through the base class pointer, and finally call the specific processing function contained in the object of the target processing subclass; the target processing resource in the resource layer can be called through the specific processing function, and the target processing resource can be loaded into the operating system. Among them, the first mapping relationship can be saved and used through data structures such as hash tables and tree structures, and the mapping relationship can also be saved and used using a database.

[0059] In the above embodiment, the PER module receives a data processing request, obtains the processing keyword information carried in the data processing request through the interface layer, and then transmits the processing keyword information to the adaptation layer. When the adaptation layer receives the processing keyword information, it obtains a constructor pointer for constructing a target processing subclass object that matches the processing keyword information according to the first mapping relationship, calls the constructor in the processing base class pointed to by the constructor pointer, instantiates the subclass through the constructor, obtains the target processing subclass object, obtains a base class pointer for referencing the target processing subclass object, calls the specific processing function contained in the target processing subclass object using the base class pointer, and then determines the corresponding target processing resource in the resource layer according to the specific processing function, and loads the corresponding target processing resource in the resource layer; the target processing subclass object can be dynamically created according to different processing keyword information, and the specific data processing function in the target processing subclass object can be called through the base class pointer, so as to load the corresponding target processing resource in the resource layer. The adaptation layer can flexibly deal with multiple types of data without the need to write a separate processing logic for each data type. The design based on the base class and the subclass enables the PER module to achieve polymorphism, which can improve the reusability and flexibility of the code written in the adaptation layer, and improve the maintainability of the PER module.

[0060] In some exemplary embodiments, the adaptation layer is also used to obtain an initial base class pointer in the processing base class, associate the target processing subclass object with the initial base class pointer, and use the associated initial base class pointer as a base class pointer for referencing the target processing subclass object.

[0061] The initial base class pointer may refer to an initial base class pointer that does not point to a specific object; the association may refer to pointing the base class pointer to a specific derived class object, so that the base class pointer can reference the derived class object.

[0062] Exemplarily, in the adaptation layer, after creating the target processing subclass object, the subclass pointer of the target processing subclass object is obtained, and the initial base class pointer in the processing base class is obtained, the aforementioned subclass pointer is assigned to the initial base class pointer, and the base class pointer associated with the target processing subclass object is obtained. The target processing subclass object can be referenced through the assigned base class pointer.

[0063] In the above embodiment, the adaptation layer references the subclass object through the base class pointer, and can utilize the polymorphism in object-oriented programming so that the same operation can be applied to the base class and all its corresponding subclass objects. The use of the base class pointer simplifies code management and object life cycle control, and facilitates unified operations on different subclass objects. If new subclasses need to be added in the future, it is only necessary to expand on the basis of the existing base class without modifying the original code structure, thereby improving the scalability and maintainability of the system.

[0064] In some exemplary embodiments, the adaptation layer is further used to respond to a new request for a processing method, add a subclass corresponding to the processing method through the processing base class, obtain processing keyword information corresponding to the processing method from the new request, map the processing keyword information with a constructor pointer corresponding to the subclass corresponding to the processing method, and store the mapping relationship;

[0065] The resource layer is also used to store processing resources corresponding to the processing method.

[0066] The new request for the processing method may refer to a request for expanding a new data processing method in the PER module to adapt to the data processing method requirements of new data.

[0067] Exemplarily, if the user needs to expand the existing data processing method for the PER module, a new request for the processing method can be initiated to the PER module. The interface layer of the PER module passes the new request to the adaptation layer. The adaptation layer responds to the new request by processing the base class to add a subclass corresponding to the processing method, and obtains the constructor pointer A for creating the subclass object by processing the base class. Then the adaptation layer extracts the processing keyword information B about the processing method from the new request, maps the processing keyword information B with the constructor pointer A, and stores the mapping relationship, for example, storing the mapping relationship between the processing keyword information B and the constructor pointer A in a preset mapping table; when the resource layer receives the new request for the processing method, the resource layer stores the processing resources associated with the new request in the corresponding dynamic library in the resource layer for subsequent calls and loading by the adaptation layer.

[0068] In the above embodiment, the adaptation layer adds a subclass corresponding to the new processing method, obtains the processing keyword information corresponding to the new request, and establishes a mapping relationship between the processing keyword information corresponding to the new request and the constructor pointer of the subclass object of the new subclass, thereby realizing the dynamic expansion of the PER module. To add a new processing method, only a corresponding subclass needs to be added and the mapping relationship needs to be maintained, which reduces the resource loss of the extended processing method and improves the expansion efficiency of the PER module.

[0069] In some exemplary embodiments, the processing resources include encryption resources;

[0070] The interface layer is further used to, when receiving a data processing request, obtain the encrypted keyword information carried in the data processing request and transmit the encrypted keyword information to the adaptation layer;

[0071] The above-mentioned adaptation layer is also used to load the corresponding target encrypted resource in the resource layer according to a pre-stored second mapping relationship when receiving the encrypted keyword information; the second mapping relationship is used to characterize the correspondence between different encrypted keyword information and different encrypted resources in the resource layer.

[0072] Among them, encryption resources may refer to resources used to perform encryption and / or decryption operations, such as encryption algorithms, key management tools, etc. The encryption keyword information may be an identifier extracted from a data processing request. The identifier may be an ID, a code or a number, or other symbols that serve as an identifier. This application does not specifically limit this. The above encryption keyword information may be used to indicate the specific encryption type or encryption function required. The second mapping relationship may be a pre-stored relationship table or rule set, which may be used to characterize the correspondence between different encryption keyword information and different encryption resources in the resource layer.

[0073] In the above embodiment, the interface layer receives a data processing request, parses the encryption keyword information in the request, and passes the information to the adaptation layer; the adaptation layer receives the encryption keyword information, determines the corresponding target encryption resource in the resource layer according to the pre-stored second mapping relationship, and then loads the corresponding target encryption resource in the resource layer; illustratively, the adaptation layer can also load the target encryption resource into the operating system corresponding to the PER module, and then the operating system executes the target encryption resource to start encrypting data, and returns the encryption result after the encryption is completed. Exemplarily, after receiving the data processing request, the interface layer can parse the encryption keyword information and the processing keyword information in the request, first complete the loading of the target encryption resource required for data encryption according to the encryption keyword information, and then complete the loading of the target processing resource required for data processing according to the processing keyword information; by completing the encryption corresponding process first and then executing the processing process, the security and integrity of the data can be guaranteed.

[0074] In the above embodiment, the PER module efficiently processes the encryption keyword information in the data processing request through the division of labor and cooperation among the interface layer, the adaptation layer and the resource layer. The resource layer also includes encryption resources, that is, different data encryption requirements can be adapted by adding new encryption resources without making large-scale changes to the entire PER module. Then, the adaptation layer dynamically loads the corresponding encryption resources in the resource layer using the pre-stored second mapping relationship, so that the PER module can adapt to new data encryption requirements by adjusting the mapping relationship stored in the adaptation layer without changing the interface layer, thereby improving the flexibility of the PER module.

[0075] In some exemplary embodiments, the second mapping relationship includes a mapping relationship between the encryption keyword information and a constructor pointer for constructing a target encryption subclass object;

[0076] The adaptation layer is also used to obtain a constructor pointer for constructing a target encryption subclass object that matches the encryption keyword information according to the second mapping relationship, call the constructor in the encryption base class pointed to by the constructor pointer, instantiate the subclass through the constructor to obtain the target encryption subclass object, obtain a base class pointer for referencing the target encryption subclass object, use the base class pointer to call a specific encryption function contained in the target encryption subclass object, determine the corresponding target encryption resource in the resource layer according to the specific encryption function, and load the corresponding target encryption resource in the resource layer.

[0077] Among them, the constructor may refer to a member function used to initialize an object; the constructor pointer may refer to a pointer to a constructor, which can be used to create an object of a specific type; the encryption base class may refer to an abstract class or a basic class, which can define the general interface of encryption resources and possible general implementations; the encryption subclass may refer to a class derived from the encryption base class, which can provide a specific implementation of the interface defined in the encryption base class; the encryption subclass may inherit from the encryption base class and provide a specific implementation; the base class pointer may refer to a pointer to the base class, which can be used to reference an object of the base class or an object of a subclass associated with the base class (derived class object), and polymorphism can be achieved through the base class pointer; the specific encryption function may refer to a function defined in the encryption subclass, which is used to perform specific data encryption tasks.

[0078] Exemplarily, in the adaptation layer, an encryption base class can be defined first, including some virtual functions, which are used to be overridden in the encryption subclass to provide specific encryption logic; a mapping relationship can also be defined to associate the encryption keyword information with the constructor pointer, which is used to point to the constructor of the encryption subclass, and the constructor of the encryption subclass can be saved in the encryption base class; the adaptation layer can obtain the constructor pointer from the second mapping relationship based on the encryption keyword information, and then call the constructor to create the object of the target encryption subclass, and reference the object of the target encryption subclass through the base class pointer, and finally call the specific encryption function contained in the object of the target encryption subclass; the target encryption resource in the resource layer can be called through the specific encryption function, and the target encryption resource can be loaded into the operating system. Among them, the second mapping relationship can be saved and used through data structures such as hash tables and tree structures, and the mapping relationship can also be saved and used using a database.

[0079] In the above embodiment, the adaptation layer of the PER module can dynamically create a target encryption subclass object according to different encryption keyword information, and call a specific data encryption function in the target encryption subclass object through a base class pointer, so as to load the corresponding target encryption resource in the resource layer. The adaptation layer can flexibly cope with various types of data without writing a separate encryption logic for each data type. The design based on the base class and subclass enables the PER module to achieve polymorphism, which can improve the reusability and flexibility of the code written in the adaptation layer, and improve the maintainability of the PER module.

[0080] In some exemplary embodiments, the adaptation layer is further used to obtain an initial base class pointer in the encryption base class, associate the target encryption subclass object with the initial base class pointer, and use the associated initial base class pointer as a base class pointer for referencing the target encryption subclass object.

[0081] The initial base class pointer may refer to an initial base class pointer that does not point to a specific object; the association may refer to pointing the base class pointer to a specific derived class object, so that the base class pointer can reference the derived class object.

[0082] Exemplarily, in the adaptation layer, after the target encryption subclass object is created, the subclass pointer of the target encryption subclass object is obtained, and the initial base class pointer in the encryption base class is obtained, and the aforementioned subclass pointer is assigned to the initial base class pointer to obtain the base class pointer associated with the target encryption subclass object. The target encryption subclass object can be referenced through the assigned base class pointer.

[0083] In the above embodiment, the adaptation layer references the subclass object through the base class pointer, and can utilize the polymorphism in object-oriented programming so that the same operation can be applied to the base class and all its corresponding subclass objects. The use of the base class pointer simplifies code management and object life cycle control, and facilitates unified operations on different subclass objects. If new subclasses need to be added in the future, it is only necessary to expand on the basis of the existing base class without modifying the original code structure, thereby improving the scalability and maintainability of the system.

[0084] In some exemplary embodiments, the adaptation layer is further used to respond to a new request for an encryption method, add a subclass corresponding to the encryption method through the encryption base class, and obtain encryption keyword information corresponding to the encryption method from the new request; map the encryption keyword information to a constructor pointer corresponding to the subclass corresponding to the encryption method, and store the mapping relationship;

[0085] The resource layer is also used to store encryption resources corresponding to the encryption method.

[0086] The new request for the encryption method may refer to a request for extending a new data encryption method in the PER module to adapt to the data encryption method requirements of new data.

[0087] Exemplarily, if the user needs to expand the existing data encryption method for the PER module, a new request for the encryption method can be initiated to the PER module. The interface layer of the PER module passes the new request to the adaptation layer. The adaptation layer responds to the new request by adding a subclass corresponding to the encryption method through the encryption base class, and obtains the constructor pointer C for creating the subclass object through the encryption base class. Then, the adaptation layer extracts encryption keyword information D about the encryption method from the new request, maps the encryption keyword information D with the constructor pointer C, and stores the mapping relationship, for example, storing the mapping relationship between the encryption keyword information D and the constructor pointer C in a preset mapping table; when the resource layer receives the new request for the encryption method, the resource layer stores the encryption resources associated with the new request in the corresponding dynamic library in the resource layer for subsequent calls and loading by the adaptation layer.

[0088] In the above embodiment, the adaptation layer adds a subclass corresponding to the new encryption method, obtains the encryption keyword information corresponding to the new request, and establishes a mapping relationship between the encryption keyword information corresponding to the new request and the constructor pointer of the subclass object of the new subclass, thereby realizing the dynamic expansion of the PER module. To add a new encryption method, only a corresponding subclass needs to be added and the mapping relationship needs to be maintained, which reduces the resource loss of extending the encryption method and improves the expansion efficiency of the PER module.

[0089] In some exemplary embodiments, Figure 2 As shown, the present application also provides a data processing method, which may include the following steps:

[0090] Step S202: upon receiving a data processing request, obtaining processing keyword information carried in the data processing request.

[0091] Among them, the processing keyword information may refer to an identifier carried in the data processing request, and the identifier may be an ID, a code or number, or other symbols that serve as an identifier, and the present application does not make specific limitations on this; the above-mentioned processing keyword information may be used to indicate the specific processing method or processing type required for the data processing request. Exemplarily, the processing keyword information may be obtained by a preset processing configuration tool according to the type of vehicle data, for example, the preset processing configuration tool configures Class A processing keyword information for vehicle data type A; the preset processing configuration tool configures Class B processing keyword information for vehicle data type B, and so on. The specific correspondence relationship depends on actual needs and is not specifically limited here. The preset processing configuration tool may refer to a configuration tool that can set corresponding processing strategies and keyword information according to different types of vehicle data.

[0092] Step S204: load the corresponding target processing resource in the resource layer according to the pre-stored first mapping relationship.

[0093] The first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer. The first mapping relationship may refer to a predefined relationship table or rule set, which is used to characterize the relationship between different processing keyword information and different processing resources in the resource layer in this embodiment.

[0094] Exemplarily, the data processing method can be applied to a PER module, which includes an interface layer, an adaptation layer, and a resource layer. The interface layer receives a data processing request, parses processing keyword information in the request, and passes the information to the adaptation layer; the adaptation layer receives the processing keyword information, determines the corresponding target processing resource in the resource layer according to a pre-stored first mapping relationship, and then loads the corresponding target processing resource in the resource layer; exemplarily, the adaptation layer can also load the target processing resource into an operating system corresponding to the PER module, and then the operating system executes the target processing resource to start processing data, and returns the processing result after the processing is completed.

[0095] The above data processing method, when receiving a data processing request, obtains the processing keyword information carried in the data processing request, and then loads the corresponding target processing resource in the resource layer according to the pre-stored first mapping relationship, and can dynamically select and load appropriate processing resources according to different data processing requests. This dynamic loading mechanism can reduce resource occupation and improve the utilization of memory and system resources. The pre-stored first mapping relationship enables expansion as new processing keywords and resources are added. Developers can add new data processing functions by simply updating the mapping relationship without modifying the core logic, maintaining the clarity and maintainability of the structure.

[0096] In some examples, such as Figure 3 As shown in FIG. 1 , an overall framework of a PER module is provided, wherein one is an external interface, two is an internal support, three is an adaptation layer, and four is an external dependency; wherein the interface layer in the above PER module is equivalent to Figure 3 The external interface layer and internal support shown in the figure; the PER (persistence) module provides the AP (Adaptive Platform) application with the ability to save data to non-volatile storage. These data can still be obtained and used after the machine is restarted, ensuring the continuity of data; PER provides two mechanisms: File Storage and Key-Value Storage. PER is implemented in the form of a library, so it does not support concurrent access to resources. Figure 4 The AdaptionApplication shown can use a combination of multiple Key-ValueStorages and multiple File Storages.

[0097] Among them, Key-Value Storage is implemented through the keyValueStorage class. Each instance of this class represents a key-value database, so the application can implement multiple instances of this class according to the amount of data used. This class is created using OpenKeyValueStorage (key-value storage class creation function) and passed to the application through SharedHandle (shared pointer). After the class is instantiated, the key-value elements in the key-value database will be loaded into RAM, and then these key-value elements can be accessed using the API GetValue (value acquisition interface) and SetValue (value setting method). Calling the SyncToStorage (synchronous storage) method will synchronize the information in the physical memory. For example Figure 5 As shown in the figure, the relationship between Key-Value Storage files and key-value pairs is described. There is only one file under each key-value storage, and each file can have multiple key-value pairs.

[0098] Among them, File Storage is implemented by the FileStorage class, created using OpenFileStorage (open file storage function), and passed to the application through SharedHandle. The methods OpenFileReadOnly (open a file in read-only mode), OpenFileWriteOnly (open a file in write-only mode), and OpenFileReadWrite (open a file to support both reading and writing) provided by the FileStorage class are used to access a single file in the file storage. The relationship between FileStorage and files is as follows Figure 6As shown, a File Storage can contain multiple Files.

[0099] Among them, the external interface is used to provide to the application (application), including:

[0100] PerComm (persistent storage common part), PerComm is not a class, but a collection of functions such as Initialize, Deinitialize, OpenKeyValueStorage, OpenFileStorage, etc. Initialize and Deinitialize are used to manage the life cycle of PER components. Initialize is used for the initialization of PER components (configuration file loading). Deinitialize is mainly for the deinitialization of PER components, releasing the configuration file content from the memory. OpenKeyValueStorage is used to create a SharedHandle of KeyValueStorage and pass it to the application. OpenFileStorage is used to create a SharedHandle of FileStorage and pass it to the application.

[0101] KeyValueStorage (key-value storage class), the KeyValueStorage class provides all methods for accessing key-value storage and its elements. It is created using OpenKeyValueStorage and passed to the application through SharedHandle. The KeyValueStorage class provides multiple methods such as GetValue, SetValue, RemoveKey, SyncToStorage, etc. to directly or indirectly operate key-value storage files.

[0102] FileStorage (file storage class), the FileStorage class provides an external access interface for file storage, is created using OpenFileStorage, and is passed to the application through SharedHandle. FileStorage provides access to files by returning the ReadAccessor and ReadWriteAccessor classes. The relationship between FileStorage, ReadAccessor / ReadWriteAccessor, and files is as follows Figure 7As shown in the figure, there are multiple files in FileStorage. If you need to operate different files, you need to create different ReadAccessor / ReadWriteAccessor according to the files.

[0103] Among them, ReadAccessor, the ReadAccessor class provides a method to read the file content. This class is created using OpenFileReadOnly or OpenFileReadWrite and passed to the application through a UniqueHandle (exclusive pointer). This class calls the file read and write methods of the adaptation layer to implement the function.

[0104] ReadWriteAccessor, the ReadWriteAccessor class inherits from ReadAccessor, provides methods to read / write file contents, is created using FileStorage::OpenFileReadWrite (a function that opens a file in read-write mode) or FileStorage::OpenFileWriteOnly (a function that opens a file in write-only mode), and is passed to the application via UniqueHandle. This class calls the file read / write methods of the adaptation layer to implement the function.

[0105] SharedHandle, the SharedHandle class is used to provide shared access to key-value storage or file storage.

[0106] UniqueHandle, The UniqueHandle class is used to provide non-shared access to a file.

[0107] Among them, the internal support includes:

[0108] PerStateManagement (persistent storage state management): The unit is responsible for managing the state management of per, managing the initialization state of per components, key-value storage, file storage, and the occupancy of files in file storage.

[0109] KeyValueStorageImpl (key-value storage implementation): The KeyValueStorageImpl class is used to manage ValueWrapper (value wrapper), and is also the specific implementation of key-value storage functions (file reading and writing, integrity verification, file update, recovery, reset, etc.).

[0110] ValueWrapper: ValueWrapper is used to save key-value pairs in RAM only. The ValueWrapper class is a "smart Union" which supports storing primitive types, extensions, nested object arrays binary format support to store content that can be copied in memory. The class provides a series of constructors for saving the requested type, as well as internal metadata like the stored type checksum and of course the associated key. The stored value can be converted back using the provided GetValue-API.

[0111] FileStorageImpl (file storage implementation): manages the information of all files under the file storage and implements specific file storage functions (file reading and writing, integrity verification, file update, recovery and reset, etc.).

[0112] ReadAccessorImpl (read accessor implementation): ReadAccessorImpl provides methods to read file contents, is created using OpenFileReadOnly, and is passed to the application through UniqueHandle.

[0113] PerSynchronization (persistent storage synchronization): used to implement the persistent storage of key-value data, and provides an optional interface for persistently storing key-value data in key-value storage. This class calls the file read and write methods of the adaptation layer to implement the function.

[0114] FileCRC (File Cyclic Redundancy Check): This class is used to implement CRC check of files.

[0115] FileRedundancy: used to implement the mout ofn mode.

[0116] PerConfig (persistent storage configuration): responsible for parsing the configuration data in the configuration file into memory for use by other units.

[0117] In the PER component, the adaptation layer plays a vital role. It serves as a link between the upper and lower parts, providing functional interfaces for external interfaces and internal support, and performing necessary encapsulation for external dependencies. The adaptation layer mainly consists of two parts: FileManage and CryptoManage.

[0118] FileManage: FileManage is used to provide general file operations for the upper layer. FileManage will receive external keywords. Figure 8As shown, FileManage consists of three parts: FileAction, FileBase (file base class), and FileXXX (XXX file subclass). FileBase defines the interface required for file storage, and implements the unified call of FileAction for all forms of file storage. There is a mapping table in FileAction, which associates keywords with the objects you really want to use. By passing in different keywords, you can create the desired object pointer and then call the method to implement the function. FileXXX inherits FileBase to encapsulate and implement various file storage; the FileAction class is mainly provided for external use to encapsulate various interfaces required by the external. At the same time, there is a mapping table inside for mapping external keywords and file storage methods. When different keywords are passed in, different FileXXX is initialized to call different file storage implementations. If a certain storage method is fixed, it can also be implemented through macro control and modification of compilation scripts.

[0119] For example, taking the data storage scenario as an example, the external keyword is the storage keyword information. The FileManage in the adaptation layer consists of three parts: the file management class FileAction, the file base class FileBase, and the file subclass FileXXX. Figure 8 As shown, the interfaces required for file storage are defined in FileBase, and FileAction is used to uniformly call all forms of file storage. There is a preset storage mapping table in FileAction, which associates the storage keyword information with the file subclass object that is actually desired to be used. By passing in different storage keyword information, the corresponding constructor pointer for creating the file subclass object is obtained, and then the method in the file subclass object, i.e. the specific storage function, is called to implement the storage function. FileXXX inherits FileBase to encapsulate and implement various file storages; the FileAction class is mainly provided for external use and encapsulates various interfaces required by the external world. At the same time, there is a preset storage mapping table inside for mapping external keywords and file storage methods. When different keywords are passed in, different FileXXX are initialized to call different file storage implementations. If a certain storage method needs to be fixed, it can also be implemented through macro control and modification of the compilation script. Please refer to Fig. 9As shown, when the PER module receives a data storage request for vehicle data initiated by the vehicle application software, it first initiates the initialization of FileAction in the adaptation layer in the PER module. After the PER module learns that the initialization of FileAction is completed, it calls the function function to FileAction to implement the next process, that is, FileAction initializes the corresponding Filexxx according to the external keyword table lookup, that is, according to the storage keyword information, it searches in the preset storage mapping table to obtain the constructor pointer matching the storage keyword information, and then calls the constructor in FileAction pointed to by the constructor pointer, and instantiates the subclass through the constructor to obtain the corresponding Filexxx object, and then initiates the initialization of the Filexxx object, and associates the base class pointer with the Filexxx object, and then calls the base class through the base class pointer to implement the interface function, that is, calls the specific storage function contained in the Filexxx object through the base class pointer, and loads the target storage resource in the resource layer into the operating system through the specific storage function, and executes the corresponding resource through the operating system to realize the data storage of the vehicle data, and finally obtains the result of the data storage.

[0120] The implementation of FileManage adopts object-oriented design ideas, abstracts file storage into FileBase, and defines various file operations as pure virtual functions such as readFile (read files), writeFile (write files), deleteFile (delete files), etc. For each file storage method, a subclass of FileBase (FileXXX) is implemented. In the subclass, the pure virtual functions in FileBase must be rewritten using their own file storage methods (such as secure space storage, online storage, local storage, etc.). This implementation adopts the factory mode, strategy mode, and dependency injection mode. It greatly improves code reuse and greatly reduces the difficulty of expansion. Each time a new addition is made, only one subclass needs to be added to maintain the mapping relationship. Factory Method Mode (FactoryMethod): Through the create (create) method in the FileAction class, the corresponding FileBase subclass object is created according to the type parameter passed in. In this way, the caller can dynamically create objects according to the type parameter without knowing the specific implementation details. Strategy Mode (Strategy): By defining an abstract base class FileBase and letting different subclasses implement specific file operation strategies, different strategies can be selected as needed at runtime. This design pattern allows the algorithm to be switched and extended freely, improving the flexibility and maintainability of the code. Dependency Injection: In the FileAction class, a mapping table creators is used to store the constructor pointers of different types of FileBase subclasses. By passing the constructor pointer as a parameter to FileAction, dependency injection of different subclasses is implemented. This can reduce the coupling between classes and improve the testability and scalability of the code.

[0121] CryptoManage: This module mainly consists of the management class CryptoAction, the base class CryptoBase (encryption base class), and multiple extension classes CryptoXXX (XXX encryption subclasses). CryptoBase defines a unified encryption and decryption interface; the CryptoXXX extension class inherits the base class and implements the encapsulation of each dependent encryption and decryption library. CryptoAction is used to manage each extension class. The implementation of each encryption and decryption library can be flexibly selected according to user needs. If a certain storage method is fixed, it can also be implemented through macro control and modification of compilation scripts.

[0122] For example, CryptoManage is used to provide the upper layer with routine file operations. CryptoManage receives external keywords, namely encryption keyword information. In the adaptation layer, CryptoManage consists of three parts, namely: encryption management class CryptoAction, encryption base class CryptoBase and encryption subclass CryptoXXX, such as Fig.10 As shown, the unified interfaces required for encryption and decryption are defined in CryptoBase, and CryptoAction is used to call all forms of encryption and decryption in a unified manner. There is a preset encryption mapping table in CryptoAction, which associates the encryption keyword information with the encryption subclass object that is actually desired to be used. By passing in different encryption keyword information, the corresponding constructor pointer for creating the encryption subclass object is obtained, and then the method in the encryption subclass object, i.e. the specific encryption function, is called to implement the encryption function. CryptoXXX inherits CryptoBase to encapsulate and implement various encryption functions; the CryptoAction class is mainly provided for external use and encapsulates various interfaces required by the external world. At the same time, there is a preset encryption mapping table inside for mapping external keywords and encryption methods. When different encryption keywords are passed in, different CryptoXXX are initialized to call different encryption implementations. If you need to use a fixed encryption method, you can also implement it through macro control and modifying the compilation script. Please refer to Fig.11 As shown, when the PER component (module) receives a data storage request for vehicle data initiated by the vehicle application software, if encryption is required, the CryptoAction in the adaptation layer in the PER component is first initialized. After the PER component learns that the CryptoAction initialization is completed, it calls the function function to CryptoAction to implement the next process, that is, CryptoAction looks up the table according to the key information and initializes the corresponding CryptoXXX, that is, it searches the preset encryption mapping table according to the encryption keyword information to obtain the constructor pointer matching the encryption keyword information, and then calls the constructor in the CryptoAction pointed to by the constructor pointer, and instantiates the subclass through the constructor to obtain the corresponding CryptoXXX object, and then initiates the initialization of the CryptoXXX object, and associates the base class pointer with the CryptoXXX object, and then calls the interface implementation function implemented by the base class through the base class pointer, that is, calls the specific encryption function contained in the CryptoXXX object through the base class pointer, and loads the target encryption resource in the resource layer into the operating system through the specific encryption function, and executes the corresponding resource through the operating system to implement data encryption of the vehicle data, and finally obtains the data encryption result.

[0123] External support includes several dynamic libraries:

[0124] libara.crypto.so (cryptographic algorithm library): This library is the library of the Cropto (encryption) component. The AutosarAPCrypto (encryption component in the automotive open system architecture adaptive platform) encryption component provides a wealth of encryption resources (functions) to provide the necessary security for automotive applications. These functions include random number generation, key derivation, hashing, message authentication code (MAC), symmetric encryption, asymmetric encryption, etc., which can meet different levels and types of encryption requirements. Through these diverse encryption algorithms and mechanisms, the security and integrity of vehicle data can be effectively protected.

[0125] Encryption resources also include: AutosarAP Crypto encryption components not only support basic encryption and decryption operations, but also involve key management and certificate processing. Key management includes key generation, import and export, and storage, while X509 certificate management covers operations such as certificate parsing, verification, trusted storage and retrieval. These functions ensure that when encryption technology is used in automotive systems, the full life cycle management of keys and certificates is effectively and securely controlled. In general, the AutosarAP Crypto encryption component provides a comprehensive encryption solution for automotive software systems, from basic encryption and decryption functions to complex key and certificate management, all of which can be implemented through standardized interfaces. This not only improves the security of vehicle communications, but also provides guarantees for the stable operation and reliability of automotive systems.

[0126] Storage resources include libTee.so (Secure Space Repository): Secure Space Repository. TEE secure storage is a hardware-based security mechanism for protecting the confidentiality and integrity of sensitive data. Trusted Execution Environment (TEE) is an isolated area on the CPU of a mobile device designed to provide a more secure space for the execution of data and code. In TEE, secure storage is usually implemented in two ways: one is to rely on the common world (REE) file system, and the other is to utilize the replay protection memory block (RPMB) partition of the eMMC (embedded multimedia card) device. Both methods provide protection against rollback attacks to varying degrees and ensure the security and atomicity of data storage. Secure storage in TEE involves multiple components, including key manager, hash tree, and hardware unique key (HUK). The key manager is responsible for managing the keys for encrypting and decrypting data, while the hash tree is used to handle data encryption and decryption. HUK is a key element for deriving other keys. It is generated when the device starts and is only stored in secure memory. Together, these components form a multi-layered security architecture to ensure that sensitive data stored in TEE is not accessible to unauthorized access.

[0127] Storage resources also include IO (input and output): standard I / O functions. C++ provides a wealth of standard I / O functions and low-level I / O functions, making file reading and writing simple and flexible. Mastering these file operation methods is a basic skill for any C++ programmer, whether processing text files or binary files, and can effectively perform persistent storage and access to data.

[0128] Encryption resources also include OPENSSL (Developed Secure Sockets Layer Protocol): OpenSSL is an open source encryption toolkit that provides a variety of encryption algorithms, such as AES, DES, RSA, etc. It supports multiple operating systems and platforms, including Windows, Linux, macOS, etc.

[0129] The PER module in the above embodiment adopts a four-layer structure to implement the autosarper component. The adaptation layer unifies the files and encryption and decryption interfaces for the upper layer, making the upper layer call simpler. This implementation greatly improves the scalability of the storage method and encryption and decryption of the PER component, reduces the difficulty of adaptation, and reduces the testing cost. When expanding, the code expansion only needs to adapt to the unified interface and add a mapping relationship. After the implementation of this technical solution, it can provide a flexible choice of multiple storage methods and encryption and decryption algorithms.

[0130] The PER component in the prior art only supports local storage of files, which has great limitations and a single usage scenario. The prior art only supports the encryption and decryption algorithms in the autosarAP crypto component, the algorithm source is single, and the crypto component is very large, which is not conducive to the separate use of the PER component. Through the adaptation layer added in the above embodiment, the storage and encryption and decryption methods can be easily expanded, replaced, and cut. It provides greater possibilities for the flexible use of PER. For example, in terms of storage, online storage, secure space storage (TEE), etc. can be easily expanded. For example, in terms of encryption and decryption, encryption and decryption libraries that meet functional safety requirements, as well as some lightweight encryption and decryption libraries, can be expanded. When in use, you can use any single encryption, decryption, and storage method, or you can configure and use multiple technologies according to actual requirements.

[0131] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0132] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

[0133] In some exemplary embodiments, Fig.12 As shown, a data processing device 900 is provided, including: a keyword acquisition module and a processing resource loading module, wherein:

[0134] A keyword acquisition module, used for acquiring processing keyword information carried in the data processing request when receiving the data processing request;

[0135] The processing resource loading module is used to load the corresponding target processing resource in the resource layer according to a pre-stored first mapping relationship; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

[0136] In one embodiment, a data processing device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0139] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0141] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A PER module, characterized in that: The PER module includes an interface layer, an adaptation layer and a resource layer, wherein: The resource layer includes a variety of processing resources; The interface layer is used to, when receiving a data processing request, obtain processing keyword information carried in the data processing request and transmit the processing keyword information to the adaptation layer; The adaptation layer is used to load the corresponding target processing resources in the resource layer according to a pre-stored first mapping relationship when receiving the processing keyword information; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

2. The PER module according to claim 1, characterized in that The first mapping relationship includes a mapping relationship between the processing keyword information and a constructor pointer for constructing a target processing subclass object; The adaptation layer is also used to obtain a constructor pointer that matches the processing keyword information and is used to construct a target processing subclass object based on the first mapping relationship, call the constructor in the processing base class pointed to by the constructor pointer, instantiate the subclass through the constructor to obtain the target processing subclass object, obtain a base class pointer for referencing the target processing subclass object, use the base class pointer to call a specific processing function contained in the target processing subclass object, determine the corresponding target processing resources in the resource layer according to the specific processing function, and load the corresponding target processing resources in the resource layer.

3. The PER module according to claim 2, characterized in that The adaptation layer is further used to obtain an initial base class pointer in the processing base class, associate the target processing subclass object with the initial base class pointer, and use the associated initial base class pointer as a base class pointer for referencing the target processing subclass object.

4. The PER module according to claim 2, characterized in that The adaptation layer is further used to respond to a new request for a processing method, add a subclass corresponding to the processing method through the processing base class, obtain processing keyword information corresponding to the processing method from the new request, map the processing keyword information with a constructor pointer corresponding to the subclass corresponding to the processing method, and store the mapping relationship; The resource layer is also used to store processing resources corresponding to the processing method.

5. The PER module according to claim 1, characterized in that The processing resources include encryption resources; The interface layer is further used to, when receiving a data processing request, obtain the encrypted keyword information carried in the data processing request and transmit the encrypted keyword information to the adaptation layer; The adaptation layer is also used to load the corresponding target encrypted resource in the resource layer according to a pre-stored second mapping relationship when receiving the encrypted keyword information; the second mapping relationship is used to characterize the correspondence between different encrypted keyword information and different encrypted resources in the resource layer.

6. The PER module according to claim 5, characterized in that The second mapping relationship includes a mapping relationship between the encryption keyword information and a constructor pointer used to construct a target encryption subclass object; The adaptation layer is also used to obtain a constructor pointer for constructing a target encryption subclass object that matches the encryption keyword information according to the second mapping relationship, call the constructor in the encryption base class pointed to by the constructor pointer, instantiate the subclass through the constructor to obtain the target encryption subclass object, obtain a base class pointer for referencing the target encryption subclass object, use the base class pointer to call a specific encryption function contained in the target encryption subclass object, determine the corresponding target encryption resource in the resource layer according to the specific encryption function, and load the corresponding target encryption resource in the resource layer.

7. The PER module according to claim 6, characterized in that The adaptation layer is further used to obtain an initial base class pointer in the encryption base class, associate the target encryption subclass object with the initial base class pointer, and use the associated initial base class pointer as a base class pointer for referencing the target encryption subclass object.

8. The PER module according to claim 6, characterized in that The adaptation layer is further used to respond to a new request for an encryption method, add a subclass corresponding to the encryption method through the encryption base class, and obtain encryption keyword information corresponding to the encryption method from the new request; map the encryption keyword information to a constructor pointer corresponding to the subclass corresponding to the encryption method, and store the mapping relationship; The resource layer is also used to store encryption resources corresponding to the encryption method.

9. A data processing method, characterized in that: The method comprises: When receiving a data processing request, obtaining processing keyword information carried in the data processing request; The corresponding target processing resource in the resource layer is loaded according to a pre-stored first mapping relationship; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

10. A data processing device, characterized in that: The device comprises: A keyword acquisition module, used for acquiring processing keyword information carried in the data processing request when receiving the data processing request; The processing resource loading module is used to load the corresponding target processing resource in the resource layer according to a pre-stored first mapping relationship; the first mapping relationship is used to characterize the correspondence between different processing keyword information and different processing resources in the resource layer.

Citation Information

Cited By

  • Method and device for determining physical property parameters of nuclear reactor melt

    CN121393622A