Information processing method and device based on storage system, equipment and medium
By adopting preset data structures and cyclic writing methods in the storage system, the information recording problem caused by limited memory resources is solved, large-scale high-frequency information recording is realized, and the stability and security of the storage system are improved.
Patent Information
- Application Number
- CN202510442594.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-08-01
AI Technical Summary
The memory resources in existing storage systems are limited, resulting in small information recording space, easy to be overwritten when the amount of data is too large, and can only monitor the status within a limited period, making it difficult to record and monitor the long-term stable range.
The preset data structure is used to write the target information in the preset data block, and the target address is determined based on the starting address, disk space capacity and number of nodes of the target object in the preset virtual disk. If the data block is full, the information is written to the bottom layer of the storage system, and the information is written to the bottom layer in batches through cyclic writing.
Large-scale high-frequency information recording is realized, data coverage problem is avoided, the stability and security of the storage system are improved, and the monitoring range and application scenarios are expanded.
Smart Images

Figure CN120407433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular, to an information processing method, apparatus, device, and medium based on a storage system. Background Art
[0002] A common information recording method in the current storage system is to separately allocate a memory space. Since the memory resources are limited, the allocated memory space is not very large. It is usually used to record the abnormal processes that may be triggered in the process and the information of key points. Then, by reading the memory information, the running state of the system can be intuitively viewed. However, due to the limited memory space, when the data volume is too large, it is easily overwritten cyclically, and only the state within a limited period can be monitored. It is difficult to record stably for a long time, and the monitoring range is limited. Summary of the Invention
[0003] The present application provides an information processing method, apparatus, device, and medium based on a storage system to at least solve the problem that it is difficult for the storage system in the related art to record large-scale and high-frequency information.
[0004] The present application provides an information processing method based on a storage system, including:
[0005] In response to an information writing command, write target information in a preset data block based on a preset data structure, and the preset data block has a preset storage space;
[0006] Determine the target address of the target information in a preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes;
[0007] If the preset storage space of the preset data block is full, based on the target address, write the first information in the preset data block to the bottom layer of the storage system until all the target information is written to the bottom layer of the storage system, and the target information includes the first information.
[0008] The present application further provides an information processing apparatus based on a storage system, including:
[0009] A data block writing module, configured to write target information in a preset data block based on a preset data structure in response to an information writing command, and the preset data block has a preset storage space;
[0010] An address determining module, configured to determine the target address of the target information in a preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes;
[0011] An information writing module, configured to, if the preset storage space of the preset data block is full, write the first information in the preset data block to the bottom layer of the storage system based on the target address until all the target information is written to the bottom layer of the storage system, where the target information includes the first information.
[0012] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above information processing methods based on a storage system when executing the computer program.
[0013] This application also provides a computer-readable storage medium, in which a computer program is stored, and where the computer program implements the steps of any of the above information processing methods based on a storage system when executed by a processor.
[0014] Through the information processing method based on a storage system provided by this application, a preset data block with a preset storage space and a fixed data structure are set, and all target information is written to the bottom layer in batches by adopting a method of circularly writing the information in the preset data block to the bottom layer, avoiding the problem of low data writing efficiency caused by excessive data volume, and at the same time avoiding the problem of information being overwritten due to excessive writing data volume and high frequency. Description of the Drawings
[0015] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 It is a flowchart of an information processing method based on a storage system provided by an embodiment of this application;
[0017] Figure 2 It is a schematic diagram of the storage data distribution provided by an embodiment of this application;
[0018] Figure 3 It is a schematic diagram of the information data distribution provided by an embodiment of this application;
[0019] Figure 4 It is a schematic diagram of the information reading and writing process provided by an embodiment of this application;
[0020] Figure 5 It is a schematic diagram of the file writing process and file generation provided by an embodiment of this application;
[0021] Figure 6 It is a schematic diagram of an information processing device based on a storage system provided by an embodiment of this application;
[0022] Figure 7 Schematic diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0023] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.
[0024] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0025] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0026] The storage system is the core infrastructure for data persistent storage, management, and access, and its design directly affects data reliability, performance, and scalability. The storage system is a system composed of storage devices, control components, and management software, and its core is the memory, which is divided into internal storage and external storage. In terms of classification, it can be divided into random access, sequential access (such as tapes), and direct access (such as disks) from the access method; and it can be divided into block storage, file storage, and object storage from the architecture. In terms of function, the storage system is responsible for data reading, writing, transmission, retention, access control, and sharing.
[0027] In the current era of big data informatization, storage systems are widely used and have gradually become an indispensable part of many industries, such as telecommunications, finance, education, banking and other industries. In order to meet the needs of various scenarios, higher requirements are put forward for the stability, reliability and business performance guarantee ability of devices. In a high-performance multi-control storage architecture, with the exponential growth of system throughput (such as IOPS breaking through the million level), stability guarantee has evolved into a core proposition as important as performance improvement. At this time, the refined monitoring of the internal operation state of the storage system has become an indispensable key link, covering the all-round tracking of hardware state fluctuations, data flow processing links and abnormal event triggering mechanisms. In related technologies, the commonly used information recording method in the current storage system is to separately allocate a piece of memory space. Due to the priority of memory resources, the allocated space is not very large. Therefore, it is often used to record some abnormal processes that may be triggered in the business process and the information at a certain key point. Then, by reading the memory information, the running state of the system can be viewed more intuitively. This method has obvious advantages but also obvious disadvantages. The recorded content is limited, and it is extremely easy to be circularly overwritten when the data volume is too large. Secondly, it can only monitor some expected abnormalities and states and cannot achieve long-term stable recording, and the monitoring range is very limited.
[0028] Based on this, the embodiments of the present invention provide an information processing method based on a storage system. Under the storage framework of a multi-control cluster, this method uses an independent processing logic to encapsulate a common interface, divides space as needed and addresses itself, uses a virtual disk to record its own state and changes, and then, as needed, can query the recorded information at any time, and generates a separate file to make information viewing more convenient, providing an additional guarantee in complex and efficient business processing, and effectively improving the stability and security of the storage system.
[0029] The embodiments of the present application provide an information processing method based on a storage system. Figure 1 It is a flowchart of the information processing method based on the storage system according to the embodiments of the present invention. As Figure 1 shown, the process includes the following steps:
[0030] Step S101, in response to an information writing command, write target information in a preset data block based on a preset data structure.
[0031] Among them, the preset data block has a preset storage space. The storage system triggers the information recording function in response to the information writing command issued by the object. The object includes application programs, threads, function modules, etc. After receiving the information writing command, a virtual disk for information recording is created, that is, the preset virtual disk. The preset virtual disk can reuse the existing virtual disks on the storage system to create the information writing function. If the existing virtual disks are used to create the information writing function, it is necessary to distinguish this function to avoid mixing the storage space with other services. If a new preset virtual disk is created, the virtual disk can be distinguished by attributes such as a special name and type to avoid mixing with other services and occupying the space for information writing. The successful creation of the preset virtual disk indicates that the information recording function is enabled. The information recording function includes information writing, information reading, etc.
[0032] The preset data block has a preset storage space, and a preset data block is used as a temporary storage area for one I / O read and write. A preset data structure for a single piece of information is constructed. One piece of information has a specific size, for example, 64 bytes, and each piece of information has specific fields to represent corresponding meanings, including time (occupying 8 bytes) for recording the timestamp of this piece of information; function address (funcpoint, occupying 8 bytes, pointer type) for recording the function address of this piece of information; data (occupying 6 * 8 bytes) for saving the data to be recorded in this piece of information. Taking the preset storage space of a preset data block as 2M and a single piece of information occupying 64 bytes as an example, 32,768 pieces of information can be stored in one data block. The target information in this embodiment refers to all the information that the target object currently needs to write, which may include multiple single pieces of information.
[0033] The preset virtual disk is partitioned to allocate corresponding disk space capacities to each using object, thereby avoiding the data overwrite problem caused by concurrent writing among the using objects. According to the disk space capacities allocated to each using object, the total capacity is calculated as the minimum space capacity of the preset virtual disk. The minimum space capacity is set when creating the virtual disk. If the capacity of the created virtual disk is less than the minimum space capacity, it cannot be created and an error prompt is returned. Specifically, the purpose of partitioning the space can be achieved by partitioning the addresses of the preset virtual disk.
[0034] Each piece of information in the target information is constructed according to the preset data structure, and the target information is written into the preset data block.
[0035] In some alternative embodiments, before executing an information writing or reading command, it is also necessary to determine whether the virtual disk status and the IO path status are online. If the determination result is yes, apply for trcb resources and generate an information writing command or an information reading command. If the determination result is no, set the path status to timeout_offline, indicating timeout and offline. Here, trcb is an information resource control block used to store relevant data of this piece of information, such as: submission address, data address, read / write distinction, virtual disk information, path information, etc., as the management basis for returning results after information submission.
[0036] In some alternative embodiments, multiple objects can write simultaneously. For the target information to be written for each object, a certain number of preset data blocks are allocated for temporarily writing the information.
[0037] Step S102: Determine the target address of the target information in the preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes.
[0038] The target object corresponding to the target information represents the object to which the target information needs to be written currently. The starting address of the target object in the preset virtual disk is calculated and determined based on the disk space capacity divided for the target object in the preset virtual disk. There are multiple nodes in the storage system, and this node is a physical node. The object can run on one or more nodes, and each object on each node can access the preset virtual disk. Therefore, each node has corresponding storage space in the preset virtual disk, and the capacity is determined based on the disk space capacity divided for the target object and the number of nodes. Exemplarily, as Figure 2 shown, if the total capacity of the preset virtual disk is 500G, the disk space capacity allocated for the target object is 100G, and if the target object corresponds to 4 nodes, and the capacity is evenly distributed to each node, then each node is allocated 25G.
[0039] Based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes, calculate the target address of the target information in the preset virtual disk, that is, the specific location where the target information should be stored in the preset virtual disk.
[0040] Step S103: If the preset storage space of the preset data block is full, based on the target address, write the first information in the preset data block to the bottom layer of the storage system until all the target information is written to the bottom layer of the storage system.
[0041] Among them, the target information includes first information, which represents the information currently written in a preset data block, and the first information is part of the target information. Check whether the preset storage space of the preset data block is full, that is, determine whether the amount of information currently stored in the preset data block reaches the upper limit of the preset storage space. If the preset storage space is full, it is necessary to release the first information in the preset data block and submit a write I / O to the lower layer of the storage system until the first information is written to the bottom layer of the storage system, that is, written to the physical disk of the storage system. After writing the first information in the preset data block, write the target information to the preset data block again, and then write the information to the bottom layer of the storage system based on the target address, and repeat the above steps until all the target information is written to the bottom layer of the storage system.
[0042] In some alternative embodiments, after writing the first information in the preset data block to the bottom layer of the storage system, release the storage space of the preset data block corresponding to the first information.
[0043] As an example, as Figure 3 shown in the information data distribution diagram, assume that the preset storage space of the preset data block is 2M, and the size of each piece of information is 64 bytes. When starting to write information to the preset data block, first fill it with a preset data structure. After writing each piece of information, the next one is offset backward by 64 bytes. After continuously writing 32,768 pieces, a preset data block is filled up. Calculate the target address based on the above step S102, and submit a write I / O to the lower layer of the storage system based on the target address.
[0044] The I / O (Input / Output) stack is a software hierarchical structure in the operating system that manages data input / output operations. It is a layer between the file system and the block device, defines the data transfer process, converts the read / write requests of the upper-layer file system into instructions that the lower-layer block device can understand, and is responsible for the process of transferring block device data. By converting, merging, sorting, and scheduling file data requests and then sending them to the block device, it plays a role of connecting the upper and lower layers. In this embodiment, the lower-layer I / O stack can reuse the original cache, storage pool, RAID (Redundant Arrays of Independent Disks), etc. of the storage system until it is written to the physical disk.
[0045] If there are multiple target objects writing concurrently, a locking protection or space isolation method can be adopted to avoid data overwrite problems during multi-threaded or multi-node writing and ensure data consistency.
[0046] The present application provides an information processing method based on a storage system, which includes, in response to an information writing command, writing target information in a preset data block based on a preset data structure, and determining a target address of the target information in a preset virtual disk based on a starting address of a target object corresponding to the target information in the preset virtual disk, a disk space capacity corresponding to the target object, and the number of nodes; if a preset storage space of the preset data block is full, writing first information in the preset data block to the bottom layer of the storage system based on the target address until all the target information is written to the bottom layer of the storage system. By setting a preset data block with a preset storage space and a fixed data structure, and adopting a method of circularly writing the information in the preset data block to the bottom layer in batches to write all the target information to the bottom layer, the problem of low data writing efficiency caused by excessive data volume can be avoided, and at the same time, the problem of information being overwritten caused by excessive writing data volume and high frequency can be avoided.
[0047] A large-scale high-frequency information recording function is provided, which can record real-time changes of various states of itself in the storage system and record the execution conditions of various events on the IO stack.
[0048] An embodiment of the present application provides an information processing method based on a storage system, and the method includes the following steps:
[0049] Step S201, in response to an information writing command, write target information in a preset data block based on a preset data structure.
[0050] Specifically, step S201 includes:
[0051] Step S2011, determine target information based on a preset data structure. Among them, a specific field in the target information is used to represent a timestamp of the information.
[0052] Step S2012, write each piece of information in the target information in a preset data block.
[0053] Construct a preset data structure for a single piece of information. A single piece of information has a specific size, for example, 64 bytes, and each piece of information has a specific field representing corresponding meanings, such as Figure 3 shown, including time (occupying 8 bytes), used to record the timestamp of this piece of information; function address (funcpoint, occupying 8 bytes, pointer type), used to record the function address of this piece of information; data (occupying 6 8-byte units), used to save the data to be recorded by this piece of information. Fill in according to the preset data structure to determine the target information, and the time can be directly obtained using system functions such as time() or gettimeofday().
[0054] A preset data block is a pre-allocated storage area in a storage system with a preset storage space for storing information. The target information consists of multiple individual pieces of information. For example, in a set of target information containing multiple user operation logs, each log record is a piece of information. Each piece of information in the target information is written into the preset data block in a certain order. During the writing process, the rules of the preset data structure need to be followed to ensure that the storage format of each piece of information in the data block is correct.
[0055] Step S202: Determine the target address of the target information in the preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes.
[0056] Specifically, step S202 includes:
[0057] Step S2021: Determine the starting address of the target object corresponding to the target information in the preset virtual disk based on the disk space capacity corresponding to the target object corresponding to the target information and the preset partition capacity.
[0058] Starting address of the target object = Disk space capacity (bytes) corresponding to the target object / Preset partition capacity.
[0059] As an example, if the starting address used by the first object is 0, and the disk space capacity corresponding to the first object is 100G, if the target object is the second object, then the starting address of the target object is:
[0060]
[0061] Among them, the preset partition capacity is 512, and the unit is bytes.
[0062] Step S2022: Calculate the ratio of the disk space capacity corresponding to the target object to the number of nodes corresponding to the target object to obtain a first ratio.
[0063] Step S2023: Calculate the product of the first ratio and the node number, and determine the target address of the target information in the preset virtual disk based on the sum of the product and the starting address.
[0064] When calculating the ratio of the disk space capacity corresponding to the target object to the number of nodes corresponding to the target object, it is necessary to control the unit to be unified, that is, the first ratio in step S2022 is:
[0065] (Disk space capacity corresponding to the target object / Number of nodes corresponding to the target object) × 1024 3 / 512;
[0066] The target address of the target information in the preset virtual disk = starting address + node number × (disk space capacity corresponding to the target object / number of nodes corresponding to the target object) × 1024 3 / 512;
[0067] Among them, the value of the node number depends on the sequence number where the node is located. The node number of the first node is 0, and the node number of the second node is 1.
[0068] As an example, assume that the total capacity of the preset virtual disk is 500G, the disk space capacity corresponding to the target object is 100G, and the number of nodes corresponding to the target object is 4.
[0069] Step S203, if the preset storage space of the preset data block is full, based on the target address, write the first information in the preset data block to the bottom layer of the storage system until all the target information is written to the bottom layer of the storage system.
[0070] For details, please refer to Figure 1 Step S103 of the illustrated embodiment, which will not be elaborated here.
[0071] In some alternative embodiments, the method further includes:
[0072] Step S301, based on a preset timeout duration, determine whether a first feedback message is received. The first feedback message is used to indicate that the target information has been successfully written to the bottom layer of the storage system;
[0073] Step S302, if the first feedback message is not received, issue an alarm prompt.
[0074] The preset timeout duration is a preset duration used to specify the maximum time to wait for a specific feedback message after writing information to the bottom layer. The preset timeout duration can be customized according to the situation of the storage system. The preset timeout duration can take values such as: the interval time when the lower-layer IO stack of the current storage system does not return results for more than a certain time is regarded as abnormal, and some margins are added on this basis.
[0075] The first feedback message is used to indicate that the target information has been successfully written to the bottom layer of the storage system. If the first feedback message is received within the preset timeout duration, it means successful writing. If the first feedback message is not received within the preset timeout duration, it means that a failure occurred when writing to the bottom layer, and an alarm prompt is issued. In addition to issuing an alarm prompt, operations such as single-node hot restart can also be set.
[0076] In some alternative embodiments, the method further includes:
[0077] Step S401, in response to an information reading command, determine the storage address of the information to be read based on the reading object, storage location, and target node in the information reading command.
[0078] The information reading command includes the reading object, the storage location of the information to be read, and the node to be read. According to the reading object and the starting address of the information to be read at the node, the calculation method of the starting address is the target address in step S2023. According to the storage location in the information reading command, an address offset is performed to obtain the address of the information to be read.
[0079] Specifically, the storage address of the information to be read = starting address + storage location * 1024 3 / 512, where 512 represents the partition size.
[0080] Step S402: Read the information to be read based on the storage address and write the information to be read into the target file.
[0081] After determining the storage address of the information to be read, the information to be read is read according to the storage address, and the read information is written into the target file. The size of the target file can be set. When the amount of information read is large, the read information can be written into multiple files, and each file has a capacity limit. For example, the capacity of each file is 512M. The file name of the target file after reading can be customized. When the information has not been completely read, the target file can be named a special name first, and the target file is not displayed externally. After the information reading is completed, the target file is renamed, and the renamed target file is stored in the specified directory and displayed externally. The format of the target file can be customized, and the form can be a table, and no specific limitation is made.
[0082] During the process of reading, a new reading command cannot be executed until the current reading is completed before the next reading can be performed.
[0083] In some alternative embodiments, the size of the amount of information read each time can be set. To improve the reading efficiency, the upper limit of the amount of data read at one time can be set (for example: 1G).
[0084] Specifically, step S402 includes:
[0085] Step S4021: Determine the number of readings based on the data volume of the information to be read and the preset reading volume;
[0086] Step S4022: Recursively read the information to be read based on the number of readings and the storage address.
[0087] The preset read amount represents the size of the data amount read at one time. According to the data amount of the information to be read and the preset read amount, the number of read times required to finish reading the information to be read can be calculated. Recursive reading is performed according to the storage address. When reading, a read I / O is submitted to the lower-layer I / O stack until all the information to be read is completely read. The information read each time is decomposed into multiple single-piece information, and the single-piece information is parsed based on a preset data structure and written into the target file item by item.
[0088] Please refer to Figure 4 the schematic flow diagram of information reading and writing shown in. When receiving a command-line notification to start reading information, calculate the storage address of the information to be read according to the information in the information reading command, call the I / O interface to read the information, and judge whether it is the last read according to the data length. If it is the last time, set the last write flag bit to true. If it is not the last time currently, parse the read data according to the preset data structure, convert the time into a format readable by the straight pipe, and recombine each field into a string in the required format, and the required format can be preset in advance. Use the write file system function interface to write the recombined string into the target file line by line. After writing, judge whether it is the last write currently. If it is not, continue with the read and write operations. If it is the last time, end the read and write.
[0089] Please refer to Figure 5 the schematic flow diagram of file writing processing and file generation shown in. When starting to write, judge whether it is the first write. If it is, open the file in a covering manner; if not, open the file in an append-write manner. Obtain the content to be written and write it into the file line by line. Judge whether it is the last write currently. If it is not, only close the file and do not display the file externally; if it is, close the file and rename the file to a custom file name and display the file externally.
[0090] The information processing method based on a storage system provided by an embodiment of the present invention, under the storage framework of a multi-control cluster, utilizes the characteristics of its own functions, adopts an independent processing logic to encapsulate a common interface, divides space as needed and addresses itself, uses a virtual disk to record its own status and changes, and then can query the recorded information at any time as needed, and makes information viewing more convenient by generating a separate file, providing an extra guarantee in complex and efficient business processing, and effectively improving the stability and security of the storage system. It realizes the function of large-scale and high-frequency information recording, can effectively monitor the running status and changes of each process of the storage system itself, improves the stability of business operation and data security, enables the storage system to be applied to more industries, and greatly expands the scenarios that the storage system can handle and broadens the application field of the product.
[0091] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0092] An embodiment of the present application further provides an information processing device based on a storage system, as Figure 6 shown, the device includes:
[0093] A data block writing module, configured to, in response to an information writing command, write target information in a preset data block based on a preset data structure, where the preset data block has a preset storage space;
[0094] An address determination module, configured to determine a target address of the target information in a preset virtual disk based on a starting address of a target object corresponding to the target information in the preset virtual disk, a disk space capacity corresponding to the target object, and the number of nodes;
[0095] An information writing module, configured to, if the preset storage space of the preset data block is full, write first information in the preset data block to the bottom layer of the storage system based on the target address until all the target information is written to the bottom layer of the storage system, where the target information includes the first information.
[0096] In some optional embodiments, the data block writing module includes:
[0097] A target information determination unit, configured to determine target information based on a preset data structure, where a specific field in the target information is used to represent a timestamp of the information;
[0098] A data block writing unit, configured to write each piece of information in the target information in the preset data block.
[0099] In some optional embodiments, the address determination module includes:
[0100] A starting address determination unit, configured to determine a starting address of a target object corresponding to the target information in a preset virtual disk based on a disk space capacity corresponding to the target object and a preset partition capacity;
[0101] A first ratio calculation unit, configured to calculate a ratio of the disk space capacity corresponding to the target object to the number of nodes corresponding to the target object to obtain a first ratio;
[0102] A target address determination unit, configured to calculate a product of the first ratio and a node number, and determine a target address of the target information in the preset virtual disk based on a sum of the product and the starting address.
[0103] In some alternative embodiments, the apparatus further includes:
[0104] A space release module, configured to release the storage space of a preset data block corresponding to the first information.
[0105] In some alternative embodiments, the apparatus further includes:
[0106] A feedback judgment module, configured to judge whether a first feedback message is received based on a preset timeout duration, where the first feedback message is used to indicate that the target information has been successfully written to the underlying layer of the storage system;
[0107] An alarm module, configured to issue an alarm prompt if the first feedback message is not received.
[0108] In some alternative embodiments, the apparatus further includes:
[0109] A storage address determination module, configured to, in response to an information reading command, determine the storage address of the information to be read based on the reading object, storage location, and target node in the information reading command;
[0110] An information reading module, configured to read the information to be read based on the storage address and write the information to be read into a target file.
[0111] In some alternative embodiments, the information reading module includes:
[0112] A number determination unit, configured to determine the number of readings based on the data volume of the information to be read and a preset reading volume;
[0113] A reading unit, configured to recursively read the information to be read based on the number of readings and the storage address.
[0114] For the description of the features in the corresponding embodiments of the information processing apparatus based on the storage system, reference may be made to the relevant description in the corresponding embodiments of the information processing method based on the storage system, which will not be elaborated here one by one.
[0115] An embodiment of the present application further provides an electronic device, as Figure 7 shown, including a memory 10 and a processor 20. A computer program is stored in the memory 10, and the processor 20 is configured to run the computer program to execute the steps in any of the above-described embodiments of the information processing method based on the storage system.
[0116] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any of the above-described embodiments of the information processing method based on the storage system when running.
[0117] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memory (ROM), random access memory (RAM), external hard drives, magnetic disks, or optical discs that can store computer programs.
[0118] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the information processing method based on a storage system.
[0119] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the information processing method based on a storage system.
[0120] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0121] The above has introduced in detail an information processing method, apparatus, device, and medium based on a storage system provided by this application. Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. An information processing method based on a storage system, characterized in that, Including: In response to an information writing command, write target information in a preset data block based on a preset data structure, where the preset data block has a preset storage space; Determine the target address of the target information in the preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes; If the preset storage space of the preset data block is full, based on the target address, write the first information in the preset data block to the bottom layer of the storage system until all the target information is written to the bottom layer of the storage system, where the target information includes the first information.
2. The method according to claim 1, characterized in that, The writing of information in the preset data block based on the preset data structure includes: Determine target information based on a preset data structure, where a specific field in the target information is used to represent the timestamp of the information; Write each piece of information in the target information in the preset data block.
3. The method according to claim 1, wherein The determining of the target address of the target information in the preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes includes: Based on the disk space capacity corresponding to the target object corresponding to the target information and the preset partition capacity, determine the starting address of the target object corresponding to the target information in the preset virtual disk; Calculate the ratio of the disk space capacity corresponding to the target object to the number of nodes corresponding to the target object to obtain a first ratio; Calculate the product of the first ratio and the node number, and determine the target address of the target information in the preset virtual disk based on the sum of the product and the starting address.
4. The method according to claim 1, wherein After writing the first information in the preset data block to the bottom layer of the storage system, the method further includes: Release the storage space of the preset data block corresponding to the first information.
5. The method according to claim 1, wherein The method further includes: Based on a preset timeout duration, determine whether to receive first feedback information, where the first feedback information is used to represent that the target information has been successfully written to the bottom layer of the storage system; If the first feedback information is not received, issue an alarm prompt.
6. The method according to claim 1, characterized in that, The method further includes: In response to an information reading command, determine the storage address of the information to be read based on the reading object, storage location, and target node in the information reading command; Read the information to be read based on the storage address and write the information to be read into a target file.
7. The method according to claim 6, characterized in that, The reading of the information to be read based on the storage address includes: Based on the data volume of the information to be read and the preset reading volume, determine the number of readings; Recursively read the information to be read based on the number of readings and the storage address.
8. An information processing apparatus based on a storage system, characterized in that, Including: A data block writing module, configured to, in response to an information writing command, write target information in a preset data block based on a preset data structure, where the preset data block has a preset storage space; An address determining module, configured to determine the target address of the target information in the preset virtual disk based on the starting address of the target object corresponding to the target information in the preset virtual disk, the disk space capacity corresponding to the target object, and the number of nodes; An information writing module, configured to, if the preset storage space of the preset data block is full, write the first information in the preset data block to the bottom layer of the storage system based on the target address until all of the target information, including the first information, is written to the bottom layer of the storage system.
9. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to implement the steps of the information processing method based on the storage system according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the information processing method based on the storage system according to any one of claims 1 to 7 when executed by a processor.