Data slicing method and device based on ant colony algorithm, equipment and storage medium

Through the data slicing method based on the ant colony algorithm, the slice scheme is dynamically optimized, which solves the problems of low data slicing efficiency and manual intervention in the prior art, and realizes efficient and automatic data slicing processing.

CN119201846APending Publication Date: 2024-12-27GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411324195.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing rules-based data slicing technology cannot adapt to the dynamic changes in the data environment, and is prone to falling into local optimization, and requires manual intervention, which increases management costs.

Method used

Using the data slicing method based on the ant colony algorithm, virtual ant colony is constructed through parameters such as ants number, pheromone volatile factors and heuristic volatile factors, and dynamically optimize the slicing scheme to find the optimal solution for the iterative target.

Benefits of technology

It realizes optimization of data slicing efficiency, reduces time and resource consumption, can automatically adjust and optimize slicing schemes, adapt to different data scenarios, and has strong scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201846A_ABST
    Figure CN119201846A_ABST
Patent Text Reader

Abstract

According to the data slicing method and device based on the ant colony algorithm, the equipment and the storage medium provided by the invention, the to-be-sliced data and the ant colony algorithm parameters are acquired, and the ant colony algorithm parameters comprise the initial parameters and the iteration target parameters; determining a convergence condition of the ant colony algorithm according to the iteration target parameter; determining a target slicing scheme through the ant colony algorithm according to the initial parameter and the convergence condition; and according to the target slicing scheme, slicing the to-be-sliced data. According to the method, the data slicing scheme can be dynamically optimized through iterative search of the ant colony algorithm, so that the optimal scheme conforming to the iterative target can be quickly found in the slicing process, the slicing time and resource consumption are reduced, the setting of the ant colony algorithm can be flexibly adjusted according to different slicing targets and initial parameters, and the slicing efficiency is improved. Comprise ant quantity, pheromone volatilization factors, heuristic volatilization factors and the like, are suitable for optimization requirements in different data scenes, and have relatively high expansibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data slicing method, device, equipment and storage medium based on an ant colony algorithm. Background Art

[0002] In the era of big data, the demand for data processing and management is becoming increasingly prominent. As an important means of data processing, data slicing technology plays a key role in improving data processing efficiency and reducing data transmission time. At present, data slicing technology mainly adopts rule-based slicing strategies, that is, data slicing is performed according to preset rules or strategies. The advantage of this method is that it is simple to implement and works well when used for small-scale data processing.

[0003] However, as the scale of data continues to expand, rule-based data slicing technology has exposed many problems. First, the preset rules or strategies may not be able to adapt to the dynamic changes in the data environment, resulting in low slicing efficiency. Secondly, due to the use of fixed slicing strategies, the global optimality of slicing cannot be considered, and it is easy to fall into the local optimality. Furthermore, rule-based data slicing technology cannot be automatically adjusted and optimized, and requires manual intervention, which undoubtedly increases management costs.

[0004] In summary, the problems existing in the prior art need to be solved urgently. Summary of the invention

[0005] The present invention provides a data slicing method, device, equipment and storage medium based on an ant colony algorithm, which are used to solve the defects in the prior art and optimize the data slicing efficiency.

[0006] The present invention provides a data slicing method based on ant colony algorithm, comprising:

[0007] Acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0008] Determining a convergence condition of the ant colony algorithm according to the iterative target parameter;

[0009] Determine a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition;

[0010] The data to be sliced ​​is sliced ​​according to the target slicing scheme.

[0011] Acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0012] Determining a convergence condition of the ant colony algorithm according to the iterative target parameter;

[0013] Determine a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition;

[0014] The data to be sliced ​​is sliced ​​according to the target slicing scheme.

[0015] According to a data slicing method based on an ant colony algorithm provided by the present invention, before the step of obtaining the data to be sliced ​​and the ant colony algorithm parameters, the method further includes:

[0016] Get the original data;

[0017] Performing data cleaning on the original data;

[0018] The cleaned data is divided into blocks to obtain the data to be sliced.

