Method and device for realizing shipyard section painting scheduling optimization based on heterogeneous input and improved nearest neighbor strategy, processor and storage medium

By constructing a hierarchical decision framework with a heterogeneous input network and a greedy decoder, and combining it with a proximal policy optimization algorithm with log probability compensation, the problem of unbalanced load in the section painting process in shipbuilding production was solved, achieving efficient utilization of workshop resources and improvement of production efficiency.

CN122366950APending Publication Date: 2026-07-10EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610445996.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-07
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively address the uneven load distribution in the shipyard's section painting process during shipbuilding production, resulting in low workshop resource utilization and production efficiency bottlenecks.

Method used

A hierarchical decision-making framework based on heterogeneous input and improved proximal policy is adopted. Combining reinforcement learning and greedy algorithm, a heterogeneous input network outputs segmented processing priorities. A scheduling scheme that satisfies process constraints is generated through a greedy decoder, and a proximal policy optimization algorithm with log probability compensation is used to train the model.

Benefits of technology

It has achieved efficient optimization of the shipyard's section painting schedule, significantly improved workshop load balancing and production efficiency, and has a wide range of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122366950A_ABST
    Figure CN122366950A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of based on heterogeneous input and improved near-end strategy to realize the method for optimizing shipyard section painting scheduling, comprising the following steps: constructing shipyard scheduling mathematical model;Section state matrix and shipyard state matrix are constructed;Heterogeneous input network, Gaussian distribution sampling module, greedy decoder are constructed;After daily scheduling, corresponding penalty value is calculated, adopts the near-end strategy optimization algorithm after logarithmic probability compensation, the parameters of heterogeneous input network are updated by gradient descent;The daily shipyard section painting scheduling scheme in whole production cycle is generated by greedy decoder.The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy of the present application is adopted, greedy decoder executes the local optimal distribution strategy satisfying all process constraints, near-end strategy optimization algorithm introducing logarithmic probability compensation is used to efficiently train model, ensure that network can gradually learn effective scheduling meta-knowledge, finally complete the load optimization of shipyard workshop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial scheduling technology, and more particularly to the field of shipbuilding production management. Specifically, it relates to a method, apparatus, processor, and computer-readable storage medium for optimizing the scheduling of section painting in shipyards based on heterogeneous input and improved near-end strategies. Background Technology

[0002] Shipbuilding typically employs an order-driven production model. During construction, the hull is divided into several sections, serving as intermediate products. Sandblasting and painting, as core processes in the coating process, must be performed strictly in sequence within dedicated workshops. However, due to the strong coupling between processes and resource constraints, improper scheduling strategies can easily lead to an imbalance between workshop load and processing capacity: on the one hand, this results in backlogs in some workshops, increasing the risk of delays; on the other hand, it causes idle resources in other workshops, reducing utilization. This load imbalance is a key bottleneck restricting the overall production efficiency of shipyards. Therefore, developing a scientific scheduling plan for section painting is a core challenge in shipbuilding production management.

[0003] Traditional research often addresses this problem by combining abstract, general mathematical models with heuristic or metaheuristic algorithms. However, such general models often fail to accurately depict the complex technological logic and rigid constraints of specific production scenarios. Therefore, constructing a mathematical model that closely matches the actual operating mechanisms and segmented process characteristics of shipyards is a prerequisite for achieving effective scheduling.

[0004] In recent years, artificial intelligence technologies, represented by deep reinforcement learning, have provided a new paradigm for solving complex scheduling problems due to their powerful adaptive decision-making and generalization capabilities. However, directly applying end-to-end reinforcement learning to industrial scheduling scenarios with strong constraints faces significant challenges: encoding all constraints and objectives into the state or action space leads to a surge in the dimensionality of the state space, resulting in difficulties in model convergence. Therefore, this paper proposes a two-layer hybrid scheduling framework of "reinforcement learning-greedy strategy": the upper layer utilizes reinforcement learning to output a segmented processing priority sequence with a global perspective; the lower layer executes specific resource allocation that satisfies complex process constraints through a greedy algorithm embedded with domain knowledge and optimization rules. This hierarchical decision-making mechanism leverages the optimization advantages of reinforcement learning at the macro-level strategy level while establishing the feasibility and local optima of micro-level allocation, providing an efficient and reliable technical path for solving complex scheduling problems under such strong constraints. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, apparatus, processor and computer-readable storage medium for optimizing the segmented painting schedule of shipyards based on heterogeneous input and improved near-end strategy, which is simple to operate, has high production efficiency and wide applicability.

[0006] To achieve the above objectives, the present invention provides a method, apparatus, processor, and computer-readable storage medium for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategies, as follows: The method for optimizing the segmented painting schedule in shipyards based on heterogeneous input and improved near-end strategy is characterized by the following steps: (1) Construct a mathematical model for shipyard scheduling; construct a segmented state matrix and a shipyard state matrix; (2) Construct a heterogeneous input network, and output the segmented processing priority and current state value through the heterogeneous input network; construct a Gaussian distribution sampling module, and generate the actual priority sequence based on the segmented processing priority sequence during the data acquisition stage through the Gaussian distribution sampling module; construct a greedy decoder, and generate a daily scheduling scheme that satisfies all process constraints based on the actual priority sequence through the greedy decoder; (3) After the daily scheduling is completed, the corresponding penalty value is calculated and stored in the experience pool. After the experience pool is full, the near-end policy optimization algorithm with log probability compensation is used to update the parameters of the heterogeneous input network through gradient descent until the network converges. (4) Input the segment status and shipyard status of the entire production cycle into the trained heterogeneous input network in batches, and generate the daily shipyard segment painting scheduling scheme for the entire production cycle through the greedy decoder.

