A secure tuple space system that supports user-defined operations

By introducing role-based access control and custom operation mechanisms, the security and flexibility issues in the collaborative model are resolved, achieving secure user-defined operations and thread safety of the tuple space, thus adapting to complex collaborative tasks.

CN115618357BActive Publication Date: 2026-11-17NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211314952.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-11-17
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

Existing collaborative models lack access control policies during communication, which makes it impossible to guarantee the integrity, confidentiality, and availability of data, posing security risks. Furthermore, the basic operations of traditional tuple spaces cannot meet the needs of complex collaborative tasks.

Method used

By introducing role-based access control policies and user-defined operation mechanisms, and through the tuple space middleware module, access control module, custom operation module, and interface module, user-defined operations and permission control are realized, thereby improving system security and flexibility.

Benefits of technology

It improves the security of multi-user collaborative communication and the flexibility of the collaborative model, adapts to complex collaborative tasks, restricts unauthorized user intervention through role binding, and achieves thread-safe tuple space operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115618357B_ABST
    Figure CN115618357B_ABST
Patent Text Reader

Abstract

This invention discloses a secure tuple space system supporting user-defined operations, comprising a tuple space middleware module, a role-based access control module, a custom operation module, and an interface module. The tuple space middleware module is used for tuple organization and storage, as well as the execution of collaborative primitives. The access control module is used to implement role-based access control policies for node authentication before communication and for permission control of tuple space operations. The custom operation module is used for the registration and execution of user-defined tuple space operations. The interface module provides the application layer with an access interface to the tuple space collaborative system. This invention introduces a role-based access control policy and a user-defined operation mechanism, improving the flexibility of the collaborative model, expanding its basic functionality, and enhancing the security of multi-user collaborative communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of tuple space technology in virtual shared memory, and specifically relates to a secure tuple space system that supports user-defined operations. Background Technology

[0002] Most collaboration models and middleware used in distributed application development can be broadly categorized into direct communication models, shared data space models, and event-based models. In direct communication models, agents must interact directly, making it difficult to maintain the openness and dynamism of ubiquitous computing scenarios. In shared data space models, agents are no longer strictly coupled in their interactions because the tuple space mediates interactions and promotes decoupling. Furthermore, the tuple space can be effectively used as a repository of local context information. Event-based models further promote decoupling, with all interactions occurring asynchronously and typically anonymously, and possessing a stronger sense of context.

[0003] JavaSpace technology is a JINI service based on JINI technology, providing communication and storage for components related to Java software objects. JavaSpace provides Java objects with components for information exchange and space for storing information. It is a powerful and efficient programming model and tool for networked distributed computing, enabling distributed memory-sharing programming patterns.

[0004] The LIME (Linda In the Mobile Environment) cooperative model, proposed in 2006, is a mobile middleware that primarily addresses issues related to the physical mobility of hosts and the logical mobility of agents. Cooperative entities exchange information in a mobile environment using a transiently shared tuple space, thereby achieving data sharing among multiple agents. However, LIME does not provide access control policies and does not guarantee the security of the communication process.

[0005] The TOTA (Tuple On the Air) model relies on distributed tuples to represent application-specific context information. In TOTA middleware, all interactions between agents are conducted in a completely decoupled manner through tuple exchange, without any concept similar to a centralized shared tuple space. Instead, TOTA injects tuples into the network from any node, and after cloning itself, they can propagate and spread throughout the network according to tuple-specific propagation patterns.

[0006] The Linda in Space-Time model, designed for ubiquitous computing environments and incorporating research on spatial concurrency, proposes a novel cooperative model and language. This model enables location agents to interact by injecting a cooperative basis into so-called spatiotemporal activities, allowing them to flexibly engage in cooperative activities closely linked to their spatiotemporal and environmental contexts.