[0019] According to a data slicing method based on an ant colony algorithm provided by the present invention, after the step of slicing the data to be sliced ​​according to the target slicing scheme, the method further includes:

[0020] Generate corresponding redundant check codes according to the data slices generated after slicing;

[0021] The redundant check code is added to the corresponding data slice, and the redundant check code is used for data recovery.

[0022] According to a data slicing method based on an ant colony algorithm provided by the present invention, the step of determining a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence conditions specifically includes:

[0023] The initial parameters include the number of ants, pheromone volatility factor and heuristic volatility factor;

[0024] constructing a virtual ant colony according to the number of ants;

[0025] Determining the current optimal slicing scheme through the virtual ant colony according to the current pheromone concentration and heuristic information, wherein the current pheromone concentration is determined according to the pheromone concentration before iteration and the pheromone volatility factor, and the heuristic information is determined according to the heuristic information before iteration and the heuristic volatility factor;

[0026] Determining the fitness of the current optimal slicing scheme;

[0027] Returning to the step of determining the current optimal slicing scheme through the virtual ant colony according to the current pheromone concentration and heuristic information, until the fitness satisfies the convergence condition.

[0028] According to a data slicing method based on ant colony algorithm provided by the present invention, the pheromone concentration is achieved by the following method:

[0029] τ i,j *=(1-ρ)·τ i,j +Δτ i,j

[0030] Among them, τ i,j * is the pheromone concentration after iteration, τ i,j is the pheromone concentration, ρ is the pheromone volatility factor, Δτ i,j For the increase of pheromone;

[0031] The heuristic information is implemented in the following way:

[0032] η i,j =\frac{1}·{d_{i,j}}

[0033] Among them, η i,j is the heuristic information, and {d_{i,j}} is the distance between the slice points.

[0034] According to a data slicing method based on an ant colony algorithm provided by the present invention, the step of determining the fitness of the current optimal slicing scheme is implemented in the following manner:

[0035] F=w1·f1+w2·f2+w3·f3+w4·f4

[0036] Among them, f1 is the objective function of the uniformity of the size of data slices, f2 is the objective function of the time efficiency of the slicing process, f3 is the objective function of the stability of data transmission after slicing, and f4 is the objective function for optimizing the consumption of system resources; w1, w2, w3, w4 are the target weights corresponding to f1, f2, f3, f4.

[0037] According to a data slicing method based on an ant colony algorithm provided by the present invention, the step of determining the current optimal slicing scheme by the virtual ant colony according to the current pheromone concentration and heuristic information specifically includes:

[0038]

[0039] Among them, τ i,j is the pheromone concentration from the current data block i to the next slicing scheme j; η i,j is the heuristic information, i.e., the attractiveness of the ant’s choice of scheme j; α is the importance coefficient of pheromone concentration; β is the importance coefficient of heuristic information; J is the set of all selectable slicing schemes.

[0040] The present invention also provides a data slicing device based on an ant colony algorithm, comprising:

[0041] A data acquisition module is used to acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0042] A condition determination module, used to determine the convergence condition of the ant colony algorithm according to the iteration target parameter;

[0043] A scheme determination module, used to determine a target slicing scheme through the ant colony algorithm according to the initial parameters and the convergence condition;

[0044] The data slicing module is used to slice the data to be sliced ​​according to the target slicing scheme.

[0045] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data slicing method based on the ant colony algorithm as described above is implemented.

[0046] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described data slicing methods based on the ant colony algorithm.

[0047] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned data slicing methods based on ant colony algorithm.

[0048] The data slicing method, device, equipment and storage medium based on the ant colony algorithm provided by the present invention obtain the data to be sliced ​​and the ant colony algorithm parameters, wherein the ant colony algorithm parameters include initial parameters and iterative target parameters; determine the convergence conditions of the ant colony algorithm according to the iterative target parameters; determine the target slicing scheme through the ant colony algorithm according to the initial parameters and the convergence conditions; and slice the data to be sliced ​​according to the target slicing scheme. The present invention can dynamically optimize the data slicing scheme through the iterative search of the ant colony algorithm, so that the optimal scheme that meets the iterative target can be quickly found during the slicing process, reducing the time and resource consumption of slicing, and can flexibly adjust the settings of the ant colony algorithm according to different slicing targets and initial parameters, including the number of ants, pheromone volatility factor and heuristic volatility factor, etc., to adapt to the optimization needs in different data scenarios, and has strong scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.