[0007] Preferably, step (1) specifically includes the following steps: (1.1) Define the basic parameters of the scheduling scenario; (1.2) Define decision variables and load calculation methods; (1.3) Define the scheduling optimization objective.

[0008] Preferably, step (1.1) specifically comprises: Define the number of work areas in the shipyard as M, and configure each work area with A sand-washing workshop and Each painting workshop and sandblasting workshop has a daily load limit. The total production cycle duration is I days, and the set of segments planned to arrive on the i-th day is... Define the set of segments to be allocated on day i as follows: , No. The actual number of segments to be allocated on a daily basis is: After the daily allocation is completed, the cumulative daily load of the sandblasting workshop and the painting workshop will be calculated. Preferably, step (1.2) specifically includes: Decision variables When 1 represents the segment of day i. The process type j and index is assigned to work area m. The load of the workshop on day i is the sum of the loads of the corresponding processes in each allocated segment. After the entire production cycle is completed, the total cumulative load of each workshop is calculated, and the load matrix of the sandblasting workshop and the load matrix of the painting workshop are constructed. Preferably, step (1.3) specifically includes: Calculate the coefficient of variation of the cumulative load of all sand washing workshops. Coefficient of variation of cumulative load across all painting workshops The optimization objective is to minimize the mean Z of both. Preferably, step (1) further includes defining constraints, specifically: The sand flushing process is not subject to date constraints, meaning that the segments allocated for each day have no overlap; The daily load limit constraint for the sand flushing workshop means that the cumulative daily load of the sand flushing workshop shall not exceed the preset daily load limit. ; The process is constrained by the work area, meaning that the sandblasting process and the painting process of each segment must be completed in the same work area; Workshop processing time constraints, that is, only one segment can be processed at the same time in the same workshop, and the processing time of different segments does not overlap; The process sequence is constrained, meaning that the segmented painting process starts after the sandblasting process is completed.

[0009] Preferably, step (2) of constructing a heterogeneous input network and outputting segmented processing priorities and current state values ​​through the heterogeneous input network specifically includes the following steps: The segmented state matrix with batch dimension B Shipyard state matrix Two independent input interfaces are respectively fed into the heterogeneous input network; After the segmented state matrix is ​​transposed and processed by a one-dimensional convolutional network, it is adjusted to the desired size. The segmented feature matrix; The shipyard state matrix, after being processed by a multilayer perceptron, is mapped to dimensions. The global state embedding is then concatenated with the segmented feature matrix along the channel dimension to form a size... The fusion state matrix; After dimensional rearrangement and perceptron processing, the fused state matrix is ​​adjusted to its size. The shared state matrix is ​​fed into the policy header and value header respectively, and the output size is [size missing]. The segmented processing priority sequence and the state value of size (B,1).

[0010] Preferably, the construction of the Gaussian distribution sampling module in step (2) generates the actual priority sequence based on the segmented processing priority sequence sampling during the data acquisition stage. Specifically, this includes the following steps: During the data acquisition phase, the actual priority of each segment on day i is sampled from a Gaussian distribution with the mean of the corresponding segment processing priority output by the heterogeneous input network and a variance of 1. During the inference phase, the segmented processing priority sequence output by the heterogeneous input network is directly used as the actual priority sequence.

[0011] Preferably, step (2) of constructing a greedy decoder, which generates a daily scheduling scheme that satisfies all process constraints based on the actual priority sequence, specifically includes the following steps: Arrange the actual set of segments to be allocated on the day in descending order of actual priority sequence to generate an ordered list of segments; Iterate through each unassigned segment in the ordered list of segments in sequence; The sequential traversal steps are executed repeatedly until all segments for the day are allocated, or all sand-washing workshops for the day can no longer accommodate new segment loads.

[0012] Preferably, the calculation of the corresponding penalty value in step (3) specifically includes the following steps: (3.1) Calculate the daily sand flushing equilibrium penalty ; (3.2) Calculate the penalty for delayed processing on the same day ; (3.3) Calculate global paint penalty ; (3.4) Calculate the penalty for unassigned segments ; (3.5) Calculate the final penalty value for the day. .

[0013] Preferably, step (3) employs a near-end strategy optimization algorithm with log probability compensation, specifically including the following steps: (3.6) For the segmented state matrix with different sizes in the experience pool, virtual segments of all zeros are used to fill the maximum number of segments in the experience pool. The corresponding dimensions are aligned as follows Matrix format; (3.7) Input the filled segmented state matrix and the shipyard state matrix into the heterogeneous input network, regenerate the segmented processing priority sequence, set the priority corresponding to the virtual segment to 0, and obtain the priority sequence under the new strategy; synchronously fill the actual priority sequence in the experience pool to... Dimensions; (3.8) Calculate the log probability compensation value, perform fixed-value compensation on the log probability corresponding to the filled virtual segment, calculate the cumulative sum of log probabilities of priority sequence occurrence under the new strategy and the old strategy respectively, and calculate the importance sampling ratio; (3.9) Calculate the advantage function and reward value based on the penalty value and state value in the experience pool, calculate the policy loss and value loss by combining the importance sampling ratio, and update the parameters of the heterogeneous input network by gradient descent.

[0014] The device for optimizing the segmented painting schedule in shipyards based on heterogeneous input and improved near-end strategies is characterized by the following: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the method described above for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy.

