Service combination method based on colored Petri network and deep reinforcement learning agent
By integrating colored Petri nets with deep reinforcement learning agents, the problem of low decision-making efficiency in manufacturing service composition is solved, achieving efficient and interpretable optimization of manufacturing service composition, and adapting to the dynamic changes in the industrial internet environment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing manufacturing service portfolio optimization methods suffer from low decision-making efficiency, poor adaptability, and opaque optimization processes in dynamic and complex industrial interconnected environments. Traditional heuristic algorithms have poor dynamic adaptability and lack interpretability in the optimization process, while standard deep reinforcement learning methods cannot effectively handle huge decision spaces and complex logical constraints.
We adopt a fusion approach based on colored Petri nets and deep reinforcement learning agents. By constructing a colored Petri net model to define the state, actions and constraints, and combining it with a deep reinforcement learning environment, we introduce action masking and proximal policy optimization algorithms to train a deep reinforcement learning agent to generate the optimal service composition policy.
It improves the interpretability and adaptability of the manufacturing service composition process, enhances learning efficiency and response speed, and can generate optimal solutions in real time when the manufacturing environment changes dynamically, while reducing computing costs and response latency.
Smart Images

Figure CN121836231A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial internet and intelligent manufacturing technology, specifically to a service composition method based on colored Petri nets and deep reinforcement learning agents. Background Technology
[0002] With the deep integration of new-generation information technology and manufacturing, industrial internet platforms have become core infrastructure supporting the optimal allocation of manufacturing resources and promoting industrial model innovation. Against this backdrop, to meet the growing market demand for personalized and customized solutions, it is often necessary to dynamically combine the massive and dispersed individual manufacturing services (MS) within the platform to form a composite service chain capable of providing value-added capabilities. This process is known as Manufacturing Service Composition (MSC). How to efficiently and intelligently select and construct a service composition solution that is optimal in terms of comprehensive Quality of Service (QoS) indicators such as time, cost, and reliability from numerous candidate services is a core technological challenge currently facing the industrial internet field.
[0003] Currently, mainstream methods for solving the Manufacturing Services Composition Problem (MSCP) largely rely on various heuristic optimization algorithms, such as Genetic Algorithms (GA) and Ant Colony Algorithms (ACO). While these methods have achieved some success in handling optimization problems in specific static scenarios, their inherent shortcomings are becoming increasingly apparent in highly dynamic and complex industrial internet environments: First, these algorithms typically involve numerous parameters that require fine-tuning based on expert experience, and the quality of these parameter settings directly affects the optimization results, leading to poor adaptability and robustness. Second, when faced with real-time disturbances such as sudden service failures or the dynamic insertion of new orders, heuristic algorithms often need to perform a global search again, resulting in slow response times and difficulty meeting the high real-time requirements of industrial scenarios. Finally, and crucially, the optimization process of heuristic algorithms is often like a "black box," with opaque decision-making logic and a lack of process interpretability, which greatly hinders their deep application and trust-building in critical manufacturing fields requiring high security and reliability.
[0004] Deep reinforcement learning (DRL), as an end-to-end learning paradigm, offers new possibilities for solving the MSCP problem due to its powerful autonomous decision-making and environmental adaptability in complex and dynamic environments. However, directly applying standard DRL algorithms to this problem still faces significant challenges: on the one hand, the number of candidate solutions for service composition grows exponentially with the task size, resulting in an exceptionally large state and action space for the DRL agent, making training difficult and convergence slow; on the other hand, there are strict logical constraints in the service composition process (such as function matching and resource exclusivity), and standard DRL algorithms lack effective mechanisms to model and handle these hard constraints, leading to a large number of ineffective explorations and severely impacting learning efficiency.
[0005] In summary, existing manufacturing service portfolio optimization methods have inherent shortcomings when facing dynamic and complex industrial interconnected environments: on the one hand, traditional heuristic algorithms have poor dynamic adaptability and lack interpretability in the optimization process; on the other hand, standard deep reinforcement learning methods suffer from low decision-making efficiency due to their inability to effectively handle huge decision spaces and complex logical constraints. Therefore, a novel solution that integrates these three aspects is urgently needed. Summary of the Invention
[0006] To address the shortcomings of the existing technologies, this invention provides a service composition method based on colored Petri nets and deep reinforcement learning agents. By deeply coupling the formal modeling capabilities of colored Petri nets with the adaptive decision-making capabilities of deep reinforcement learning, this invention solves the problems of low decision-making efficiency, poor adaptability, and opaque optimization processes caused by the huge decision space and complex logical constraints in manufacturing service composition methods in dynamic and complex industrial interconnection environments.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0008] A service composition method based on colored Petri nets and deep reinforcement learning agents includes the following steps:
[0009] S1. Construct a colored Petri net model of the manufacturing service composition system, and define the state, action and constraints.
[0010] S2. Construct a deep reinforcement learning environment based on the colored Petri net model, and define the state space, action space and reward function for the deep reinforcement learning agent;
[0011] S3. The deep reinforcement learning agent interacts with the deep reinforcement learning environment, and the colored Petri net model is used to dynamically generate an action mask to constrain the action space of the deep reinforcement learning agent. The deep reinforcement learning agent is trained until convergence using a proximal policy optimization algorithm.
[0012] S4. The policy obtained by the deep reinforcement learning agent after training convergence is taken as the optimal service composition policy. Based on the optimal service composition policy, the corresponding transitions are triggered in the colored Petri net model in sequence to generate the final manufacturing service composition scheme.
[0013] As a preferred embodiment, in step S1, in the colored Petri net model, the library is used to represent the state of manufacturing tasks and services, the transition is used to represent the action of service allocation or task triggering, and the color attribute of the token is used to represent the manufacturing sub-task with specific functional requirements.
[0014] As a preferred embodiment, in step S1, the constraint condition is the guard function of the transition in the colored Petri net model. The guard function is used to determine the enabling condition of the transition, and its determination condition is as follows:
[0015] When the color attribute of the manufacturing subtask token matches the color attribute of the service allocation transition, and the service state library connected to the service allocation transition is in an idle state, it is determined that the service allocation transition has the enabling condition.
[0016] Specifically:
[0017] S101: Determine whether the color attribute of the manufacturing subtask token to be assigned matches the color attribute of the service assignment transition to ensure that the service function meets the subtask requirements. The elements in the colored Petri net model are represented as follows:
[0018] ;
[0019] In the formula, The collection of places in the model; Task Library Subtasks to be processed Manufacturing service warehouse Free space; All are index variables; Number of subtasks in a task order Number of services;
[0020] ;
[0021] In the formula, The set of transitions in the model; Subtask selection transition Task Selection Changes Delivery transition; triggered by the end of the service process. and All are index variables;
[0022] ;
[0023] In the formula, The set of colors in the model; Different services carry color information. ;
[0024] ;
[0025] In the formula, For the arc function in the model; A set of arcs; Multiple color sets;
[0026] S102: The guard function in the colored Petri net model includes determining whether the service state database connected to service allocation transitions is in an idle state to ensure that the same service processes only one subtask at a time, as well as corresponding control conditions, as detailed below:
[0027] ;
[0028] ;
[0029] ;
[0030] ;
[0031] ;
[0032] ;
[0033] In the formula, Guard function for subtask selection transition Guard functions for service selection class transitions; Guard functions for delivering transitions upon service completion; Control signals; Task pointer when The first task does not require the predecessor to be completed. Must meet If the data is already in the completed collection, return True.
[0034] As a preferred embodiment, in step S2, the current label of the colored Petri net model is used as the environmental state of the deep reinforcement learning agent, the service allocation change is used as the action of the deep reinforcement learning agent, and a reward function is constructed based on the service quality attribute data of the manufacturing service; the service quality attribute data includes the processing time, processing cost, reliability of the manufacturing service, as well as logistics time and logistics cost.
[0035] The formula is expressed as:
[0036] ;
[0037] ;
[0038] ;
[0039] ;
[0040] ;
[0041] ;
[0042] ;
[0043] ;
[0044] ;
[0045] ;
[0046] In the formula, For manufacturing task orders Number of subtasks To describe the granularity of task decomposition For task structure Number of logistics nodes For workload; For the first Sub-tasks For the quantity required The required functional type for this subtask For transport weight For workload; proportionality coefficient Processing coefficient Unit processing time; For the i-th enterprise, provide manufacturing services with k capabilities. Functionality provided for the service Service capabilities for services Service unit price Service capability correction factor For service reliability For logistics services Service price per unit weight per unit distance Transportation time per unit weight per unit distance For selection Service processing subtasks Time For selection Service processing subtasks price For the reliability of subtasks and The logistics time and cost between the two different sub-tasks are respectively. These are logical coefficients.
[0047] As a preferred embodiment, in step S2, the reward function is constructed using the following formula, expressed as:
[0048] ;
[0049] ;
[0050] ;
[0051] In the formula, Normalization of cost-related indicators; To normalize the performance indicators; and These are the maximum values of cost-related indicators and benefit-related indicators among all candidate services, respectively. and These are the normalized values of cost-type indicators and benefit-type indicators, respectively. and These are the minimum values of cost-related indicators and benefit-related indicators among all candidate services, respectively. For the first Reward functions for each subtask; Normalized processing time; To normalize processing costs; For normalized reliability; To normalize logistics time; To normalize logistics costs; , , These are time weight, cost weight, and reliability weight, respectively.
[0052] As a preferred embodiment, step S3, which involves dynamically generating the action mask using the colored Petri net model, includes the following steps:
[0053] S301. Traverse all available actions of the deep reinforcement learning agent, where each action corresponds to a service assignment transition;
[0054] S302. Call the guard function corresponding to the service allocation transition for each available action and determine its enabling status;
[0055] S303. Generate a mask vector with the same dimension as the action space. If the service allocation transition is enabled, the mask vector at the corresponding position is determined to be valid; otherwise, it is determined to be invalid.
[0056] The formula is expressed as:
[0057] ;
[0058] ;
[0059] In the formula, For the policy network based on the current state Calculated corresponding to the action The value after masking is the unnormalized score; For action The guard function, The action is legal; For a deep reinforcement learning agent, the current policy is in the state Select action The probability distribution of actions; These are the parameters of the policy network; The dummy variable used for summation represents each action in the action space;
[0060] S304. Apply the mask vector to the policy network output layer of the deep reinforcement learning agent. Before performing probability normalization, mask the output values corresponding to invalid actions to ensure that the deep reinforcement learning agent selects only from the currently valid actions.
[0061] ;
[0062] ;
[0063] In the formula, The importance sampling ratio at time step t; The first of the mask vectors One element; Index for the action; This represents the total size of the action space; For the first in the action space A specific action; A set of transitions assigned to all services.
[0064] As a preferred embodiment, in step S3, the proximal policy optimization algorithm integrates a priority sampling policy based on advantage weighting. The specific process of training this deep reinforcement learning agent includes the following steps:
[0065] After the deep reinforcement learning agent interacts with the deep reinforcement learning environment, the experience tuples generated from this interaction are... The data is stored in the current trajectory buffer. Then, the generalized advantage estimate for each time step is calculated using the Critic network to measure the superiority or inferiority of the current action relative to the average level. Next, a priority probability distribution based on the advantage value is constructed, and the sampling probability of each sample is calculated. The sample with the larger the absolute value of the advantage, the higher the probability of being selected into the Mini-batch. Based on the Mini-batch data extracted by the above sampling probability, the truncation objective function of PPO is calculated, and backpropagation is performed to update the parameters of the Actor and Critic networks, thereby training the deep reinforcement learning agent.
[0066] The formula is expressed as:
[0067] ;
[0068] ;
[0069] ;
[0070] ;
[0071] ,
[0072] In the formula, and These are the state variables of the subtask repository and the processing subtask repository, respectively. and These are the subtask progress state vector / set when the current subtask being processed is 𝑗, and the next progress state obtained after completing the service selection for subtask 𝑗 and moving to the next subtask; and These are the state variables corresponding to the idle warehouse and the delivery warehouse, respectively; and These are the corresponding status quantities for logistics services.
[0073] As a preferred embodiment, step S4 further includes: when the colored Petri net model is updated, causing a change in the environmental state, the deep reinforcement learning agent that has been trained and converged adaptively generates a new optimal service composition scheme based on the updated environmental state without retraining, and quantitatively evaluates the newly generated optimal service composition scheme through a global service quality evaluation function.
[0074] As a preferred embodiment, the global service quality evaluation function is expressed as follows:
[0075] ;
[0076] ;
[0077] ;
[0078] ;
[0079] In the formula, For service portfolio solutions A comprehensive service quality assessment; For the plan Total time score; For the plan Total cost score; For the plan The overall reliability score; , , These are the weighting coefficients for time attribute, cost attribute, and reliability score, respectively.
[0080] Compared with the prior art, the present invention has the following technical effects:
[0081] 1. This invention constructs a Colored Petri Net (CPN) model to formally model a manufacturing service composition system. By utilizing elements such as places, transitions, and color tokens, it leverages the topological relationships, constraints, and concurrent interactions between manufacturing tasks and services to formally model the system. This clearly describes the service triggering logic and state transition process, achieving a graph-structured representation of manufacturing tasks. The introduction of the Colored Petri Net model makes the execution process of service composition visual and verifiable, effectively avoiding the problems of ambiguous model structure and untraceable state in traditional methods.
[0082] 2. This invention integrates a priority sampling strategy based on advantage weighting and an action masking mechanism into the deep reinforcement learning (DRL) framework built on the CPN model. Combined with the guard function information provided by Petri nets, the action space of the agent is constrained and filtered, thereby automatically eliminating ineffective actions during training, significantly reducing invalid exploration, and improving the convergence speed and stability of the algorithm. The priority sampling strategy based on advantage weighting dynamically adjusts the sample sampling probability, focusing the learning process on high-value experiences, significantly improving data utilization and learning efficiency. In the DEL agent optimization process, the proximal policy optimization (PM-PPO) algorithm is used to overcome the problems of difficult convergence and slow training speed, enabling the agent to quickly learn high-performance policies in industrial-level complex scenarios.
[0083] 3. This invention introduces a spatiotemporal constrained multidimensional index system at the service quality evaluation level. It comprehensively considers factors such as processing time, service cost, reliability and logistics delay to form a unified normalized evaluation model, providing accurate reward signals for reinforcement learning agents. This mechanism realizes the quantitative unification of multidimensional heterogeneous attributes, enabling service composition optimization to not only focus on local performance indicators, but also take into account global collaborative efficiency.
[0084] 4. Based on the converged training agent, the strategy of this invention not only achieves global optimality in the overall quality of service (QoS) index, but more importantly, when the manufacturing environment changes dynamically (such as service failure or order insertion), only the state of the CPN model needs to be updated. The agent can generate a new optimal solution in real time based on the learned strategy without retraining. This has the ability to adapt multiple times after one training, which greatly reduces the computational cost and response latency of online applications and significantly improves the system's response speed and robustness. Attached Figure Description
[0085] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0086] Figure 1 This is a flowchart of a service composition method based on colored Petri nets and deep reinforcement learning agents disclosed in this invention;
[0087] Figure 2 This is a framework diagram of the service composition method based on colored Petri nets and deep reinforcement learning in an embodiment of the present invention;
[0088] Figure 3 This is a detailed diagram illustrating the interaction between the reinforcement learning environment based on colored Petri nets and the improved PPO algorithm in an embodiment of the present invention.
[0089] Figure 4 This is a flowchart of the manufacturing service combination process under the industrial interconnection mode in an embodiment of the present invention. Detailed Implementation
[0090] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0091] The present invention will now be described in further detail with reference to the accompanying drawings.
[0092] With the deep integration of the Industrial Internet and intelligent manufacturing, how to dynamically combine the globally optimal service chain from massive, distributed manufacturing services has become a core technological challenge restricting industrial model innovation. Currently, mainstream methods generally have inherent defects: on the one hand, traditional heuristic optimization algorithms (such as genetic algorithms and ant colony algorithms) are sensitive to parameters and have poor dynamic adaptability, responding slowly to real-time disturbances such as service failures and order changes, and their "black box" decision-making process lacks interpretability, making it difficult to establish trust in industrial scenarios with high reliability requirements; on the other hand, although deep reinforcement learning (DRL) has strong adaptive decision-making potential, when dealing with service composition problems, the action space explodes exponentially with the task size and there is a lack of effective modeling mechanisms for complex logical constraints (such as function matching and resource exclusivity), resulting in low training efficiency and difficulty in convergence.
[0093] To address the aforementioned problems, this invention proposes a service composition method based on colored Petri nets and deep reinforcement learning agents. This method, by introducing a fusion mechanism of Petri nets and deep reinforcement learning, achieves efficient modeling and intelligent optimization of the manufacturing service composition problem in a dynamic industrial interconnection environment, significantly improving the interpretability, adaptability, and computational efficiency of the service composition process. Traditional manufacturing service composition methods generally suffer from problems such as reliance on extensive manual parameter setting during the optimization process, insufficient model generalization ability, and difficulty in handling dynamic service changes. This invention proposes a manufacturing service composition method based on Petri net structured modeling combined with an improved proximal policy optimization algorithm, constructing an interpretable, scalable, and highly adaptive optimization decision framework.
[0094] Specifically, the service composition method proposed in this invention based on colored Petri nets and deep reinforcement learning agents, such as... Figure 1 As shown, it specifically includes:
[0095] S1. Construct a colored Petri net model of the manufacturing service composition system, and define the state, action and constraints.
[0096] S2. Construct a deep reinforcement learning environment based on the colored Petri net model, and define the state space, action space and reward function for the deep reinforcement learning agent;
[0097] S3. The deep reinforcement learning agent interacts with the deep reinforcement learning environment, and the colored Petri net model is used to dynamically generate an action mask to constrain the action space of the deep reinforcement learning agent. The deep reinforcement learning agent is trained until convergence using a proximal policy optimization algorithm.
[0098] S4. The policy obtained by the deep reinforcement learning agent after training convergence is taken as the optimal service composition policy. Based on the optimal service composition policy, the corresponding transitions are triggered in the colored Petri net model in sequence to generate the final manufacturing service composition scheme.
[0099] As can be seen, this invention constructs the PetriDRL-SC integrated optimization framework by deeply coupling the formal modeling capability of colored Petri nets with the autonomous decision-making capability of deep reinforcement learning. This framework utilizes Petri nets to provide DRL with a clear and interpretable state space, a dynamically constrained action space, and a structured environmental interaction logic, thereby effectively constraining the exploration range of the agent, significantly improving the learning efficiency and policy quality of the agent, and ultimately generating a globally optimal manufacturing service combination scheme in a dynamic and complex industrial interconnection environment.
[0100] The service composition method of the present invention based on colored Petri nets and deep reinforcement learning agents will be described in more detail below.
[0101] I. PetriDRL-SC Integrated Optimization Framework
[0102] The PetriDRL-SC ensemble optimization framework proposed in this embodiment is as follows: Figure 2 As shown, it mainly consists of three parts: Petri net modeling layer, reinforcement learning decision layer, and service execution layer. Each layer interacts with the others through data and control signals to form a complete closed-loop optimization system.
[0103] 1.1 Petri Net Modeling Layer
[0104] This layer is responsible for formally modeling the manufacturing service composition system, mapping manufacturing tasks, service nodes, and their constraints to a colored Petri net structure. By defining places, transitions, and guard functions, it visualizes the state of manufacturing tasks, service allocation actions, and execution flow. The graph structure of the Petri net not only provides topological information at the system level but also provides a dynamic constraint mechanism for the legal action space of the reinforcement learning agent. The triggering condition for each transition is determined by the Petri net guard function G(a), thereby automatically generating action masks during system operation and preventing the agent from selecting illegal or redundant service actions.
[0105] 1.2 Strengthen the learning decision-making level
[0106] In this layer, the deep reinforcement learning agent learns the optimal service combination strategy through interaction with the Petri net environment. Each interaction includes four processes: state observation, action decision-making, reward acquisition, and experience storage. The agent's policy network outputs the service selection probability distribution in the current state, while the value network evaluates the overall value of the current state. By introducing a priority sampling strategy based on advantage weighting, the system prioritizes replaying high-value experience samples during the learning process, improving sample utilization and learning efficiency.
[0107] 1.3 Service Execution Layer
[0108] This layer corresponds to the actual industrial internet manufacturing environment and includes various manufacturing service provider nodes. The system executes actual production tasks based on the optimal service combination scheme output by the reinforcement learning layer. When a service node becomes unavailable due to failure, latency, or load changes, the PetriDRL-SC framework can automatically trigger a replanning process, dynamically adjusting based on changes in the Petri net state to achieve adaptive reconstruction and continuous optimization of manufacturing tasks.
[0109] The following section provides a detailed introduction to each core component of the PetriDRL-SC integrated optimization framework.
[0110] II. Colored Petri Net Modeling
[0111] This embodiment uses colored Petri nets as the basic tool for task description and state evolution to achieve structured expression and logical constraint control of the service composition problem.
[0112] 2.1 Basic Structure Definition of Colored Petri Net Model
[0113] The colored Petri net model is defined as an octet: CPN = (P, T, A, C, N, E, G, I), where:
[0114] P: Location / place set, used to store system states, such as task pools, service pools, and logistics nodes;
[0115] T: A set of transitions, representing event triggering or state changes, such as service allocation or task completion;
[0116] A: Arc set, which defines the connection relationship between position and transition;
[0117] C: Color set, used to describe token attributes, including task type, processing quantity, geographical location, etc.;
[0118] N: Node mapping function, which specifies the input-output relationship;
[0119] E: Arc expression, defining the token transfer rules;
[0120] G: Guard function, describing the transition triggering condition;
[0121] I: Initial identifier, defines the initial state of the system.
[0122] Based on the above definition, the execution process of a manufacturing task can be abstracted as the flow and transition of tokens between various locations, and each manufacturing service, logistics service, and task status can be clearly represented in the model.
[0123] In this embodiment, the library is used to represent the state of manufacturing tasks and services, the transition is used to represent the action of service allocation or task triggering, and the color attribute of the token is used to represent manufacturing sub-tasks with specific functional requirements.
[0124] 2.2 System State and Task Flow Modeling
[0125] In this specific application, the decomposition results of the manufacturing task are mapped to multiple sub-task locations. Each location's token represents a task currently to be assigned or executed. The token's color attributes include task type, quantity, time constraints, and product batch information. Service nodes correspond to service locations, used to store the idle or occupied status of storage resources. A service can be considered a dynamic node with capacity constraints, its availability determined by the presence of the corresponding token in the Petri net and the guard function's decision logic. The system also sets up task completion locations and logistics locations to describe the transfer of task results and the spatial transfer of processed parts. The triggering order and path topology of each transition in the Petri net reflect the execution logic of the manufacturing task, forming a time-consistent service collaboration process.
[0126] The constraints are guard functions of transitions in the colored Petri net model. These guard functions are used to determine the enabling conditions of transitions, and their determination conditions are as follows:
[0127] When the color attribute of the manufacturing subtask token matches the color attribute of the service allocation transition, and the service state library connected to the service allocation transition is in an idle state, it is determined that the service allocation transition has the enabling condition.
[0128] Specifically:
[0129] S101: Determine whether the color attribute of the manufacturing subtask token to be assigned matches the color attribute of the service assignment transition to ensure that the service function meets the subtask requirements. The elements in the colored Petri net model are represented as follows:
[0130] ;
[0131] In the formula, The set of places in the model, i.e. the storage locations of tokens, includes subtask places and service places, etc. Task Library Subtasks to be processed Manufacturing service warehouse Free space; All are index variables; Number of subtasks in a task order Number of services;
[0132] ;
[0133] In the formula, The set of transitions in the model, i.e. the model's triggering behaviors, are controlled by attribute conditions; Subtask selection changes, selecting subtasks to be completed according to task order process constraints. Task Selection Changes Delivery transition; triggered by the end of the service process. Number of subtasks in a task order Number of services;
[0134] ;
[0135] In the formula, The color set in the model represents the heterogeneous attributes of the task and control conditions. Different services carry color information. ;
[0136] ;
[0137] In the formula, The arc function in the model determines the type and quantity of tokens transported along the arc; The set of arcs, i.e., all directed edges in the CPN model; Color set; Multiple color sets;
[0138] S102: The guard function in the colored Petri net model includes determining whether the service state database connected to service allocation transitions is in an idle state to ensure that the same service processes only one subtask at a time, as well as corresponding control conditions, as detailed below:
[0139] ;
[0140] ;
[0141] ;
[0142] ;
[0143] ;
[0144] .
[0145] In the formula, The guard function for the subtask selection transition, i.e., when the control condition is true and there is a task token that can be consumed. The guard function for service selection transitions means that service allocation transitions can only be enabled when the control conditions are true, both places required for the allocation transition have available tokens, and the color of an input token matches the transition requirements. The guard function for the delivery transition upon service completion can only trigger the delivery action and release service resources when the token in the service repository can be consumed. The control signal has a subtask. In the task library, and this subtask is exactly equal to If the sequence pointer points to a value that has already completed its previous task, the control signal is True; otherwise, it is False. Task pointer when The first task does not require the predecessor to be completed. Must meet If the data is already in the completed collection, return True.
[0146] Therefore, in specific implementation, the guard function of the transition in the colored Petri net model is used to determine the enabling condition of the transition. The determination condition is: when the color attribute of the subtask token is matched with the color attribute of the service allocation transition, and the service state library connected to the service allocation transition is in an idle state, the service allocation transition is determined to have the enabling condition.
[0147] III. Constructing a DRL Interactive Environment Based on a Colored Petri Net Model
[0148] In practice, the current label of the colored Petri net model is used as the environmental state of the deep reinforcement learning agent, the service allocation change is used as the action of the deep reinforcement learning agent, and a reward function is constructed based on the service quality (QoS) attribute data of the manufactured service.
[0149] Specifically, such as Figure 3 As shown, by introducing a dynamic mapping relationship between task state and service state into the colored Petri net model, the manufacturing service composition problem is formalized into a learnable Markov decision process (MDP), thereby realizing interactive learning and optimization control between reinforcement learning agents and Petri net systems.
[0150] 3.1 Environmental Status
[0151] The interactive environment constructed in this invention is based on a colored Petri net framework. Its core idea is to embed the execution logic of manufacturing tasks, changes in service status, and logistics constraints into the Petri net model, so that the Petri net can serve as the logical carrier of system state evolution.
[0152] Building upon this foundation, the reinforcement learning agent learns optimal service selection and composition strategies through continuous interaction with the Petri net environment. Each state transition in the environment is triggered by the flow of tokens within the Petri net, with the token's color attribute describing different manufacturing subtasks, resource states, and execution sequences. Through this mechanism, the Petri net not only assumes the responsibility of state updates and constraint determination but also provides a dynamically interpretable state space for reinforcement learning.
[0153] Specifically, the agent selects a service allocation action at each time step. When the action satisfies the Petri net guard function constraint, the corresponding transition is triggered, and the token is migrated between warehouses, thereby realizing the state update of the manufacturing task. At the same time, the system calculates the instant reward based on the quality of service (QoS) and logistics factors and feeds it back to the agent to guide subsequent strategy optimization.
[0154] 3.2 Definition of State Space
[0155] In this embodiment, the location distribution of the Petri net and the token identifiers together constitute the system's state space. The state of each manufacturing subtask is represented by the presence or absence of a token in the corresponding location; if the token is still in the pending location, it means that the subtask has not yet been assigned a service; if the token moves to the service location, it means that the subtask is being executed; when the token disappears or enters the delivery location, it means that the task has been completed. For each subtask, its token color attribute includes information such as task category, processing quantity, time constraints, and geographical location. This state representation method can simultaneously reflect the spatiotemporal distribution characteristics of tasks and service resources, facilitating the agent's understanding of the current overall operational status of the system.
[0156] Furthermore, the state of a manufacturing service node is also represented by tokens: if a token exists in the service idle library, it indicates that the service is available; if the token is consumed, it indicates that the service has been assigned to a task. Through the graph structure and color mechanism of Petri nets, the state space can uniformly express two types of dynamic features: task progress and resource consumption, thus achieving environment modeling that combines interpretability and scalability.
[0157] 3.3 Definition of Action Space
[0158] In this embodiment, the action space of the deep reinforcement learning agent is determined by the set of transitions in the Petri net, particularly those representing service allocation or task triggering. The primary responsibility of the reinforcement learning agent is to select an optimal service node from the available set of manufacturing services for allocation to the current subtask. The agent's action corresponds to triggering a service allocation transition (Ta), and its selection range is constrained by the Petri net guard function G(a). If the guard condition is not met, the action cannot be executed.
[0159] To improve training efficiency, this embodiment introduces an action masking mechanism: the system traverses all transitions in each state, automatically filters out the set of possible actions by calling the Petri net guard function, and generates a mask matrix. The mask blocks all actions that do not meet the conditions, ensuring that the agent only samples legal actions after the policy network outputs, thus effectively avoiding ineffective exploration and computational waste. The dynamic adjustment mechanism of the action space allows the number of selectable actions for the agent to vary in different states. This Petri net-based constraint action design significantly improves the convergence speed and stability of reinforcement learning.
[0160] Generate the action mask using the following steps:
[0161] S301. Traverse all available actions of the deep reinforcement learning agent, where each action corresponds to a service assignment transition;
[0162] S302. Call the guard function corresponding to the service allocation transition for each available action and determine its enabling status;
[0163] S303. Generate a mask vector with the same dimension as the action space. If the service allocation transition is enabled, the mask vector at the corresponding position is determined to be valid; otherwise, it is determined to be invalid.
[0164] The formula is expressed as:
[0165] ;
[0166] ;
[0167] In the formula, For the policy network based on the current state Calculated corresponding to the action The value after masking is the unnormalized score; For action The guard function, The action represents legality; For a deep reinforcement learning agent, the current policy is in the state Select action The probability distribution of actions; These are the parameters of the policy network; The dummy variable used for summation represents each action in the action space;
[0168] S304. The mask vector is applied to the policy network output layer of the deep reinforcement learning agent. Before probability normalization, the output values corresponding to invalid actions are masked to ensure that the deep reinforcement learning agent selects only from the currently valid actions.
[0169] ;
[0170] ;
[0171] In the formula, The importance sampling ratio at time step t; The first of the mask vectors The element represents the element. Is the element valid? biaos Is each element valid? Index for the action; This represents the total size of the action space; For the first in the action space A specific action; A set of transitions assigned to all services.
[0172] 3.4 Reward Function and QoS Awareness Model
[0173] The reward function is crucial for guiding the agent to learn the optimal strategy. To accurately evaluate the merits of each service allocation decision and guide the agent towards the optimal overall service quality, this invention first constructs a QoS-aware model that comprehensively considers processing and logistics processes, and designs a reward function based on this model.
[0174] 3.4.1 Service Quality (QoS) Attribute Modeling
[0175] like Figure 4 As shown, to reflect the geographical distribution characteristics among enterprises in the Industrial Internet environment, both temporal and spatial constraints are introduced into the QoS awareness model to construct a comprehensive evaluation system that can simultaneously characterize production and logistics. Its goal is to maximize the global QoS value and minimize production and logistics costs under a multi-objective trade-off. (This relates to composite manufacturing tasks.) It consists of a series of subtasks, and its sequential structure is represented as follows: The QoS attribute data considered includes the processing time, processing cost, and reliability of manufacturing services, as well as the logistics time and cost due to the geographical distribution of service providers;
[0176] The formula is expressed as:
[0177] ;
[0178] ;
[0179] ;
[0180] ;
[0181] ;
[0182] ;
[0183] ;
[0184] ;
[0185] ;
[0186] ;
[0187] In the formula, For manufacturing task orders, Number of subtasks To describe the granularity of task decomposition, For task structure, For the number of logistics nodes, For workload; For the first Sub-tasks For the required quantity, The required functional type for this subtask. For transport weight, For workload; This is the proportionality coefficient. This is the processing coefficient. Unit processing time; The manufacturing services provided to the i-th company, possessing k capabilities. Functions provided for the service To improve service capabilities For the unit price of service, Adjustment factor for service capacity. For service reliability, For logistics services, The price is the service price per unit weight and unit distance. This refers to the transportation time per unit weight and unit distance. For selection Service processing subtasks Time, For selection Service processing subtasks The price For the reliability of subtasks, and These refer to the logistics time and cost between two different sub-tasks. This is a logical coefficient; 0 indicates that logistics are not required.
[0188] 3.4.2 Construction of Reward Function
[0189] Based on the QoS-aware model described above, an agent can calculate an immediate reward after allocating a service to each subtask. The construction steps are as follows:
[0190] S201. QoS index normalization: Perform the following normalization process on all service quality attribute data to unify the indices of different dimensions into the [0,1] range;
[0191] ;
[0192] ;
[0193] In the formula, Normalization of cost-related indicators; To normalize the performance indicators; and These are the maximum values of cost-related indicators and benefit-related indicators among all candidate services, respectively. and These are the normalized values of cost-type indicators and benefit-type indicators, respectively. and These are the minimum values of cost-related indicators and benefit-related indicators among all candidate services, respectively.
[0194] S202. Calculate the immediate reward: After the agent selects a manufacturing service for the j-th sub-task, it performs a weighted sum of the normalized QoS index of the manufacturing service and the normalized logistics QoS index generated by completing the sub-task to obtain the immediate reward for the current decision step. It is represented as:
[0195]
[0196] In the formula, For the first Reward functions for each subtask; Normalized processing time; To normalize processing costs; For normalized reliability; To normalize logistics time; To normalize logistics costs; , , These are time weight, cost weight, and reliability weight, respectively.
[0197] IV. Policy learning is performed using a near-end policy optimization algorithm that integrates action masking and advantage-weighted key sampling.
[0198] In specific implementation, the proximal policy optimization algorithm adopts a priority sampling strategy based on advantage weighting, and the agent is trained using the proximal policy optimization (PM-PPO) algorithm. The training process includes: First, after the deep reinforcement learning agent interacts with the deep reinforcement learning environment, it generates experience samples (state, action, reward, next state) and stores them in the experience replay pool; then, it calculates the temporal difference error (TD-error) of each experience sample in the experience replay pool, and uses the absolute value of the temporal difference error as its priority; finally, it performs weighted non-uniform sampling according to the priority of each experience sample, extracts experience samples from the experience replay pool to update the deep reinforcement learning network, thereby training the deep reinforcement learning agent.
[0199] The proximal policy optimization algorithm integrates a priority sampling policy based on advantage weighting. The specific training process of this deep reinforcement learning agent includes the following steps:
[0200] After the deep reinforcement learning agent interacts with the deep reinforcement learning environment, the experience tuples generated from this interaction are... The data is stored in the current trajectory buffer. Then, the generalized advantage estimate for each time step is calculated using the Critic network to measure the superiority or inferiority of the current action relative to the average level. Next, a priority probability distribution based on the advantage value is constructed, and the sampling probability of each sample is calculated. The sample with the larger the absolute value of the advantage, the higher the probability of being selected into the Mini-batch. Based on the Mini-batch data extracted by the above sampling probability, the truncation objective function of PPO is calculated, and backpropagation is performed to update the parameters of the Actor and Critic networks, thereby training the deep reinforcement learning agent.
[0201] The formula is expressed as:
[0202] ;
[0203] ;
[0204] ;
[0205] ;
[0206] ,
[0207] In the formula, and These are the state variables of the subtask repository and the processing subtask repository, respectively. and These are the subtask progress state vector / set when the current subtask being processed is 𝑗, and the next progress state obtained after completing the service selection for subtask 𝑗 and moving to the next subtask; and These are the state variables corresponding to the idle warehouse and the delivery warehouse, respectively; and These are the corresponding status quantities for logistics services.
[0208] In this specific embodiment, the training of the agent is a cyclical process of continuous interaction with the Petri net environment, specifically including:
[0209] (1) Environment initialization: The system starts a new training cycle and the Petri net environment is reset to the initial state S0;
[0210] (2) State observation: At each step t, the agent observes the current state S from the environment. j This state is the current label of the colored Petri net;
[0211] (3) Action Mask Generation and Action Selection: The system calls the Petri net's guardian function G(a) to generate the action mask. The agent's policy network selects the action mask based on the current state S. j Output the original action probability distribution, apply the action mask, and sample the specific action 'a' from a legal action. j ;
[0212] (4) Environmental execution and reward feedback: Environmental execution action a j (That is, triggering the corresponding service allocation transition in the Petri net), the Petri net state is updated to S according to its inherent transition rules. j+1 Simultaneously, the environment calculates and feeds back an immediate reward R based on a pre-built reward function. j ;
[0213] (5) Trajectory acquisition and advantage evaluation: The experience tuples generated in this interaction The data is stored in the current trajectory buffer. Then, a Critic network is used to calculate the generalized advantage estimate for each time step, which measures the superiority or inferiority of the current action relative to the average level. A priority probability distribution based on the advantage value is then constructed. The sampling probability of each sample is calculated; samples with larger absolute advantage values have a higher probability of being selected into the Mini-batch.
[0214] (6) Network update: Based on the Mini-batch data extracted by the above probability, calculate the cutoff objective function of PPO, and backpropagate to update the parameters of the Actor and Critic networks.
[0215] (7) Loop and seed termination: Repeat steps (2) to (6) above until all subtasks of the current manufacturing task have been processed (one episode ends), and then start a new round. Iterate in this way until the agent's policy performance converges.
[0216] Based on this, when the colored Petri net model is updated, causing a change in the environmental state, the deep reinforcement learning agent that has converged after training adaptively generates a new optimal service composition scheme based on the updated environmental state without retraining, and then quantitatively evaluates the newly generated optimal service composition scheme through a global service quality evaluation function.
[0217] The global service quality evaluation function is expressed as follows:
[0218] ;
[0219] ;
[0220] ;
[0221] ;
[0222] In the formula, For service portfolio solutions A comprehensive service quality assessment; For the plan Total time score; For the plan Total cost score; For the plan The overall reliability score; , , These are the weighting coefficients for time attribute, cost attribute, and reliability score, respectively.
[0223] V. Overview
[0224] In summary, this embodiment proposes a service composition method based on colored Petri nets and deep reinforcement learning agents. By introducing a fusion mechanism of Petri nets and deep reinforcement learning, this method achieves efficient modeling and intelligent optimization of the manufacturing service composition problem in a dynamic industrial interconnection environment, significantly improving the interpretability, adaptability, and computational efficiency of the service composition process. Traditional manufacturing service composition methods generally suffer from problems such as reliance on extensive manual parameter setting during the optimization process, insufficient model generalization ability, and difficulty in handling dynamic service changes. This invention innovatively proposes a manufacturing service composition method based on Petri net structured modeling combined with an improved proximal policy optimization algorithm, constructing an interpretable, scalable, and highly adaptive optimization decision framework.
[0225] 1. This invention constructs a colored Petri net (CPN) model to formally model a manufacturing service composition system. By utilizing elements such as places, transitions, and colored tokens, it leverages the topological relationships, constraints, and concurrent interactions between manufacturing tasks and services to formally model the system. This clearly describes the service triggering logic and state transition process, achieving a graph-structured representation of manufacturing tasks. The introduction of the colored Petri net model makes the execution process of service composition visual and verifiable, effectively avoiding the problems of ambiguous model structure and untraceable state in traditional methods.
[0226] 2. This invention designs a priority sampling strategy and action masking mechanism based on the advantage weighting in the deep reinforcement learning (DRL) framework built on the CPN model. Combined with the guard function information provided by Petri nets, the action space of the agent is constrained and filtered, thereby automatically eliminating inactive actions during training, greatly reducing invalid exploration, and improving the convergence speed and stability of the algorithm. The priority sampling strategy based on advantage weighting focuses the learning process on high-value experiences by dynamically adjusting the sample sampling probability, which significantly improves data utilization and learning efficiency. In the DRL agent optimization process, an improved proximal policy optimization (PM-PPO) algorithm is adopted to overcome the problems of difficult convergence and slow training speed, enabling the agent to quickly learn high-performance policies in industrial-level complex scenarios.
[0227] 3. This invention introduces a spatiotemporal constrained multidimensional index system at the service quality evaluation level. It comprehensively considers factors such as processing time, service cost, reliability and logistics delay to form a unified normalized evaluation model, providing accurate reward signals for reinforcement learning agents. This mechanism realizes the quantitative unification of multidimensional heterogeneous attributes, enabling service composition optimization to not only focus on local performance indicators, but also take into account global collaborative efficiency.
[0228] 4. Based on the converged training agent, the strategy of this invention not only achieves global optimality in the overall quality of service (QoS) index, but more importantly, when the manufacturing environment changes dynamically (such as service failure or order insertion), only the state of the CPN model needs to be updated. The agent can generate a new optimal solution in real time based on the learned strategy without retraining. This has the ability to adapt multiple times after one training, which greatly reduces the computational cost and response latency of online applications and significantly improves the system's response speed and robustness.
[0229] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described with reference to preferred embodiments, those skilled in the art should understand that various changes in form and detail can be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A service composition method based on colored Petri net and deep reinforcement learning agent, characterized in that, The method comprises the following steps: S1, constructing a colored Petri net model of a manufacturing service combination system, defining states, actions and constraint conditions; S2, constructing a deep reinforcement learning environment based on the colored Petri net model, and defining state space, action space and reward function for a deep reinforcement learning agent; S3, interacting the deep reinforcement learning agent with the deep reinforcement learning environment, dynamically generating an action mask by using the colored Petri net model to constrain the action space of the deep reinforcement learning agent, and training the deep reinforcement learning agent by using a proximal policy optimization algorithm until convergence; S4, taking the policy obtained by the deep reinforcement learning agent after training convergence as an optimal service combination strategy, triggering corresponding transitions in the colored Petri net model based on the optimal service combination strategy, and generating a final manufacturing service combination scheme.
2. The service composition method based on colored Petri net and deep reinforcement learning agent according to claim 1, characterized in that, In step S1, in the colored Petri net model, places are used to represent manufacturing tasks and service states, transitions are used to represent service allocation or task triggering actions, and color attributes of tokens are used to represent manufacturing sub-tasks with specific functional requirements.
3. The service composition method based on colored Petri net and deep reinforcement learning agent according to claim 2, characterized in that, In step S1, the constraint condition is a guard function of a transition in the colored Petri net model, and the guard function is used to determine the enabling condition of the transition, and the determination condition is: When the color attribute of a manufacturing sub-task token matches the color attribute of a service allocation transition, and the service state place connected with the service allocation transition is in an idle state, it is determined that the service allocation transition has an enabling condition. Specifically: S101: Determine whether the color attribute of the manufacturing sub-task token to be allocated matches the color attribute of the service allocation transition to ensure that the service function meets the sub-task demand. The elements in the colored Petri net model are represented as follows: ; wherein a set of libraries in the model; a task library a to-be-processed subtask library a manufacturing service library an idle flag library; are all index variables; a number of subtasks in a task order a number of services; ; wherein a set of transitions in the model; subtask selection transition task selection transition delivery transition; triggers end of service process and are index variables; ; In the formula, is a set of colors in the model; color information carried by different services, ; ; wherein is an arc function in the model; a set of arcs; a multiple color set; S102: The guard function in the colored Petri net model includes determining whether the service state place connected with the service allocation transition is in an idle state to ensure that the same service processes only one sub-task at the same time and the corresponding control conditions are as follows: ; ; ; ; ; ; wherein Guard function for subtask selection transition Guard function for service selection class transition Guard function for service completion delivery transition Control signal Task pointer When The first task does not require a predecessor to complete, if Must satisfy Is in the completion set, return True.
4. The service composition method based on colored Petri net and deep reinforcement learning agent according to claim 3, characterized in that, In step S2, the current token of the colored Petri net model is taken as the environment state of the deep reinforcement learning agent, the service allocation transition is taken as the action of the deep reinforcement learning agent, and the reward function is constructed based on the service quality attribute data of the manufacturing service; the service quality attribute data includes processing time, processing cost, reliability, logistics time and logistics cost of the manufacturing service; The formula is represented as: ; ; ; ; ; ; ; ; ; ; In the formula, For manufacturing task orders Number of subtasks To describe the granularity of task decomposition For task structure Number of logistics nodes For workload; For the first Sub-tasks For the quantity required The required functional type for this subtask For transport weight For workload; proportionality coefficient Processing coefficient Unit processing time; For the i-th enterprise, provide manufacturing services with k capabilities. Functionality provided for the service Service capabilities for services Service unit price Service capability correction factor For service reliability For logistics services Service price per unit weight per unit distance Transportation time per unit weight per unit distance For selection Service processing subtasks time For selection Service processing subtasks price For the reliability of subtasks and The logistics time and cost between the two different sub-tasks are respectively. These are logical coefficients.
5. The service composition method based on colored Petri nets and deep reinforcement learning agents according to claim 4, characterized in that, In step S2, the reward function is constructed by the following formula and is represented as: ; ; ; where, is the cost-type index normalization; is the benefit-type index normalization; and are the maximum values of the cost-type index and the benefit-type index in all candidate services, respectively; and are the normalized values of the cost-type index and the benefit-type index, respectively; and are the minimum values of the cost-type index and the benefit-type index in all candidate services, respectively; is the reward function of the th subtask; is the normalized processing time; is the normalized processing cost; is the normalized reliability; is the normalized logistics time; is the normalized logistics cost; , , are the time weight, the cost weight, and the reliability weight, respectively.
6. The service composition method based on colored Petri nets and deep reinforcement learning agents according to claim 5, characterized in that, In step S3, the specific process of dynamically generating an action mask by using the colored Petri net model comprises the following steps: S301, traverse all available actions of the deep reinforcement learning agent, wherein each action corresponds to a service allocation transition; S302, call the guard function of the service allocation transition corresponding to each available action to determine its enabling state; S303, a mask vector with the same dimension as the action space is generated, when the service allocation transition is in the enabled state, it is determined that the mask vector at the corresponding position is valid, otherwise it is determined to be invalid; The formula is expressed as: ; ; In the formula, For the policy network based on the current state Calculated corresponding to the action The value after masking is the unnormalized score; For action The guard function, The action is legal; For a deep reinforcement learning agent, the current policy is in the state Select action The probability distribution of actions; These are the parameters of the policy network; The dummy variable used for summation represents each action in the action space; S304, the mask vector is applied to the output layer of the policy network of the deep reinforcement learning agent, and the output value corresponding to the invalid action is shielded before probability normalization, so as to ensure that the deep reinforcement learning agent only selects from the currently valid actions; ; ; wherein is the importance sampling ratio at time step t; is the i-th element of the mask vector; is the i-th element of the mask vector; is the index of the action; is the total size of the action space; is the i-th specific action in the action space; is the i-th specific action in the action space; is the set of all service allocation transitions.
7. The service composition method based on colored Petri nets and deep reinforcement learning agents according to claim 6, characterized in that, In step S3, the proximal policy optimization algorithm integrates a key sampling strategy based on advantage weighting, and the specific process of training the deep reinforcement learning agent includes the following steps: After the deep reinforcement learning agent interacts with the deep reinforcement learning environment, an experience tuple generated by this interaction is stored in the current trajectory buffer into the current trajectory buffer; Subsequently, the Critic network is used to calculate the generalized advantage estimation value of each time step, which is used to measure the advantages and disadvantages of the current action relative to the average level; then a priority probability distribution based on the advantage value is constructed, and the sampling probability of each sample is calculated; the greater the absolute value of the advantage, the higher the probability of being selected into the Mini-batch; according to the Mini-batch data extracted according to the above sampling probability, the truncated objective function of PPO is calculated, and the Actor and Critic network parameters are updated by back propagation, so as to train the deep reinforcement learning agent; The formula is expressed as: ; ; ; ; , In the formula, and are the state quantities of the subtask warehouse and the state quantity of the subtask warehouse with processing, respectively; and are the subtask progress state vector / set when the current processing subtask is j and the next progress state obtained after the service selection for the subtask j is completed and the next subtask is transferred to, respectively; and are the state quantities corresponding to the idle warehouse and the delivery warehouse, respectively; and are the corresponding state quantities of the logistics service, respectively.
8. The service composition method based on colored Petri nets and deep reinforcement learning agents according to claim 7, characterized in that, In step S4, it also includes: when the colored Petri net model is updated to change the environment state, the deep reinforcement learning agent trained to converge generates a new optimal service combination scheme based on the updated environment state through the learned strategy without retraining, and quantitatively evaluates the new optimal service combination scheme through the global service quality evaluation function.
9. The service composition method based on colored Petri nets and deep reinforcement learning agents according to claim 8, characterized in that, The global service quality evaluation function is expressed as: ; ; ; ; wherein is the global service quality assessment for the service composition scheme ; is the total time score for the scheme ; is the total cost score for the scheme ; is the total reliability score for the scheme ; , , are weighting factors for the time attribute, the cost attribute and the reliability score, respectively.