[0050] Figure 1 It is a flow chart of a data slicing method based on ant colony algorithm provided by the present invention;

[0051] Figure 2 It is a structural schematic diagram of a data slicing device based on ant colony algorithm provided by the present invention;

[0052] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] In order to solve the problems in the prior art, the present invention proposes a data slicing method based on ant colony algorithm to optimize the data slicing efficiency. The data slicing method based on ant colony algorithm is described below. Figure 1 As shown, including but not limited to the following steps:

[0055] Step 110: Obtain the data to be sliced ​​and the parameters of the ant colony algorithm, where the parameters of the ant colony algorithm include initial parameters and iterative target parameters.

[0056] In this step, firstly, the data to be sliced ​​that needs to be sliced ​​is obtained. The data can be file data in various formats, database records or other large-scale data blocks. The obtained data to be sliced ​​can be pre-processed according to actual needs, such as data cleaning and format conversion, to ensure the accuracy and consistency of data slicing.

[0057] At the same time, the necessary parameters for executing the ant colony algorithm are obtained. The ant colony algorithm parameters include initial parameters and iterative target parameters, among which:

[0058] The initial parameters include the number of ants, pheromone volatility factor, heuristic volatility factor, etc. The number of ants determines the intensity of parallel search, the pheromone volatility factor determines the speed of pheromone update, and the heuristic volatility factor determines the weight of heuristic information.

[0059] The iteration target parameters are used to define the optimization goal of the algorithm, such as the fitness threshold or the maximum number of iterations. These parameters are used to control the convergence and termination conditions of the algorithm.

[0060] Step 120: Determine the convergence condition of the ant colony algorithm according to the iteration target parameter.

[0061] After obtaining the iteration target parameters, this step uses these target parameters to determine the convergence conditions of the ant colony algorithm. Common convergence conditions include:

[0062] Fitness value convergence: When the fitness value searched by the algorithm tends to be stable in multiple iteration cycles, that is, when the increment of fitness is less than a preset threshold, the algorithm will be considered to have converged.

[0063] Maximum number of iterations: When the ant colony algorithm reaches the predetermined maximum number of iterations, the algorithm will terminate.

[0064] Determining the convergence condition helps ensure that the algorithm finds a more ideal slicing solution within a reasonable time, while avoiding the waste of computing resources due to too many iterations.

[0065] Step 130: Determine a target slicing scheme through the ant colony algorithm according to the initial parameters and the convergence condition.

[0066] In this step, the algorithm builds a virtual ant colony based on initial parameters (including the number of ants, pheromone volatilization factor, etc.). Each ant randomly selects a slicing scheme in the search space. According to the path taken by the ant, the pheromone concentration will be updated on the path to guide subsequent ants to make more optimized choices. Through the above mechanism, the ant colony gradually tends to choose a slicing scheme with a higher pheromone concentration and stronger heuristic information. As the iteration proceeds, it eventually converges to a global optimal or near-optimal target slicing scheme.

[0067] Step 140: Slice the data to be sliced ​​according to the target slicing scheme.

[0068] After the ant colony algorithm converges, the final target slicing scheme is obtained. According to the scheme, the system performs actual slicing operations on the sliced ​​data. The slicing standards can be defined according to specific business needs, such as the uniformity of slice size, transmission efficiency, system resource consumption, etc.

[0069] The sliced ​​data can be further processed according to business needs, such as storage, transmission or adding redundant check codes to improve data reliability and recovery capabilities.