[0015] The processor for optimizing the painting schedule of shipyard sections based on heterogeneous input and improved near-end strategy is characterized in that the processor is configured to execute computer-executable instructions, and when the computer-executable instructions are executed by the processor, the various steps of the above-mentioned method for optimizing the painting schedule of shipyard sections based on heterogeneous input and improved near-end strategy are implemented.

[0016] The main feature of this computer-readable storage medium is that it stores a computer program that can be executed by a processor to implement the various steps of the above-described method for optimizing shipyard section painting scheduling based on heterogeneous input and improved proximal strategies.

[0017] The present invention employs a method, apparatus, processor, and computer-readable storage medium for optimizing the segmented painting schedule in a shipyard based on heterogeneous input and an improved near-end strategy. The upper-layer network outputs a segmented priority sequence from a global perspective. Subsequently, a greedy decoder executes a locally optimal allocation strategy that satisfies all process constraints. Finally, a near-end strategy optimization algorithm with log probability compensation is used to efficiently train the model, ensuring that the network can gradually learn effective scheduling meta-knowledge, and ultimately complete the load optimization of the shipyard workshop. Attached Figure Description

[0018] Figure 1 This is an overall flowchart of the method for optimizing the segmented painting schedule in shipyards based on heterogeneous input and improved near-end strategy according to the present invention.

[0019] Figure 2 This is a diagram of the heterogeneous input network architecture of the method for optimizing the segmented painting schedule in shipyards based on heterogeneous input and improved near-end strategy according to the present invention.

[0020] Figure 3 This is a daily sand flushing schedule diagram for the method of optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to the present invention.

[0021] Figure 4 This is a global painting scheduling diagram for the method of optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to the present invention.

[0022] Figure 5 This is a heatmap of sand flushing scheduling for other scale problems after the training of the model of the method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy of the present invention is completed.

[0023] Figure 6 This is a line graph showing the painting scheduling of the model after training of the method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to the present invention, on other scale problems. Detailed Implementation

[0024] To more clearly describe the technical content of the present invention, the following description is provided in conjunction with specific embodiments.

[0025] The method for optimizing the section painting scheduling in shipyards based on heterogeneous input and improved near-end strategy of the present invention includes the following steps: (1) Construct a mathematical model for shipyard scheduling; construct a segmented state matrix and a shipyard state matrix; (2) Construct a heterogeneous input network, and output the segmented processing priority and current state value through the heterogeneous input network; construct a Gaussian distribution sampling module, and generate the actual priority sequence based on the segmented processing priority sequence during the data acquisition stage through the Gaussian distribution sampling module; construct a greedy decoder, and generate a daily scheduling scheme that satisfies all process constraints based on the actual priority sequence through the greedy decoder; (3) After the daily scheduling is completed, the corresponding penalty value is calculated and stored in the experience pool. After the experience pool is full, the near-end policy optimization algorithm with log probability compensation is used to update the parameters of the heterogeneous input network through gradient descent until the network converges. (4) Input the segment status and shipyard status of the entire production cycle into the trained heterogeneous input network in batches, and generate the daily shipyard segment painting scheduling scheme for the entire production cycle through the greedy decoder.

[0026] In a preferred embodiment of the present invention, step (1) specifically includes the following steps: (1.1) Define the basic parameters of the scheduling scenario; (1.2) Define decision variables and load calculation methods; (1.3) Define the scheduling optimization objective.

[0027] In a preferred embodiment of the present invention, step (1.1) specifically comprises: Define the number of work areas in the shipyard as M, and configure each work area with A sand-washing workshop and Each painting workshop and sandblasting workshop has a daily load limit. The total production cycle duration is I days, and the set of segments planned to arrive on the i-th day is... Define the set of segments to be allocated on day i as follows: , No. The actual number of segments to be allocated on a daily basis is: After the daily allocation is completed, the cumulative daily load of the sandblasting workshop and the painting workshop will be calculated. In a preferred embodiment of the present invention, step (1.2) specifically comprises: Decision variables When 1 represents the segment of day i. The process type j and index is assigned to work area m. The load of the workshop on day i is the sum of the loads of the corresponding processes in each allocated segment. After the entire production cycle is completed, the total cumulative load of each workshop is calculated, and the load matrix of the sandblasting workshop and the load matrix of the painting workshop are constructed. In a preferred embodiment of the present invention, step (1.3) specifically comprises: Calculate the coefficient of variation of the cumulative load of all sand washing workshops. Coefficient of variation of cumulative load across all painting workshops The optimization objective is to minimize the mean Z of both. In a preferred embodiment of the present invention, step (1) further includes defining constraints, specifically: The sand flushing process is not subject to date constraints, meaning that the segments allocated for each day have no overlap; The daily load limit constraint for the sand flushing workshop means that the cumulative daily load of the sand flushing workshop shall not exceed the preset daily load limit. ; The process is constrained by the work area, meaning that the sandblasting process and the painting process of each segment must be completed in the same work area; Workshop processing time constraints, that is, only one segment can be processed at the same time in the same workshop, and the processing time of different segments does not overlap; The process sequence is constrained, meaning that the segmented painting process starts after the sandblasting process is completed.

