A central control platform architecture design method for a DNA data storage device cluster
Patent Information
- Application Number
- CN202511650191.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-11-12
AI Technical Summary
同时,当前的生化反应设备存在单批次任务执行时间长、通量低等问题,为适配多用户场景下不同特性的数据读写需求,通常将负责同种生化任务的不同型号下若干设备以集群形式进行组织
[0035]本发明所述的一种面向DNA数据存储设备集群的中控平台架构设计方法,利用分层与模块化思想,在中控平台架构构建时明确各部分功能,允许后续版本迭代过程中快速进行功能完善和扩展;采用并行化、读写任务逻辑流水线抽象机制,提高中控平台任务管理能力和系统任务执行效率;简化不同读写任务调度处理策略的引入方式,允许其快速适配不同应用场景。本发明可辅助DNA数据存储系统管理,作为上层数据存储用户与底层DNA数据存储相关生化设备间的承接,能够灵活地满足用户数据读写等多种任务需求,同时允许定制DNA数据存储系统的设备资源利用率优化方案。
Smart Images

Figure CN121523609B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of DNA data storage technology, specifically relating to a central control platform architecture design method for DNA data storage device clusters. Background Technology
[0002] DNA is a system in nature that stably stores genetic information over long periods. Its reliance on base pairs to preserve genetic information is similar to the binary information storage concept in computers. Based on this, binary data in computers is encoded into base sequences, and data can be accessed and retrieved using DNA storage media through technologies such as artificial DNA synthesis, preservation, amplification, and sequencing. Due to its advantages of high storage density, long storage period, and low maintenance costs, DNA data storage has become a new focus in the field of data storage in recent years, and it is expected to be relied upon to assist in the archiving and storage of cold data.
[0003] Data reading and writing on DNA data storage media relies on a series of biochemical processes, including DNA synthesis, PCR amplification, and DNA sequencing. Current approaches tend to modularize the complete biochemical process of DNA data reading and writing, with one type of device corresponding to one stage of the biochemical reaction task. These devices are organized in a pipeline manner to complete the entire data reading and writing process. However, current biochemical reaction equipment suffers from long batch execution times and low throughput. To adapt to the diverse data reading and writing needs of multiple users, several devices of different models responsible for the same biochemical task are typically organized into clusters. Thus, DNA data storage systems with multi-device clusters require unified scheduling and management of the devices through a central control platform in scenarios involving massive data reading and writing tasks.
[0004] As the middle layer of the DNA data storage system, users and devices interact with the central control platform via network messages. The central control platform is responsible for user and device information management and task scheduling within the DNA data storage system. Therefore, the central control platform needs to possess the following functions: sending, receiving, and processing user messages; sending, receiving, and processing device messages; DNA data storage system information management; and scheduling system tasks such as data reading and writing.
[0005] To meet the timeliness and other requirements of DNA data storage systems in different scenarios, and to improve the overall utilization of the equipment cluster while satisfying user needs, the central control platform should ensure the parallelism of the execution of each function and allow the read and write task scheduling strategy to be adjusted as needed. Summary of the Invention
[0006] The problem this invention aims to solve is to improve the central control platform architecture design of DNA data storage device clusters to meet various types of user requests and improve the processing efficiency of data read and write related tasks as needed. To this end, a central control platform architecture design method for DNA data storage device clusters is proposed.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A central control platform architecture design method for DNA data storage device clusters includes three parts: a program control layer, a program function layer, and an inter-layer message pipeline.
[0009] The program control layer is responsible for initialization when the program starts, signal listening, network connection management, message sending and receiving and resource allocation during program operation, and post-processing tasks before the central control platform of the DNA data storage device cluster exits.
[0010] The design of the program control layer includes a network socket server module, a network connection listening module, and a network message sending and receiving module. The network socket server module creates and manages two network socket servers, which are responsible for managing and terminating the network data flow connections between the central control platform and the user, and between the central control platform and the controlled device, respectively. The network connection listening module includes two EPOLL listeners, which are responsible for handling TCP network connection requests from users and devices, respectively. The network message sending and receiving module uses EPOLL listeners and TCP SOCKETs to send and receive network messages with users and devices.
[0011] The program function layer provides the two basic functions that the central control platform of the DNA data storage device cluster must have: information management and read / write task scheduling. It also allows for the expansion of additional functions. The design of the program function layer includes the design of an information management module and a read / write task scheduling module. The information management module is involved in the management of user information, device information and read / write task information. The read / write task scheduling module involves multiple processes in the execution of read / write tasks, including DNA synthesis, amplification, sequencing and physical DNA data storage medium container transfer.
[0012] The program control layer and the program function layer are connected by message passing. The message passing adopts a producer-consumer mechanism and is implemented through inter-layer message pipelines.
[0013] The inter-layer message pipeline includes the design of two sets of inter-layer message pipelines. The first set is responsible for transmitting messages related to the interaction between the central control platform and the user, and the second set is responsible for transmitting messages related to the interaction between the central control platform and the equipment. In each set of inter-layer message pipelines, one pipeline is used to transmit messages that have been received through the network from the program control layer to the program function layer, and the other pipeline is used to transmit messages waiting to be sent through the network from the program function layer to the program control layer.
[0014] Furthermore, the network socket server module utilizes TCP SOCKET to provide parameters such as IP address, port number, blocking mode, and connection request queue length;
[0015] Connection request queue length parameter The settings take into account actual operating scenarios, and the TCPDUMP tool is used to measure the peak connection request arrival rate within a time period that matches the characteristics of the actual operating scenario. mean and the average dwell time of a single connection request within the system The calculation yields:
[0016]
[0017] in, The safety factor is set to take into account both memory space usage and the allowable request loss rate.
[0018] Furthermore, the EPOLL listener in the network connection listening module associates with the network socket server using file descriptors. The EPOLL listener operates with a loop listening logic. When a single listening round reaches the maximum waiting time or the maximum number of events received, the EPOLL listener submits the events received in that round for batch processing.
[0019] Submitted TCP network connection requests are processed using SOCKETs. After a TCP network connection is established, a file descriptor representing the TCP network connection is recorded for subsequent network message sending and receiving.
[0020] Furthermore, the execution logic of the program control layer includes the following steps:
[0021] Step 1. Initialization Phase: After the program starts, the main thread function is called to perform initialization tasks, including creating a network socket server, creating an EPOLL listener for network connection requests, registering system signal handling functions and starting the remaining child threads, and waiting for the child threads to complete initialization; the child thread initialization mainly involves creating the message receiving EPOLL listener; after the initialization phase is completed, the PTHREAD BARRIER mechanism is used to synchronize the state between threads, and then the execution phase begins.
[0022] Step 2. Execution phase: The main thread is responsible for managing the network connection of users and devices, while the other sub-threads execute their corresponding functions; each thread cyclically checks the status flags provided by the signal handling function to determine whether to terminate execution. After detecting a termination signal, the PTHREAD BARRIER mechanism is used to synchronize the state between threads, and then the post-processing phase begins.
[0023] Step 3. Post-processing stage: After the child thread unregisters the EPOLL listener and other components, it exits. The main thread merges the child thread to reclaim resources, disconnects established TCP network connections, and unregisters the EPOLL listener and network socket server. The program then terminates.
[0024] Furthermore, the error handling method in the program control layer's execution logic process is to use the system's ERRNO to capture errors and provide corresponding processing mechanisms at the error points related to the network socket server, EPOLL listener, and PTHREAD thread.
[0025] Furthermore, the implementation of the information management module in the program function layer is specifically divided into three sub-modules according to function: user information management, device information management, and read / write task information management; it uses file or database data management methods to maintain relevant information about users, devices, and read / write tasks.
[0026] The read / write task scheduling module adopts a pipeline scheduling strategy, abstracting the read / write task process into a logical multi-stage pipeline, allowing the central control platform to perform system-level scheduling in multi-task and multi-device scenarios. The read / write task scheduling module maintains two queues, which record tasks waiting for scheduling and devices in an idle state within a certain time period. When the program function layer executes a task and when the device status is changed, the task number and device number that meet the status conditions are simultaneously entered into the relevant scheduling queue.
[0027] The task scheduling strategy of the read / write task scheduling module is set to a greedy read / write task scheduling strategy that considers limited scenarios.
[0028] Furthermore, the inter-layer message pipeline is based on LIST or MAP containers. The input and output of messages correspond to the writing and reading of the container, respectively. The internal space of the container serves as a message buffer. In multi-threaded scenarios, mutex locks and condition variable mechanisms are used to ensure the synchronization of the communication state between the program control layer and the program function layer at both ends of the pipeline.
[0029] Furthermore, the program control layer, program function layer, and inter-layer message pipeline are integrated to obtain the central control platform architecture of the DNA data storage device cluster. The program control layer is responsible for the operation logic of the underlying program in terms of network interaction, event listening, and multi-threaded parallelism. The program function layer runs on the basis of the program control layer and uses various functional modules to realize the information management and read / write task scheduling functions of the DNA data storage system central control platform. The program control layer and the program function layer communicate with each other through the inter-layer message pipeline.
[0030] Furthermore, the operation flow of the central control platform of the aforementioned DNA data storage device cluster is as follows:
[0031] S1. After the central control platform of the DNA data storage device cluster starts up, it executes the system initialization logic, including creating network socket servers, creating EPOLL listeners, registering system signal processing functions, and creating and starting various functional threads;
[0032] S2. Each thread runs in a loop according to the set logic, listening for a termination signal during the process. If the signal is received, proceed to step S3.
[0033] S3. Upon receiving the termination signal, each thread executes the set central control platform system termination logic, including saving relevant operating status, notifying users and devices of system termination information, disconnecting existing network connections, terminating the EPOLL listener and network socket server, reclaiming each functional thread, and finally exiting the program.
[0034] The beneficial effects of this invention are:
[0035] This invention discloses a central control platform architecture design method for DNA data storage device clusters. Utilizing a layered and modular approach, the architecture clearly defines the functions of each component during construction, allowing for rapid functional improvements and expansions in subsequent version iterations. It employs a parallelization and read / write task logic pipeline abstraction mechanism to enhance the central control platform's task management capabilities and system task execution efficiency. The method for introducing different read / write task scheduling and processing strategies is simplified, allowing for rapid adaptation to various application scenarios. This invention can assist in the management of DNA data storage systems, serving as a bridge between upper-layer data storage users and lower-layer DNA data storage-related biochemical devices. It can flexibly meet various task requirements such as data read / write, while also allowing for customized optimization schemes for the device resource utilization of the DNA data storage system. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the central control platform architecture for a DNA data storage device cluster as described in this invention.
[0037] Figure 2 This is a schematic diagram of the communication logic of the inter-layer message pipeline of the present invention;
[0038] Figure 3 This is a schematic diagram illustrating the system integration implementation of a central control platform for a DNA data storage device cluster as described in this invention.
[0039] Figure 4 This is a flowchart illustrating the operation of a central control platform for a DNA data storage device cluster as described in this invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.
[0041] Therefore, the following detailed description of specific embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.
[0042] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1 -Appendix Figure 4 Detailed explanation is as follows:
[0043] Example 1:
[0044] A central control platform architecture design method for DNA data storage device clusters includes three parts: a program control layer, a program function layer, and an inter-layer message pipeline.
[0045] The program control layer is responsible for initialization when the program starts, signal listening, network connection management, message sending and receiving and resource allocation during program operation, and post-processing tasks before the central control platform of the DNA data storage device cluster exits.
[0046] The design of the program control layer includes a network socket server module, a network connection listening module, and a network message sending and receiving module. The network socket server module creates and manages two network socket servers, which are responsible for managing and terminating the network data flow connections between the central control platform and the user, and between the central control platform and the controlled device, respectively. The network connection listening module includes two EPOLL listeners, which are responsible for handling TCP network connection requests from users and devices, respectively. The network message sending and receiving module uses EPOLL listeners and TCP SOCKETs to send and receive network messages with users and devices.
[0047] Furthermore, the network socket server module utilizes TCP SOCKET to provide parameters such as IP address, port number, blocking mode, and connection request queue length;
[0048] Connection request queue length parameter The settings take into account actual operating scenarios, and the TCPDUMP tool is used to measure the peak connection request arrival rate within a time period that matches the characteristics of the actual operating scenario. mean and the average dwell time of a single connection request within the system The calculation yields:
[0049]
[0050] in, The safety factor is set to take into account both memory space usage and the allowable request loss rate.
[0051] Furthermore, the EPOLL listener in the network connection listening module associates with the network socket server using file descriptors. The EPOLL listener operates with a loop listening logic. When a single listening round reaches the maximum waiting time or the maximum number of events received, the EPOLL listener submits the events received in that round for batch processing.
[0052] Submitted TCP network connection requests are processed using SOCKET. After the TCP network connection is established, a file descriptor representing the TCP network connection is recorded for subsequent network message sending and receiving. Network message reception uses the EPOLL event listening method, which registers the file descriptor representing the user or device network connection to the corresponding message receiving EPOLL listener, submitting a batch of message receiving events for processing in each listening round; network message sending simply uses a loop processing mechanism. Network message sending and receiving processing utilizes the RECV and SEND methods of SOCKET, where RECV uses a non-blocking strategy to cooperate with the aforementioned EPOLL event listening for network message reception.
[0053] Furthermore, when performing network connection listening or message reception listening, the network communication pressure should be considered. (Unit: events / second) Dynamically adjust the maximum number of events received per listening round. and longest waiting time One adjustment strategy is to let the variable for a certain time period be represented as... Given an initial value During operation, after a fixed period of time (e.g.) Adjust according to the following formula parameter:
[0054]
[0055] in Indicates changes in network communication pressure; As a fixed adjustment factor.
[0056] Furthermore, the execution logic of the program control layer includes the following steps:
[0057] Step 1. Initialization Phase: After the program starts, the main thread function is called to perform initialization tasks, including creating a network socket server, creating an EPOLL listener for network connection requests, registering system signal handling functions, and starting the remaining child threads, while waiting for the child threads to complete their initialization. The child thread initialization mainly involves creating the message receiving EPOLL listener. After the initialization phase is completed, the PTHREAD BARRIER mechanism is used to synchronize the state between threads, and then the execution phase begins.
[0058] Step 2. Execution phase: The main thread is responsible for managing the network connection of users and devices, while the other sub-threads execute their corresponding functions; each thread cyclically checks the status flags provided by the signal handling function to determine whether to terminate execution. After detecting a termination signal, the PTHREAD BARRIER mechanism is used to synchronize the state between threads, and then the post-processing phase begins.
[0059] Step 3. Post-processing stage: After the child thread unregisters the EPOLL listener and other components, it exits. The main thread merges the child thread to reclaim resources, disconnects established TCP network connections, and unregisters the EPOLL listener and network socket server. The program then terminates.
[0060] Furthermore, the error handling method in the program control layer's execution logic process is to use the system's ERRNO to capture errors and provide corresponding processing mechanisms at the error points related to the network socket server, EPOLL listener, and PTHREAD thread.
[0061] The program function layer provides the two basic functions that the central control platform of the DNA data storage device cluster must have: information management and read / write task scheduling. It also allows for the expansion of additional functions. The design of the program function layer includes the design of an information management module and a read / write task scheduling module. The read / write task scheduling module involves multiple processes, including DNA synthesis, amplification, sequencing, and physical DNA data storage medium container transfer.
[0062] The program control layer and the program function layer are connected by message passing. The message passing adopts a producer-consumer mechanism and is implemented through inter-layer message pipelines.
[0063] Furthermore, the implementation of the information management module in the program function layer is specifically divided into three sub-modules according to function: user information management, device information management, and read / write task information management; it uses file or database data management methods to maintain relevant information about users, devices, and read / write tasks.
[0064] Furthermore, the information management module should specifically include:
[0065] User ID, user status, and user permissions;
[0066] Equipment owner's equipment number, equipment type parameters, and equipment status;
[0067] The network communication between the device / user and the central control platform involves information such as IP address, port number, and established file descriptors; task number, task size, current pipeline stage of the task, and associated user and device numbers. The data types and specific value meanings of various information types are set according to the given message exchange protocol.
[0068] The message types involved in the information management module include: user / device registration / deregistration, login / logout, permission / status management messages; task creation / destruction, execution process feedback messages.
[0069] Furthermore, the read / write task scheduling module adopts a pipeline scheduling strategy, abstracting the read / write task process into a logical multi-stage pipeline, allowing the central control platform to perform system-level scheduling in multi-task and multi-device scenarios; the read / write task scheduling module internally maintains two queues, which respectively record the tasks in the waiting scheduling state and the devices in the idle state at a certain moment; when the program function layer executes a task and when the device state is rewritten, the task number and device number that meet the state conditions are simultaneously entered into the relevant scheduling queues;
[0070] Furthermore, the single execution process of read / write task scheduling is as follows: obtain the tasks and devices currently waiting to be scheduled from the queue; use the information management module to obtain attribute information such as the data scale and device processing capacity of the currently executing read / write tasks in the system, calculate the relatively optimal solution for system load through the given scheduling strategy; allocate the current pipeline stage task execution device to the tasks waiting to be scheduled based on the relatively optimal solution, generate and submit control messages, and rewrite the relevant task and device status in the information management module.
[0071] The read / write task scheduling module has read / write permissions to the information management module. The parsing and generation of relevant control messages follow the given message interaction protocol. The internal read / write task scheduling strategy of the module can be customized as needed.
[0072] The task scheduling strategy of the read / write task scheduling module is set to a greedy read / write task scheduling strategy that considers limited scenarios.
[0073] Define the relevant set: the set of pipeline stages involved in the process of writing and reading data. Task set in a single round of scheduling ,Task The current stage is denoted as The set of available devices in a single round of scheduling ,equipment Only responsible for executing a single pipeline stage ,gather A collection of rate-type devices and fixed batch type equipment collection It consists of two subsets that satisfy , Define environment parameters: for the task The amount of data to be processed in this pending pipeline stage The elapsed time calculated from the start of task creation. (Unit: minutes); For equipment Its data processing rate is (Unit: data volume / minute); For equipment Its single batch execution time (Unit: minutes); Equipment For the task Compatibility ,in Represents compatibility. This indicates incompatibility. Define auxiliary parameters: Define the task. Scheduling priority weight function ,Require Satisfies monotonically non-decreasing; define penalty weights. This takes into account the delayed scheduling situation where a single round of scheduling cannot allocate execution equipment to the task. Define decision variables: for the task... ,equipment ,definition ,in This indicates that the task will be included in the scheduling results. Assigned to device , Indicates the tasks in this scheduling result With equipment Unrelated; for the task ,definition ,in This indicates that the current round of scheduling is for a task. Equipment was allocated. Indicates the tasks in this round of scheduling No equipment has been assigned; you must wait for the next round of scheduling. satisfy .
[0074] A greedy scheduling strategy is adopted to maximize the overall execution efficiency in each round of scheduling. The objective function is expressed as follows:
[0075]
[0076] in Defined as a task in a single scheduling session In the equipment The above actions contribute to the system's data processing rate. Defined as a task Assign to feasible equipment At that time, the task Estimated execution time for the current pending stage in the pipeline.
[0077] objective function The following constraints must be met:
[0078]
[0079] Among the constraints: the first requirement is that the equipment in the obtained scheduling scheme... fulfill the task Compatibility involves various aspects such as device functionality and maximum data capacity. To simplify logic and unify usage... The second requirement is that the obtained scheduling scheme covers all tasks waiting to be scheduled, including tasks on both assigned and unassigned devices; the third requirement is that a single device can only undertake a single task in a single scheduling session.
[0080] The task scheduling strategy model only considers a portion of the read / write task scheduling scenarios in the DNA data storage system, and environmental parameters, objective variables, and constraints can be adjusted as needed. The established scheduling model is solved using a commonly used optimization solver.
[0081] The message types involved in the read / write task scheduling module include: creation of data read / write tasks, and status report messages for each pipeline stage during task execution. The task scheduling module can be expanded according to actual needs, such as adding or deleting tasks for DNA data storage containers.
[0082] The inter-layer message pipeline includes the design of two sets of inter-layer message pipelines. The first set is responsible for transmitting messages related to the interaction between the central control platform and the user, and the second set is responsible for transmitting messages related to the interaction between the central control platform and the equipment. In each set of inter-layer message pipelines, one pipeline is used to transmit messages that have been received through the network from the program control layer to the program function layer, and the other pipeline is used to transmit messages waiting to be sent through the network from the program function layer to the program control layer.
[0083] Furthermore, the inter-layer message pipeline is based on LIST or MAP containers. The input and output of messages correspond to the writing and reading of the container, respectively. The internal space of the container serves as a message buffer. In multi-threaded scenarios, mutex locks and condition variable mechanisms are used to ensure the synchronization of the communication state between the program control layer and the program function layer at both ends of the pipeline.
[0084] Furthermore, the program control layer, program function layer, and inter-layer message pipeline are integrated to obtain the central control platform architecture of the DNA data storage device cluster. The program control layer is responsible for the operation logic of the underlying program in terms of network interaction, event listening, and multi-threaded parallelism. The program function layer runs on the basis of the program control layer and uses various functional modules to realize the information management and read / write task scheduling functions of the DNA data storage system central control platform. The program control layer and the program function layer communicate with each other through the inter-layer message pipeline.
[0085] Example 2:
[0086] According to the control platform architecture design method for DNA data storage device clusters described in Specific Implementation Method 1, the operation flow of the control platform for the DNA data storage device cluster is as follows:
[0087] S1. After the central control platform of the DNA data storage device cluster starts up, it executes the system initialization logic, including creating network socket servers, creating EPOLL listeners, registering system signal processing functions, and creating and starting various functional threads;
[0088] S2. Each thread runs in a loop according to the set logic, listening for a termination signal during the process. If the signal is received, proceed to step S3.
[0089] S3. Upon receiving the termination signal, each thread executes the set central control platform system termination logic, including saving relevant operating status, notifying users and devices of system termination information, disconnecting existing network connections, terminating the EPOLL listener and network socket server, reclaiming each functional thread, and finally exiting the program.
[0090] Example 3:
[0091] According to the central control platform architecture design method for DNA data storage device clusters described in Specific Implementation Method 1, the program control layer also includes a network message sending and receiving module.
[0092] Network messages exist in the form of data packets. The message sending and receiving process (the logic is the same, and it will be referred to as transmission in this section) is divided into two stages: transmitting a fixed-size message header, which contains the data packet size and other attribute information and can be expanded as needed; and transmitting a complete data packet based on the message header information, which contains protocol messages or file data content.
[0093] Network message sending and receiving involves two parts: the central control platform and the user, and the central control platform and the device. Message receiving and sending in each part run in independent PTHREAD threads. Network message receiving uses the EPOLL event listening method, which registers the file descriptor representing the user's or device's network connection to the corresponding message receiving EPOLL listener. Each listening round submits a batch of message receiving events for processing. Network message sending simply uses a loop processing mechanism. Network message sending and receiving processing utilizes the SOCKET's RECV and SEND methods, where RECV employs a non-blocking strategy to complement the aforementioned EPOLL event listening for network message receiving.
[0094] Furthermore, the execution logic of the program control layer is as follows:
[0095] Since the program control layer involves several functions such as receiving, processing, and sending network messages, task management, and program running status management for users and devices, this invention utilizes PTHREAD multi-threaded parallel technology to allow each function to be executed in parallel, thereby improving the operating efficiency of the central control platform.
[0096] In accordance with PTHREAD parallel technology requirements, each module of the program control layer is implemented independently as a function. This includes a main thread and several functional sub-threads. The main thread uses PTHREAD utility functions to manage the start and termination of other sub-threads, while thread control and state synchronization are achieved using the Linux signal mechanism and the PTHREAD BARRIER mechanism. The functional sub-threads can be extended; for example, the central control platform program functional layer (described later) can run in an independent thread, involving the same technologies described above.
[0097] Example 4:
[0098] According to the central control platform architecture design method for DNA data storage device clusters described in Specific Implementation Method 1, the single-round operation logic of the program function layer can be summarized as follows: obtaining interactive messages through the inter-layer message pipeline (see subsequent sections) and parsing the content of the interactive messages; processing the parsing results using relevant functional modules; generating feedback messages based on the processing results and delivering the feedback messages to the program control layer for sending through the inter-layer message pipeline.
[0099] In complex system scenarios involving multiple messages and multiple tasks, in order to meet system scheduling requirements, the aforementioned logic is separated into multiple threads for parallel execution. The threads involved include: user message processing thread, device message processing thread, and read / write task scheduling thread.
[0100] Within the user message processing thread and the device message processing thread, when parsing message content, if the message involves read / write task scheduling, it is written into the corresponding queue within the read / write task scheduling module and handed over to the read / write task scheduling thread for processing; other types of messages are processed directly and feedback messages are generated, which are then delivered to the program control layer for sending via the inter-layer message pipeline.
[0101] The read / write task scheduling thread runs the scheduling logic implemented within the read / write task scheduling module. The timing of scheduling execution is set according to system requirements, and can employ single-request real-time scheduling or batch delayed scheduling methods. The feedback message generated after a single scheduling operation is completed is delivered to the program control layer via an inter-layer message pipeline.
[0102] The information management module and the read / write task scheduling module use mutex locks and condition variables to ensure that their contents are synchronized between threads in the program function layer.
[0103] The termination conditions for threads in the program function layer are managed by the program control layer (see the aforementioned program control layer section). Upon receiving a termination condition, each thread uses the PTHREAD BARRIER mechanism to synchronize their state, then executes the pre-defined DNA data storage system termination logic, and exits after completion.
[0104] Example 5:
[0105] According to the central control platform architecture design method for DNA data storage device clusters described in Specific Implementation Method 1, the workflow of the central control platform for DNA data storage device clusters is as follows:
[0106] Step a: The network connection listener listens for incoming network connection requests. If a request to establish a TCP network connection is detected at the network layer, proceed to step b; otherwise, maintain the listening state of step a.
[0107] Step b: The TCP network server establishes a network connection with the user through a network connection request and delivers the network connection to the user message receiving listener.
[0108] Step c: The user message receiving listener performs event-triggered listening to the internal network connection. If a message from the user is detected at the network layer, proceed to step d; otherwise, maintain the listening state of step c.
[0109] Step d: The message receiving thread uses the RECV function of SOCKET to receive network messages. First, it receives a fixed message header containing the message data packet size, and then receives the complete network message using the data packet size. After receiving the message, the network message is passed to the user message processing thread through the message pipe.
[0110] Step e: The user message processing thread receives the user message to be processed from the message pipe, parses the message according to the protocol, executes the corresponding processing method and generates a feedback message, and passes the feedback message to the corresponding message sending thread through the message pipe, and executes step g; if the message involves task scheduling, the relevant information is passed to the task scheduling module, and step f is executed.
[0111] Step f: The task scheduling module periodically executes the set task scheduling algorithm, generates corresponding scheduling messages according to the protocol based on the scheduling results, and transmits them to the corresponding message sending thread through the message pipeline.
[0112] Step g: The message sending thread receives the message to be sent from the message pipe and sends the network message using the SOCKET's SEND function;
[0113] Step h: Execute the above logic repeatedly until a system termination signal is received.
[0114] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0115] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A central control platform architecture design method for DNA data storage device clusters, characterized in that, It consists of three parts: the program control layer, the program function layer, and the inter-layer message pipeline. The program control layer is responsible for initialization when the program starts, signal listening, network connection management, message sending and receiving and resource allocation during program operation, and post-processing tasks before the central control platform of the DNA data storage device cluster exits. The design of the program control layer includes a network socket server module, a network connection listening module, and a network message sending and receiving module. The network socket server module creates and manages two network socket servers, which are responsible for managing and terminating the network data flow connections between the central control platform and the user, and between the central control platform and the controlled device, respectively. The network connection listening module includes two EPOLL listeners, which are responsible for handling TCP network connection requests from users and devices, respectively. The network message sending and receiving module uses EPOLL listeners and TCP SOCKETs to send and receive network messages with users and devices. The program function layer provides the two basic functions that the central control platform of the DNA data storage device cluster must have: information management and read / write task scheduling. It also allows for the expansion of additional functions. The design of the program function layer includes the design of an information management module and a read / write task scheduling module. The read / write task scheduling module involves multiple processes, including DNA synthesis, amplification, sequencing, and physical DNA data storage medium container transfer. The program control layer and the program function layer are connected by message passing. The message passing adopts a producer-consumer mechanism and is implemented through inter-layer message pipelines. The inter-layer message pipeline includes the design of two sets of inter-layer message pipelines. The first set is responsible for transmitting messages related to the interaction between the central control platform and the user, and the second set is responsible for transmitting messages related to the interaction between the central control platform and the equipment. In each set of inter-layer message pipelines, one pipeline is used to transmit messages that have been received through the network from the program control layer to the program function layer, and the other pipeline is used to transmit messages waiting to be sent through the network from the program function layer to the program control layer. The network socket server module uses TCP SOCKET and requires the IP address, port number, blocking mode, and connection request queue length parameters. Connection request queue length parameter This is achieved by using the TCPDUMP tool to measure the peak connection request arrival rate within a time period that matches the characteristics of the actual operating scenario. mean and the average dwell time of a single connection request within the system The calculation yields: in, The safety factor is set to take into account both memory space usage and the allowable request loss rate.
2. The central control platform architecture design method for DNA data storage device clusters according to claim 1, characterized in that, The EPOLL listener in the network connection listening module associates with the network socket server using file descriptors. The EPOLL listener operates with a loop listening logic. When a single listening round reaches the maximum waiting time or the maximum number of events received, the EPOLL listener submits the events received in that round for batch processing. Submitted TCP network connection requests are processed using SOCKETs; After a TCP network connection is established, a file descriptor representing the TCP network connection is recorded for subsequent network message sending and receiving.
3. The central control platform architecture design method for DNA data storage device clusters according to claim 2, characterized in that, The execution logic of the program control layer includes the following steps: Step 1. Initialization Phase: After the program starts, the main thread function is called to perform initialization tasks, including creating a network socket server, creating an EPOLL listener for network connection requests, registering system signal handling functions, and starting the remaining child threads, while waiting for the child threads to complete initialization; the child thread initialization mainly involves creating the message receiving EPOLL listener; after the initialization phase is completed, the PTHREAD BARRIER mechanism is used to synchronize the state between threads, and then the execution phase begins; Step 2. Execution Phase: The main thread is responsible for managing the network connections of users and devices, while the other sub-threads execute their respective functions; Each thread continuously checks the status flags provided by the signal handling function to determine whether to terminate execution. After detecting a termination signal, the PTHREAD BARRIER mechanism is used to synchronize the state between threads, and then the thread enters the post-processing stage. Step 3. Post-processing stage: The child thread exits after unregistering components such as the EPOLL listener; The main thread merges with child threads to reclaim resources, disconnects established TCP network connections, and unregisters the EPOLL listener and network socket server; then the program terminates.
4. The central control platform architecture design method for DNA data storage device clusters according to claim 3, characterized in that, The error handling method in the program control layer's execution logic is to use the system's ERRNO to capture errors and provide corresponding processing mechanisms at the points of error related to the network socket server, EPOLL listener, and PTHREAD thread.
5. The central control platform architecture design method for DNA data storage device clusters according to claim 4, characterized in that, The information management module in the program's functional layer is specifically divided into three sub-modules: user information management, device information management, and read / write task information management. It uses file or database data management methods to maintain relevant information about users, devices, and read / write tasks. The read / write task scheduling module in the program function layer adopts a pipeline scheduling strategy, abstracting the read / write task process into a logical multi-stage pipeline, allowing the central control platform to perform system-level scheduling in multi-task and multi-device scenarios. The read / write task scheduling module maintains two queues, which record tasks in the waiting scheduling state and devices in the idle state within a certain time period. When the program function layer executes a task and when the device status is changed, the task number and device number that meet the status conditions are synchronously entered into the relevant scheduling queue. The task scheduling strategy of the read / write task scheduling module is set to a greedy read / write task scheduling strategy that considers limited scenarios.
6. The central control platform architecture design method for DNA data storage device clusters according to claim 5, characterized in that, Inter-layer message pipelines are based on LIST or MAP containers. Message input and output correspond to writing and reading from the container, respectively. The internal space of the container serves as a message buffer. In multi-threaded scenarios, mutex locks and condition variable mechanisms are used to ensure the synchronization of communication states between the program control layer and the program function layer at both ends of the pipeline.
7. The central control platform architecture design method for DNA data storage device clusters according to claim 6, characterized in that, The central control platform architecture of the DNA data storage device cluster is obtained by integrating the program control layer, program function layer, and inter-layer message pipeline. The program control layer is responsible for the operation logic of the underlying program in terms of network interaction, event listening, and multi-threaded parallelism. The program function layer runs on the basis of the program control layer and uses various functional modules to realize the information management and read / write task scheduling functions of the DNA data storage system central control platform. The program control layer and the program function layer communicate with each other through the inter-layer message pipeline.
8. The central control platform architecture design method for DNA data storage device clusters according to claim 7, characterized in that, The operation flow of the central control platform of the DNA data storage device cluster is as follows: S1. After the central control platform of the DNA data storage device cluster starts up, it executes the system initialization logic, including creating network socket servers, creating EPOLL listeners, registering system signal processing functions, and creating and starting various functional threads; S2. Each thread runs in a loop according to the set logic, listening for a termination signal during the process. If the signal is received, proceed to step S3. S3. Upon receiving the termination signal, each thread executes the set central control platform system termination logic, including saving relevant operating status, notifying users and devices of system termination information, disconnecting existing network connections, terminating the EPOLL listener and network socket server, reclaiming each functional thread, and finally exiting the program.
Citation Information
Patent Citations
Server designing method based on semi-synchronization, semi-synchronization and pipe filter mode
CN104219284A
System suitable for PB-level data DNA storage and encoding and decoding method
CN118193453A