[0070] The data slicing method based on the ant colony algorithm provided by the present invention obtains the data to be sliced ​​and the ant colony algorithm parameters, the ant colony algorithm parameters include initial parameters and iterative target parameters; determines the convergence condition of the ant colony algorithm according to the iterative target parameters; determines the target slicing scheme through the ant colony algorithm according to the initial parameters and the convergence conditions; and slices the data to be sliced ​​according to the target slicing scheme. The present invention can dynamically optimize the data slicing scheme through the iterative search of the ant colony algorithm, so that the optimal scheme that meets the iterative target can be quickly found during the slicing process, reducing the time and resource consumption of slicing, and can flexibly adjust the settings of the ant colony algorithm according to different slicing targets and initial parameters, including the number of ants, pheromone volatility factor and heuristic volatility factor, etc., to adapt to the optimization needs in different data scenarios, and has strong scalability.

[0071] As a further optional embodiment, before the step of obtaining the data to be sliced ​​and the ant colony algorithm parameters, the method further includes:

[0072] Get the original data;

[0073] Performing data cleaning on the original data;

[0074] The cleaned data is divided into blocks to obtain the data to be sliced.

[0075] In this embodiment, before step 110 of the original embodiment, a step of processing raw data is further added to ensure the quality of the data and the accuracy of the slicing process. Before performing data slicing, the raw data is first obtained. The raw data can be data collected from multiple sources, such as records in a database, data blocks in a large file, real-time data generated by an IoT sensor, etc. These raw data usually have different formats and structures, and may have problems such as noise, redundancy or missing. After the raw data is acquired, it needs to be cleaned. The process of data cleaning can include removing noise, filling missing values ​​and standardizing data formats. After completing data cleaning, the cleaned data is divided into blocks according to certain rules to obtain data to be sliced. The block rules can be customized according to actual needs, such as: block by data size or block by logic or business needs.

[0076] As a further optional embodiment, after the step of slicing the data to be sliced ​​according to the target slicing scheme, the method further includes:

[0077] Generate corresponding redundant check codes according to the data slices generated after slicing;

[0078] The redundant check code is added to the corresponding data slice, and the redundant check code is used for data recovery.

[0079] After completing the data slicing, a corresponding redundant check code is further generated for each generated data slice. The redundant check code is used to detect and correct errors that may occur during data transmission or storage, thereby improving the fault tolerance of the system. Common redundant check code generation methods include:

[0080] Parity check code: Calculate the parity of the binary bits of each data slice and generate an additional check bit.

[0081] Cyclic Redundancy Check (CRC): A set of checksums is calculated through polynomial division to capture and correct more complex errors.

[0082] Hamming code: detects and corrects single-bit errors by inserting multiple check bits into the data slice.

[0083] The generated redundant check code can select a suitable check algorithm according to actual needs to facilitate subsequent data recovery.

[0084] Once the redundancy check code is generated, it is attached to the corresponding data slice to form a redundancy-enhanced data slice. In this way, if the data fragment is damaged or lost during data transmission or storage, the system can perform data recovery operations through the redundancy check code.

[0085] By adding redundant checksums, the integrity and security of each data slice is further guaranteed. When data is damaged, lost, or otherwise erroneous, the original data can be quickly restored by reading the redundant checksums and performing verification.

[0086] As a further optional embodiment, the step of determining the target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition specifically includes:

[0087] The initial parameters include the number of ants, pheromone volatility factor and heuristic volatility factor;

[0088] constructing a virtual ant colony according to the number of ants;

[0089] Determining the current optimal slicing scheme through the virtual ant colony according to the current pheromone concentration and heuristic information, wherein the current pheromone concentration is determined according to the pheromone concentration before iteration and the pheromone volatility factor, and the heuristic information is determined according to the heuristic information before iteration and the heuristic volatility factor;

[0090] Determining the fitness of the current optimal slicing scheme;

[0091] Returning to the step of determining the current optimal slicing scheme through the virtual ant colony according to the current pheromone concentration and heuristic information, until the fitness satisfies the convergence condition.

[0092] In this embodiment, the specific process of determining the target slicing scheme by the ant colony algorithm is further refined based on step 130 of the original embodiment. By setting initial parameters, building a virtual ant colony, and determining the optimal slicing scheme based on pheromone concentration and heuristic information, the optimization capability of the data slicing scheme is improved.