[0007] The aforementioned collaborative models propose targeted solutions for different collaborative scenarios. However, in many complex collaborative tasks, the basic operations of the traditional tuple space can no longer meet the actual needs. At the same time, due to the lack of security mechanisms such as access control policies, the existing collaborative models cannot guarantee the integrity, confidentiality, and availability of data during communication, which poses certain security risks. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a secure tuple space system that supports user-defined operations. This system introduces role-based access control policies and user-defined operation mechanisms, improves the flexibility of the collaborative model, expands the basic functions of the collaborative model, and enhances the security of multi-user collaborative communication.

[0009] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:

[0010] A secure tuple space system that supports user-defined operations includes a tuple space middleware module, a role-based access control module, a custom operation module, and an interface module.

[0011] Among them, the tuple space middleware module is used for the organization and storage of tuples and the execution of cooperative primitives;

[0012] The access control module is used for authentication of nodes before communication and permission control for tuple space operations;

[0013] The custom operation module is used for registering and executing user-defined tuple space operations;

[0014] The interface module is used to provide the application layer with an access interface to the tuple space cooperative system;

[0015] To optimize the above technical solution, the specific measures also include:

[0016] The method for implementing user-defined operations based on the tuple space middleware module, role-based access control module, custom operation module, and interface module is as follows:

[0017] The interface module transmits application layer operations to the role-based access control module. The access control module queries user role information, and after authentication, enters the tuple space middleware module to execute tuple space operations. The custom operation module extends the tuple space middleware module.

[0018] The aforementioned tuple space middleware module includes:

[0019] The tuple space management unit is used for storing communication tuples and implementing tuple space operations.

[0020] The event management unit provides a synchronization mechanism for message tuples. When a tuple is written to the tuple space, the execution of related code will be automatically triggered.

[0021] Tuple unit, used to implement the storage structure of tuple itself.

[0022] The event management unit described above packages tuples of a specific form and registers them with the tuple space. Once a matching tuple is written into the tuple space, the user can immediately react to the event and perform the corresponding operation.

[0023] In the tuple units described above, the local tuples are organized using fields, which are implemented by a field class. Specifically:

[0024] The formal description of the field is as follows:

[0025] Field = (T, V)

[0026] Where T represents the type of the field, and V represents the value of the field;

[0027] The formal description of a tuple is as follows:

[0028] Tuple = (Field, Field, ...)

[0029] Fields at a given position in a tuple can be read, modified, or removed.

[0030] The access control module described above adopts a role-based access control policy, assigning different roles to users and binding users, roles, and tuple space operations together. The specific binding method is as follows:

[0031] Let User set = <U1,U2,...,U n >A set of users with distinct identifiers; Role set = <R1,R2,...,R n > Represents different types of roles within the system; tuple space operation set Operation <Op1,Op2,...,Op n > represents operations on the tuple space;

[0032] For any elements U, R, and Op taken from the user set, role set, and tuple space operation set respectively, establish the following mapping relationship:

[0033] (1)UR = U × R is a many-to-many binary relation, which means that a user can have multiple roles and a role can be owned by multiple users;

[0034] (2) R-Op = R×Op is a many-to-many binary relation, which means that a role can have the permission to perform multiple tuple space operations, and a tuple space operation can also be used by multiple roles.

[0035] The aforementioned custom operation modules include:

[0036] A custom operation registration unit is used to register user-defined operations and implement their internal representation.

[0037] The type conversion unit is used to convert user-input string type variables into other specified type variables;

[0038] A custom operation execution unit is used to dynamically load user-written operation classes into memory and execute them.

[0039] In the aforementioned custom operation registration unit, the operation information is received by the user using the operation information data structure, and the operation information is written into the tuple space for storage in the form of tuples so that other users can view and call the corresponding methods.

[0040] The data storage structure for the aforementioned operation information includes the following information: the name of the operation program written by the user, the name of the operation defined by the user, the types of each parameter required for the custom operation, and the return value type of the program method.

[0041] In the aforementioned type conversion unit, the operation information tuple is read from the tuple space according to a specific tuple template, the types of each parameter in the operation method are read and the corresponding class objects are obtained, and the results are transmitted to the custom operation execution unit to perform the relevant operations.

[0042] The present invention has the following beneficial effects:

[0043] By employing a role-based access control strategy, the security issues in tuple space communication are resolved. Simultaneously, a custom operation mechanism is implemented, allowing users to define custom collaborative primitives to operate on the tuple space. Therefore, this invention achieves temporal and spatial decoupling of multi-user collaboration, improves the security of multi-user collaboration in collaborative scenarios through access control strategies, and enhances the flexibility of the coordination process by utilizing a custom operation mechanism.

[0044] 1. A role-based access control (RBAC) strategy is introduced to improve the security of the collaborative model. Instead of directly granting permissions to specific users, a set of roles is established between the user set and the permission set. Each role corresponds to a set of permissions. Once a user is assigned an appropriate role, that user possesses all the operational permissions for that role. By assigning different roles to users and binding those roles to tuple space operations, excessive interference by unauthorized users in the tuple space is limited, thus improving system security.

[0045] 2. A custom operation module has been introduced to expand the tuple space model. The custom operation module is responsible for storing user-defined operations and executing operation programs. The custom operation module enables users to customize specific tuple space operations according to different collaborative tasks, which greatly improves the flexibility of the collaborative middleware and thus adapts to more complex collaborative tasks and scenarios. Attached Figure Description

[0046] Figure 1 This is a structural diagram of the secure tuple space system supporting user-defined operations according to the present invention;

[0047] Figure 2 This is a schematic diagram of the role-based access control principle of the present invention;

[0048] Figure 3 This is a structural diagram of the custom operation module of the present invention. Detailed Implementation

[0049] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0050] like Figure 1 As shown, the present invention provides a secure tuple space system that supports user-defined operations, comprising the following four modules:

[0051] 1. Tuple Space Middleware Module: This module organizes and stores tuples and executes cooperative primitives; it also implements a tuple space to store communication tuples between multiple users.

[0052] 2. Role-based access control module, used to implement identity authentication before node communication and permission control for tuple space operations;

[0053] 3. A custom operation module is used to register and execute user-defined tuple space operations; this improves the flexibility of the tuple space when participating in collaborative tasks, enabling the tuple space model to cope with complex and changing collaborative tasks.

[0054] 4. Interface module, which provides the application layer with access control interface to the tuple space collaborative system, provides a unified user interface, and the application uses the tuple space primitive operating system;

[0055] The interface module, access control module, and tuple space module are hierarchical. The interface module transmits application layer operations to the access control module. The access control module queries user role information and, after authentication, enters the tuple space module to execute tuple space operations. The custom operation module extends the tuple space module and is at the same level as the tuple space module.

[0056] The tuple space middleware module mainly includes:

[0057] 1. Tuple Space Management Unit: Used for storing communication tuples and implementing tuple space operations;

[0058] 2. Event Management Unit: Used to provide a synchronization mechanism for message tuples. When a tuple is written to the tuple space, the execution of related code will be automatically triggered.

[0059] 3. Tuple unit: Used for implementing the storage structure of the tuple itself.

[0060] The method for organizing and storing local tuples in the tuple space middleware module is as follows: For the organization of local tuples, fields are used to construct the tuples. These fields are implemented by the Field class, which provides a minimal abstraction of typed tuple fields and methods for accessing field types. The formal description of the fields is as follows:

[0061] Field = (T, V)

[0062] Where T represents the type of the field and V represents the value of the field; the field in the tuple can be a specific value or a class type, which are implemented by addActual and addFormal respectively.

[0063] The formal description of a tuple is as follows:

[0064] Tuple = (Field, Field, ...)

[0065] Fields at a given position in a tuple can be read, modified, or removed. A new field can be appended to the end of the tuple and at any other position. Furthermore, the system synchronizes the storage structure of the tuple to ensure thread safety.

[0066] The event management unit wraps tuples of a specific form into reactions and registers them with the tuple space. Once a matching tuple is written to the tuple space, the user can immediately react to the event and perform the corresponding operation. Each tuple space in the system contains an event manager (Reactor) object, responsible for managing event registration and the execution of event procedures. Users create reactions by specifying the templates to be matched in the tuple space, which is formally described as follows:

[0067]

