Drilling sequence optimization method for offshore heavy oil thermal recovery well based on improved ant colony algorithm

By improving the ant colony algorithm to optimize the drilling sequence of offshore heavy oil thermal recovery wells, the problems of heat injection crossflow risk and poor drilling safety were solved, the drilling schedule was shortened and costs were saved, and quantitative safety distance guidance was provided.

CN117273056BActive Publication Date: 2025-10-17CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311298409.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-10-17
Estimated Expiration
2043-10-09

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively optimize the drilling and heat injection sequence of offshore heavy oil thermal recovery wells, resulting in high risks of heat injection crossflow, poor drilling safety, extended construction periods, large computational complexity, and difficulty in finding the appropriate safe distance and drilling sequence.

Method used

An improved ant colony algorithm is used to optimize the drilling sequence through the bottom hole distance matrix and pheromone update strategy, select the path with the shortest downtime, reduce drilling time, enhance safety, and provide quantitative indicators to guide the selection of safe distance.

Benefits of technology

Under a given crossflow safety distance, the drilling sequence is optimized to reduce downtime, lower the amount of calculation, improve drilling safety and efficiency, save costs, and provide quantitative indicators to guide on-site selection of appropriate safety distances and sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117273056B_ABST
    Figure CN117273056B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for optimizing the drilling sequence of offshore heavy oil thermal recovery wells based on an improved ant colony algorithm, comprising the following steps: S1: obtaining drilling-related parameters and initializing ant colony algorithm parameters; S2: randomly generating an initial position of an ant k based on the drilling-related parameters and the ant colony algorithm parameters; S3: finding the next well to be drilled by ant k; S4: updating the status of the thermal injection well in step S2; and S5: calculating the cumulative drilling downtime T of ant k. k ; S6: Based on the cumulative drilling downtime T k , update the drilling status until all wells are drilled; S7: based on the accumulated drilling downtime T k , update the pheromone value τ in the ant colony algorithm parameters ij , according to the pheromone value τ ij , ant k selects the path with the shortest downtime; S8: update and iterate the shortest downtime T of each ant until the shortest downtime T, drilling sequence and heat injection sequence for a given safety distance are output.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a drilling sequence optimization method for offshore heavy oil thermal recovery wells based on an improved ant colony algorithm, and belongs to the technical field of drilling sequences in the field of oil engineering. BACKGROUND

[0002] Steam stimulation is one of the widely used heavy oil recovery methods. Due to the limitation of drilling duration and high operation cost, drilling is carried out at the same time as steam injection in the adjacent drilled well in offshore heavy oil blocks. This mode can greatly improve the drilling and production efficiency, but there is a certain risk of steam channeling in the steam injection well. The cantilever beam coverage of the offshore drilling ship is limited, the wellhead spacing of the platform is small, and the well bottom distance gradually increases, but the well bottom distance of some wells is still small. The steam injected into the steam injection well or the hot water after steam condensation may channel to the drilling well, affecting the safety of drilling.

[0003] To avoid steam channeling from the steam injection well to the drilling well, the distance between the open hole sections of the steam injection well and the drilling well needs to be strictly controlled. When the distance between the open hole sections of the steam injection well and the drilling well is less than the channeling safety distance, drilling needs to be stopped or steam injection needs to be stopped to avoid channeling, but this will prolong the drilling duration and increase the cost. In the field, a safety distance is usually set according to experience. When the safety distance is set too large, it is difficult to find a well to be drilled or a steam injection well that meets the safety distance, causing the prolongation of the duration. When the safety distance is set too small, the risk of steam channeling is large, affecting the safety of drilling. To ensure safe drilling and improve the efficiency of steam injection and drilling, the drilling and steam injection sequence should be optimized.

[0004] If the drilling sequence optimization problem is regarded as a path planning problem, the ant colony algorithm has the advantages of strong robustness, good convergence, strong adaptability and low calculation amount in finding the optimal path. However, the existing technology does not have an optimization solution for the parallel construction operation (drilling and steam injection) of the same operation object (thermal recovery well) and the double time problem (drilling cycle and steam injection cycle). The time complexity of the enumeration method for finding the optimal solution is O(n!), and the calculation amount increases exponentially with the increase of the wellhead number, which is extremely costly. SUMMARY

