Data access method, data blackboard system, medium, device and program product
By implementing access permission verification, reference count management and storage space release mechanisms in the data access method, the problems of uneven allocation of storage space resources and memory leakage in multi-threaded concurrency control are solved, and efficient resource management and system stability are achieved.
Patent Information
- Application Number
- CN202411780524.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art has problems of uneven allocation of storage space resources and memory leaks in data access and multi-threaded concurrency control, resulting in waste of resources and reduced system stability.
By implementing access permission verification, reference count management and storage space release mechanisms in the data access method, it is ensured that only authorized algorithm modules can access the data and release storage space in time when the data is no longer in use.
Effectively manage storage resources, reduce memory leaks, improve system resource utilization efficiency and stability, and ensure data consistency and security.
Smart Images

Figure CN119718641A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data access and multi-thread concurrent control, and in particular to a data access method, a data blackboard system, a medium, a device and a program product. Background Art
[0002] As computing systems continue to increase their demands for real-time data processing and multi-task concurrent processing, data access is very important in data sharing and resource management between algorithm modules. In related technologies, multi-threaded concurrent control and data access management often face problems such as uneven allocation of storage space resources and memory leaks. Most of the related data access methods use simple data read and write operations, which easily lead to waste of storage resources and memory leaks.
[0003] Based on this, the present application provides a data access method, a data blackboard system, a medium, a device and a program product to improve the relevant technology. Summary of the invention
[0004] The purpose of this application is to provide a data access method, a data blackboard system, a medium, a device and a program product to reasonably allocate storage resources and reduce memory leaks.
[0005] The purpose of this application is achieved by the following technical solutions:
[0006] In a first aspect, the present application provides a data access method, the method comprising: after receiving a data access request from an algorithm module, performing an access permission check on the algorithm module; if the algorithm module passes the access permission check, obtaining a reference to target data corresponding to the data access request; incrementing a reference count of the target data; and if the reference count of the target data is not greater than a target value, releasing the storage space occupied by the target data.
[0007] In some embodiments, the access permission check on the algorithm module includes: determining a target storage area where the target data corresponding to the data access request is located; the target storage area is a read-only data area or a read-write data area; if the algorithm module has access permission to the target storage area, determining that the algorithm module has passed the access permission check; or, if the algorithm module does not have access permission to the target storage area, determining that the algorithm module has not passed the access permission check.
[0008] In some embodiments, the data access request includes a target template type and a target tag, and obtaining a reference to the target data corresponding to the data access request includes: indexing through the target template type and the target tag to obtain a reference to the target data.
[0009] In some embodiments, obtaining a reference to target data corresponding to the data access request includes: if the target data exists, obtaining a reference to the target data; the method also includes: if the target data does not exist, performing a write permission check on the algorithm module; if the algorithm module passes the write permission check, creating creation data corresponding to the data access request.
[0010] In some embodiments, the method further comprises: discretely recording the creation data.
[0011] In some embodiments, the discretely recording the creation data includes: performing hashing processing according to a creation template type and a creation tag of the creation data to obtain a unique identifier of the creation data.
[0012] In some embodiments, the method further includes: if the algorithm module fails to pass the write permission check, determining that the algorithm module data access has failed.
[0013] In some embodiments, the method further includes: after the algorithm module releases the reference to the target data, decrementing a reference count of the target data.
[0014] In some embodiments, the target value is 0.
[0015] In the second aspect, the present application provides a data blackboard system, which includes: a data operation interface for receiving data access requests from an algorithm module; a data authentication module for performing access permission verification on the algorithm module after receiving the data access request; a data index module for obtaining a reference to target data corresponding to the data access request if the algorithm module passes the access permission verification; a reference management module for adding one to the reference count of the target data; and releasing the storage space occupied by the target data if the reference count of the target data is not greater than the target value.
[0016] In some embodiments, the data blackboard system further includes: a read-only data area for storing data that does not allow dynamic read and write operations; and a read-write data area for storing data that allows dynamic read and write operations.
[0017] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements any of the above methods when executed by a processor.
[0018] In a fourth aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any one of the above methods when executing the computer program.
[0019] In a fifth aspect, the present application provides a computer program product, wherein the computer program product comprises a computer program, and the computer program implements any one of the above methods when executed by a processor.
[0020] The present application provides a data access method, a data blackboard system, a medium, a device and a program product. First, when a data access request from an algorithm module is received, the data access request is checked for access rights to ensure that only an authorized algorithm module can access the data. If the algorithm module passes the access rights check, a reference to the target data matching the data access request will be returned, rather than a copy of the data, thereby reducing the redundant data copy process. Subsequently, the reference count of the target data is added by one, and the reference count increases whenever the algorithm module references the data. Finally, when the reference count of the data is less than or equal to the set target value, the storage space occupied by it is automatically released. This mechanism ensures that the data can effectively manage storage resources, reduce memory leaks and ensure data consistency during the access process of multiple modules. The above data access method can significantly improve the resource utilization efficiency of the system through access rights check, reference counting and storage space release mechanism. First, the access rights check ensures the security of the data and restricts unauthorized access. Secondly, the reference counting mechanism ensures that the storage space is released in time when the data is no longer used (or rarely used), thereby reducing memory leaks and improving the stability of the system. Finally, through precise storage management, the storage overhead of redundant data is reduced and system performance is optimized. This method is efficient, reliable, and has low resource consumption. It is particularly suitable for complex application scenarios that require multi-threaded concurrency and real-time data processing, especially for high-frequency data interaction scenarios such as robots and autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present application is further described below in conjunction with the accompanying drawings and specific implementation methods.
[0022] Figure 1 It is a flowchart of a data access method provided in an embodiment of the present application.
[0023] Figure 2 It is a data interaction relationship diagram between a multi-algorithm module and a data blackboard system provided in an embodiment of the present application.
[0024] Figure 3 It is a data access flow diagram provided in an embodiment of the present application.
[0025] Figure 4 It is a structural diagram of a data blackboard system provided in an embodiment of the present application.
[0026] Figure 5 It is a structural block diagram of a robot provided in an embodiment of the present application.
[0027] Figure 6 It is a structural block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in the implementation mode of this application. Obviously, the described implementation mode is only a part of the implementation mode of this application, not all the implementation modes. Based on the implementation mode in this application, all other implementation modes obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0029] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0030] With the development of intelligent robots and autonomous driving technologies, there are more and more algorithm modules in the system. The system usually needs to process one or more algorithm modules in the same process. These modules need to share data efficiently and securely and interact with data at a high frequency. In this case, how to ensure the thread safety of data access, how to efficiently manage the data flow between modules, and how to effectively control the permissions of data access are major challenges in current technology.
[0031] The current technical solutions have the following defects in data sharing and multi-threaded concurrent processing. The relevant data sharing methods usually rely on lock mechanisms to ensure thread safety, which may lead to performance bottlenecks, deadlocks, starvation and other problems. Especially in high-frequency interaction scenarios, lock contention will significantly reduce the response speed of the system. The relevant solutions often require developers to pre-define the data structure for each module, resulting in reduced scalability and flexibility of the system. When the data structure needs to be modified, it is often necessary to recompile multiple modules, which increases the cost of development and maintenance. The management of the overall system becomes complicated and inflexible, and it is difficult to flexibly add, delete, and change data types. In the process of data interaction, the data used by different algorithms may be different. The lack of an effective permission control mechanism may lead to unauthorized data access, thereby increasing the risk of data leakage and tampering. Multiple algorithm modules may need to read and write data independently in their respective cycles, and the relevant solutions often cannot effectively coordinate this asynchronous access mode. Centralized data storage is usually stored according to the overall data structure when allocating and managing memory. Even if some data is not used, it will take up a lot of storage space, resulting in resource waste.
[0032] In order to solve the above problems, the present application provides a discrete data blackboard, which aims to realize safe and efficient data interaction between modules, support the use of multiple data types, and provide a convenient authentication mechanism. Through the discretized data storage architecture, the system can dynamically and on-demand allocate and access data without predefining all data structures. This data blackboard is particularly suitable for high-concurrency data access in a multi-threaded environment, and ensures the security and efficiency of data access. The discrete data blackboard provided by the present application is suitable for the field of data access and multi-threaded concurrent control, and is particularly suitable for high-frequency data interaction scenarios such as robots and autonomous driving, and can realize thread-safe data interaction and authentication management between multiple algorithm modules.
[0033] The terms used in this application are explained below.
[0034] Template: In the C++ programming language, it refers to function templates and class templates, which is a parameterized type mechanism. Generics in Java and C# roughly correspond to C++ templates, but there are also some significant functional differences (C++ templates support template template parameters and template non-type parameters that are not explicitly corresponding to the two, but do not support Java's wildcards and C#'s generic type constraints). Templates are an indispensable part of C++ generic programming.
[0035] POD: Plain old data structure, abbreviated as POD, is a type of data structure defined in the C++ language standard. POD is suitable for systems that require clear underlying data operations. POD is usually used at the boundary of the system, which means that different systems can only interact in the form of underlying data, and the high-level logic of the system is not compatible with each other. For example, when the field value of an object is constructed from external data, the system has no way to perform semantic inspection and interpretation on the object. At this time, POD is used to store data.
[0036] The implementation methods of the present application are described in detail below.
[0037] See also Figures 1 to 3 , Figure 1 is a flow chart of a data access method provided in an embodiment of the present application. Figure 2 is a data interaction relationship diagram between a multi-algorithm module and a data blackboard system provided in an embodiment of the present application, Figure 3 It is a data access flow diagram provided by an embodiment of the present application. In the figure, module A, module B, and module N are algorithm modules, and the data blackboard is also called a data blackboard system.
[0038] The embodiment of the present application provides a data access method, which includes steps S101 to S104.
[0039] Step S101: after receiving a data access request from an algorithm module, performing access permission verification on the algorithm module.
[0040] Step S102: when the algorithm module passes the access permission check, obtaining a reference to the target data corresponding to the data access request.
[0041] Step S103: Increment the reference count of the target data.
[0042] Step S104: when the reference count of the target data is not greater than the target value, releasing the storage space occupied by the target data.
[0043] In some embodiments, the method may further include: if the algorithm module fails to pass the access permission check, determining that the algorithm module data access has failed.
[0044] See also Figure 4 , Figure 4 It is a structural diagram of a data blackboard system provided in an embodiment of the present application.
[0045] In some embodiments, the method may be performed on a data blackboard system. Figure 4As shown, the data blackboard system can include, for example, a data operation interface, a data authentication module, a data index module, a reference management module, a read-only data area, and a read-write data area. As an example, initialization can be performed when the system is started, and a read-only data area and a read-write data area are divided from the data blackboard system. The read-only data area is used to store constants or configuration information loaded during initialization, and the read-write data area stores data that need to be dynamically updated.
[0046] In some embodiments, the access permission check for the algorithm module may include: determining a target storage area where the target data corresponding to the data access request is located; the target storage area is a read-only data area or a read-write data area; if the algorithm module has access permission to the target storage area, determining that the algorithm module has passed the access permission check; or, if the algorithm module does not have access permission to the target storage area, determining that the algorithm module has not passed the access permission check.
[0047] In the above embodiment, the algorithm module that sends the data access request is subjected to permission verification. As an example, before reading the data, the data authentication module checks whether the algorithm module has permission (i.e., access permission) to access the storage area (i.e., the target storage area) where the data is located. Only when the access permission verification is passed, the subsequent read operation is allowed.
[0048] In some embodiments, the data access request may include a target template type and a target tag, and obtaining a reference to the target data corresponding to the data access request may include: indexing by the target template type and the target tag to obtain a reference to the target data.
[0049] In the above embodiment, data index is defined by template type and label, that is, template type and label are used to index and manage data. Each data (or data item) has a unique combination of template type and label to ensure the uniqueness and discrete storage of data. For example, when algorithm module A needs to read vehicle status data, the data access interface (i.e., data operation interface) is called to obtain the reference of data through the template type and label request of vehicle status data.
[0050] In some embodiments, obtaining a reference to the target data corresponding to the data access request may include: obtaining a reference to the target data if the target data exists. The method may also include: performing a write permission check on the algorithm module if the target data does not exist; and creating creation data corresponding to the data access request if the algorithm module passes the write permission check.
[0051] In some embodiments, the method may further include: discretely recording the creation data.
[0052] In some embodiments, the discrete recording of the creation data may include: performing hashing according to the creation template type and the creation tag of the creation data to obtain a unique identifier of the creation data. As an example, the data blackboard system may discretely record the created data (i.e., creation data), wherein hashing is performed according to the template type (i.e., creation template type) and the tag (i.e., creation tag) of the creation data, so that the corresponding data can be found next time according to the template type and tag of the data, thereby accessing the same data area.
[0053] In some embodiments, the method may further include: if the algorithm module fails to pass the write permission check, determining that the algorithm module data access has failed.
[0054] In the above embodiment, it can be determined whether the target data already exists, and different treatments can be performed. As an example, in the case where the target data does not exist, the data blackboard system verifies whether the algorithm module A that sends the data access request has writable permission (also known as write permission); if the algorithm module A does not have writable permission, the data blackboard system returns failure, and the algorithm module A cannot access the data; if the algorithm module A has writable permission, the data blackboard system creates data according to the template type and label (in order to distinguish it from the "target data", it is recorded as creation data), and initializes the creation data, thereby obtaining a reference to the creation data, and returning the reference to the creation data to the algorithm module A. In the case where the target data already exists, the reference to the target data is directly returned to the algorithm module A. Algorithm module A reads the data according to the reference. For these two cases where the reference of the data can be returned, it can be determined that the data is read successfully.
[0055] In some embodiments, the method may further include: after the algorithm module releases the reference to the target data, decrementing a reference count of the target data by one.
[0056] The above embodiment does not limit the target value, and in some embodiments, the target value may be 0. Alternatively, the target value may also be an integer greater than 0.
[0057] As an example, each data corresponds to a reference counting unit (or, reference counting submodule), which is used to track how many algorithm modules are using the data. When the reference count is zero, the system can automatically release the data resources to prevent memory leaks.
[0058] The embodiment of the present application also provides a data blackboard system, which includes a data operation interface, a data authentication module, a data index module, and a reference management module. The data operation interface is used to receive a data access request from an algorithm module. The data authentication module is used to perform an access permission check on the algorithm module after receiving the data access request. The data index module is used to obtain a reference to the target data corresponding to the data access request if the algorithm module passes the access permission check. The reference management module is used to add one to the reference count of the target data; if the reference count of the target data is not greater than the target value, the storage space occupied by the target data is released.
[0059] In some embodiments, the data blackboard system may further include a read-only data area and a read-write data area. The read-only data area is used to store data that does not allow dynamic read and write operations. The read-write data area is used to store data that allows dynamic read and write operations.
[0060] like Figure 4 As shown, Figure 4 The overall architecture of the data blackboard system is shown. The read-only data area ensures that key data is not tampered with after initialization, maintaining data integrity. The read-write data area is used to store data that allows dynamic read and write operations, which can be modified by the user at runtime. The data index module can index by data type (for example, template type) and label to quickly locate the target data. The data reference management module (i.e., reference management module) provides thread-safe data references to ensure secure access in a multi-threaded environment. The data authentication module controls the algorithm module's access to data through permission management to ensure system security. The data operation interface can provide a convenient interface for = assignment and () reading to simplify data operations.
[0061] The above embodiment provides a data blackboard system (e.g., a discrete data blackboard), which can safely read and write data between multiple algorithm modules in the same process, and index different data areas through template types and tags to achieve flexible access and authentication control of different types of data. The data blackboard can be widely used in scenarios that require frequent data interaction, such as robots and autonomous driving.
[0062] The data blackboard system uses a lock-free mechanism to ensure that multiple algorithm modules can access data safely in a multi-threaded environment, improving the performance bottleneck and deadlock problems caused by related lock mechanisms. Atomic operations and CAS (Compare-And-Swap) mechanisms are used to ensure that multiple threads can safely operate on data at the same time without explicit locking, thereby improving problems such as deadlock and lock contention. The lock-free design can reduce context switching and improve the efficiency of concurrent execution. POD type data can be directly instantiated into atomically operable data types.
[0063] The data area of the above data blackboard system is divided into a read-only data area and a read-write data area. The read-only data area completes data construction during initialization to ensure the integrity and consistency of key data; the read-write data area allows dynamic read and write operations.
[0064] Each data unit in the above data blackboard system is independent and uncoupled from each other. This allows the system to expand seamlessly without affecting data operations in other parts when expanding new functions or modifying existing data structures. Each data unit can be a simple POD data (such as integers, floating point numbers, etc.) or a complex data structure. These data do not need to be stored in the same memory area, but are scattered in different locations in the memory. The advantage of this is that data management is more flexible, and data can be created, initialized, and destroyed on demand without affecting other data. Since the data is stored discretely, there is no physical continuity between the data. This design allows different data units to grow or be destroyed independently according to demand, reducing memory fragmentation and reducing the waste caused by allocating a large amount of continuous memory at one time. This discrete design makes the data blackboard particularly suitable for scenarios where data structures need to be frequently modified or new functions need to be added, greatly improving the scalability and flexibility of the system.
[0065] The above data blackboard system allows data to be initialized dynamically on demand, reducing the pre-allocation of a large amount of unused memory resources. When the algorithm module needs to access specific data, the system dynamically allocates and initializes data storage based on the template type and label. Unaccessed data does not consume system resources, thereby improving memory utilization.
[0066] The data in the above data blackboard system is indexed by template types and labels, and users can uniquely identify the data through template types and labels. The indexing mechanism involves template types and labels. Among them, the template type means that each type of data type (such as int, float or a custom structure) has a templated definition. Different data types can be stored and accessed independently in the blackboard. Each data type can be assigned multiple labels according to its purpose. For example, the pose data of the same data type can be identified by different labels for the calculation of different algorithm modules. Through the combination of template types and labels, the data blackboard system can efficiently index and manage discrete data storage space.
[0067] In the above embodiment, each time the data is obtained from the data blackboard system, it is returned through a thread-safe reference. The reference counting mechanism tracks the usage of each data (e.g., data unit) to ensure that the data will not be released prematurely when used by multiple algorithm modules. Mechanisms such as smart pointers can automatically manage the life cycle of data and improve problems such as memory leaks or dangling pointers.
[0068] Each algorithm module is subject to permission verification by the data authentication module when accessing data (for example, by sending a data access request), ensuring that only authorized algorithm modules can access or modify specific data. This mechanism effectively prevents data from being accidentally modified or accessed without authorization, ensuring data security and integrity. The authentication mechanism can be dynamically adjusted according to system requirements to flexibly control the access rights of each algorithm module to data. Data security is particularly important in sensitive applications such as autonomous driving and robotics.
[0069] In order to simplify the operation of developers, the data blackboard system provides a simple data operation interface. '=' assignment symbol: Overload the '=' operator to allow direct assignment of data in the data blackboard, simplifying the write operation. '()' value symbol: Overload the '()' operator to allow direct acquisition of data references, simplifying the read operation. Such an interface design reduces the difficulty of use for developers, allowing them to focus on the development of business logic without having to worry about the underlying data management details.
[0070] Through the above design, the data blackboard system (e.g., discrete data blackboard) of the present invention can achieve efficient memory utilization, specifically, dynamically allocate and manage data storage on demand, and reduce memory resource waste. The data blackboard system can achieve flexible data storage and expansion, specifically, data discrete storage, support independent expansion and modification, and adapt to different algorithm requirements. The data blackboard system can achieve thread-safe high-concurrency data access, specifically, the lock-free design ensures data access security in a multi-threaded environment and improves the concurrent performance of the system. The data blackboard system can achieve data access permission control, specifically, through the authentication mechanism, ensure that only authorized modules can access or modify specific data, and ensure the security and integrity of the data. The data blackboard system can achieve a simplified development interface, specifically, by overloading assignment and value operators, simplifying data operations and improving development efficiency. The data blackboard system can achieve a discrete data storage architecture, specifically, a "data blackboard" design that stores data in a discrete manner is proposed, and data is indexed by template types and tags, making data storage more flexible and highly scalable. Each data (e.g., data item) can be a complex data structure or a simple POD (Plain Old Data) type, and the data area can be divided into a read-only data area and a read-write data area. The data blackboard system can implement a lock-free multi-threaded safe data access mechanism. Specifically, it provides a data reading and writing method based on a lock-free mechanism, and implements safe and fast data reading and writing through overloaded () operators and = operators. Even in a multi-threaded concurrent environment, data consistency and security can be guaranteed.
[0071] The data blackboard system can implement a data authentication mechanism. Specifically, when each algorithm module accesses data, the system performs authentication control according to its permissions to ensure that only authorized modules can access the corresponding data area. The permissions of the algorithm module to the data area can be divided into "read-only" and "read-write", for example, to effectively prevent unauthorized modification operations. As an example, algorithm module A has "read-only" permissions to the read-write data area, so algorithm module A can only read data in the read-write data area, but cannot write data; algorithm module B has "read-write" permissions to the read-write data area, so algorithm module B can not only read data in the read-write data area, but also write data; algorithm module A and algorithm module B have "read-only" permissions to the read-only data area, so algorithm module A and algorithm module B can only read data in the read-only data area, but cannot write data.
[0072] The data blackboard system enables dynamic data creation and management. Specifically, it supports the dynamic creation of new data (e.g., data items) while the system is running, and automatically manages the life cycle of the data through reference counting. Data does not need to be pre-initialized at system startup, but can be generated on demand, thereby improving resource utilization efficiency.
[0073] The data blackboard system can implement the design of read-only data areas. Specifically, constant data is loaded into the read-only area when the system is initialized to ensure that these data cannot be modified during the system life cycle, preventing erroneous operations from damaging key constant data.
[0074] The data blackboard system can achieve the flexibility of the data operation interface. Specifically, through the unified interface design, data access and operation are simplified. The algorithm module only needs to focus on where to read data and where to write data, reducing the complex underlying data management operations. This improves development efficiency and facilitates the later maintenance and expansion of the system.
[0075] See also Figure 5 , Figure 5 It is a structural block diagram of a robot provided in an embodiment of the present application.
[0076] An embodiment of the present application also provides a robot, comprising a control module, and the control module is used to execute any one of the above methods.
[0077] In some embodiments, the robot is a humanoid robot (ie, a humanoid robot, a bipedal robot), a quadrupedal robot, or a wheeled robot.
[0078] In some embodiments, the robot may also include one or more of an odometer, an IMU (Inertial Measurement Unit), an image sensor, a laser sensor, an angle encoder, a torque sensor, and a PIR sensor (Passive Infrared Sensor).
[0079] In some embodiments, the image sensor may include a camera (or a camera module).
[0080] In some embodiments, the laser sensor may include a 2D laser sensor and / or a 3D laser sensor.
[0081] In some embodiments, the robot may be a multi-jointed robot.
[0082] It should be noted that although some embodiments of the present application take robots as examples, the present application can be applied to other automated equipment, such as AGVs, drones, unmanned vehicles (or, autonomous driving vehicles), etc., and the present application is not limited to this.
[0083] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.
[0084] An embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.
[0085] The computer program product may be a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the computer program product of the present application is not limited thereto, and the computer program product may be any combination of one or more computer readable media.
[0086] An embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the above methods when executing the computer program.
[0087] See also Figure 6 , Figure 6 It is a structural block diagram of a computer device provided in an embodiment of the present application.
[0088] The embodiments of the present application do not limit the computer device, which may be, for example, a local computer device, a cloud computer device, a distributed computer device, etc.
[0089] The computer device may include: a memory 110, a processor 120, and a communication interface 130. The memory 110, the processor 120, and the communication interface 130 are connected via an internal connection path.
[0090] The memory 110 is used to store computer programs. In some implementations, the computer programs may include codes for implementing the methods of the embodiments of the present application.
[0091] The processor 120 is used to execute the computer program stored in the memory 110 to control the communication interface 130 to receive input data and information and output data such as operation results. In some implementations, when the solution of the embodiment of the present application is implemented by software or firmware, the computer program for implementing the solution of the embodiment of the present application can be stored in the processor 120 and executed by the processor 120.
[0092] The memory 110 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory 110 described herein is intended to include, but is not limited to, any memory of these and other suitable types. As an example, the memory 110 includes a random access memory (RAM), a cache memory and a read-only memory (ROM). Among them, the memory 110 stores a computer program, and the computer program can be executed by the processor 120 so that the processor 120 implements the steps of any of the above methods.
[0093] The processor 120 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor 120 may be any conventional processor, etc.
[0094] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 120 or an instruction in the form of software. The method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor 120 for execution. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 110, and the processor 120 reads the information in the memory 110 and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0095] In some implementations, in addition to the hardware units described above, the computer device may also include software modules, where the software modules may be, for example, an operating system, a basic input output system (BIOS), application software, etc.
[0096] The operating system is used to manage the hardware and / or software resources of computer devices and is the core and cornerstone of computer devices. The operating system needs to handle basic tasks such as managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output devices, operating networks, and managing file systems. In order to facilitate user operations, most operating systems will provide an operating interface for users to interact with the system.
[0097] BIOS is used to run hardware initialization during the power-on boot phase and provide runtime services for the operating system and application programs. In some implementations, BIOS can also monitor and display processor temperature and execute functions such as adjusting temperature protection strategies.
[0098] Application software is also called application program, which can be understood as software written for a specific application purpose of the user. It is one of the main categories of computer software. For example, application software can be a program used to achieve power control, temperature management, etc.
[0099] It should be understood that the specific examples in this specification are only intended to help those skilled in the art to better understand the implementation methods of the present application, rather than to limit the scope of protection of the present application.
[0100] It is understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0101] It can be understood that the various implementation modes described in this specification can be implemented individually or in combination, and this application is not limited to this.
[0102] Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0103] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0104] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of each embodiment described above can refer to the corresponding process in other embodiments and will not be repeated here.
[0105] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0106] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the technical solution of the present application.
[0107] In addition, each functional unit in each embodiment of the present specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0108] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0109] The above are only specific implementations of this specification, but the protection scope of this application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of this application should be based on the protection scope of the claims.
Claims
1. A data access method, characterized in that: The method comprises: After receiving a data access request from an algorithm module, performing access permission verification on the algorithm module; When the algorithm module passes the access permission check, obtaining a reference to the target data corresponding to the data access request; Increasing the reference count of the target data by one; When the reference count of the target data is not greater than the target value, the storage space occupied by the target data is released.
2. The data access method according to claim 1, characterized in that: The performing access permission verification on the algorithm module includes: Determine a target storage area where target data corresponding to the data access request is located; the target storage area is a read-only data area or a read-write data area; If the algorithm module has access rights to the target storage area, the algorithm module is deemed to have passed the access rights check; or, if the algorithm module does not have access rights to the target storage area, the algorithm module is deemed to have failed the access rights check.
3. The data access method according to claim 1, characterized in that: The data access request includes a target template type and a target tag, and obtaining a reference to target data corresponding to the data access request includes: The target data is referenced by indexing through the target template type and the target tag.
4. The data access method according to claim 1, characterized in that: The obtaining a reference to target data corresponding to the data access request includes: If the target data exists, obtaining a reference to the target data; The method further comprises: If the target data does not exist, performing a write permission check on the algorithm module; When the algorithm module passes the write permission check, creation data corresponding to the data access request is created.
5. The data access method according to claim 4, characterized in that: The method further comprises: The creation data is discretely recorded.
6. The data access method according to claim 5, characterized in that: The discretely recording the creation data comprises: A hash process is performed according to the creation template type and the creation tag of the creation data to obtain a unique identifier of the creation data.
7. The data access method according to claim 4, characterized in that: The method further comprises: When the algorithm module fails to pass the write permission check, it is determined that the algorithm module data access fails.
8. The data access method according to claim 1, characterized in that: The method further comprises: After the algorithm module releases the reference to the target data, the reference count of the target data is reduced by one.
9. The data access method according to claim 1, characterized in that: The target value is 0.
10. A data blackboard system, characterized in that: The data blackboard system comprises: Data operation interface, used to receive data access requests from algorithm modules; A data authentication module, configured to perform access permission verification on the algorithm module after receiving the data access request; A data index module, used to obtain a reference to target data corresponding to the data access request when the algorithm module passes the access permission check; The reference management module is used to increase the reference count of the target data by one; if the reference count of the target data is not greater than the target value, release the storage space occupied by the target data.
11. The data blackboard system according to claim 10, characterized in that: The data blackboard system also includes: Read-only data area, used to store data that does not allow dynamic read and write operations; The read-write data area is used to store data that allows dynamic read and write operations.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
13. A computer device, characterized in that: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 9 when executing the computer program.
14. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.