[0093] Before applying the ant colony algorithm, first set the initial parameters. The initial parameters include the following:

[0094] Number of ants: The number of virtual ants contained in the virtual ant colony directly affects the exploration space of the ant colony algorithm. A larger number of ants can improve the coverage of the solution space, but it also increases the amount of calculation.

[0095] Pheromone Volatilization Factor: This parameter controls how quickly the pheromone concentration decays over time. A higher volatility factor causes the pheromone to evaporate quickly, reducing the attractiveness of the previous path and helping to explore new slicing schemes.

[0096] Heuristic volatility factor: The importance coefficient of heuristic information, which is used to adjust the ant's reliance on heuristic information when selecting a path and affects the path that the ant prefers.

[0097] According to the set number of ants, a virtual ant colony is constructed. Each virtual ant represents a potential slice scheme selector. The virtual ant colony gradually explores and optimizes the data slice scheme through multiple iterations.

[0098] The virtual ant colony determines the slicing scheme based on the following two main pieces of information:

[0099] Current pheromone concentration: represents the attractiveness of the path previously chosen by the ants. The higher the pheromone concentration, the greater the possibility that the path will be chosen by the ants. The current pheromone concentration is determined by the concentration of the previous iteration and the pheromone volatility factor.

[0100] As a further optional embodiment, the pheromone concentration is achieved by:

[0101] τ i,j *=(1-ρ)·τ i,j +Δτ i,j

[0102] Among them, τ i,j * is the pheromone concentration after iteration, τ i,j is the pheromone concentration, ρ is the pheromone volatility factor, Δτ i,j For the increase of pheromone;

[0103] The heuristic information is implemented in the following way:

[0104] ηi,j =\frac{1}·{d_{i,j}}

[0105] Among them, η i,j is the heuristic information, and {d_{i,j}} is the distance between the slice points.

[0106] In each iteration, the path selection of the virtual ant colony is not only affected by the current pheromone concentration, but also dynamically adjusted based on the previous path selection of the ants. The formula for updating the pheromone concentration is:

[0107] τ i,j *=(1-ρ)·τ i,j +Δτ i,j

[0108] τ i,j * is the pheromone concentration after iteration, τ i,j is the pheromone concentration, ρ is the pheromone volatility factor that controls the speed of pheromone decay, and its value range is 0, 1. A higher ρ value will cause the previously accumulated pheromone to dissipate quickly, prompting the algorithm to explore more new slicing schemes, Δτ i,j is the increment of pheromone, which is usually related to the superiority of the path, indicating that the attractiveness of a path has increased in this iteration.

[0109] Heuristic information is used to reflect the potential superiority of a slicing scheme, which is mainly calculated based on the distance between slicing points. The formula is as follows:

[0110] η i,j =\frac{1}·{d_{i,j}}

[0111] η i,j is the heuristic information, and {d_{i,j}} is the distance between the slice points.

[0112] This formula shows that the shorter the distance between slicing points, the greater the heuristic information value, indicating that the slicing path is more attractive and the virtual ants are more inclined to choose this path for slicing. By dynamically adjusting the calculation of heuristic information, the ability to select the local optimal solution can be improved during the data slicing process, while avoiding over-reliance on global information.

[0113] As a further optional embodiment, the step of determining the fitness of the current optimal slicing scheme is implemented in the following manner:

[0114] F=w1·f1+w2·f2+w3·f3+w4·f4

[0115] Among them, f1 is the objective function of the uniformity of the size of data slices, f2 is the objective function of the time efficiency of the slicing process, f3 is the objective function of the stability of data transmission after slicing, and f4 is the objective function for optimizing the consumption of system resources; w1, w2, w3, w4 are the target weights corresponding to f1, f2, f3, f4.

[0116] Specifically, size uniformity can be represented by the variance of the data block. The smaller the variance, the higher the uniformity. Suppose the size of each data block is S i , a total of N data blocks, then:

[0117]

[0118] in, is the average size of the data blocks.

[0119] Slicing efficiency can be defined as the inverse of the time required to process a slice, that is:

[0120]