[0005] To solve the above technical problems, the application provides a drilling sequence optimization method for offshore heavy oil thermal recovery wells based on an improved ant colony algorithm, which can solve the drilling sequence with the shortest drilling downtime under a given channeling safety distance. The method of the application enables wells with large well bottom distances to have a greater probability of being selected, enhancing the safety of drilling. The drilling sequence with the shortest drilling downtime is selected, reducing the drilling duration and saving the drilling cost. The calculation amount of problem solving is greatly reduced.

[0006] To achieve the above purpose, the application adopts the following technical solutions:

[0007] The application discloses an offshore heavy oil thermal recovery well drilling sequence optimization method based on an improved ant colony algorithm.

[0008] S1: obtaining drilling related parameters and initializing ant colony algorithm parameters;

[0009] S2: based on the drilling related parameters and the ant colony algorithm parameters, randomly generating an initial position of an ant k, i.e. an initial position of a first well to be drilled, and setting a state of the ant k as drilling completion after drilling is completed, so that a heat injection operation, i.e. heat injection well, can be performed;

[0010] S3: finding a next well to be drilled of the ant k;

[0011] S4: updating a state of the heat injection well in step S2;

[0012] S5: calculating a cumulative drilling downtime T of the ant k k .

[0013] S6: based on the cumulative drilling downtime T of the ant k k , updating a drilling state, and returning to step S3 when the ant k has not drilled all wells, until drilling of all wells is completed;

[0014] S7: based on the cumulative drilling downtime T of the ant k k , updating a pheromone value τ ij in the ant colony algorithm parameters, and according to the pheromone value τ ij , the ant k selects a path with a short downtime;

[0015] S8: updating a shortest downtime T of each ant in iteration until a shortest downtime T of a given safety distance, a drilling sequence and a heat injection sequence are output;

[0016] S9: setting different safety distances to obtain the shortest downtime T under different safety distances, and the result provides a quantitative index for the shortest downtime under different safety distances, and is used for guiding selection of a proper safety distance and a drilling sequence in an oilfield site.

[0017] The offshore heavy oil thermal recovery well drilling sequence optimization method, preferably, in step S1, the drilling related parameters include a well construction period pb, a heat injection period ph, a well bottom channeling safety distance ls and a minimum distance matrix lb of horizontal open hole sections of each well; and the ant colony algorithm parameters include a pheromone heuristic coefficient alpha, beta, a pheromone evaporation rate rho, an initial pheromone Q, a pheromone concentration tau ij , an ant number m and an iteration number R.

[0018] The offshore heavy oil thermal recovery well drilling sequence optimization method, preferably, the next well to be drilled of the ant k is found, and a specific process is as follows:

[0019] If there is a well in the heating well: find the set N of un-drilled wells from the distance matrix lb which are greater than ls from the current heating well allow ;

[0020] If N allow is empty: stop drilling, drilling downtime is the remaining heating time of the current heating well, that is, t k ij = ph-th, t k ij is the waiting time of ant k before drilling well i is completed and drilling well j is started;

[0021] The current well state is marked as heating completed, and the current well is added to the list of heated wells L k injected , the heating time th of the current heating well is 0;

[0022] Find the set N of un-drilled wells again allow , calculate the position transition probability p of each un-drilled well, and determine the next well to be drilled.

[0023] The offshore heavy oil thermal recovery well drilling sequence optimization method, preferably, the state of the heating well in step S2 is updated, and the specific process is as follows:

[0024] If there is a well being drilled: the heating time of the current well increases by one drilling period, th=th+pd;

[0025] If th> ph: mark the state of the current heating well as heating completed, and add the current well to the list of heated wells L k injected ;

[0026] Find the set H of heating wells that meet the safety distance allow ;

[0027] If the set H allow is empty: stop heating, the heating time th of the current heating well is 0; find the next well to be heated, and the heating time th of the current well is th-ph;

[0028] If there is a well being drilled: find the set H of heating wells that meet the safety distance allow , and determine the next heating well, and the heating time th of the current well is th+pd.