[0028] As a preferred embodiment of the present invention, step (2) of constructing a heterogeneous input network and outputting segmented processing priorities and current state values ​​through the heterogeneous input network specifically includes the following steps: The segmented state matrix with batch dimension B Shipyard state matrix Two independent input interfaces are respectively fed into the heterogeneous input network; After the segmented state matrix is ​​transposed and processed by a one-dimensional convolutional network, it is adjusted to the desired size. The segmented feature matrix; The shipyard state matrix, after being processed by a multilayer perceptron, is mapped to dimensions. The global state embedding is then concatenated with the segmented feature matrix along the channel dimension to form a size... The fusion state matrix; After dimensional rearrangement and perceptron processing, the fused state matrix is ​​adjusted to its size. The shared state matrix is ​​fed into the policy header and value header respectively, and the output size is [size missing]. The segmented processing priority sequence and the state value of size (B,1).

[0029] As a preferred embodiment of the present invention, the construction of the Gaussian distribution sampling module in step (2) generates the actual priority sequence based on the segmented processing priority sequence sampling during the data acquisition stage through the Gaussian distribution sampling module, specifically including the following steps: During the data acquisition phase, the actual priority of each segment on day i is sampled from a Gaussian distribution with the mean of the corresponding segment processing priority output by the heterogeneous input network and a variance of 1. During the inference phase, the segmented processing priority sequence output by the heterogeneous input network is directly used as the actual priority sequence.

[0030] As a preferred embodiment of the present invention, the construction of the greedy decoder in step (2), which generates a daily scheduling scheme that satisfies all process constraints based on the actual priority sequence, specifically includes the following steps: Arrange the actual set of segments to be allocated on the day in descending order of actual priority sequence to generate an ordered list of segments; Iterate through each unassigned segment in the ordered list of segments in sequence; The sequential traversal steps are executed repeatedly until all segments for the day are allocated, or all sand-washing workshops for the day can no longer accommodate new segment loads.

[0031] In a preferred embodiment of the present invention, the calculation of the corresponding penalty value in step (3) specifically includes the following steps: (3.1) Calculate the daily sand flushing equilibrium penalty ; (3.2) Calculate the penalty for delayed processing on the same day ; (3.3) Calculate global paint penalty ; (3.4) Calculate the penalty for unassigned segments ; (3.5) Calculate the final penalty value for the day. .

[0032] In a preferred embodiment of the present invention, step (3) employs a near-end strategy optimization algorithm with log probability compensation, specifically including the following steps: (3.6) For the segmented state matrix with different sizes in the experience pool, virtual segments of all zeros are used to fill the maximum number of segments in the experience pool. The corresponding dimensions are aligned as follows Matrix format; (3.7) Input the filled segmented state matrix and the shipyard state matrix into the heterogeneous input network, regenerate the segmented processing priority sequence, set the priority corresponding to the virtual segment to 0, and obtain the priority sequence under the new strategy; synchronously fill the actual priority sequence in the experience pool to... Dimensions; (3.8) Calculate the log probability compensation value, perform fixed-value compensation on the log probability corresponding to the filled virtual segment, calculate the cumulative sum of log probabilities of priority sequence occurrence under the new strategy and the old strategy respectively, and calculate the importance sampling ratio; (3.9) Calculate the advantage function and reward value based on the penalty value and state value in the experience pool, calculate the policy loss and value loss by combining the importance sampling ratio, and update the parameters of the heterogeneous input network by gradient descent.

[0033] The apparatus of the present invention for optimizing the segmented painting schedule in shipyards based on heterogeneous input and improved near-end strategy, wherein the apparatus includes: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the method described above for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy.

[0034] The present invention discloses a processor for optimizing the painting schedule of shipyard sections based on heterogeneous input and improved near-end strategy. The processor is configured to execute computer-executable instructions. When the computer-executable instructions are executed by the processor, the various steps of the above-mentioned method for optimizing the painting schedule of shipyard sections based on heterogeneous input and improved near-end strategy are implemented.

[0035] The computer-readable storage medium of the present invention stores a computer program that can be executed by a processor to implement the various steps of the above-described method for optimizing the segmented painting schedule of a shipyard based on heterogeneous input and improved proximal strategies.

[0036] This invention relates to a shipyard segmented painting scheduling optimization method based on heterogeneous input and improved near-end strategy. The method includes: constructing a mathematical model aiming to minimize the total load difference in the workshops; establishing a heterogeneous input network to receive the segmented status of dynamic dimensions and the shipyard status of fixed dimensions daily, and outputting a segmented priority sequence representing the scheduling order; designing a greedy decoder to generate and evaluate a daily scheduling scheme that satisfies process constraints based on the sampled sequence; constructing a near-end strategy optimization algorithm to dynamically calculate probability compensation values ​​based on historical scheduling trajectories to correct strategy loss, and training the network using gradient descent until convergence; finally, inputting the segments and shipyard status of the entire production cycle into the network in batches, and having the decoder output a specific daily scheduling scheme. This invention can significantly optimize the load balancing of the workshops and effectively improve the production efficiency of shipyards.

[0037] This invention proposes a shipyard section painting scheduling optimization method based on heterogeneous input and improved near-end strategy. It effectively solves the shipyard load balancing problem by using reinforcement learning, thereby improving production efficiency.

[0038] Please see Figure 1 As shown, this shipyard section painting scheduling optimization method based on heterogeneous input and improved near-end strategy includes the following steps: (1) Construct a mathematical model for shipyard scheduling; construct a segmented state matrix and a shipyard state matrix; (2) Construct a heterogeneous input network to output segment processing priorities and current state values; construct a Gaussian distribution sampling module to output the actual priorities of segments; construct a greedy decoder to generate daily scheduling schemes; (3) Store the daily segmented status, shipyard status, actual scheduling priority, penalty value and status value in the experience pool during the iteration. After the pool is full, send it to the near-end policy optimization algorithm with log probability compensation to update the network parameters. (4) The scheduling tasks of the production cycle are sent to the model after training is completed, and the greedy decoder generates the daily scheduling plan.