[0121] Among them, T slice is the total time to complete the slicing operation.

[0122] Transmission stability can be measured based on the error rate or packet loss rate that occurs during transmission. Assuming the error rate of data transmission is E, then:

[0123]

[0124] The lower the transmission error rate, the higher the stability.

[0125] System resource consumption can be evaluated based on the total consumption of resources such as CPU usage, memory usage, and network bandwidth. Assume that the system resource consumption is R cpu , R mem and R net , the total resource consumption can be expressed as:

[0126] f4=-(R cpu +R mem +R net )

[0127] The greater the resource consumption, the lower the fitness.

[0128] As a further optional embodiment, the step of determining the current optimal slicing scheme by the virtual ant colony according to the current pheromone concentration and heuristic information specifically includes:

[0129]

[0130] Among them, τ i,jis the pheromone concentration from the current data block i to the next slicing scheme j; η i,j is the heuristic information, i.e., the attractiveness of the ant’s choice of scheme j; α is the importance coefficient of pheromone concentration; β is the importance coefficient of heuristic information; J is the set of all selectable slicing schemes.

[0131] Specifically, τ i,j represents the pheromone concentration from the current data block i to the next slicing scheme j. The higher the pheromone concentration, the more ants have passed through the path before, so the path is considered more attractive.

[0132] η i,j It represents heuristic information, that is, the attractiveness from data block i to tiling scheme j, which is usually related to the distance of the path or other performance indicators. The larger the value, the better the path.

[0133] α is the importance coefficient of pheromone concentration, which is used to control the ant's dependence on the path history selection (i.e. pheromone concentration). A larger α value means that the ants are more inclined to choose the path that more ants have passed through.

[0134] β is the importance coefficient of heuristic information, which is used to control the ant's reliance on heuristic information. A larger β value indicates that the ant is more sensitive to the attraction based on path performance.

[0135] J represents the set of all currently selectable slicing schemes, ∑ j′∈J Represents the total attractiveness of all alternative paths.

[0136] Through this formula, each ant will choose an optimal slicing scheme at each step based on the current pheromone concentration and the relative size of the heuristic information, thus gradually approaching the globally optimal slicing path.

[0137] By introducing two weight parameters, α and β, the degree to which ants rely on historical experience (pheromones) and heuristic information (path performance) when selecting paths can be flexibly adjusted, so that the algorithm can achieve a balance between exploration and utilization.

[0138] In each step of the selection process, ants will gradually tend to choose the optimal slicing solution, thereby improving the efficiency and accuracy of the data slicing process.

[0139] The data slicing device based on ant colony algorithm provided by the present invention is described below. Figure 2 As shown, the data slicing device based on the ant colony algorithm described below and the data slicing method based on the ant colony algorithm described above can correspond to each other.

[0140] A data slicing device based on ant colony algorithm, comprising:

[0141] A data acquisition module 210 is used to acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0142] A condition determination module 220, configured to determine a convergence condition of the ant colony algorithm according to the iteration target parameter;

[0143] A scheme determination module 230 is used to determine a target slicing scheme through the ant colony algorithm according to the initial parameters and the convergence condition;

[0144] The data slicing module 240 is used to slice the data to be sliced ​​according to the target slicing scheme.

[0145] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the data slicing method based on the ant colony algorithm, and the method includes:

[0146] Acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0147] Determining a convergence condition of the ant colony algorithm according to the iterative target parameter;

[0148] Determine a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition;

[0149] The data to be sliced ​​is sliced ​​according to the target slicing scheme.

[0150] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-On l yMemory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.

[0151] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data slicing method based on the ant colony algorithm provided by the above methods, the method includes:

[0152] Acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0153] Determining a convergence condition of the ant colony algorithm according to the iterative target parameter;

[0154] Determine a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition;

[0155] The data to be sliced ​​is sliced ​​according to the target slicing scheme.

[0156] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the data slicing method based on the ant colony algorithm provided by the above methods, the method comprising:

[0157] Acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters;

[0158] Determining a convergence condition of the ant colony algorithm according to the iterative target parameter;