[0029] The offshore heavy oil thermal recovery well drilling sequence optimization method, preferably, the position transition probability p of the well to be drilled is calculated, and the calculation formula is:

[0030]

[0031] In the formula, represents the probability of the ant k from position 16 to position j in the first iteration; z is the normalized matrix of the well bottom distance matrix.

[0032] The drilling sequence optimization method for offshore heavy oil thermal recovery wells, preferably, the cumulative drilling downtime T of the ant k is calculated k , and the specific formula is as follows:

[0033] T k =∑t k ij

[0034] In the formula, t k ij is the waiting time of the ant k after the drilling of the well i is completed and the drilling of the well j is started.

[0035] The drilling sequence optimization method for offshore heavy oil thermal recovery wells, preferably, the pheromone value tau of the ant colony algorithm parameter is updated ij , and the updating strategy is as follows:

[0036]

[0037] In the formula, delta refers to the increment of the pheromone value, r refers to the iteration number, is the pheromone left by the ant k on the path from position i to position j.

[0038] The second aspect of the present application provides a drilling sequence optimization device for offshore heavy oil thermal recovery wells based on an improved ant colony algorithm, comprising:

[0039] A first processing unit is configured to acquire drilling related parameters and initialize ant colony algorithm parameters.

[0040] A second processing unit is configured to randomly generate an initial position of an ant k based on the drilling related parameters and the ant colony algorithm parameters, that is, an initial position of the first well to be drilled, and set the state of the initial position as drilling completion after the drilling is completed, so that the heat injection operation, that is, the heat injection well, can be performed.

[0041] A third processing unit is configured to find the next well to be drilled by the ant k.

[0042] A fourth processing unit is configured to update the state of the heat injection well in the second processing unit.

[0043] A fifth processing unit is configured to calculate the cumulative drilling downtime T of the ant k k .

[0044] A sixth processing unit is configured to update the drilling state based on the cumulative drilling downtime T of the ant k k , and return to the third processing unit when the ant k has not drilled all the wells until the drilling of all the wells is completed.

[0045] A seventh processing unit is configured to update the pheromone value tau in the ant colony algorithm parameter based on the accumulated drilling downtime T k ij ij The ant k selects a path with a short downtime according to the pheromone value tau

[0046] An eighth processing unit is configured to update the shortest downtime T of each ant in iteration until the shortest downtime T, the drilling sequence and the thermal injection sequence of a given safety distance are output.

[0047] A ninth processing unit is configured to set different safety distances and obtain the shortest downtime T under different safety distances, which provides a quantitative index for the shortest downtime under different safety distances and is used to guide the selection of appropriate safety distance and drilling sequence in the oilfield.

[0048] The third aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the offshore heavy oil thermal recovery well drilling sequence optimization method based on the improved ant colony algorithm.

[0049] The fourth aspect of the present application provides a computer device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the offshore heavy oil thermal recovery well drilling sequence optimization method based on the improved ant colony algorithm when executing the computer program.

[0050] The present application has the following advantages due to the above technical solutions:

[0051] 1. The drilling downtime is introduced into the pheromone update strategy, which can make the algorithm select the path with the shortest downtime and reduce the drilling period, thereby saving the offshore drilling cost.

[0052] 2. The well bottom distance matrix is used instead of the heuristic function of the original algorithm, so that the well with a large well bottom distance has a greater selection probability, i.e. the distance between the thermal injection well and the drilling well is increased, thereby enhancing the drilling safety.

[0053] 3. The present application has small calculation amount and can quantitatively solve the shortest downtime under a given safety distance, give the drilling sequence and the thermal injection sequence, and provide a quantitative basis for the selection of drilling safety distance. BRIEF DESCRIPTION OF DRAWINGS

[0054] Figure 1 The offshore heavy oil thermal recovery well drilling sequence optimization method based on the improved ant colony algorithm provided by an embodiment of the present application is shown in the flowchart.

[0055] Figure 2 The three-dimensional well trajectory of an oilfield provided by the present application is shown in the figure. ​​

[0056] Figure 3 The oilfield well bottom distance matrix diagram provided by the present application;

[0057] Figure 4 The shortest drilling downtime when different safety distances are calculated. DETAILED DESCRIPTION

