Workpiece state-based process feature expression method and extraction system
By constructing a process feature extraction system based on workpiece state, and utilizing state prefixes and transition prefixes to perform similarity calculations and loss value optimization in a high-dimensional vector space, the problems of inaccurate process modeling and high computational overhead in existing technologies are solved, thereby improving the accuracy and efficiency of process recommendation.
Patent Information
- Application Number
- CN202510895144.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-11-21
AI Technical Summary
Existing semantic modeling methods for process operations cannot effectively model the dynamic changes and causal relationships of workpiece states in the process flow, resulting in inaccurate process recommendations and high computational costs.
A process feature extraction system based on workpiece state is adopted. Through a preprocessing unit, an attention mechanism unit, a similarity calculation unit, a state space optimization unit, and an error calculation unit, a dynamic state representation chain is constructed. Similarity calculation and loss value optimization are performed in a high-dimensional vector space using state prefixes and transition prefixes.
It achieves accurate modeling of state transitions between processes, improves the accuracy and computational efficiency of process recommendations, and enhances the model's adaptability and stability to complex process chains.
Smart Images

Figure CN120996541A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of process optimization, and in particular to a process feature expression method and extraction system based on workpiece state. BACKGROUND
[0002] In the field of mechanical processing, process semantic understanding and state modeling are important research directions for the intelligentization of complex processing processes. Process semantic understanding aims to extract processing semantic information from process descriptions and analyze key links in the process flow by modeling and reasoning on workpiece states to provide process optimization suggestions. Its application scenarios include semantic analysis and interpretation of complex process, machining path planning, workpiece state prediction, and process flow logic consistency verification, etc.
[0003] In recent years, techniques combining natural language processing and embedding learning have been gradually applied in the field of process semantic modeling, such as capturing the semantic features of sentences through embedding models. However, existing methods focus more on the overall semantic features of sentences and fail to effectively model the state changes of workpieces caused by each process and the logical connection between processes. This deficiency makes it difficult for the model to accurately model the physical process and state transition relationship of process descriptions, thus limiting its applicability in actual production scenarios.
[0004] Traditional process semantic modeling methods usually use a single [CLS] vector to represent the semantic features of each process. Although this method has certain effects in capturing global information, it is difficult to accurately model the complex state evolution process in manufacturing processes due to its inherent representation limitations. The root cause lies in the fact that the process flow is a dynamic and progressive state transition system, and each process will cause specific changes to the workpiece state, and the process effect is not isolated but the cumulative result of all previous operations. The [CLS] vector, as a static global representation, cannot reflect the continuity and causality of state evolution. This is because the [CLS] vector only synchronously mixes the features of all processes through attention mechanism, lacking a mechanism to record the cumulative changes of workpiece state by previous processes. Essentially, it converts the time-dependent relationship into a weighted sum of unordered features, making it difficult for the model to accurately depict the constraint effect of previous processes on subsequent processes, as well as the different effects of the same process under different workpiece states (such as temperature, hardness, and geometric shape). For example, under normal working conditions, the grinding process is arranged after the turning process, and according to the state of the workpiece and the final demand, a heat treatment process may be arranged between the two processes. Using a single [CLS] vector can only rigidly determine whether the turning process is followed by the grinding process or the heat treatment process, but it cannot determine whether the heat treatment process must be arranged according to the current workpiece state and final demand, and whether the workpiece state needs further grinding process.
[0005] In addition, the semantic features of each process are expressed by a single [CLS] vector, and when each step of the process recommendation is performed to generate a complete process chain, the [CLS] vector needs to be input into a large-scale model again, increasing the computational overhead, resulting in slow response speed, and only similar process chain templates can be generated statically according to known process flows, and potential process chains with fewer or more optimal processes cannot be generated. The reason for the former is that when the model generates the [CLS] vector, the distribution of the [CLS] vector in the high-dimensional vector space has a certain randomness and no constraints, resulting in that the process information saved by the [CLS] vector must be explained by the model that generates the [CLS] vector; the latter is because the model training data is the text description of the existing process chain, and the goal of the model is to learn the statistical distribution of the data. For example, if "quenching → tempering" appears 100 times in the training data, and "quenching → short tempering → rapid cooling" appears only once, the model will tend to generate the former, even though the latter may be more efficient.
[0006] To solve the above problems, the core technical problem to be solved is: how to build a process semantic representation method that can dynamically track the evolution of workpiece state, accurately distinguish process characteristics, and support local matching and process recommendation. This method needs to break through the limitations of traditional [CLS] vector static representation, establish a state transition model, and thus achieve more accurate modeling and analysis of the process flow.
[0007] For example, CN117972444A discloses an automatic process analysis and comparison method and device, including the steps of: data acquisition, obtaining the quotation sheet of each processing plant, the quotation sheet including a process table; preprocessing, preprocessing the obtained quotation sheet for subsequent comparison and analysis; text comparison, analyzing and comparing the preprocessed quotation sheets of each processing plant to identify the same or similar processes; translation analysis, performing translation processing on the process tables of different processing plants with different naming methods; automatic matching and calculation, according to the results of text comparison and translation analysis, performing automatic matching and calculation of the processes. Although this technical solution can realize the optimization and management of automatic process flow by collecting, comparing and analyzing the data in the process table of the quotation sheet, it cannot realize local matching and process recommendation.
[0008] Therefore, the present application aims to provide a process feature expression method and extraction system that can accurately extract process features.
[0009] In addition, on the one hand, there are differences in understanding between people skilled in the art; on the other hand, the applicant has studied a large number of literatures and patents when making the present application, but due to the limited space, all the details and contents have not been listed in detail, which does not mean that the present application does not have these characteristics of the prior art, on the contrary, the present application already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art in the background art. SUMMARY
[0010] Traditional process semantic modeling methods generally rely on a single [CLS] vector to express the semantic information of each process. Although this representation has a certain effect on obtaining overall semantics, due to its inherent limitations in representation ability, it is difficult to accurately reflect the complex workpiece state change process in the manufacturing process. Essentially, the machining process is a constantly evolving state transition system, and each operation step will have a specific impact on the current state of the workpiece, and these impacts are cumulative and the result of the joint action of all previous processes. However, as a static global feature, the [CLS] vector cannot effectively reflect the continuity and causality in this dynamic change. The reason is that this vector integrates the information of all processes at once through an attention mechanism, lacking a recording mechanism for the gradual evolution of the workpiece state caused by previous operations. This makes the model transform the time sequence related operations into a weighted combination of unordered features, so it cannot accurately depict the constraints of previous processes on subsequent operations, nor can it reflect the possible differential effects of the same process under different workpiece states (such as temperature, hardness, geometry). For example, grinding is usually arranged after turning, but whether a heat treatment needs to be added between the two often depends on the current state of the workpiece and the final performance requirements. Using a single [CLS] vector approach can only mechanically identify "turning followed by grinding" or "turning followed by heat treatment", but it cannot determine whether a heat treatment step must be inserted based on the actual workpiece state and target requirements, nor can it assess whether the current workpiece still needs further grinding.
[0011] In view of the deficiencies of the prior art, the present application provides, in a first aspect, a process feature extraction system based on workpiece state. The system includes a preprocessing unit, an attention mechanism unit, a similarity calculation unit, a state space optimization unit, and an error calculation unit. The preprocessing unit normalizes the received data and constructs positive and negative pairs based on the labeled data. The data including the positive and negative pairs is sequentially matched within the process chain to determine the process arrangement order within a single process chain. The attention mechanism unit compares and trains the process arrangement order so that the migration prefixes of similar processes tend to be close in high-dimensional vector space. The similarity calculation unit calculates the cosine similarity of the migration prefixes. The state space optimization unit combines the migration prefixes and process arrangement order data, recursively calculates the combined data, and obtains the state prefixes. The error calculation unit calculates the contrast loss value based on the cosine similarity result. The training parameters of the state prefixes are optimized based on the contrast loss value, so that the state prefixes of adjacent processes have reasonable recursive relationships, and similar state prefixes also have clustering properties in high-dimensional vector space.
[0012] The present application constructs a dynamic state representation chain through a recursive mechanism of transition prefixes. The process sequence matching established by the preprocessing unit ensures the correctness of the data topology, the transition prefixes generated by the attention mechanism unit carry the state transition features between processes, and the recursive algorithm of the state space optimization unit realizes the time sequence modeling of the state sequence, effectively recording the cumulative change process of parameters such as workpiece hardness / geometry. Compared with the static [CLS] vector, the present application makes the adjacent state prefixes have traceable conversion logic, solving the problem of missing necessity judgment of heat treatment processes caused by information compression in traditional methods.
[0013] According to a preferred embodiment, the step of the preprocessing unit of constructing positive example pairs and negative example pairs comprises: grouping the processes of the process chain with the same labeled data into positive example pairs; grouping the processes of the process chain with inconsistent labeled data into negative example pairs; and forming a training set for comparative training by the positive example pairs and the negative example pairs.
[0014] By constructing positive and negative example pairs through labeled data, the physical constraint rules of process combination are established. The positive example pairs ensure that the model learns the legal process connection (such as quenching must be followed by tempering), and the negative example pairs eliminate combinations that violate process principles (such as quenching without annealing). This comparison mechanism enables the similarity calculation unit to identify the necessary condition dependency relationship between processes (such as temperature threshold triggering heat treatment insertion), overcoming the problem of traditional methods relying only on statistical co-occurrence while ignoring process logic.
[0015] According to a preferred embodiment, the attention mechanism unit includes a Transformer encoder module and a weighted attention pooling module. The Transformer encoder module extracts the hidden layer of the labeled data and performs weighted attention pooling to obtain the transition prefix; and the weighted attention pooling module calculates the attention score of each word element to determine the word element that has an impact on state transition, thereby obtaining a representative transition prefix.
[0016] The multi-head attention mechanism of the Transformer encoder separates the features of different state dimensions such as temperature and deformation, and the weighted attention pooling dynamically adjusts the physical meaning direction of the transition prefix through word-level weight distribution. Compared with traditional mean pooling, the present application generates differentiated transition prefixes for the same process under different parameters, accurately reflecting the impact of parameter changes on the state of the workpiece.
[0017] According to a preferred embodiment, the error calculation unit calculates the comparative loss value of the data after weighted attention pooling based on a loss function. The comparative loss function can impose double constraints, such as maximizing the state prefix distance of the positive example pairs and minimizing the distance of the negative example pairs, while ensuring P t and P t+1The state transition of the present application conforms to physical laws. Compared with a traditional single loss function, the present application makes the state space satisfy both local constraints (adjacent process compatibility) and global constraints (complete process chain feasibility).
[0018] According to a preferred embodiment, the state space optimization unit converts the positive example pair, the negative example pair and the migration prefix into a state prefix pair; randomly initializes the state prefix of the first process data, and gradually learns the optimized representation of the state prefix: P1=W init Transformer (S1), wherein P1 is the state prefix of the first process data; W init is a training parameter; S1 is process data; the initial process description is mapped to the state prefix space; and the state prefix of the subsequent process is obtained through recursion.
[0019] The recursive algorithm adopts a parameter-shared Transformer structure, so that the state prefix inherits the previous state and fuses the current process feature. The historical information weight is dynamically adjusted through a gating mechanism, so that the workpiece state is updated in stages. The present application breaks through the limitation of the static representation of the traditional method, so that the same grinding process produces different machining allowance decisions before and after quenching.
[0020] The present application provides a process feature extraction method based on workpiece state from a second aspect, which comprises: normalizing the received data and constructing positive example pairs and negative example pairs according to the labeled data; sequentially matching the data including the positive example pairs and the negative example pairs within the process chain to determine the process arrangement order within a single process chain; comparing and training the process arrangement order so that the migration prefixes of similar processes tend to be close in a high-dimensional vector space; calculating the cosine similarity of the migration prefixes; combining the migration prefixes and the process arrangement order data, recursively calculating the combined data and obtaining the state prefix; calculating the contrast loss value based on the cosine similarity result; and optimizing the training parameters of the state prefix based on the contrast loss value, so that the state prefix recursive relationship of adjacent processes is reasonable, and similar state prefixes also have clustering properties in a high-dimensional vector space.
[0021] The method of the present application solves the problem of fuzzy process representation and difficulty in modeling state evolution relationship in traditional process analysis. By normalizing and comparing the data, constructing positive example pairs and negative example pairs, the model can more accurately capture the semantic similarity and difference between processes. The introduction of cosine similarity and contrast loss mechanism further enhances the learning ability of the model on the evolution law of process state. By recursively fusing the migration prefix and the process order information, a state prefix representation with time continuity is formed, thereby effectively improving the accuracy and robustness of process sequence modeling.
[0022] According to a preferred embodiment, the method of constructing positive example pairs and negative example pairs comprises: forming positive example pairs by combining procedures with the same annotation data; forming negative example pairs by combining procedures with inconsistent annotation data; and forming a training set for contrastive training by combining the positive example pairs and the negative example pairs.
[0023] This embodiment solves the problem of difficulty in constructing effective training samples under unsupervised or weak supervision by constructing positive example pairs and negative example pairs based on the consistency of annotation data. This label-driven sampling strategy ensures semantic differentiation between positive and negative samples during contrastive training, thereby improving the system's discrimination ability and generalization performance for similar procedures and enhancing the system's adaptability and stability in complex procedure chains.
[0024] According to a preferred embodiment, the method further comprises: performing hidden layer extraction on the annotation data and performing weighted attention pooling to obtain a migration prefix; and calculating attention scores of each word element to determine word elements that have an impact on state migration, thereby obtaining a representative migration prefix.
[0025] This embodiment introduces a weighted attention pooling mechanism to solve the problem that traditional fixed window or average pooling methods cannot effectively identify key word elements. By assigning different attention weights to word elements, the system can automatically identify key semantic units that have a decisive impact on state migration, thereby extracting a more representative migration prefix. This technical means significantly improves the system's understanding ability of complex semantic structures and enhances the interpretability and robustness of state representation.
[0026] According to a preferred embodiment, the method further comprises: converting the positive example pairs, the negative example pairs, and the migration prefix into state prefix pairs; initializing the state prefix of the first procedure data and gradually learning the optimized representation of the state prefix: P1=W init Transformer(S1), wherein P1 is the state prefix of the first procedure data; W init is a training parameter; S1 is the procedure data; the initial process description is mapped to the state prefix space; and the state prefixes of subsequent procedures are obtained by recursive calculation.
[0027] This embodiment solves the problem that existing methods are difficult to model the dynamic changes of procedure states over time through a recursive mechanism. By initializing the state prefix of the first procedure and recursively generating subsequent state representations, the system can more naturally simulate the evolution process of states in the procedure chain. Combined with the training parameter and the Transformer structure, the system not only enhances the expression ability but also guarantees the temporal consistency and logical coherence of the state representation.
[0028] According to a preferred embodiment, the method further comprises: calculating the contrastive loss value of the data after weighted attention pooling based on a loss function.
[0029] The embodiment solves the problem of difficulty in balancing semantic similarity and difference in model training by introducing a contrast loss function to optimize the data after weighted attention pooling. By pulling similar samples closer and pushing dissimilar samples farther apart in a high-dimensional vector space, the clustering performance and discriminative ability of the state prefix are further improved. This method significantly improves the stability and generalization performance of the model when facing complex and variable process chains. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 is a structural schematic diagram of a workpiece state-based process feature extraction system provided by the application;
[0031] Figure 2 is another structural schematic diagram of a workpiece state-based process feature extraction system provided by the application;
[0032] Figure 3 is a step flowchart of a workpiece state-based process feature expression method provided by the application;
[0033] Figure 4 is a logic diagram of a workpiece state-based process feature expression system provided by the application;
[0034] Figure 5 is a migration prefix vector representation diagram provided by the application;
[0035] Figure 6 is a table information diagram of a first process chain provided by the application;
[0036] Figure 7 is a table information diagram of a second process chain provided by the application;
[0037] Figure 8 is a table information diagram of an optimized process chain provided by the application.
[0038] LIST OF REFERENCE NUMERALS
[0039] 100: processor; 101: preprocessing unit; 102: attention mechanism unit; 103: similarity calculation unit; 104: error calculation unit; 105: state space optimization unit; 110: memory; 120: storage; 121: preprocessing model; 122: attention mechanism model; 123: similarity calculation model; 124: error calculation model; 125: state space optimization model; 130: I / O device; 140: bus. DETAILED DESCRIPTION
[0040] The following will be described in detail with reference to the accompanying drawings.
[0041] Some noun terms are explained in the application.
[0042] High-dimensional vector space: the space of feature representation, also known as the representation space. In the present invention, each element in the high-dimensional vector space is a vector containing 768 dimensions. For example, the process "quenching" can be mapped to the vector v = [0.2, -0.7, 1.3, …, 0.5] (dimension d = 768). The state prefix P i and the transition prefix T i are also represented in the form of similar high-dimensional vectors.
[0043] Process chain: refers to a collection of a series of ordered process steps in industrial production, describing the complete processing flow from raw materials to finished products. The core of the process chain lies in the dynamic dependency between steps and the causality of workpiece state transmission.
[0044] Process feature: used to describe the quantifiable attributes or semantic representation of a single process step, so as to accurately depict the physical effects, control parameters and their influence on workpiece state in machine learning and optimization models.
[0045] Traditional process semantic modeling methods generally rely on a single [CLS] vector to express the semantic information of each process. Although this representation has a certain effect on obtaining the overall semantics, due to its inherent limitations in representation ability, it is difficult to accurately reflect the complex workpiece state change process in the manufacturing process. Essentially, the processing flow is a constantly evolving state transition system, and each operation step will have a specific impact on the current state of the workpiece, and these effects have cumulative nature, which is the result of the joint action of all previous processes. However, as a static global feature, the [CLS] vector cannot effectively reflect the continuity and causality in this dynamic change. The reason is that this vector integrates the information of all processes at once through the attention mechanism, lacking a recording mechanism for the gradual evolution of the workpiece state caused by previous operations. This makes the time sequence related operations into a weighted combination of unordered features, so it cannot accurately depict the constraint relationship of previous processes on subsequent operations, nor can it reflect the possible differential effects of the same process under different workpiece states (such as temperature, hardness, geometry). For example, grinding is usually arranged after turning, but whether to add heat treatment between the two often depends on the current state of the workpiece and the final performance requirements. The use of a single [CLS] vector can only mechanically identify "turning followed by grinding" or "turning followed by heat treatment", but it cannot determine whether heat treatment must be inserted according to the actual workpiece state and target requirements, nor can it assess whether the current workpiece still needs further grinding.
[0046] In view of the deficiencies of the prior art, the present application proposes a workpiece state-based process feature expression method, aiming to improve the understanding and reasoning ability of the model in the system of process features to the change of workpiece state by introducing two special prefixes in the process description.
[0047] Specifically, the first special prefix is called state prefix (P), which is used to represent the state of the workpiece at the beginning of the current process. The state prefix P is a vectorized expression of the initial state of the workpiece in this process, which implicitly contains all relevant attributes of the workpiece at the beginning of the process, such as size, shape, material, etc.
[0048] The second special prefix is called transfer prefix (T), which is used to represent the change or transfer of the workpiece state caused by the current process, i.e. the direction of state evolution. The transfer prefix T is also represented in vector form, which encodes the function of the process and its impact on the characteristics of the workpiece, thus describing the trend of the change of the workpiece state after the execution of the process.
[0049] The present application also provides a workpiece state-based process process semantic embedding method. This method integrates the initial state information and state change information of the workpiece by embedding the state prefix P and the transfer prefix T into the sequence embedding of the process description, and optimizes the vector distribution with the help of contrastive learning, so that the state vector can more accurately reflect whether the workpiece meets the process requirements and effectively describe the evolution process of the state.
[0050] Process description sequence embedding refers to the conversion of process text into fixed-dimensional vector representation, which facilitates subsequent processing and analysis by machine learning models. This vector representation covers key information in the process flow, including process steps, features and parameters, etc., and can capture complex relationships between processes in high-dimensional vector space. Contrastive learning optimization is a training strategy that minimizes the vector distance between similar process descriptions and maximizes the difference between dissimilar process descriptions to improve the quality of embedded representation. In this process, positive examples (i.e. pairs of process descriptions with similar semantics) are brought closer together, and negative examples (i.e. pairs of process descriptions with large semantic differences) are pushed further apart, thereby enhancing the system's ability to identify subtle differences between different processes and improve reasoning accuracy.
[0051] The present application can also provide a workpiece state-based process feature extraction system, including a processor 100. As shown in Figure 1 The processor 100 includes a preprocessing unit 101, an attention mechanism unit 102, a similarity calculation unit 103, an error calculation unit 104 and a state space optimization unit 105. Preferably, the processor 100 is connected with the memory 110, the storage 120 and the I / O device 130 through the bus 140 respectively.
[0052] The preprocessing unit 101 executes the processing flow defined by the preprocessing model 121, normalizes the received data, constructs positive and negative pairs based on the labeled data, performs intra-process sequence matching on the data including positive and negative pairs, and determines the process arrangement order within a single process chain.
[0053] Attention mechanism unit 102 executes the processing flow defined by attention mechanism model 122, compares and trains the order of the process steps, so that the transfer prefix T of similar processes tends to be close in the high-dimensional vector space.
[0054] The similarity calculation unit 103 executes the processing flow defined by the similarity calculation model 123 to perform cosine similarity calculation on the migration prefix T.
[0055] The state space optimization unit 105 executes the processing flow defined by the state space optimization model 125, combines the migration prefix T and the process arrangement order data, performs recursive calculations on the obtained combined data, and obtains the state prefix P.
[0056] Error calculation unit 104 executes the processing flow defined by error calculation model 124, calculates the contrast loss value based on the cosine similarity result, and optimizes the training parameters of state prefix P based on the contrast loss value, so that the recursive relationship of state prefix P of adjacent processes is reasonable, and at the same time, similar state prefix P produces clustering properties in high-dimensional vector space.
[0057] The present invention can also provide a process feature extraction system based on workpiece state, including a processor 100 and a memory 120. The memory 120 is used to store data models corresponding to each unit, which are retrieved and run by the processor 100. The data models include a preprocessing model 121, an attention mechanism model 122, a similarity calculation model 123, an error calculation model 124, and a state space optimization model 125.
[0058] Example 1
[0059] In this embodiment, a process feature extraction system based on workpiece state is provided, such as... Figure 1 As shown, the system includes a processor 100 and a memory 120. The processor 100 can control the operation of various models in the memory 120 via a bus 140. The processor 100 is connected to the memory 120 via the bus 140. The processor 100 is also connected to an I / O device 130 via the bus 140 for data interaction with the outside world.
[0060] The memory 120 contains a preprocessing model 121, an attention mechanism model 122, a similarity calculation model 123, an error calculation model 124, and a state space optimization model 125.
[0061] likeFigure 2 As shown, the pre-processing model 121, the attention mechanism model 122, the similarity calculation model 123, the error calculation model 124 and the state space optimization model 125 are modular components stored in the memory 120, have the ability to access each other's data, and can access other related data in the memory 120.
[0062] The pre-processing model 121, the attention mechanism model 122, the similarity calculation model 123, the error calculation model 124 and the state space optimization model 125 collectively constitute a semantic embedding module. The attention mechanism model 122 can be implemented based on a pre-trained model of the Transformer architecture. The similarity calculation model 123 supports the calculation function of cosine similarity, which is used to perform a contrast learning task. The error calculation model 124 supports the calculation of mean square error (MSE) to measure the deviation between the predicted value and the target value. The role of the state space optimization model 125 is to recursively update the state prefix P based on the transition prefix T, and optimize the vector distribution in the state prefix space to improve the accuracy and discrimination ability of the state representation.
[0063] The processor 100 is the core processing unit of the system hardware, responsible for instruction decoding and execution, and arithmetic and logical operations on data. It coordinates and controls the operation of the memory 120 and the I / O device 130 by accessing the program instructions stored in the memory 110, in this embodiment, a central processing unit (CPU) or a CUDA core in a graphics processing unit (GPU).
[0064] The bus 140 constitutes a communication channel between the functional modules of the system, connecting the processor 100, the memory 110, the memory 120 and the I / O device 130, for transmitting data, address information and control signals between modules to ensure efficient and synchronous data interaction between system components.
[0065] The I / O device 130 is used to realize the input and output interaction between the system and the external environment. In this embodiment, the I / O device 130 includes standard peripheral interface devices such as keyboard, mouse and display device, supports input operation of process flow data, and feeds back system running results to the user. The operator can send control instructions to the processor 100 through the interface to call the pre-processing model 121 to perform manual annotation tasks.
[0066] The memory 120 is used to persistently store program codes and data resources required by the system. In this embodiment, the memory 120 is specifically a hard disk device, which provides storage and access support for input process description text, learnable parameters in the training process, generated embedding vectors, error calculation results, trained transition prefix T and state prefix P, and the corresponding function codes of the similarity calculation model 123 and the error calculation model 124.
[0067] The conventional technology adopts a Transformer-based feature extraction and classification model using a single [CLS] vector, which first inputs Figure 6 and then inputs Figure 7 for training. In the second process chain, the “drilling φ20” and “boring to φ29.70” are identified as “boring” and “drilling”, and thus determined as conflict data. This is because the “drilling” and “boring” in the first process chain appear after the “finishing” process, while the two processes in the second process chain are inserted between the “roughing” processes. Since the conventional model extracts the overall process features in a static manner, it cannot identify the association between these processes and their previous and subsequent steps, and thus identifies the second process chain as conflict data, making it difficult to further optimize the processes.
[0068] For all single processes in the first process chain, after extracting their process feature semantics through a single [CLS] vector and converting them into a high-dimensional vector, even if a projection matrix of [728, 2] is used for dimensionality reduction, various similar processes still cannot form obvious clusters, and their distribution in the high-dimensional vector space is relatively uniform, lacking readability and distinguishability.
[0069] The steps of the process feature expression method based on the workpiece state of the present application are as shown in Figure 3 and Figure 4 .
[0070] S100: Input a pre-labeled process data set, and the pre-processing model 121 reads and parses the data set to construct the required positive and negative pairs for training.
[0071] The operator transmits the labeled data to the pre-processing model 121 through the I / O device 130 via the bus 140. The pre-processing model 121 normalizes the numerical information in the data, and constructs the required positive and negative pairs for subsequent training according to the labeling content. The constructed data set is stored in the storage 120.
[0072] S101: The pre-processing model 121 forms a unified data expression form by normalizing the numerical information to a fixed interval [0, 1].
[0073] For example, in the diameter normalization process, assuming that the maximum diameter is 500 mm, then φ55 in the process is calculated as 55 / 500 = 0.11. Similarly, in the allowance normalization, assuming that the maximum allowance is 5 mm, then the allowance 0.40 in the process is converted to 0.08. Through this normalization process, as shown in Figure 6As shown, the process 2 "Turning φ216 to φ223" in the first process chain is output as "Turning φ0.432 to φ0.446", and the process 7 "Turning φ258 to φ261" is output as "Turning φ0.516 to φ0.522".
[0074] The purpose of this preprocessing step is to scale all numerical attributes to a unified interval, ensuring that the contribution of each feature during gradient update is relatively balanced, thereby improving the stability of the optimization process. For example, in the first process chain, the outer diameter is mostly three digits, while the roughness and allowance are usually one digit or a decimal with an integer part of zero. Without normalization, the diameter value, which is only a part of the workpiece identification, will become the dominant feature in gradient calculation, and the truly key roughness and allowance features will be difficult to be effectively identified by traditional models.
[0075] S102: The positive example pair of the data processed in the previous step is obtained by the preprocessing model 121. The construction is as follows, where S i and represent the processes that perform similar functions in different process cards. At the same time, the preprocessing model 121 selects all processes with different semantics from the first process chain and the second process chain as negative example pairs wherein, represent the processes with different semantics. i
[0076] For all processes in the first process chain and the second process chain that are labeled as "rough turning: n", they can be combined two by two to form positive example pairs. For example, the process 7 "Turning φ258 to φ261" in the first process chain is labeled as "rough turning: 7", and the process 4 "Turning to φ45.30" in the second process chain is labeled as "rough turning: 4", which can form a positive example pair.
[0077] All processes with different labels form negative example pairs. For example, "Drilling with φ26 gun drill" in the first process chain, which is labeled as "drilling: 1", and "quenching, 45-50 HRC" in the second process chain, which is labeled as "heat treatment: 1", can form a negative example pair.
[0078] The positive example pairs and negative example pairs constructed above will be used as the training set for contrastive learning in step S200. The role of the positive example pairs is to force the attention mechanism model 122 to bring similar samples closer in high-dimensional vector space, such as processes with different numerical expressions but belonging to the same category (e.g., process 7 in the first process chain and process 4 in the second process chain); while the negative example pairs promote the attention mechanism model 122 to push irrelevant samples away in high-dimensional vector space (e.g., process 17 in the first process chain and process 9 in the second process chain).
[0079] S103: The pre-processing model 121 sequentially matches the data processed in step S101 within the process chain to determine the sequence of processes within a single process chain.
[0080] For example, the two processes labeled as "rough turning: 3" and "rough turning: 4" can form a positive example pair. Similarly, "rough turning: 3" and "rough turning: 6" can also form a positive example pair, because in other process chains, these two processes can be directly connected without inserting other steps.
[0081] The processes labeled as "rough turning: n" and "finishing turning: n" can also form a positive example pair because they are adjacent in the process category. For a single process, there may be a potential shorter connection path. For example, the two processes labeled as "rough turning: 7" and "finishing turning: 6" can form a positive example pair because in the potential optimal process chain, these two processes can be directly adjacent (i.e., if adjacent is allowed, "finishing turning: 6" will become "finishing turning: 1" in the new process chain generated).
[0082] The processes labeled as "rough turning: n" and "boring: n" can form a negative example pair. For example, "rough turning: 6" and "boring: 1" can form a negative example pair because these two processes are separated by two categories (with "finishing turning" and "drilling" in between) in the process category, so they can be considered as non-adjacent processes.
[0083] This step provides the pre-processing model 121 with the before-after dependency relationship and constraint conditions between the processes, ensuring that in the subsequent training process, the pre-processing model 121 can accurately learn the sequence constraint relationship between different processes. For example, inputting "rough turning → finishing turning" as a positive example pair into the pre-processing model 121 helps it capture the process common sense of "first rough turning, then finishing turning".
[0084] S200: The attention mechanism model 122 is trained based on similar process data, so that the migration prefix T of similar processes tends to be close in high-dimensional vector space.
[0085] The processor 100 uniformly schedules and coordinates the operation execution and data exchange of each model. The attention mechanism model 122 first extracts the hidden layer of the labeled data in the memory 120, and then generates the prefix T before migration through weighted attention pooling, and stores the result to the memory 120. Subsequently, the similarity calculation model 123 reads the prefix T before migration from the memory 120, calculates the cosine similarity with the target data, and saves the result to the memory 120. The error calculation model 124 then reads the cosine similarity value in the memory 120, calculates the contrast loss value, and also saves it to the memory 120. Finally, the attention mechanism model 122 adjusts the training parameters according to the contrast loss value in the memory 120, so that the generated prefix T before migration is more reasonable, and finally stores the trained prefix T before migration in the memory 120. The attention mechanism model 122 executed by the attention mechanism unit 102 includes a Transformer encoder module and a weighted attention pooling module.
[0086] S201: The Transformer encoder module extracts the hidden layer of the labeled data and performs weighted attention pooling to obtain the prefix T before migration.
[0087] For the process S processed by the preprocessing model 121 and stored in the memory 120, the processor 100 calls the Transformer encoder module in the attention mechanism model 122 to extract the hidden layer representation H i = Transformer(S i ). Here is an example of the first 5-dimensional vector of the trained prefix T before migration output by the Transformer encoder module:
[0088] The process 7 "turning φ258 to φ261" in the first process chain corresponds to the migration vector T1 = [0.98, 0.97, 0.95, 0.96, 0.93].
[0089] The process 4 "turning to φ45.30" in the second process chain corresponds to the migration vector T2 = [0.97, 0.96, 0.94, 0.95, 0.92].
[0090] The process 9 "quenching, 45-50 HRC" in the second process chain corresponds to the migration vector T3 = [0.10, 0.12, 0.08, 0.15, 0.05].
[0091] In the training process, (T1, T2) is constructed as a positive example pair, and (T1, T3) is constructed as a negative example pair. The weighted attention pooling module filters out key tokens that have a significant impact on state transition by calculating the attention scores of each token, thereby generating a more representative prefix T before transition. This mechanism enables the attention mechanism model 122 to accurately focus on the core information related to state transition in the process, such as the operation type "car" and the processing part "cylinder", and other key features, thereby improving the representation accuracy of the transition prefix T for process state changes.
[0092] S202: The error calculation model 124 calculates the contrast loss value of the data after weighted attention pooling based on the loss function.
[0093] The error calculation model 124 uses the built-in NT-Xent (Normalized Temperature-scaled Cross Entropy Loss) as the loss function to calculate the contrast loss of the data processed in step S201. This process aims to bring similar process transition prefixes T closer to each other (such as (T1, T2) in the previous step), while moving the transition prefixes T of dissimilar processes away from each other, and finally storing the generated contrast loss value together with the original process description in the memory 120.
[0094] The formula for calculating the contrast loss value by the error calculation model 124 is as follows:
[0095]
[0096] In the formula, L is the contrast loss value, cos(T i ,T j ) is the cosine similarity of the transition prefixes (T i ,T j ) of similar processes , cos(T i ,T k ) is the cosine similarity of the transition prefixes T i and T k of two dissimilar processes in the high-dimensional vector space, and τ = 0.1.
[0097] The result of the training of the transition prefix T1 is as follows:
[0098] The cosine similarity cos(T1, T2) of (T1, T2) is approximately 0.999.
[0099] The cosine similarity cos(T1, T3) of (T1, T3) is approximately 0.102.
[0100] The error calculation model 124 brings the above two contrast loss values into the contrast loss calculation formula to obtain:
[0101] Under the guidance of the contrast loss, the error calculation model 124 can automatically find a feature division with more physical meaning through the similarity relationship of the data itself. In the high-dimensional vector space, the distance between the positive example pairs (i.e., the two “out-of-circle” processes described above) is reduced, so that similar processes are gathered in the same region. Specifically, the cosine similarity of the transition prefix T tends to 1, thereby strengthening the attention mechanism model 122’s ability to pay attention to the key features of state transition. In this example, the final training contrast loss value L is significantly lower than 1, indicating that the optimized attention mechanism model 122 judges the two processes to be highly similar, verifying the effectiveness of the method.
[0102] For the transition prefix T of some processes in the first process chain, dimension reduction processing is performed through a [5, 2] dimensional projection matrix, and it is mapped to the X-Y coordinate system of Figure 5 .
[0103] As shown in the transition prefix vector representation diagram. Figure 5 Figure 5 The quadrant number in is set counterclockwise, and the first quadrant is the area surrounded by the positive direction of the x-axis (right side) and the positive direction of the y-axis (upper side). The three process clusters in the first quadrant are “boring” processes. The three processes with high y values in the second quadrant are “finishing” processes, and the other five are “roughing” processes. The third quadrant clusters are “grinding” processes. The fourth quadrant clusters are “drilling” processes. In Figure 5 , the transition prefix T of the processes shows obvious clustering.
[0104] S300: Perform process prefix matching training within the process chain to generate the state prefix P, ensuring that the state prefix P of adjacent processes can be recursively derived through the transition prefix T.
[0105] The state space optimization model 125 combines the transition prefix T generated by the attention mechanism model 122 and stored in the memory 120 with the process arrangement order data saved to the memory 120 to form combined data. By performing recursive calculation on the combined data, the state space optimization model 125 generates the state prefix P and stores it in the memory 120.
[0106] Subsequently, the similarity calculation model 123 and the error calculation model 124 read the state prefix P from the memory 120 respectively, and perform cosine similarity calculation, mean square error calculation and contrastive learning loss calculation, and the calculation results are also saved to the memory 120. The state space optimization model 125 adjusts the training parameters (in this embodiment, the transformation matrix W and the bias b) according to the mean square error and the contrastive learning loss results in the memory 120, and finally stores the optimized state prefix P to the memory 120. The operation execution and data interaction of the above-mentioned state space optimization model 125 are all completed by the processor 100 unified scheduling.
[0107] S301: The state space optimization model 125 combines the positive example pair and the negative example pair in the process data processed in step S100 with the transition prefix T generated in step S200 to construct a state prefix pair. The representation form of the positive example pair is (P i ,T i ,P i+1 ).
[0108] Taking the positive example pair in the first process chain as an example:
[0109] Process 1: "Clamp the blank outer circle with a self-centering chuck, and clamp the other end with a center hole with a centering top, and turn the outer circle of φ220h6 to φ223".
[0110] Process 2: "Turn the outer circle of φ216 to φ223".
[0111] The combination relationship of the transition prefix T corresponding to the positive example pair and the state prefix P is (P1, T1, P2).
[0112] S302: Set the process sequence data in the memory 120 as {S1, S2, …, S i}.
[0113] In the present application, the process sequence refers to the collection of multiple processes, that is, the process chain. The process arrangement order refers to the front and back relationship between each process in a process sequence. The process sequence data contains the process arrangement order.
[0114] The state prefix P 11 of the first process data S1 is initialized by the state space optimization model 125, and then its representation form is optimized through iterative learning: P1=W init Transformer(S1).
[0115] Wherein, P1 is the state prefix of the first process data; W init is the training parameter, which is used to map the initial process description to the state prefix space.
[0116] The state prefix P i+1 of the subsequent process data Si+1 By recursive formula calculation:
[0117] P i+1 = P i + W T T i + b.
[0118] In the formula, P i represents the state prefix of the process data S i , T i represents the transition prefix of the process data S i , W T represents the transpose form of the recursive parameter W, and b represents the bias term.
[0119] Taking the process 1 (i.e. the first process in the first process chain) of the first process chain “clamping the outer circle of the blank with a self-centering chuck, the other end is clamped with a center hole with a center, clamping, turning φ220h6 outer circle to φ223” as an example, its state prefix P1 is initialized to [0.50, 0.50, 0.50, 0.50, 0.50] through the transformation matrix.
[0120] The trained recursive parameter W and the bias term b are:
[0121]
[0122] Taking the process 1 in the first process chain “clamping the outer circle of the blank with a self-centering chuck, the other end is clamped with a center hole with a center, clamping, turning φ220h6 outer circle to φ223” as an example, its transition prefix T1 = [0.98, 0.97, 0.95, 0.96, 0.93], and the calculated state prefix P2 of the process 2 “turning φ216 outer circle to φ223” is:
[0123] P2 = P1 + W T T1 + b = [0.50 + 1.03, 0.50 + 0.93, …] = [1.53, 1.43, 1.37, 1.40, 1.48].
[0124] [1.53, 1.43, 1.37, 1.40, 1.48].
[0125] Similarly, the state prefix P3 = [2.02, 2.01, 2.74, 1.92, 2.58] can be further recursively obtained.
[0126] This step gradually optimizes the state prefix P by recursive method, so that the state prefix P of each process can be updated according to the state prefix P of the previous process and the transition prefix T.
[0127] S303: The error calculation model 124 adopts a combination of mean square error and contrastive learning loss to optimize the high-dimensional vector space representation of the state prefix P, so that the recursive relationship of the state prefix P of adjacent processes is reasonable, and similar state prefixes P also have certain clustering properties in the high-dimensional vector space. The resulting results are saved to the memory 120 together with the process description sequence.
[0128] The calculation formula of the error calculation model 124 is as follows:
[0129] State loss value: L state =∑ i ||P i+1 -(P i +T i )|| 2 .
[0130] If the state space optimization model 125 can accurately predict P i+1 , then P i+1 -(P i +T i )≈0, and the contrastive loss value tends to 0.
[0131] Contrastive loss value:
[0132] The goal of the contrastive loss value L contrast is to narrow the distance of positive example pairs and push away the distance of negative example pairs through cosine similarity. If the cosine similarity of the positive example pair is close to 1 (such as 0.9999), and the cosine similarity of the negative example pair is close to 0 (such as 0.15), then the contrastive loss value tends to 0.
[0133] Total state loss value: L = L state +λL contrast .
[0134] Here shows the error calculation after training.
[0135] The state loss value L state is calculated as:
[0136] |P2-(P1+W T T1+b)| 2 =|[1.28,1.26,1.63,1.22,1.55]-
[0137] [1.27,1.26,1.62,1.21,1.54]| 2 = (0.01 2 +0.00 2 +0.01 2 +0.01 2 +0.01 2 )=0.0004.
[0138] |P3-(P2+W T T2+b)| 2 =|[2.02,2.01,2.74,1.92,2.58]-
[0139] [2.04,2.01,2.74,1.92,2.58]| 2 =0.0004。
[0140] State loss value L state =0.0004+0.0004=0.0008。
[0141] State loss value L state The loss value is very low (much less than 1), indicating that the state space optimization model 125 successfully learned the recursive relationship of adjacent processes, i.e. i+1 -(P i +T i )≈0.
[0142] Comparative loss value L contrast The calculation process is as follows:
[0143] Take process 1 and process 2 in the first process chain ("clamping the blank outer circle with a self-centering chuck, the other end is clamped with a center hole with a center, clamping, turning φ220h6 outer circle to φ223", "turning φ216 outer circle to φ223") as positive examples (P1+W T T1+b,P2), and calculate the cosine similarity to get:
[0144] cos([1.27,1.26,1.62,1.21,1.54],[1.28,1.26,1.63,1.22,1.55])≈0.9999.
[0145] Take a general negative example P k =[0.11,0.13,0.09,0.10,0.08], and the cosine similarity with the state prefix P1 is 0.15.
[0146] Take the temperature coefficient τ = 0.1 to calculate the comparative loss value:
[0147]
[0148] Comparative loss value L contrast ≈0.00003, indicating that the error calculation model 124 has effectively distinguished similar and dissimilar processes.
[0149] Take λ = 0.1 to get the total loss value L = L state + λL contrast= 0.0008 + 0.1 x 0.00003 = 0.000803.
[0150] The final total loss value L = 0.000803 is much lower than 1, which proves that the state prefix P of adjacent processes is relatively reasonable.
[0151] For the above steps, taking process 3 of the first process chain as an example, the final saved form is {“φ222h6 outer circle to φ225, length 124”, P2, T2}. The process chain representation sequence of the entire first process chain is saved as {P1, T1, T2, ···, T 28}.
[0152] If the state space optimization model 125 of the application has not learned a reasonable recursive relationship, the state loss value will increase significantly (for example, ||P i+1 -(P i +T i )|| may reach 1-10 orders of magnitude); if similar processes are not effectively distinguished, the comparison loss value will also increase significantly (for example, the comparison loss value L contrast may reach 0.1-1 orders of magnitude). The total loss value of the application is much lower than 1, which directly proves two points:
[0153] (1) The recursive relationship is reasonable: the state prefix P of adjacent processes satisfies P i+1 -(P i +T i ) = 0, with a very small error.
[0154] (2) Similarity clustering is effective: the positive examples are highly similar in high-dimensional vector space, and the negative examples are significantly different.
[0155] Embodiment 2
[0156] This embodiment is a further improvement of embodiment 1, and the repeated contents will not be described again.
[0157] After the processing of embodiment 1, the second process chain can obtain a process chain representation sequence {P1, T1, T2, T3, ···, T 12}. P1 represents the initial state of the process, and T n represents the transition vector of the corresponding process.
[0158] Input the process chain representation sequence (process) into the state space optimization model 125, and the state space optimization model 125 calculates the workpiece state P i+1 after each process through the internal recursive formula P i = P T + W i T n+1 + b, and finally outputs the final state P 13.
[0159] In traditional schemes based on a single [CLS] vector, optimizing the process chain or decoding a specific process requires re-inputting the [CLS] vector into the model that generated it. Due to the large size of the model, such repetitive calculations consume a significant amount of computing power, resulting in a substantial decrease in response speed.
[0160] This scheme utilizes the semantic features embedded in the transfer prefix T during the decoding process, eliminating the need to re-input the transfer prefix T into the attention mechanism model 122. The similarity calculation model 123 can calculate the cosine similarity Cos(T). i ,T j The process is directly matched to the process corresponding to the migration prefix T—that is, the known process corresponding to the maximum cosine similarity is selected as the decoding result. i T represents the transition prefix to be decoded. j This represents the migration prefix of the known process stored in memory 120. This method requires significantly less computational power than traditional model reconstruction processes, resulting in a substantial improvement in response speed.
[0161] When optimizing the second process chain, the initial state prefix P1 and the final state prefix P of the workpiece in the second process chain are... 13 Input into state-space optimization model 125.
[0162] The state-space optimization model 125 begins by traversing the state transition vectors stored in memory 120, with the goal of finding the initial state prefix P1 and the final state prefix P in the high-dimensional vector space. 13 The shortest path. The path is determined by the migration prefix T. n They are connected sequentially. The connection method in high-dimensional vector space is similar to vector addition (connecting front and back), which in practical terms means: under the premise of ensuring equivalent processing results, selecting combinations of processes with fewer operation steps or simpler processes to generate new process chains.
[0163] State-space optimization model 125 combines the state prefix P1 with each transition prefix T obtained from memory 120. n Perform a recursive process.
[0164] The recursive formula is: P i+1 =P i +W T T i +b.
[0165] Multiple state prefixes are obtained through recursion. They are respectively denoted as State prefix One-to-one with the final state prefix P 13 The pairs are input into the similarity calculation model 123.
[0166] The formula for similarity calculation model 123 is as follows:
[0167] The state prefix with the highest similarity to cosine. The corresponding transition prefix is denoted as T`1, and the corresponding process is the first process in the new process chain. State-space optimization model 125... Based on this, repeat the above process to obtain the subsequent processes of the new process chain in sequence, until the state prefix is obtained. The final state prefix P of the original process chain 13 If the cosine similarity is higher than a preset similarity threshold, the process generation stops, and the resulting new process chain is {P1,T`1,T`2,...,T`...} n}
[0168] The newly obtained process chain is then input into the similarity calculation model 123 for process decoding. The final optimized process chain is as follows: Figure 8 As shown.
[0169] like Figure 7 As shown, the original process chain (second process chain) performs the drilling operation in process 5. For example... Figure 8 As shown, the optimized process chain performs a drilling operation in process 2. Compared with the original process chain (second process chain), although the number of processes in the optimized process chain is not reduced, the process sequence of the roughing part has been adjusted. Specifically, the optimized process chain first performs a drilling operation, then chamfers the inner and outer circles on one side of the workpiece, then cuts off the workpiece and turns it around to chamfer the inner and outer circles on the other end, finally completing the end face turning process.
[0170] like Figure 7 As shown, the original process chain (second process chain) has two reversal operations (process 3 and process 8). For example... Figure 8 As shown, the optimized process chain only requires one turning operation (process 7). Compared with the original process chain (second process chain), the optimized process chain reduces one turning operation, thereby reducing the machining errors that may be introduced by manual assembly during the turning process, and avoiding wear on the outer diameter precision caused by repeated clamping of the outer diameter.
[0171] It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to devise modifications which, though perhaps not specifically enumerated herein, fall within the scope of the application. Those skilled in the art will understand that the drawings, described above, and the claims, described below, are an integral part of the disclosure and are presented for purposes of exemplification. The scope of the application is defined by the claims and their equivalents. The specification and drawings are illustrative rather than restrictive. The specification contains multiple inventive concepts, and the applicant has designated each of these concepts as a separate invention. The applicant hereby rescinds any disclaimer of claim scope made by the terms "means" or "step," additionally, although the application has been described in connection with specific embodiments, it will be understood that the application is capable of further modifications.
Claims
1. A workpiece state-based process feature extraction system, comprising: The system comprises: a preprocessing unit (101) for normalizing received data, constructing positive example pairs and negative example pairs according to labeled data, sequentially matching data including the positive example pairs and the negative example pairs within a process chain, and determining the process arrangement order within a single process chain; an attention mechanism unit (102) for comparing and training the process arrangement order within the process chain, so that the migration prefixes of similar processes tend to be close in a high-dimensional vector space; a similarity calculation unit (103) for calculating the cosine similarity of the migration prefixes; a state space optimization unit (105) for combining the migration prefixes and the process arrangement order, recursively calculating the combined data, and obtaining state prefixes; an error calculation unit (104) for calculating a comparison loss value based on the cosine similarity result, and optimizing the training parameters of the state prefixes based on the comparison loss value, so that the state prefix recursive relationship of adjacent processes is reasonable, and similar state prefixes produce clustering properties in a high-dimensional vector space.
2. The system of claim 1, wherein, The preprocessing unit (101) constructs positive example pairs and negative example pairs by: grouping the processes of process chains with the same labeled data into positive example pairs; grouping the processes of process chains with inconsistent labeled data into negative example pairs; forming the positive example pairs and the negative example pairs into a training set for comparison training.
3. The system of claim 1 or 2, wherein, The attention mechanism unit (102) comprises: a Transformer encoder module for extracting hidden layers from labeled data and performing weighted attention pooling to obtain migration prefixes; a weighted attention pooling module for calculating the attention scores of each word element to determine the word elements that have an impact on state migration, thereby obtaining representative migration prefixes.
4. The system according to any one of claims 1 to 3, characterized in that The error calculation unit (104) calculates the comparison loss value of the data after weighted attention pooling based on a loss function.
5. The system according to any one of claims 1 to 4, characterized in that The state space optimization unit (105) converts the positive example pairs, the negative example pairs, and the migration prefixes into state prefix pairs; Initialize the state prefix of the first procedure data, and gradually learn the optimal representation of the state prefix: P1=W init Transformer(S1), Wherein, P1 is the state prefix of the first process data; W inir is the training parameter; S1 is the process data; maps the initial process description to the state prefix space; obtains the state prefixes of subsequent processes through recursive calculation.
6. A workpiece state-based process feature extraction method, characterized by, The method comprises: normalizing received data, constructing positive example pairs and negative example pairs according to labeled data, sequentially matching data including the positive example pairs and the negative example pairs within a process chain, and determining the process arrangement order within a single process chain; comparing and training the process arrangement order within the process chain, so that the migration prefixes of similar processes tend to be close in a high-dimensional vector space; calculating the cosine similarity of the migration prefixes; combining the migration prefixes and the process arrangement order, recursively calculating the combined data, and obtaining state prefixes; calculating a comparison loss value based on the cosine similarity result, and optimizing the training parameters of the state prefixes based on the comparison loss value, so that the state prefix recursive relationship of adjacent processes is reasonable, and similar state prefixes produce clustering properties in a high-dimensional vector space.
7. The method of claim 6, wherein, The method for constructing positive example pairs and negative example pairs comprises: grouping the processes of process chains with the same labeled data into positive example pairs; grouping the processes of process chains with inconsistent labeled data into negative example pairs; forming the positive example pairs and the negative example pairs into a training set for comparison training.
8. The method according to claim 6 or 7, characterized in that, The method further comprises: The labeled data is extracted by a hidden layer and weighted attention pooling to obtain a prefix before migration; Attention scores of each word element are calculated to determine the word elements that have an impact on state migration, thereby obtaining a representative prefix before migration.
9. The method according to any one of claims 6 to 8, characterized in that, The method further comprises: Converting the positive example pairs, negative example pairs and prefixes before migration into state prefix pairs; Initializing the state prefix of the first process data and gradually learning the optimized representation of the state prefix: P1 = W init Transformer (S1), Wherein, P1 is the state prefix of the first process data; W inir is the training parameter; S1 is the process data; Mapping the initial process description to the state prefix space; The state prefix of the subsequent process is calculated by recursion.
10. The method according to any one of claims 6 to 9, characterized in that, The method further comprises: Calculating the contrast loss value of the data after weighted attention pooling based on the loss function.