[0039] In a preferred embodiment of the present invention, step (1) specifically includes the following steps: (1.1) Define the number of work areas within the shipyard Each workspace has the same configuration and all have The number of sand-washing workshops, and The painting workshop has a number of sections; the segmented sandblasting process cannot be carried out across dates, therefore the sandblasting workshop has a daily load limit. The painting process can be carried out across dates; the segmented sandblasting and painting processes can only be completed within one work area; the entire production cycle is continuous. day, no. The daily plan has a number of Segmented arrival is defined as ,in Representatives plan at The index for daily delivery is Segmentation; Define parameters For the work area The internal process type is The index is The workshop, among which These represent the sandblasting and painting processes, respectively. ; The shipyard allows sections to arrive early for the following day and participate in the same day's allocation; therefore, the following section delivery mechanism is established: the actual sections to be allocated on the current day are defined as the set of remaining sections and sections scheduled to arrive the following day, where remaining sections refer to sections that were left over from yesterday due to the sand-washing workshop being fully loaded; The actual set of segments to be allocated on a given day Defined as: in Representing the The set of segments allocated on each day; therefore, except for the actual number of segments to be allocated on the first day, the actual number of segments to be allocated on other days is affected by the allocation results of the previous day; it is stipulated that... ,in For the first The actual number of segments to be allocated on a given day; After the daily allocation is completed, the cumulative daily load of the sandblasting workshop and the painting workshop will be calculated: in It is a decision variable, when the first Daily segmentation Assigned to the workshop The value is 1 if the time condition is met, and 0 otherwise. It is segmented The corresponding process type is The load capacity; After the entire production cycle is completed, the cumulative load of all workshops will be calculated. and define the workshop load matrix. : The scheduling objective is to calculate the cumulative load variation coefficient for all sand-washing workshops after the scheduling of the entire production cycle is completed. and the cumulative load variation coefficient of all painting workshops and minimize their mean : in and These are the operations of calculating the mean and standard deviation of the values ​​within the matrix, respectively; the coefficient of variation reflects the dispersion of data at different scales, and the smaller the value, the smaller the relative fluctuation of the data. The constraints for this type of shipyard scheduling problem are as follows: The segmented sand-washing process is not allowed to be carried out across dates: The daily sand washing volume in the sand washing workshop must not exceed the upper limit: To meet the shipyard's assessment requirements, the sandblasting and painting processes for each section must be completed within the same work area: Each workshop is equipped with a buffer zone, allowing multiple segments to be processed simultaneously, but only one segment can be processed at a time within the workshop. in It is a decision variable, when the workshop Li segmentation Arranged in segments Record it as 1 if it is processed immediately afterwards, otherwise record it as 0; and Representative segment In the workshop The process type is The start and completion dates; , and The definition methods are similar; It is a sufficiently large constant; The segmented painting process can only be performed after the sandblasting process is completed: (1.2) Define segments The four characteristic values ​​are: sand flushing volume, ... Paint application amount Arrival date and delay processing time Therefore, the first The actual set of segments to be allocated on a given day Its state matrix has a size of The amount of sand flushing, the amount of paint applied, and the date of arrival at the factory are all known, while the delayed processing time is defined as the difference between the current date and the date of arrival at the factory. (1.3) Define a shipyard state matrix, including the daily cumulative load of the sandblasting workshop and the current cumulative load of the painting workshop in each work area, with fixed dimensions. .

[0040] In a preferred embodiment of the present invention, step (2) specifically includes the following steps: (2.1) The size is The piecewise state matrix and its size are The shipyard state matrix is ​​fed into two input interfaces of the heterogeneous network, where... The batch dimension is fixed at 1 during the data acquisition phase and defined as the number of samples used for training during the network update phase; the segmented state matrix, after transpose and processing by a one-dimensional convolutional network, has its size adjusted to... The shipyard state matrix is ​​fed into a multilayer perceptron for processing, and its feature dimensions are mapped to a matrix of size . The global state embedding is then concatenated with the piecewise state matrix along the channel dimension to form a matrix of size [size missing]. The fusion state matrix is ​​then processed again by dimension rearrangement and a perceptron to adjust it to a size of [size missing]. The shared state matrix is ​​then fed into the subsequently separated policy head and value head, with the final output size being... The segmentation priority sequence and size are State value, defining priority sequence .

[0041] (2.2) During the data acquisition phase, the first Daily segmentation actual priority Obtained by sampling from a Gaussian distribution, i.e.: in The policy network is the first Daily segmentation Output priority, defining the actual priority sequence ; In the reasoning stage, segmentation The actual priority sequence is .