[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application are described clearly and completely below. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0059] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the meanings commonly understood by those skilled in the art. The terms "first", "second", "third", "fourth" and similar words used in the present application do not represent any order, number or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar words mean that the elements or objects before the words cover the elements or objects listed after the words and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0060] In order to facilitate the description, spatial relative terms can be used in the description to describe the relationship of one element or feature with respect to another element or feature as shown in the drawings, such as "inner", "outer", "inside", "outside", "under", "above", etc. Such spatial relative terms are intended to include different orientations of the device in use or operation in addition to the orientation depicted in the drawings.

[0061] In order to avoid the heat injection well from channeling to the drilling well, the distance between the heat injection well and the open hole section of the drilling well needs to be strictly controlled. When the distance between the heat injection well and the open hole section of the drilling well is less than the channeling safety distance, the drilling needs to be stopped or the heat injection needs to be stopped to avoid channeling, but the drilling period will be prolonged and the cost will be increased. In the field, a safety distance is usually set according to experience. When the safety distance is set too large, it will be difficult to find a well to be drilled or a heat injection well that meets the safety distance, causing the drilling period to be prolonged. When the safety distance is set too small, the risk of channeling is large, affecting the safety of drilling. In order to ensure safe drilling and improve the efficiency of heat injection and drilling, the drilling and heat injection sequence should be optimized.

[0062] In view of the above technical problems, the present application provides a kind of offshore heavy oil thermal recovery well drilling sequence optimization method based on improved ant colony algorithm, which can solve the drilling stop time shortest drilling sequence under the given channeling safety distance.The method makes the well bottom distance greater well has greater probability of being selected, enhances the drilling safety;Select the drilling sequence with the shortest drilling stop time, reduce the drilling period, save drilling cost;Greatly reduce the amount of calculation of problem solving.

[0063] As Figure 1 shown, the offshore heavy oil thermal recovery well drilling sequence optimization method based on improved ant colony algorithm described in the present application comprises the following steps:

[0064] (1) according to the average period of offshore drilling and heat injection, set drilling related parameters: ① well construction period pb=12d;② heat injection period ph=26d;③ well bottom channeling safety distance ls=450m;④ Figure 2 is the well trajectory diagram of a certain offshore oilfield, and the distance between some wells is small.According to the three-dimensional well trajectory, the minimum distance matrix lb of the horizontal open hole section of each well is calculated, as Figure 3 shown, the number of wells n=28.

[0065] (2) the basic parameters of ant colony algorithm are as follows: α=2, β=1, information volatility rate ρ=0.2, initial information Q=20, ant number m=50, total iteration number R=200, and initial information τ ij =1.

[0066] (3) randomly generate the initial position of ant k (k=1, 2, …, 50), i.e. the first well to be drilled, which is well No. 16 here.The 13th well is drilled, and it is added to the drilled well list, i.e. L k drilled =

[16] , at this time, well No. 16 starts heat injection, and the state is marked as being heated, and the heat injection time th=1.

[0067] (4) find the next well to be drilled for ant k. From Figure 3 the distance matrix, find the undrilled well set N allow =[9, 20, 27] which has a distance greater than 450m from well No. 16.Calculate the position transition probability p of the undrilled well, and the calculation formula is:

[0068]

[0069] In the formula, represents the probability of ant k moving from position 16 to position j in the first iteration; z is Figure 3 the normalized matrix of the well bottom distance matrix, and the calculation method is:

[0070]

[0071] After calculating the position transfer probability of all undrilled wells p = [0.3347, 0.3202, 0.3451], use the "roulette" algorithm to calculate the cumulative probability p c =[0,0.3347,0.6549,1], the generated random number is 0.2513, which falls on p c The first interval, so determine N k allow The first well in the list, well 9#, is the next well to be drilled, and the status of well 9# is marked as drilling. 16,9 =0, indicating that the downtime when drilling is transferred from well 16# to well 9# is 0.

[0072] (5) Update the status of the heat injection well. At this time, well 9# is being drilled and well 16# is being heat injected. Drilling and heat injection are carried out simultaneously. This status can last for a drilling cycle of 12 days until the drilling is completed. The heat injection time of well 16# increases by 12 days. At this time, th=1+12=13 days, and the heat injection status of this well is still heat injection. At this time, the list of drilled wells L k drilled =[16,9], the list of injected heat wells is empty, that is, L k injected =[].