[0068] Here, the || operator represents multiple operations to be performed in a single atomic step, θ / μ represents binding the tuple θ to the variable μ, and introduces the auxiliary variable r. α The actual triggering condition (i.e., the execution of user action s) depends on r. α The content of this variable is as follows. This variable stores tuples that have already been responded to; only tuples that have not been recorded can trigger the event. In the formula, `react to` means to react to `match(TS, temp)`, that is, when a tuple matching the template `temp` appears in the tuple space `TS`, the user performs the operation `s`.

[0069] Users can register a reaction object with the tuple space using the system-extended addReaction operation. This object contains tuples or tuple templates of interest. Once another user writes a tuple matching the template into the tuple space using the out operation, the Reactor immediately executes the react() method in the ReactionListener event listener. The specific execution strategy of the react() method is defined by the user at the application layer.

[0070] The role-based access control module registers users and assigns permissions to users of the collaborative system, using the following method:

[0071] Users of the collaborative system must register their personal information within the system; otherwise, they will be unable to access its operations. The system employs a role-based access control policy. By assigning different roles to users and binding these roles to tuple space operations, it restricts unauthorized users from excessively interfering with the tuple space system, thereby enhancing the security of the collaborative system. A diagram of the role-based access control model is shown below. Figure 2 As shown. Where, the user set user = <U1,U2,...,U n >A set of roles (Role) for a group of users with distinct identifiers. <R1,R2,...,R n > Represents different types of roles within the system, and the set of operations. <Op1,Op2,...,Op n> represents operations on the tuple space.

[0072] For any elements U, R, and Op taken from the user set, role set, and tuple space operation set respectively, establish the following mapping relationship:

[0073] (1)UR = U×R, a many-to-many binary relationship, where a user can have multiple roles and a role can be owned by multiple users;

[0074] (2) R-Op = R×Op, a many-to-many binary relation, where one role can have the permissions for multiple operations, and one operation can be used by multiple roles;

[0075] In the tuple space system of this invention, all user, role, and operation information are stored in the tuple space in the form of tuples. All users undergo detection by a role-based access control module during operation, and a registration mechanism for users and roles is provided. All users who successfully join the system are assigned roles that match their characteristics. Now, assume that user U's role R1 has a set of operation permissions P1 = {rd, in}, meaning this user can only execute rd and in operations. Now, the user attempts to execute the out operation, as shown in the following equation:

[0076]

[0077] in Let P1 be the set of permissions that user U has in role R1. The role-based access control module RM will query the corresponding set of permissions based on the user's role. If there is no out operation in the set of permissions, the user's out operation will fail, and the original tuple space TS will remain unchanged.

[0078] The custom operation module implements user-defined operation functions, enabling the tuple space model to handle complex collaborative tasks. Its specific structure diagram is shown below. Figure 3 As shown. It includes the following three parts:

[0079] 1. A custom operation registration unit is used to register user-defined operations and implement their internal representation, as well as store information related to user-defined operations;

[0080] 2. Type conversion unit, used to convert user-input string type variables into other specified type variables;

[0081] 3. Custom operation execution unit, used to dynamically load user-written operation classes into memory and execute them.

[0082] The custom operation registration unit needs to register user-defined operations and implement their internal representation. The execution of the specific custom operation method is completed by the program specified by the user when registering the operation. This program is written by the user and must comply with the constraints of parameters and return values ​​preset by the system. Once a new tuple space operation is defined, it can be used by other users.

[0083] The data storage structure for operation information is shown below:

[0084]

[0085] When a user enters the above information to register, the types of all parameters required for the custom operation will be converted to String type. The custom operation registration unit uses the above data structure to receive the operation information entered by the user, and writes the above information into the tuple space for storage in the form of a tuple, so that other users can view and call the corresponding methods.

[0086] In addition, the system needs to obtain the class objects corresponding to each parameter type, represented as strings; otherwise, the methods corresponding to the custom operations cannot be executed. The type conversion unit reads the operation information tuple from the tuple space according to a specific tuple template, reads the types of each parameter in the operation method and obtains the corresponding class objects, and transmits the results to the custom operation execution unit to perform the relevant operations.