[0042] (2.3) Define an ordered list of segments to be assigned on the current day. The order is from According to priority sequence Sort in descending order; the greedy decoder traverses the ordered list sequentially. Each segment And perform the following allocation decision process for it: For the current unassigned segments First, a set of candidate sand flushing workshops that satisfy the sand flushing constraints is determined. Sand washing workshop A segment belongs to this set if and only if it can continue to hold segments. The sandblasting load was then calculated. Subsequently, the painting workshops in all work areas of the set were traversed to simulate task allocation; the coefficient of variation of the cumulative sandblasting load and the coefficient of variation of the cumulative painting load after allocation were calculated, and the sum of the two was taken. As an evaluation indicator, the calculation method is as follows: in and They are the allocations The coefficients of variation for sandblasting and painting were calculated; the combination of sandblasting and painting workshops that minimized the weighted sum was selected as the optimal allocation scheme; if the candidate sandblasting workshop set... An empty set indicates that there is currently no sand-washing workshop capable of accommodating the segment. If so, this segment will be carried over to the next day's allocation; Repeat the above process until the first... All sections were allocated on a given day, or the sand-washing workshop could no longer accommodate any more sections that day.

[0043] In a preferred embodiment of the present invention, step (3) specifically includes the following steps: (3.1) For a period of time Daily production scheduling tasks, when the first After the daily allocation is completed, the daily sand flushing balance penalty is calculated. and penalties for delayed processing : in It is the first The matrix consisting of the cumulative sand flushing load of all sand flushing workshops per day is defined as follows: After the production plan for the entire production cycle is determined, the global painting penalty and the penalty for unassigned segments are calculated. It is stipulated that the painting penalty is only non-zero on the last day. If there are unallocated segments at the end of the production cycle, there will be an unallocated segment penalty. A sufficiently large negative number; otherwise, 0. The daily final penalty is stipulated as follows: hyperparameters The delay penalty is scaled to the same order of magnitude as the sandblasting and global painting penalties.

[0044] (3.2) During the network update phase, the segmented state matrices of different sizes in the experience pool are first filled with virtual segments of the same size with all eigenvalues ​​being 0, and then aligned to the network. The data is fed into a heterogeneous network to regenerate a size of [size missing]. The scheduling priority is then determined, and the scheduling priority of the filled virtual segments is replaced with 0, defined as follows: ,in It is the value with the largest number of segments in the segmented state matrix of the experience pool; the actual scheduling priority in the experience pool. Fill the same size with 0. Defined as The first in the experience pool Daily priority sequence The probability of each segment priority is equal to the probability of occurrence. The product of probabilities, summed using logarithmic probabilities Represented as: Because virtual segments are introduced, compensation must be added when calculating the new cumulative logarithmic probability; since the scheduling priority of the virtual segments is the same as the actual priority (0), their logarithmic probabilities are constant. After compensation Daily cumulative logarithmic probability Represented as:

[0045] After calculating the probabilities of the new and old strategies, the importance sampling ratio can be obtained: The advantage function and reward value that the near-end policy optimization algorithm relies on can be calculated according to standard methods, because they only depend on the state value and penalty value, and the state value and penalty value will only have a fixed size value after the daily scheduling ends; after obtaining the advantage function, reward value and importance sampling ratio, the policy function loss, value function loss and cross-entropy loss can be obtained through normal calculation.

[0046] In specific embodiments of this invention, in actual shipyard scheduling applications, shipyard status, production workload, and daily production plans are often dynamically changing. Improperly designed scheduling schemes can easily lead to idle or overloaded workshop resources, and in severe cases, even a large backlog of sections may still exist at the end of the production cycle. Therefore, researching an efficient and adaptable scheduling algorithm to fully utilize the capacity of each workshop is of significant practical importance. This technical solution proposes a shipyard section painting scheduling optimization method based on heterogeneous input and an improved near-end strategy. Its core idea is to allow the upper-layer network to output a section priority sequence from a global perspective. Subsequently, a greedy decoder executes a locally optimal allocation strategy that satisfies all process constraints. Finally, a near-end strategy optimization algorithm incorporating logarithmic probability compensation is used to efficiently train the model, ensuring that the network can gradually learn effective scheduling meta-knowledge, ultimately achieving load optimization for the shipyard workshops.

[0047] The performance of this method is verified through a specific example. In a shipyard, there are five work areas, each equipped with one sandblasting workshop and two painting workshops. In this invention, three datasets of different sizes are constructed, named Dataset-42, Dataset-79, and Dataset-165 according to the number of segments, respectively. The performance of this method is analyzed by comparing it with various algorithms. The number of daily planned delivery segments is extracted from historical scheduling schemes. Specific parameters are shown in Table 1.

[0048] This invention applies a pre-trained model to three datasets and generates new scheduling schemes. Taking the scheduling results of dataset-79 as an example, the scheduling results for the sand flushing process are as follows: Figure 3 As shown, the segment labels represent the segment index and the paint shop index to be assigned, respectively. It can be seen that this method successfully balances the load differences of the sand-washing workshops under the constraint of sand-washing limit. Figure 4 This is the scheduling result of this method in balancing the overall painting load, and it can also be seen that this method achieves an approximately completely equal division of the painting process. Therefore, the model of this invention can balance the total load of the sandblasting workshop and the painting workshop under the condition of considering sandblasting constraints.

[0049] To evaluate the performance of this method, this invention also introduces multiple sets of comparative algorithms, the specific architecture of each of which is shown in Table 2. Some algorithm architectures are defined as follows: REINFORCE: A reinforcement learning algorithm that directly learns and optimizes policy functions; Polling decoder: After obtaining the actual scheduling priority of the segment, the process allocation of each segment is determined by polling the current status of the sand-washing workshop and the painting workshop; Single actor-critic network: During the data acquisition and network update process, the daily segment status to be allocated is directly filled with 0 to the same size and sent to the network; Genetic algorithm: Its selection, crossover and mutation operations are all based on the scheduling priority of the segment; Heuristic rules: (1) Arrange the segments in ascending order of sand-washing load; (2) Arrange the segments in descending order of sand-washing load.