[0073] (6) Search the list of drilled wells L k drilled The number of wells drilled is 2 <n=28,因此返回步骤(4),继续进行钻井操作,直到完成所有28口井的钻进。

[0074] (7) After this ant has traversed all 28 wells, it returns to step (3) and starts the traversal of the next ant. Until all 50 ants have completed the traversal, the cumulative downtime of each ant is recorded. k , record the drilling sequence and heat injection sequence of each ant. k The calculation formula is:

[0075] T k =∑t k ij

[0076] Where, t k ij is the waiting time for ant k to finish drilling well i and start drilling well j. Find the shortest downtime T among the 50 ants, when T=min(T k ) and record the corresponding drilling sequence and heat injection sequence.

[0077] (8) The first iteration is now complete, and the number of iterations r increases by 1. If T <min(Tk ), the value of T is updated as T k , and the corresponding drilling sequence and heat injection sequence are updated. At this time, r = 1 < R = 200, return to step (3) and continue iteration.

[0078] (9) After completing all 200 iterations, the shortest downtime T is output as 4d, the drilling sequence is: [16→20→9→27→28→21→19→23→7→24→5→8→4→15→14→10→1→17→3→12→2→22→18→11→6→13→26→25], and the heat injection sequence is: [16→19→23→8→7→5→12→27→15→20].

[0079] Further, the construction progress at a safety distance of 450m, including the drilling and heat injection wells and the well bottom distance per day, is shown in Table 1.

[0080] Table 1 is the construction progress at a safety distance

[0081]

[0082]

[0083] In the 205-206d, 327-308d, no drilling well satisfying the safety distance can be found during heat injection, so drilling needs to be stopped, and thus the total drilling downtime is 4d. In the 39-84d, 137-144d, 173-180d, 235-242d, 293-302d, no heat injection well satisfying the safety distance can be found, so heat injection needs to be stopped.

[0084] Further, different safety distances are set, and the shortest downtime at different safety distances is obtained, as shown in Table 2. Figure 4 The results provide quantitative indexes of the shortest downtime at different safety distances, which can guide the selection of appropriate safety distances and drilling sequences in oilfield sites.

[0085] In the calculation of the position transfer probability p, the normalized well bottom minimum distance matrix is used instead of the heuristic function of the traditional ant colony algorithm, so that the position points with a greater distance have a greater selection probability, and the safety of drilling is enhanced.

[0086] In the calculation of the pheromone increment Δτ ij , the total drilling downtime T k is used instead of the path length of the traditional ant colony algorithm, so that the algorithm can be used for path optimization involving drilling time and heat injection time.

[0087] The present invention adopts a strategy of single-well single-time construction without interruption, that is, if the well is being drilled (or heat injected), the drilling (or heat injection) operation is completed in one go without interruption, thus ensuring the continuity of construction and avoiding the hazards caused by intermittent construction.

[0088] A second aspect of the present invention provides an offshore heavy oil thermal recovery well drilling sequence optimization device based on an improved ant colony algorithm, comprising:

[0089] The first processing unit is used to obtain drilling related parameters and initialize ant colony algorithm parameters;

[0090] The second processing unit is used to randomly generate an initial position of an ant k based on drilling-related parameters and ant colony algorithm parameters, that is, the initial position of the first well to be drilled. When the drilling is completed, its status is set to drilling completed, and the heat injection operation can be carried out at this time, that is, the heat injection well;

[0091] The third processing unit is used to find the next well to be drilled by ant k;

[0092] a fourth processing unit, configured to update the status of the heat injection well in the second processing unit;

[0093] The fifth processing unit is used to calculate the cumulative drilling downtime T of ant k k ;

[0094] The sixth processing unit is configured to calculate the drilling downtime based on the accumulated drilling downtime T k , update the drilling status. When ant k still has undrilled wells, it returns to the third processing unit until all wells are drilled;

