Financial data storage path optimization method based on big data
By calculating the operating characteristics of data blocks and storage units in the financial data storage system, the ant colony algorithm is optimized to select storage paths, which solves the problem of low storage efficiency in traditional methods and achieves more efficient data storage and system performance improvement.
Patent Information
- Application Number
- CN202410559194.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-05-08
AI Technical Summary
Traditional data storage methods cannot meet the storage and processing needs of large-scale financial data, and the IO merging efficiency between data is not fully considered when using the ant colony algorithm for storage path optimization, resulting in low overall storage efficiency.
By obtaining the operation records of newly added data blocks and storage units in the storage system, calculating the frequency of read and write operations, time uniformity and correlation, constructing a matching matrix, optimizing the ant colony algorithm to select the optimal storage path, and realizing data Distributed storage and load balancing.
It improves the efficiency of data storage and system performance, and improves the overall efficiency of storage paths through more accurate matching calculation and path planning.
Smart Images

Figure CN118377432B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method for optimizing a financial data storage path based on big data. Background Art
[0002] With the rapid growth of data in the financial industry, financial institutions are facing more and more challenges in data storage and management. Traditional data storage methods often cannot meet the storage and processing needs of large-scale data, so a method that can dynamically select the optimal storage path based on data characteristics and storage system status is needed to improve data storage efficiency and system performance.
[0003] Before selecting the optimal storage path, it is necessary to analyze the characteristics of the newly added data blocks, including the access frequency, size, type, etc. of the data. These characteristics can help determine the storage requirements and access patterns of the data, and provide a basis for path selection. The ant colony algorithm is a heuristic optimization algorithm that simulates the behavior of ants in the process of searching for food. In this method, the ant colony algorithm will be used to search for the optimal storage path in multiple storage systems. By selecting paths between multiple storage systems, distributed storage and load balancing of data can be achieved, improving the performance and scalability of the system.
[0004] In view of the distributed storage characteristics of the current financial industry, when using traditional ant colony algorithms to optimize storage paths, usually only the storage efficiency of the space within the storage unit is considered, without considering the comprehensive efficiency of IO merging between storage data, resulting in low overall storage efficiency. Summary of the invention
[0005] The present invention provides a financial data storage path optimization method based on big data to solve the existing problems.
[0006] The financial data storage path optimization method based on big data of the present invention adopts the following technical solutions:
[0007] The present invention proposes a method for optimizing the storage path of financial data based on big data, which comprises the following steps:
[0008] Obtaining operation records of newly added data blocks and storage units in the current storage system; the operation records include the type of each operation and the start time of each operation;
[0009] According to the number of read operations and write operations in the newly added data block and the storage unit, the read operation frequency and the write operation frequency of the newly added data block and the storage unit are obtained; according to the start time interval of adjacent read operations in the newly added data block and the storage unit, the read time uniformity of the newly added data block and the storage unit is obtained; according to the start time interval of adjacent write operations in the newly added data block and the storage unit, the write time uniformity of the newly added data block and the storage unit is obtained;
[0010] According to the start time interval between each read operation and the next write operation in the newly added data block and the storage unit, the correlation degree between the newly added data block and the storage unit is obtained. According to the start time interval between each read operation and the previous write operation in the newly added data block and the storage unit, the correlation degree between the newly added data block and the storage unit is obtained.
[0011] According to the read operation frequency, write operation frequency, read time uniformity and write time uniformity of the newly added data block and the storage unit, the possibility of simultaneous occurrence of IO operation in the newly added data block and the storage unit is obtained; according to the correlation degree of first reading and then writing of the newly added data block and the correlation degree of first writing and then reading, the weight of the correlation degree of first reading and then writing of the newly added data block is obtained; according to the weight of the correlation degree of first reading and then writing of the newly added data block, the possibility of simultaneous occurrence of IO operation in the newly added data block and the storage unit, and the correlation degree of first reading and then writing of the newly added data block and the storage unit and the correlation degree of first writing and then reading, the matching degree of the newly added data block and the storage unit is obtained;
[0012] According to the matching degree between the newly added data blocks and the storage units, the storage path of the ant colony algorithm is optimized.
[0013] Furthermore, the specific method of obtaining the operation record of adding a new data block and a storage unit in the current storage system includes:
[0014] Divide the data in the temporary storage area into blocks to obtain M new data blocks;
[0015] The operation records of each newly added data block and each storage unit within a collection time of T minutes are obtained to obtain the operation records of M newly added data blocks and the operation records of m storage units, where T is a preset collection time.
[0016] Furthermore, the method of obtaining the read operation frequency and the write operation frequency of the newly added data block and the storage unit according to the number of read operations and write operations in the newly added data block and the storage unit includes the following specific methods:
[0017] The ratio of the number of write operations contained in the zth newly added data block to the acquisition duration is recorded as the write operation frequency of the zth newly added data block;
[0018] The ratio of the number of read operations contained in the zth newly added data block to the acquisition duration is recorded as the read operation frequency of the zth newly added data block;
[0019] The ratio of the number of read operations contained in the s-th storage unit to the acquisition duration is recorded as the read operation frequency of the s-th storage unit;
[0020] The ratio of the number of write operations contained in the s-th storage unit to the acquisition duration is recorded as the write operation frequency of the s-th storage unit.
[0021] Furthermore, the method of obtaining the read time uniformity of the newly added data block and the storage unit according to the start time interval of the adjacent read operations in the storage unit includes the following specific methods:
[0022] The starting time interval between the vth read operation and the v+1th read operation in the zth newly added data block is subtracted from the average starting time interval of all adjacent read operations in the zth newly added data block, and the interval difference between the vth read operation and the v+1th read operation in the zth newly added data block is recorded as;
[0023] The inversely proportional normalized value of the sum of squares of the interval differences between every two adjacent read operations in the zth newly added data block is recorded as the read time uniformity of the zth newly added data block.
[0024] Furthermore, the method of obtaining the correlation between the newly added data block and the storage unit read first and then write according to the start time interval between each read operation and the next write operation in the storage unit includes the following specific methods:
[0025]
[0026] Where, L z,1 Indicates the association degree of the zth newly added data block being read first and written later, t z,v,1 Indicates the start time interval between the vth read operation and the next write operation in the zth newly added data block, N z,1 Indicates the number of read operations in the zth newly added data block, represents the mean of the start time intervals of all adjacent read operations in the zth newly added data block, and exp( ) is an exponential function with a natural constant as the base.
[0027] Furthermore, the method of obtaining the correlation between the newly added data block and the storage unit of writing first and reading later according to the start time interval between each read operation and the previous write operation in the storage unit includes the following specific methods:
[0028]
[0029] Where, Lz,2 Indicates the association degree of the zth newly added data block being written first and read later, t z,v,2 Indicates the start time interval between the vth read operation and the previous write operation in the zth newly added data block, N z,1 Indicates the number of read operations in the zth newly added data block, Represents the average of the start time intervals of all adjacent read operations in the zth newly added data block.
[0030] Further, the possibility of simultaneous occurrence of the IO operation in the newly added data block and the storage unit is obtained according to the read operation frequency, write operation frequency, read time uniformity and write time uniformity of the newly added data block and the storage unit, including the specific method of:
[0031]
[0032] In the formula, E z,s represents the possibility that the zth newly added data block and the IO operation in the sth storage unit occur simultaneously, g s,1 represents the read operation frequency of the sth storage unit, g s,2 represents the write operation frequency of the sth storage unit, G z,1 represents the read operation frequency of the zth newly added data block, G Z,2 represents the write operation frequency of the zth newly added data block, U z,1 represents the uniformity of the reading time of the zth newly added data block, U z,2 represents the uniformity of the writing time of the zth newly added data block, u s,1 represents the read time uniformity of the sth storage unit, u s,2 represents the write time uniformity of the s-th storage unit, || represents the absolute value function, and exp() is an exponential function with a natural constant as the base.
[0033] Further, the weight of the correlation degree of the newly added data block being read first and written later is obtained according to the correlation degree of the newly added data block being read first and written later and the correlation degree of the newly added data block being written first and read later, including the specific method of:
[0034] The sum of the association degree of the zth newly added data block that is read first and written later and the association degree that is written first and read later is recorded as the total association degree of the zth newly added data block;
[0035] The ratio of the relevance of the zth newly added data block being read first and written later to the total relevance of the zth newly added data block is recorded as the weight of the relevance of the zth newly added data block being read first and written later.
[0036] Further, the matching degree between the newly added data block and the storage unit is obtained according to the weight of the association degree of the newly added data block being read first and written later, the possibility of the IO operation of the newly added data block and the storage unit occurring simultaneously, and the association degree of the newly added data block being read first and written later and the association degree of the newly added data block being written first and read later with the storage unit, including the specific method of:
[0037] P z,s =E z,s ×exp(-(α z ×|L z,1 -l s,1 |+(1-α z )×|L z,2 -l s,2 |))
[0038] In the formula, α z represents the weight of the read-before-write association of the zth newly added data block, P z,s Indicates the matching degree between the zth newly added data block and the sth storage unit, L z,1 Indicates the association degree of the zth newly added data block being read first and written later, L z,2 Indicates the association degree of the zth newly added data block being written first and read later, l s,1 represents the association degree of the sth storage unit being read first and then written, l s,2 represents the association degree of writing first and reading later of the sth storage unit, E z,s represents the possibility that the zth newly added data block and the IO operation in the sth storage unit occur simultaneously, | | represents the absolute value function, and exp( ) is an exponential function with a natural constant as the base.
[0039] Furthermore, the storage path of the ant colony algorithm is optimized according to the matching degree between the newly added data block and the storage unit, and the specific method includes:
[0040] The matching degree between each newly added data block and each storage unit is used as a heuristic function to construct a matching degree matrix between each newly added data block and each storage unit;
[0041] The optimal path is planned through the ant colony algorithm, and the optimal path is obtained as the storage solution for each newly added data block.
[0042] The beneficial effects of the technical solution of the present invention are as follows: the present invention obtains the operation records of the newly added data blocks and the storage units in the current storage system; when calculating the correlation between each newly added data block being read first and then written, not only the starting time interval between each read operation and the next write operation is used, but also the starting time interval between each read operation and the next read operation is used, so that the correlation between each newly added data block being read first and then written is more practical, and paves the way for obtaining the matching degree between the newly added data block and the storage unit; when calculating the possibility of simultaneous occurrence of IO operations in the newly added data block and the storage unit, the read operation frequency is combined with the read time uniformity, and not only the overall consistency of each newly added data block and the storage unit is considered, but also the local consistency of the newly added data block and the storage unit is considered, and the matching accuracy between the newly added data block and the storage unit in the read and write mode is further improved; thereby, the matching degree between the newly added data block and the storage unit is made more accurate, and the matching degree matrix of the ant colony algorithm is constructed according to the matching degree between the newly added data block and the storage unit, so that the storage efficiency of the storage path obtained under the optimal path is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 This is a flow chart of the steps of the financial data storage path optimization method based on big data of the present invention. DETAILED DESCRIPTION
[0045] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the financial data storage path optimization method based on big data proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0047] The specific scheme of the financial data storage path optimization method based on big data provided by the present invention is described in detail below with reference to the accompanying drawings.
[0048] See also Figure 1 , which shows a flowchart of a method for optimizing a financial data storage path based on big data provided by an embodiment of the present invention, the method comprising the following steps:
[0049] Step S001: Acquire the operation records of adding new data blocks and storage units in the current storage system.
[0050] It should be noted that in the financial industry, due to the huge amount of data, in order to reduce the amount of operations, the newly added data is not directly added to the existing storage system, but is first stored in a temporary storage area. When the amount reaches a certain level, the newly added data is divided into blocks, and the storage path is planned, and the newly added data blocks are stored in different storage systems. Therefore, the operation records of the newly added data blocks and storage units are obtained to plan the storage path.
[0051] Specifically, the data in the temporary storage area is divided into blocks to obtain M newly added data blocks. The operation records of each newly added data block and each storage unit within the collection time of T minutes are obtained to obtain the operation records of M newly added data blocks and the operation records of m storage units. The collection time T=40 preset in this embodiment is used as an example for description, and other values can be set in other implementations. Blocking the data in the temporary storage area is a well-known technology and is not described in detail in this embodiment. When obtaining the operation records of newly added data blocks or storage units, if the start time of an operation is within the collection time, then this operation is in the operation record. Among them, the operation record of the newly added data block or storage unit includes: the type of each operation, that is, whether each operation is a read operation or a write operation, and the start time of each operation.
[0052] Step S002: According to the number of read operations and write operations in the newly added data block and the storage unit, the read operation frequency and the write operation frequency of the newly added data block and the storage unit are obtained; according to the start time interval of adjacent read operations in the newly added data block and the storage unit, the read time uniformity of the newly added data block and the storage unit is obtained; according to the start time interval of adjacent write operations in the newly added data block and the storage unit, the write time uniformity of the newly added data block and the storage unit is obtained.
[0053] It should be noted that when optimizing the storage path of the newly added data block, the newly added data block should be added to the storage unit that can be merged with it for IO, so as to improve the IO efficiency and storage efficiency after storage. Because the IO characteristics of financial data are mainly reflected in the IO frequency and IO mode of the data, the IO frequency and IO mode of each newly added data block and storage unit are calculated. When performing IO operations, read operations and write operations cannot be performed at the same time. Therefore, the read operation frequency and write operation frequency of the newly added data block and storage unit are calculated.
[0054] Specifically, the ratio of the number of read operations contained in the zth newly added data block to the collection time is recorded as the read operation frequency of the zth newly added data block; the ratio of the number of write operations contained in the zth newly added data block to the collection time is recorded as the write operation frequency of the zth newly added data block.
[0055] Through the above method, the write operation frequency and the read operation frequency of each newly added data block are obtained.
[0056] Furthermore, the ratio of the number of read operations contained in the sth storage unit to the collection time is recorded as the read operation frequency of the sth storage unit; the ratio of the number of write operations contained in the sth storage unit to the collection time is recorded as the write operation frequency of the sth storage unit.
[0057] Through the above method, the write operation frequency and the read operation frequency of each storage unit are obtained.
[0058] It should be noted that, because the processing time of each read operation in the newly added data block and the storage unit may be different from that of other read operations, the read operation frequencies of the newly added data block and the storage unit are relatively similar, but the distribution of the read operations in the newly added data block and the storage unit is quite different. Therefore, the distribution of read operations and write operations in the newly added data block and the storage unit is calculated, that is, the read time uniformity and write time uniformity of the newly added data block and the storage unit.
[0059] Specifically, taking the zth newly added data block as an example, calculate the start time interval of adjacent read operations in the zth newly added data block and the average of the start time intervals of all adjacent read operations in the zth newly added data block. The read time uniformity of the zth newly added data block is denoted as U z,1 , the specific calculation formula is as follows:
[0060]
[0061] Where U z,1 N represents the uniformity of the reading time of the zth newly added data block. z,1 represents the number of read operations in the zth newly added data block, D z,v,1 Indicates the start time interval between the vth read operation and the v+1th read operation in the zth newly added data block, represents the average of the start time intervals of all adjacent read operations in the zth newly added data block, It represents the interval difference between the vth read operation and the v+1th read operation in the zth newly added data block. exp() is an exponential function with a natural constant as the base. This embodiment adopts the exp(-x) model to present the inverse proportional relationship and normalization processing. x is the input of the model. The implementer can set the inverse proportional function and normalization function according to the actual situation.
[0062] It should be noted that It indicates the difference between the start time interval and the average start time interval of each adjacent read operation in the zth newly added data block. The larger the value is, the more uneven the time distribution of the read operation in the zth newly added data block is, that is, the smaller the read time uniformity of the zth newly added data block is; the smaller the value is, the more uniform the time distribution of the read operation in the zth newly added data block is, that is, the greater the read time uniformity of the zth newly added data block is.
[0063] Similarly, the write time uniformity of the zth newly added data block is calculated, and the read time uniformity and write time uniformity of all newly added data blocks and storage units are further obtained.
[0064] At this point, the read time uniformity and write time uniformity of each newly added data block and storage unit are obtained.
[0065] Step S003: According to the start time interval between each read operation and the next write operation in the newly added data block and the storage unit, the correlation degree between the newly added data block and the storage unit is obtained. According to the start time interval between each read operation and the previous write operation in the newly added data block and the storage unit, the correlation degree between the newly added data block and the storage unit is obtained.
[0066] It should be noted that the IO mode of the newly added data block and the storage unit is mainly the read-write mode between the data, and the read-write mode is mainly reflected in the read-write correlation. Therefore, the correlation between each newly added data block and the storage unit is calculated.
[0067] Specifically, taking the zth newly added data block as an example, calculate the starting time interval between each read operation and the next write operation, the starting time interval between each read operation and the previous write operation, and the average of the starting time intervals of all adjacent read operations in the zth newly added data block. If there is no write operation after the vth read operation in the zth newly added data block, then the average of the starting time intervals of all adjacent read operations in the zth newly added data block is recorded as the starting time interval between the vth read operation and the next write operation. In addition, the average of the starting time intervals of all adjacent read operations in the zth newly added data block is recorded as the starting time interval between the 1st read operation and the previous write operation. Obtain the correlation degree of read-first-then-write and write-first-then-read of the zth newly added data block.
[0068] The association degree of the zth newly added data block being read first and written later is recorded as L z,1 , the specific calculation formula is as follows:
[0069]
[0070] Where, L z,1 Indicates the association degree of the zth newly added data block being read first and written later, t z,v,1 Indicates the start time interval between the vth read operation and the next write operation in the zth newly added data block, N z,1 Indicates the number of read operations in the zth newly added data block, It represents the mean of the start time intervals of all adjacent read operations in the zth newly added data block. exp() is an exponential function with a natural constant as the base. This embodiment adopts the exp(-x) model to present the inverse proportional relationship and normalization processing. x is the input of the model. The implementer can set the inverse proportional function and normalization function according to the actual situation.
[0071] It should be noted that It represents the average time interval between each read operation and the next write operation in the zth newly added data block; It represents the ratio of the time interval between the read operation and the write operation in the zth newly added data block to the time interval between the read operations. The larger the value is, the more likely it is that there are more read operations between a read operation and a write operation in the zth newly added data block, that is, the correlation of the zth newly added data block being read first and written later is smaller.
[0072] The association degree of the zth newly added data block being written first and read later is recorded as L z,2 , the specific calculation formula is as follows:
[0073]
[0074] Where, L z,2 Indicates the association degree of the zth newly added data block being written first and read later, t z,v,2 Indicates the start time interval between the vth read operation and the previous write operation in the zth newly added data block, N z,1 Indicates the number of read operations in the zth newly added data block, Represents the average of the start time intervals of all adjacent read operations in the zth newly added data block.
[0075] It should be noted that It indicates the ratio of the time connection between the write operation and the read operation to the time connection between the read operations in the zth newly added data block. The larger the value is, the more consecutive read operations are contained after a write operation in the zth newly added data block, that is, the smaller the correlation between the write first and the read later of the zth newly added data block.
[0076] At this point, the association degree of each newly added data block with the storage unit of reading first and writing later, and the association degree of each newly added data block with the storage unit of writing first and reading later are obtained.
[0077] Step S004: According to the read operation frequency, write operation frequency, read time uniformity and write time uniformity of the newly added data block and the storage unit, obtain the possibility of simultaneous occurrence of IO operations in the newly added data block and the storage unit; according to the correlation between the newly added data block being read first and written later and the correlation between the newly added data block being written first and read later, obtain the weight of the correlation between the newly added data block being read first and written later; according to the weight of the correlation between the newly added data block being read first and written later, the possibility of simultaneous occurrence of IO operations in the newly added data block and the storage unit, and the correlation between the newly added data block being read first and written later and the correlation between the newly added data block being written first and read later, obtain the matching degree between the newly added data block and the storage unit.
[0078] It should be noted that because the IO characteristics of financial data are mainly reflected in the IO frequency and IO mode, and because the processing time of each read operation in the newly added data block and storage unit may be different from that of other read operations, the read operation frequency of the newly added data block and storage unit is relatively similar, while the distribution of the read operations in the newly added data block and storage unit is quite different. Therefore, according to the read operation frequency, write operation frequency, read time uniformity and write time uniformity of the newly added data block and storage unit, the possibility of simultaneous IO operations in the newly added data block and storage unit is obtained.
[0079] It should be further explained that, because the IO mode is mainly the correlation degree of read first and write first and read later, the matching degree of each new data block and each storage unit is obtained according to the possibility of simultaneous IO operation of the new data block and the storage unit, the correlation degree of read first and write later and the correlation degree of write first and read later of each new data block and each storage unit.
[0080] Specifically, the probability that the zth newly added data block and the IO operation in the sth storage unit occur simultaneously is denoted as E z,s , the specific calculation formula is as follows:
[0081]
[0082] In the formula, E z,s represents the possibility that the zth newly added data block and the IO operation in the sth storage unit occur simultaneously, g s,1 represents the read operation frequency of the sth storage unit, gs,2 represents the write operation frequency of the sth storage unit, G z,1 represents the read operation frequency of the zth newly added data block, G Z,2 represents the write operation frequency of the zth newly added data block, U z,1 represents the uniformity of the reading time of the zth newly added data block, U z,2 represents the uniformity of the writing time of the zth newly added data block, u s,1 represents the read time uniformity of the sth storage unit, u s,2 represents the write time uniformity of the s-th storage unit, || represents the absolute value function, exp() is an exponential function with a natural constant as the base, and this embodiment adopts the exp(-x) model to present the inverse proportional relationship and normalization processing, x is the input of the model, and the implementer can set the inverse proportional function and normalization function according to the actual situation.
[0083] It should be noted that |g s,1 -G z,1 | represents the difference in the frequency of read operations between the zth newly added data block and the sth storage unit. The smaller the value, the more likely it is that the read operations in the zth newly added data block and the sth storage unit will occur simultaneously; (g s,1 +G z,1 ) represents the sum of the read operation frequencies of the zth newly added data block and the sth storage unit. The larger the value, the more likely it is that the read operations of the zth newly added data block and the sth storage unit will occur simultaneously; (U z,1 +u s,1 ) represents the sum of the time uniformity of the read operations of the zth newly added data block and the sth storage unit. When the read operation frequencies of the zth newly added data block and the sth storage unit are close, (U z,1 +u s,1 ), the larger the value of , the greater the possibility of IO merging between the zth newly added data block and the sth storage unit; represents the probability that the read operation of the zth newly added data block and the sth storage unit occur simultaneously (i.e., the prerequisite for IO merging); It represents the probability that the zth newly added data block and the write operation in the sth storage unit occur simultaneously.
[0084] The matching degree between the zth newly added data block and the sth storage unit is recorded as P z,s , the specific calculation formula is as follows:
[0085]
[0086] In the formula, α z represents the weight of the read-before-write association of the zth newly added data block, P z,sIndicates the matching degree between the zth newly added data block and the sth storage unit, L z,1 Indicates the association degree of the zth newly added data block being read first and written later, L z,2 Indicates the association degree of the zth newly added data block being written first and read later, L z,1 +L z,2 represents the total relevance of the zth newly added data block, l s,1 represents the association degree of the sth storage unit being read first and then written, l s,2 represents the association degree of writing first and reading later of the sth storage unit, E z,s represents the possibility of the zth newly added data block and the IO operation in the sth storage unit occurring simultaneously, || represents the absolute value function, exp() is an exponential function with a natural constant as the base, and this embodiment adopts the exp(-x) model to present the inverse proportional relationship and normalization processing, x is the input of the model, and the implementer can set the inverse proportional function and normalization function according to the actual situation.
[0087] It should be noted that |L z,1 -l s,1 | indicates the difference in the correlation between the zth newly added data block and the sth storage unit in terms of read-first-then-write. The larger the value, the greater the difference in the reading mode between the zth newly added data block and the sth storage unit, and the lower the efficiency of IO merging between the zth newly added data block and the sth storage unit; |L z,2 -l s,2 | represents the difference in the correlation between the zth newly added data block and the sth storage unit in terms of write-before-read. The larger the value, the greater the difference in the reading mode between the zth newly added data block and the sth storage unit, and the lower the efficiency of IO merging between the zth newly added data block and the sth storage unit.
[0088] At this point, the matching degree between each newly added data block and each storage unit is obtained.
[0089] Step S005: Optimizing the storage path of the ant colony algorithm according to the matching degree between the newly added data block and the storage unit.
[0090] Specifically, the matching degree between each newly added data block and each storage unit calculated above is used as a heuristic function to construct a matching degree matrix between each newly added data block and each storage unit. Then, the optimal path is planned by an ant colony algorithm to obtain the optimal path and use it as the storage solution for each newly added data block. Among them, constructing a matching degree matrix between each newly added data block and each storage unit is a well-known technology and will not be described in detail in this embodiment. The optimal path is planned by an ant colony algorithm to obtain the optimal path, which is a well-known technology and will not be described in detail in this embodiment.
[0091] At this point, this embodiment is completed.
[0092] To sum up, in the embodiments of the present invention, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for optimizing the storage path of financial data based on big data, characterized in that: The method comprises the following steps: Obtaining operation records of newly added data blocks and storage units in the current storage system; the operation records include the type of each operation and the start time of each operation; According to the number of read operations and write operations in the newly added data block and the storage unit, the read operation frequency and the write operation frequency of the newly added data block and the storage unit are obtained; according to the start time interval of adjacent read operations in the newly added data block and the storage unit, the read time uniformity of the newly added data block and the storage unit is obtained; according to the start time interval of adjacent write operations in the newly added data block and the storage unit, the write time uniformity of the newly added data block and the storage unit is obtained; The specific method of obtaining the read operation frequency and the write operation frequency of the newly added data block and the storage unit according to the number of read operations and write operations in the newly added data block and the storage unit includes: The first The ratio of the number of write operations contained in the newly added data block to the acquisition duration is recorded as The frequency of write operations for newly added data blocks; The first The ratio of the number of read operations contained in the newly added data block to the acquisition duration is recorded as The frequency of read operations for newly added data blocks; The first The ratio of the number of read operations contained in a storage unit to the acquisition time is recorded as The frequency of read operations of each memory cell; The first The ratio of the number of write operations contained in a storage unit to the acquisition duration is recorded as The write operation frequency of each memory cell; According to the start time interval between each read operation and the next write operation in the newly added data block and the storage unit, the correlation degree between the newly added data block and the storage unit is obtained. According to the start time interval between each read operation and the previous write operation in the newly added data block and the storage unit, the correlation degree between the newly added data block and the storage unit is obtained. The method of obtaining the correlation between the newly added data block and the storage unit read first and then write according to the start time interval between each read operation and the next write operation in the storage unit includes the following specific methods: In the formula, Indicates The association degree of newly added data blocks read first and written later, Indicates The newly added data block The time interval between the start of a read operation and the next write operation. Indicates The number of read operations within the newly added data blocks, Indicates The average of the start time intervals of all adjacent read operations in a newly added data block, is an exponential function with a natural constant as base; The method of obtaining the correlation between the newly added data block and the storage unit of writing first and reading later according to the start time interval between each read operation and the previous write operation in the storage unit includes the following specific methods: In the formula, Indicates The association degree of newly added data blocks written first and read later, Indicates The newly added data block The time interval between the start of a read operation and the start of the previous write operation, Indicates The number of read operations within the newly added data blocks, Indicates The average of the start time intervals of all adjacent read operations in a newly added data block; According to the read operation frequency, write operation frequency, read time uniformity and write time uniformity of the newly added data block and the storage unit, the possibility of simultaneous occurrence of IO operation in the newly added data block and the storage unit is obtained; according to the correlation degree of first reading and then writing of the newly added data block and the correlation degree of first writing and then reading, the weight of the correlation degree of first reading and then writing of the newly added data block is obtained; according to the weight of the correlation degree of first reading and then writing of the newly added data block, the possibility of simultaneous occurrence of IO operation in the newly added data block and the storage unit, and the correlation degree of first reading and then writing of the newly added data block and the storage unit and the correlation degree of first writing and then reading, the matching degree of the newly added data block and the storage unit is obtained; According to the matching degree between the newly added data blocks and the storage units, the storage path of the ant colony algorithm is optimized.
2. The method for optimizing the storage path of financial data based on big data according to claim 1, characterized in that: The specific method of obtaining the operation record of adding new data blocks and storage units in the current storage system includes: Divide the data in the temporary storage area into blocks and obtain New data blocks; Get the acquisition time of each new data block and each storage unit Operation records within minutes, get The operation record of the newly added data block and The operation records of storage units, The preset collection duration.
3. The method for optimizing the storage path of financial data based on big data according to claim 1, characterized in that: The method of obtaining the read time uniformity of the newly added data block and the storage unit according to the start time interval between the newly added data block and the adjacent read operations in the storage unit includes the following specific methods: The first The newly added data block The first read operation and the The time interval between the start and end of the read operation minus the The average of the start time intervals of all adjacent read operations in the newly added data block is recorded as The newly added data block The first read operation and the The interval difference between read operations; The first The inverse normalized value of the sum of squares of the interval differences between each two adjacent read operations in the newly added data block is recorded as The read time uniformity of the newly added data blocks.
4. The method for optimizing the storage path of financial data based on big data according to claim 1, characterized in that: The possibility of simultaneous occurrence of the IO operation of the newly added data block and the storage unit is obtained according to the read operation frequency, write operation frequency, read time uniformity and write time uniformity of the newly added data block and the storage unit, including the specific method of: In the formula, Indicates The new data blocks and The possibility of IO operations occurring simultaneously in a storage unit, Indicates The read operation frequency of each memory cell, Indicates The write operation frequency of each memory cell, Indicates The read operation frequency of the newly added data blocks, Indicates The frequency of write operations for newly added data blocks, Indicates The read time uniformity of the newly added data blocks, Indicates The write time uniformity of the newly added data blocks, Indicates The read time uniformity of each storage unit, Indicates The write time uniformity of each storage unit, represents the absolute value function, is an exponential function with a natural constant as its base.
5. The method for optimizing the storage path of financial data based on big data according to claim 1, characterized in that: The specific method of obtaining the weight of the correlation degree of the newly added data block being read first and written later according to the correlation degree of the newly added data block being read first and written later and the correlation degree of the newly added data block being written first and read later is as follows: The first The sum of the correlation degree of the newly added data block read first and then written and the correlation degree of the newly added data block written first and then read is recorded as The total relevance of the newly added data blocks; The first The correlation between the first read and the second write of the newly added data block is The ratio of the total correlation of the newly added data blocks is recorded as The weight of the association degree of the newly added data block to be read first and written later.
6. The method for optimizing the storage path of financial data based on big data according to claim 1, characterized in that: The matching degree between the newly added data block and the storage unit is obtained according to the weight of the association degree of the newly added data block being read first and written later, the possibility of the IO operation of the newly added data block and the storage unit occurring at the same time, and the association degree of the newly added data block being read first and written later and the association degree of the newly added data block being written first and read later with the storage unit, including the specific method as follows: In the formula, Indicates The weight of the association degree of the newly added data block read first and then written, Indicates The new data blocks and The matching degree of each storage unit, Indicates The association degree of newly added data blocks read first and written later, Indicates The association degree of newly added data blocks written first and read later, Indicates The association degree of a storage unit that is read first and then written, Indicates The correlation between the write-before-read of a storage unit, Indicates The new data blocks and The possibility of IO operations occurring simultaneously in a storage unit, represents the absolute value function, is an exponential function with a natural constant as its base.
7. The method for optimizing the storage path of financial data based on big data according to claim 1, characterized in that: The storage path of the ant colony algorithm is optimized according to the matching degree between the newly added data block and the storage unit, and the specific method includes: The matching degree between each newly added data block and each storage unit is used as a heuristic function to construct a matching degree matrix between each newly added data block and each storage unit; The optimal path is planned through the ant colony algorithm, and the optimal path is obtained as the storage solution for each newly added data block.