[0050] Table 3 shows the scheduling metrics of various algorithms on the three datasets. The algorithm of this invention performs best on datasets -42 and -165, while its performance on dataset -79 is slightly lower than that of the genetic algorithm. Replacing proximal policy optimization with REINFORCE significantly reduces network performance, demonstrating the superiority of the proximal policy optimization algorithm in terms of development, exploration, and update mechanisms. The heterogeneous network with a polling decoder shows moderate performance on all three datasets, proving that it is difficult to achieve a balance between local and global optimization from a global perspective alone. Simply filling the segmented states with the same size significantly reduces network performance, proving that the segmented states are severely diluted. The excellent performance of the genetic algorithm on the three datasets demonstrates the effectiveness and scalability of the proposed approach. The other two heuristic rules show significantly poor performance, proving that it is difficult to achieve a balance between local and global optimization from a local perspective alone. This method separates policy learning from constraint enforcement. It is this combination of long-term planning in reinforcement learning and short-term optimal execution in greedy algorithms that enables this method to satisfy process constraints at each allocation step while moving towards the global optimum, ultimately achieving a highly balanced scheduling result.

[0051] To evaluate the generalization ability of the model in this invention, a heterogeneous network model was first fully trained on dataset-165, and the following two experiments were designed: Experiment 1 directly applied the model to two other datasets to generate scheduling results; Experiment 2, before generating scheduling results, continued iterative training for 5000 steps on the other two datasets, and introduced the scheduling results of the fully retrained model as a comparison. The scheduling results of the sand flushing process are as follows: Figure 5 As shown in the figure. On dataset-79, the maximum average calorific value difference of the reuse model is 0.09, corresponding to a daily sandblasting load difference of 450. The maximum average calorific value difference of the fine-tuning model is 0.05, corresponding to a daily sandblasting load difference of 250. Therefore, fine-tuning is better than reuse in the allocation of sandblasting load, and the same conclusion is reached on dataset-42. The scheduling results of the painting process are as follows. Figure 6As shown, on dataset-42, the performance of the fine-tuned model is significantly better than that of the reused model. On dataset-79, the results of the fine-tuned and reused models are approximately the same, and both are close to those of the retrained model.

[0052] In summary, the trained heterogeneous network models achieved excellent scheduling results on the new-scale test set, and after fine-tuning, even better scheduling schemes for sand flushing and painting could be obtained. This strongly verifies that the heterogeneous network learns a generalizable, high-quality scheduling meta-knowledge. The generalization ability exhibited by the heterogeneous network model is an advantage that metaheuristic algorithms and heuristic algorithms do not possess. In dynamic production environments requiring rapid response, this ability to instantly generate near-optimal solutions for problems of different scales provides strong technical support for shipyard scheduling systems.

[0053] For the specific implementation scheme of this embodiment, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0054] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0055] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0056] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0057] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0058] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The corresponding program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0059] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0060] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0061] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0062] The present invention employs a method, apparatus, processor, and computer-readable storage medium for optimizing the segmented painting schedule in a shipyard based on heterogeneous input and an improved near-end strategy. The upper-layer network outputs a segmented priority sequence from a global perspective. Subsequently, a greedy decoder executes a locally optimal allocation strategy that satisfies all process constraints. Finally, a near-end strategy optimization algorithm with log probability compensation is used to efficiently train the model, ensuring that the network can gradually learn effective scheduling meta-knowledge, and ultimately complete the load optimization of the shipyard workshop.

[0063] In this specification, the invention has been described with reference to specific embodiments thereof. However, it will be apparent that various modifications and variations can be made without departing from the spirit and scope of the invention. Therefore, the specification and drawings should be considered illustrative rather than restrictive.

Claims

1. A method for optimizing the scheduling of section painting in shipyards based on heterogeneous input and improved near-end strategy, characterized in that, The method includes the following steps: (1) Construct a mathematical model for shipyard scheduling; construct a segmented state matrix and a shipyard state matrix; (2) Construct a heterogeneous input network, and output the segmented processing priority and current state value through the heterogeneous input network; construct a Gaussian distribution sampling module, and generate the actual priority sequence based on the segmented processing priority sequence during the data acquisition stage through the Gaussian distribution sampling module; construct a greedy decoder, and generate a daily scheduling scheme that satisfies all process constraints based on the actual priority sequence through the greedy decoder; (3) After the daily scheduling is completed, the corresponding penalty value is calculated and stored in the experience pool. After the experience pool is full, the near-end policy optimization algorithm with log probability compensation is used to update the parameters of the heterogeneous input network through gradient descent until the network converges. (4) Input the segment status and shipyard status of the entire production cycle into the trained heterogeneous input network in batches, and generate the daily shipyard segment painting scheduling scheme for the entire production cycle through the greedy decoder.

2. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 1, characterized in that, Step (1) specifically includes the following steps: (1.1) Define the basic parameters of the scheduling scenario; (1.2) Define decision variables and load calculation methods; (1.3) Define the scheduling optimization objective.

3. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 2, characterized in that, The specific steps (1.1) are as follows: Define the number of work areas in the shipyard as M, and configure each work area with A sand-washing workshop and Each painting workshop and sandblasting workshop has a daily load limit. The total production cycle duration is I days, and the set of segments planned to arrive on the i-th day is... Define the set of segments to be allocated on day i as follows: , No. The actual number of segments to be allocated on a daily basis is: After the daily allocation is completed, the cumulative daily load of the sandblasting workshop and the painting workshop will be calculated.

4. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 2, characterized in that, The specific steps (1.2) are as follows: Decision variables When 1 represents the segment of day i. The process type j and index is assigned to work area m. The load of the workshop on day i is the sum of the loads of the corresponding processes in each allocated segment. After the entire production cycle is completed, the total cumulative load of each workshop is calculated, and the load matrix of the sandblasting workshop and the load matrix of the painting workshop are constructed.

5. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 2, characterized in that, The specific steps (1.3) are as follows: Calculate the coefficient of variation of the cumulative load of all sand washing workshops. Coefficient of variation of cumulative load across all painting workshops The optimization objective is to minimize the mean Z of both.

6. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 2, characterized in that, Step (1) further includes defining constraints, specifically: The sand flushing process is not subject to date constraints, meaning that the segments allocated for each day have no overlap; The daily load limit constraint for the sand flushing workshop means that the cumulative daily load of the sand flushing workshop shall not exceed the preset daily load limit. ; The process is constrained by the work area, meaning that the sandblasting and painting processes of each segment must be completed in the same work area. Workshop processing time constraints, that is, only one segment can be processed at the same time in the same workshop, and the processing time of different segments does not overlap; The process sequence is constrained, meaning that the segmented painting process starts after the sandblasting process is completed.

7. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 1, characterized in that, The construction of the heterogeneous input network in step (2), which outputs the segmented processing priority and the current state value through the heterogeneous input network, specifically includes the following steps: The segmented state matrix with batch dimension B Shipyard state matrix Two independent input interfaces are respectively fed into the heterogeneous input network; After the segmented state matrix is ​​transposed and processed by a one-dimensional convolutional network, it is adjusted to the desired size. The piecewise feature matrix; The shipyard state matrix, after being processed by a multilayer perceptron, is mapped to dimensions. The global state embedding is then concatenated with the segmented feature matrix along the channel dimension to form a size... The fusion state matrix; After dimensional rearrangement and perceptron processing, the fused state matrix is ​​adjusted to its size. The shared state matrix is ​​fed into the policy header and value header respectively, and the output size is [size missing]. The segmented processing priority sequence and the state value of size (B,1).

8. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 1, characterized in that, The construction of the Gaussian distribution sampling module in step (2) involves generating the actual priority sequence based on the segmented processing priority sequence sampling during the data acquisition stage. This process specifically includes the following steps: During the data acquisition phase, the actual priority of each segment on day i is sampled from a Gaussian distribution with the mean of the corresponding segment processing priority output by the heterogeneous input network and a variance of 1. During the inference phase, the segmented processing priority sequence output by the heterogeneous input network is directly used as the actual priority sequence.

9. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 1, characterized in that, The step (2) described above involves constructing a greedy decoder to generate a daily scheduling scheme that satisfies all process constraints based on the actual priority sequence. This process specifically includes the following steps: Arrange the actual set of segments to be allocated on the day in descending order according to their actual priority sequence to generate an ordered list of segments. Iterate through each unassigned segment in the ordered list of segments in sequence; The sequential traversal steps are executed repeatedly until all segments for the day are allocated, or all sand-washing workshops for the day can no longer accommodate new segment loads.

10. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 1, characterized in that, The calculation of the corresponding penalty value in step (3) includes the following steps: (3.1) Calculate the daily sand flushing equilibrium penalty ; (3.2) Calculate the penalty for delayed processing on the same day ; (3.3) Calculate global paint penalty ; (3.4) Calculate the penalty for unassigned segments ; (3.5) Calculate the final penalty value for the day. .

11. The method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy according to claim 10, characterized in that, Step (3) employs a near-end policy optimization algorithm with log probability compensation, specifically including the following steps: (3.6) For the segmented state matrix with different sizes in the experience pool, virtual segments of all zeros are used to fill the maximum number of segments in the experience pool. The corresponding dimensions are aligned as follows Matrix format; (3.7) Input the filled segmented state matrix and the shipyard state matrix into the heterogeneous input network, regenerate the segmented processing priority sequence, set the priority corresponding to the virtual segment to 0, and obtain the priority sequence under the new strategy; synchronously fill the actual priority sequence in the experience pool to... Dimensions; (3.8) Calculate the log probability compensation value, perform fixed-value compensation on the log probability corresponding to the filled virtual segment, calculate the cumulative sum of log probabilities of priority sequence occurrence under the new strategy and the old strategy respectively, and calculate the importance sampling ratio; (3.9) Calculate the advantage function and reward value based on the penalty value and state value in the experience pool, calculate the policy loss and value loss by combining the importance sampling ratio, and update the parameters of the heterogeneous input network by gradient descent.

12. A device for optimizing the scheduling of section painting in shipyards based on heterogeneous input and improved near-end strategy, characterized in that, The device includes: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the steps of the method for optimizing shipyard section painting scheduling based on heterogeneous input and improved proximal strategy as described in any one of claims 1 to 11.

13. A processor for optimizing the scheduling of section painting in shipyards based on heterogeneous input and an improved near-end strategy, characterized in that, The processor is configured to execute computer-executable instructions, which, when executed by the processor, implement the steps of the method for optimizing shipyard section painting scheduling based on heterogeneous input and improved proximal strategy as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, It stores a computer program that can be executed by a processor to implement the steps of the method for optimizing shipyard section painting scheduling based on heterogeneous input and improved near-end strategy as described in any one of claims 1 to 11.