[0095] The seventh processing unit is configured to process the drilling downtime T based on the accumulated drilling downtime T. k , update the pheromone value τ in the ant colony algorithm parameters ij , according to the pheromone value τ ij , ant k chooses the path with short downtime;

[0096] An eighth processing unit is configured to iteratively update the shortest downtime T of each ant until outputting the shortest downtime T, drilling sequence, and heat injection sequence for a given safety distance;

[0097] The ninth processing unit is used to set different safety distances and obtain the minimum downtime T at different safety distances. This result provides a quantitative indicator for the shortest downtime under different safety distances, which is used to guide the oil field site to select appropriate safety distances and drilling sequences.

[0098] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned method for optimizing the drilling sequence of offshore heavy oil thermal recovery wells based on the improved ant colony algorithm.

[0099] The fourth aspect of the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the offshore heavy oil thermal recovery well drilling sequence optimization method based on the improved ant colony algorithm when executing the computer program.

[0100] The present application is described according to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus for implementing the functions specified in one or more flows and / or blocks.

[0101] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product comprising instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus for implementing the functions specified in one or more flows and / or blocks.

[0102] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus for implementing the functions specified in one or more flows and / or blocks.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for optimizing the drilling sequence of offshore heavy oil thermal recovery wells based on an improved ant colony algorithm, characterized in that: The steps include: S1: Obtain drilling related parameters and initialize ant colony algorithm parameters; S2: Based on the drilling-related parameters and the ant colony algorithm parameters, the initial position of an ant k is randomly generated, that is, the initial position of the first well to be drilled. When the drilling is completed, its status is set to drilling completed. At this time, the heat injection operation can be carried out, that is, the heat injection well; S3: Find the next well to be drilled by ant k; S4: Update the status of the heat injection well in step S2; S5: Calculate the cumulative drilling downtime T of ant k k ; S6: Based on the cumulative drilling downtime T k , update the drilling status. If ant k still has undrilled wells, it returns to step S3 until all wells are drilled; S7: Based on the cumulative drilling downtime T k , update the pheromone value τ in the ant colony algorithm parameters ij , according to the pheromone value τ ij , ant k chooses the path with short downtime; S8: Iterate and update the shortest downtime T of each ant until the shortest downtime T, drilling sequence, and heat injection sequence for a given safety distance are output; S9: Set different safety distances and obtain the minimum downtime T at different safety distances. This result provides a quantitative indicator for the minimum downtime at different safety distances, which is used to guide the selection of appropriate safety distances and drilling sequences at oilfield sites. Find the next well to be drilled by ant k. The specific process is as follows: If there is a well injecting heat: Find the set of undrilled wells N whose distance from the current heat injection well is greater than ls from the distance matrix lb allow ; If N allow Empty: Stop drilling. The drilling downtime is the remaining heat injection time of the current heat injection well, i.e., t k ij =ph–th, t k ij is the waiting time of ant k after drilling well i is completed and before it starts drilling well j; The current well status is marked as heat injection completed, and the current well is added to the list of heat injected wells L k injected , the current heat injection time of the heat injection well th=0; Re-search the undrilled well set N allow , calculate the position transfer probability p of each undrilled well and determine the next well to be drilled; Update the status of the heat injection well in step S2. The specific process is as follows: If drilling is in progress: the heat injection time of the current well is increased by one drilling cycle, th = th + pd; If th>ph: mark the current heat injection well status as heat injection completed, and add the current well to the list of heat injection wells L k injected ; Find the set of hot wells to be injected that meet the safety distance H allow ; If H allow If the set is empty: stop heat injection, the heat injection time of the current heat injection well is th = 0; find the next heat injection well, the heat injection time of the current well is th = th – ph; If there is a well being drilled: Find the set of hot wells to be injected that meet the safety distance H allow , and determine the next heat injection well, the current well heat injection time th = th + pd.

2. The offshore heavy oil thermal recovery well drilling sequence optimization method according to claim 1, characterized in that: In step S1, the drilling parameters include: well construction period pb, heat injection period ph, bottom hole crossflow safety distance ls and the minimum distance matrix lb of each horizontal open hole section; the ant colony algorithm parameters include: pheromone heuristic coefficients α, β, pheromone volatilization rate ρ, initial pheromone Q, pheromone concentration τ ij , number of ants m, number of iterations R.