[0159] Determine a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition;

[0160] The data to be sliced ​​is sliced ​​according to the target slicing scheme.

[0161] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data slicing method based on ant colony algorithm, characterized in that: include: Acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters; Determining a convergence condition of the ant colony algorithm according to the iterative target parameter; Determine a target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition; The data to be sliced ​​is sliced ​​according to the target slicing scheme.

2. The data slicing method based on ant colony algorithm according to claim 1, characterized in that: Before the step of obtaining the data to be sliced ​​and the ant colony algorithm parameters, the method further includes: Get the original data; Performing data cleaning on the original data; The cleaned data is divided into blocks to obtain the data to be sliced.

3. The data slicing method based on ant colony algorithm according to claim 1, characterized in that: After the step of slicing the data to be sliced ​​according to the target slicing scheme, the method further includes: Generate corresponding redundant check codes according to the data slices generated after slicing; The redundant check code is added to the corresponding data slice, and the redundant check code is used for data recovery.

4. The data slicing method based on ant colony algorithm according to claim 1, characterized in that: The step of determining the target slicing scheme by using the ant colony algorithm according to the initial parameters and the convergence condition specifically includes: The initial parameters include the number of ants, pheromone volatility factor and heuristic volatility factor; constructing a virtual ant colony according to the number of ants; Determining the current optimal slicing scheme through the virtual ant colony according to the current pheromone concentration and heuristic information, wherein the current pheromone concentration is determined according to the pheromone concentration before iteration and the pheromone volatility factor, and the heuristic information is determined according to the heuristic information before iteration and the heuristic volatility factor; Determining the fitness of the current optimal slicing scheme; Returning to the step of determining the current optimal slicing scheme through the virtual ant colony according to the current pheromone concentration and heuristic information, until the fitness satisfies the convergence condition.

5. The data slicing method based on ant colony algorithm according to claim 4 is characterized in that: The pheromone concentration is achieved by: t i,j *=(1-r)·t i,j +Δt i,j Among them, τ i,j * is the pheromone concentration after iteration, τ i,j is the pheromone concentration, ρ is the pheromone volatility factor, Δτ i,j For the increase of pheromone; The heuristic information is implemented in the following way: η i,j =\frac{1}·{d_{i,j}} Among them, η i,j is the heuristic information, and {d_{i,j}} is the distance between the slice points.

6. The data slicing method based on ant colony algorithm according to claim 5, characterized in that: The step of determining the fitness of the current optimal slicing scheme is implemented in the following manner: F=w1·f1+w2·f2+w3·f3+w4·f4 Among them, f1 is the objective function of the uniformity of the size of data slices, f2 is the objective function of the time efficiency of the slicing process, f3 is the objective function of the stability of data transmission after slicing, and f4 is the objective function for optimizing the consumption of system resources; w1, w2, w3, w4 are the target weights corresponding to f1, f2, f3, f4.

7. The data slicing method based on ant colony algorithm according to claim 6, characterized in that: The step of determining the current optimal slicing scheme by the virtual ant colony according to the current pheromone concentration and heuristic information specifically includes: Among them, τ i,j is the pheromone concentration from the current data block i to the next slicing scheme j; η i,j is the heuristic information, i.e., the attractiveness of the ant’s choice of scheme j; α is the importance coefficient of pheromone concentration; β is the importance coefficient of heuristic information; J is the set of all selectable slicing schemes.

8. A data slicing device based on ant colony algorithm, characterized in that: include: A data acquisition module is used to acquire the data to be sliced ​​and the parameters of the ant colony algorithm, wherein the parameters of the ant colony algorithm include initial parameters and iterative target parameters; A condition determination module, used to determine the convergence condition of the ant colony algorithm according to the iteration target parameter; A scheme determination module, used to determine a target slicing scheme through the ant colony algorithm according to the initial parameters and the convergence condition; The data slicing module is used to slice the data to be sliced ​​according to the target slicing scheme.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data slicing method based on the ant colony algorithm as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data slicing method based on the ant colony algorithm as described in any one of claims 1 to 7 is implemented.