[0087] The custom operation execution module provides a fully functional dynamic program execution mechanism. Its function is to dynamically load and execute user-defined operation programs during system operation. This module dynamically executes user-written operation programs, which should conform to the UDO specification provided by the system. The program loading mechanism has the following functions:

[0088] (1) Standardization check of user programs;

[0089] (2) It can invoke user programs by operation name;

[0090] (3) The loaded program should be available to other users and the user should decide whether to retain it in the system after exiting the system.

[0091] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A secure tuple space system that supports user-defined operations, characterized in that, It includes a tuple space middleware module, a role-based access control module, a custom operation module, and an interface module; Among them, the tuple space middleware module is used for the organization and storage of tuples and the execution of cooperative primitives; The access control module is used to implement role-based access control policies to achieve identity authentication before node communication and permission control for tuple space operations; The custom operation module is used for registering and executing user-defined tuple space operations; The interface module is used to provide the application layer with an access interface to the tuple space cooperative system; The method for implementing user-defined operations based on the tuple space middleware module, role-based access control module, custom operation module, and interface module is as follows: the interface module transmits application layer operations to the role-based access control module, the access control module queries the user's role information, and after authentication, enters the tuple space middleware module to execute the tuple space operation; the custom operation module extends the tuple space middleware module. The tuple space middleware module includes: a tuple space management unit for storing communication tuples and implementing tuple space operations; an event management unit for providing a synchronization mechanism for message tuples, which automatically triggers the execution of relevant code when a tuple is written to the tuple space; and a tuple unit for implementing the storage structure of the tuple itself. The event management unit packages tuples of a specific form and registers them with the tuple space. Once a matching tuple is written to the tuple space, the user can immediately react to the event and perform corresponding operations. The custom operation module includes: a custom operation registration unit, used to register user-defined operations and implement their internal representation; a type conversion unit, used to convert user-input string type variables into other specified type variables; and a custom operation execution unit, used to dynamically load user-written operation classes into memory and execute them.

2. The secure tuple space system supporting user-defined operations according to claim 1, characterized in that, Within a tuple unit, for the organization of local tuples, fields are used to construct the tuple. These fields are implemented by a field class, specifically: The formal description of the field is as follows: Where T represents the type of the field, and V represents the value of the field; The formal description of a tuple is as follows: Fields at a given position in a tuple can be read, modified, or removed.

3. A secure tuple space system supporting user-defined operations according to claim 1, characterized in that, The access control module adopts a role-based access control policy, assigning different roles to users and binding users, roles, and tuple space operations together. The specific binding method is as follows: User set A set of users with distinct identifiers; a set of roles Represents different types of roles within the system; tuple space operation set < > Operations that represent the space of tuples; For any elements U, R, and Op taken from the user set, role set, and tuple space operation set respectively, establish the following mapping relationship: (1) This is a many-to-many binary relationship, meaning that a user can have multiple roles, and a role can also be owned by multiple users; (2) This is a many-to-many binary relation, indicating that a role can have access to multiple tuple space operations, and a tuple space operation can also be used by multiple roles.

4. A secure tuple space system supporting user-defined operations according to claim 1, characterized in that, In the custom operation registration unit, the operation information is received by the user using the operation information data structure, and the operation information is written into the tuple space for storage so that other users can view and call the corresponding methods.

5. A secure tuple space system supporting user-defined operations according to claim 4, characterized in that, The data storage structure for operation information includes the following information: the name of the operation program written by the user, the name of the operation defined by the user, the types of each parameter required for the custom operation, and the return value type of the program method.

6. A secure tuple space system supporting user-defined operations according to claim 1, characterized in that, In the type conversion unit, the operation information tuple is read from the tuple space according to a specific tuple template, the types of each parameter in the operation method are read and the corresponding class objects are obtained, and the results are transmitted to the custom operation execution unit to perform the relevant operations.

Citation Information

Patent Citations

  • Mobile agent-based Internet of things middleware development method

    CN102158554A