3. The offshore heavy oil thermal recovery well drilling sequence optimization method according to claim 1, characterized in that: Calculate the position transfer probability p of the well to be drilled, and the calculation formula is: Where, represents the probability of ant k moving from position 16 to position j in the first iteration; z is the normalized matrix of the bottom-of-well distance matrix.

4. The offshore heavy oil thermal recovery well drilling sequence optimization method according to claim 2, characterized in that: Calculate the cumulative drilling downtime T of ant k k , the specific formula is as follows: T k =∑t k ij Where, t k ij is the waiting time for ant k to finish drilling well i and start drilling well j.

5. The offshore heavy oil thermal recovery well drilling sequence optimization method according to claim 4, characterized in that: Update the pheromone value τ in the ant colony algorithm parameters ij , the update strategy is as follows: Where Δ refers to the increment of pheromone value, r refers to the number of iterations, is the pheromone left by ant k on the path between positions i and j.

6. A device for optimizing the drilling sequence of offshore heavy oil thermal recovery wells based on an improved ant colony algorithm, characterized in that: include: The first processing unit is used to obtain drilling related parameters and initialize ant colony algorithm parameters; The second processing unit is used to randomly generate an initial position of an ant k based on drilling-related parameters and ant colony algorithm parameters, that is, the initial position of the first well to be drilled. When the drilling is completed, its status is set to drilling completed, and the heat injection operation can be carried out at this time, that is, the heat injection well; The third processing unit is used to find the next well to be drilled by ant k; a fourth processing unit, configured to update the status of the heat injection well in the second processing unit; The fifth processing unit is used to calculate the cumulative drilling downtime T of ant k k ; The sixth processing unit is configured to calculate the drilling downtime based on the accumulated drilling downtime T k , update the drilling status. When ant k still has undrilled wells, it returns to the third processing unit until all wells are drilled; The seventh processing unit is configured to process the drilling downtime T based on the accumulated drilling downtime T. k , update the pheromone value τ in the ant colony algorithm parameters ij , according to the pheromone value τ ij , ant k chooses the path with short downtime; An eighth processing unit is configured to iteratively update the shortest downtime T of each ant until outputting the shortest downtime T, drilling sequence, and heat injection sequence for a given safety distance; The ninth processing unit is used to set different safety distances and obtain the minimum downtime T at different safety distances. This result provides a quantitative indicator of the minimum downtime at different safety distances, which is used to guide the selection of appropriate safety distances and drilling sequences at the oil field site. Find the next well to be drilled by ant k. The specific process is as follows: If there is a well injecting heat: Find the set of undrilled wells N whose distance from the current heat injection well is greater than ls from the distance matrix lb allow ; If N allow Empty: Stop drilling. The drilling downtime is the remaining heat injection time of the current heat injection well, i.e., t k ij =ph–th, t k ij is the waiting time of ant k after drilling well i is completed and before it starts drilling well j; The current well status is marked as heat injection completed, and the current well is added to the list of heat injected wells L k injected , the current heat injection time of the heat injection well th=0; Re-search the undrilled well set N allow , calculate the position transfer probability p of each undrilled well and determine the next well to be drilled; Update the status of the heat injection well in step S2. The specific process is as follows: If drilling is in progress: the heat injection time of the current well is increased by one drilling cycle, th = th + pd; If th>ph: mark the current heat injection well status as heat injection completed, and add the current well to the list of heat injection wells L k injected ; Find the set of hot wells to be injected that meet the safety distance H allow ; If H allow If the set is empty: stop heat injection, the heat injection time of the current heat injection well is th = 0; find the next heat injection well, the heat injection time of the current well is th = th – ph; If there is a well being drilled: Find the set of hot wells to be injected that meet the safety distance H allow , and determine the next heat injection well, the current well heat injection time th = th + pd.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the offshore heavy oil thermal recovery well drilling sequence optimization method based on the improved ant colony algorithm according to any one of claims 1 to 5 are implemented.

8. A computer 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 computer program, the steps of the offshore heavy oil thermal recovery well drilling sequence optimization method based on the improved ant colony algorithm according to any one of claims 1 to 5 are implemented.