Work order merging method and apparatus, electronic device, and storage medium
By constructing multi-dimensional feature vectors and similarity calculations, combined with tooling compatibility constraints, the problems of automation and accuracy in work order merging in multi-variety, small-batch production were solved, thereby improving production efficiency and equipment utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN BAISIJIE TECH CO LTD
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies struggle to automatically and accurately identify process similarities between products and mass production orders under multi-variety, small-batch production models, leading to frequent equipment changeovers and low production efficiency.
By extracting the process features of work orders to construct multi-dimensional feature vectors, calculating the similarity between work orders, and combining tooling compatibility constraints to make merging decisions, including the quantitative representation and weighted processing of process path coding, program code fingerprints, tooling type and processing parameter features.
It has automated and improved the accuracy of the work order merging process, thereby increasing production efficiency and equipment utilization and reducing unnecessary equipment replacement.
Smart Images

Figure CN122452985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of process manufacturing technology, specifically to a work order merging method, apparatus, electronic device, and storage medium. Background Technology
[0002] In modern manufacturing models characterized by high-mix, low-volume (HMLV), companies often need to handle a large number of small-batch processing tasks with significantly different process routes on the same production line to meet diverse and customized market demands. Each task is typically managed and scheduled in the form of a work order. To improve production efficiency and reduce equipment downtime and changeover preparation time, merging multiple work orders with similar process requirements into a larger processing batch is an important method in production scheduling optimization. Traditional work order merging aims to achieve efficient utilization of bottleneck resources by reducing repetitive equipment adjustments and parameter settings.
[0003] Currently, in actual production management systems (such as MES), work order merging mainly relies on two strategies. The first is the principle of complete consistency, where the system only allows automatic merging between work orders that are completely identical in all elements, such as process routes, machining programs, and tooling fixtures. The second is manual judgment based on experience, where production schedulers rely on their personal experience to subjectively judge whether fixtures are interchangeable or programs are compatible, thus deciding whether to merge work orders when some differences exist. However, these existing strategies have significant drawbacks: First, the principle of complete consistency is too rigid. Many work orders with only minor differences in non-critical parameters (such as slight adjustments to feed rate in CNC programs or slight differences in heat treatment holding time) but highly similar core processes are excluded by the system because they cannot meet the stringent condition of complete consistency, thus missing merging opportunities. Second, the manual judgment method is inefficient, heavily reliant on individual experience, and has inconsistent judgment standards, making it difficult to replicate and promote, and its feasibility in large-scale work order processing scenarios is poor.
[0004] Therefore, existing technologies cannot automatically and accurately identify the process similarity between work orders and mass production orders, making it difficult to effectively solve the problem of intelligent work order merging in the HMLV production mode. This leads to frequent unnecessary equipment changeovers during the production process, which restricts the improvement of equipment utilization and the stability of the production cycle. Summary of the Invention
[0005] In view of this, it is necessary to provide a work order merging method, apparatus, electronic device and storage medium to solve the technical problems of low merging efficiency, frequent equipment changeover and low utilization of production resources caused by the reliance on manual experience and fixed rules in the existing methods.
[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a work order merging method, comprising: Extract the process features of the work orders to be processed, and construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters. For any two work orders, calculate the similarity between the multidimensional feature vectors of the two work orders and obtain the similarity value; Based on the similarity and a preset similarity threshold, and in conjunction with tooling compatibility constraints, the merging decision result is determined. The tooling compatibility constraints are predefined constraint rules used to determine whether the tooling used by two work orders can be processed continuously on the same machine.
[0007] In one possible implementation, the multidimensional feature vector includes a process path encoding vector, a program code fingerprint vector, a tooling type vector, and a processing parameter feature vector.
[0008] In one possible implementation, the step of extracting the process features of the work orders to be processed and constructing a multi-dimensional feature vector for each work order includes: Obtain the process characteristics of the work order to be processed, including process path code, program code fingerprint, tooling type characteristics, and processing parameter characteristics; Each of the aforementioned process features is vectorized to obtain a corresponding process feature vector, which includes a process path encoding vector, a program code fingerprint vector, a tooling type vector, and a processing parameter feature vector. Each of the aforementioned process feature vectors is weighted, and the multidimensional feature vector corresponding to the work order to be processed is obtained by combining the weighted process feature vectors.
[0009] In one possible implementation, the process feature is a program code fingerprint, and the vectorization of each process feature to obtain the corresponding process feature vector includes: The program code fingerprint is parsed and cleaned to obtain structured text; Extract tool call sequences and different types of machining segments from the structured text; Based on the structural information of the tool call sequence and machining segments, a structural feature representation is generated; Based on the structural features, a program code fingerprint vector is generated.
[0010] In one possible implementation, the weighting of each of the process feature vectors includes: The process feature vector is normalized using the Min-Max normalization method to obtain a normalized feature vector. The range value used for normalization is determined based on the theoretical limit of the machine tool or the statistical quantile value of historical work orders. Different weights are assigned to the process path encoding vector, program code fingerprint vector, tooling type vector, and processing parameter feature vector, wherein the weights of the program code fingerprint vector and tooling type vector are higher than the weights of the processing parameter feature vector. Each normalized feature vector is weighted using assigned weights.
[0011] In one possible implementation, determining the merging decision result based on the similarity and a preset similarity threshold, combined with tooling compatibility constraints, includes: Obtain a first threshold and a second threshold, wherein the first threshold is higher than the second threshold; When the similarity between two work orders is higher than the first threshold and the tooling compatibility constraint is met, the merging decision result is determined to be to automatically merge the work orders. When the similarity between two work orders is between the first threshold and the second threshold, the merging decision result is determined to be manual review and merging. When the similarity between two work orders is less than the second threshold, the merging decision result is determined to be that they cannot be merged.
[0012] In one possible implementation, before determining the merging decision result based on the similarity and a preset similarity threshold, combined with tooling compatibility constraints, the work order merging method further includes: Collect historical work orders and historical merge results as training data; Based on the training data, the first threshold and the second threshold are calibrated by evaluating the accuracy of the merged decision under different candidate thresholds.
[0013] On the other hand, the present invention also provides a work order merging device, comprising: The feature extraction module is used to extract the process features of the work orders to be processed, and to construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters. The similarity calculation module is used to calculate the similarity between the multidimensional feature vectors of any two work orders and obtain a similarity value. The merging decision module is used to determine the merging decision result based on the similarity and a preset similarity threshold, combined with tooling compatibility constraints.
[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the work order merging method described in any of the above implementations.
[0015] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps in the work order merging method described in any of the above implementations.
[0016] The beneficial effects of this invention are as follows: The work order merging method provided by this invention, by extracting and constructing multi-dimensional feature vectors that quantitatively represent multiple dimensions such as process logic, execution code, physical clamping, and process parameters, overcomes the shortcomings of traditional methods in unifying modeling and quantifying complex process features, thereby enabling a more comprehensive and objective representation of the process essence of work orders. By calculating the similarity between these multi-dimensional feature vectors, a quantitative assessment of the process proximity between work orders is achieved, providing an objective and accurate basis for intelligent decision-making. By introducing a preset similarity threshold and combining it with the hard constraint of tooling compatibility for decision-making, the merging process is automated while effectively controlling merging risks, ensuring the feasibility of decision results, and improving the automation level, decision accuracy, and production efficiency of work order merging in multi-variety, small-batch production. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of an embodiment of the work order merging method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S101; Figure 3 For the present invention Figure 2 A schematic diagram of an embodiment of S202; Figure 4 For the present invention Figure 2 A schematic diagram of an embodiment of S203; Figure 5 For the present invention Figure 1 A schematic diagram of an embodiment of S103; Figure 6 A schematic flowchart of another embodiment of the work order merging method provided by the present invention; Figure 7A schematic diagram of an embodiment of the work order merging device provided by the present invention; Figure 8 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0019] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0023] This invention provides a work order merging method, apparatus, electronic device, and storage medium. The technical solutions of the embodiments of this 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 this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] Figure 1 This is a schematic flowchart of an embodiment of the work order merging method provided by the present invention, as shown below. Figure 1 As shown, the methods for merging work orders include: S101. Extract the process features of the work orders to be processed, and construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters.
[0025] S102. For any two work orders, calculate the similarity between the multidimensional feature vectors of the two work orders and obtain the similarity value.
[0026] S103. Based on similarity and a preset similarity threshold, and in conjunction with tooling compatibility constraints, determine the merging decision result.
[0027] This embodiment provides a work order merging method for automatically merging multiple pending work orders in a manufacturing execution system.
[0028] First, for each work order to be processed, its corresponding process features are extracted, and a multi-dimensional feature vector is constructed based on these process features. This multi-dimensional feature vector is used to structurally and digitally represent the heterogeneous process information involved in the work order, and its dimensions cover multiple key aspects such as process logic, CNC program structure, physical clamping method, and process execution parameters.
[0029] In some embodiments of the present invention, the multidimensional feature vector is composed of a combination of several sub-vectors, including but not limited to: The process path encoding vector is used to characterize the type of processing process and its execution order in the work order; Program code fingerprint vectors are used to reflect the core logical structure of CNC programs; Tooling type vector, used to describe clamping-related information such as fixture type and positioning reference used in the work order; Machining parameter feature vectors are used to quantify the specific values or ranges of process parameters such as spindle speed, feed rate, and depth of cut.
[0030] After constructing the multidimensional feature vectors for each work order, for any two work orders to be evaluated, the similarity between their corresponding multidimensional feature vectors is calculated to obtain a quantitative similarity value. This similarity value is used to objectively measure the overall similarity between the two work orders at the process level.
[0031] Subsequently, based on the similarity value compared with the preset similarity threshold, and combined with tooling compatibility constraints, a comprehensive judgment is made as to whether it is permissible to merge the two work orders for execution.
[0032] Tooling compatibility constraints are predefined hard rules used to determine whether the tooling used in two work orders can be processed continuously on the same machine without changing fixtures or requiring only minor adjustments. If the tooling is incompatible, automatic merging is prohibited regardless of the similarity level.
[0033] Based on the above judgment results, the system can output three types of merging decisions: The first category consists of items that meet the similarity threshold and are tooling compatible, and are therefore deemed suitable for merging. The second category includes items with similarity close to the threshold but with uncertainty, or tooling requiring manual confirmation of compatibility, which are deemed to require manual review. The third category consists of items with similarity below the threshold or with clearly incompatible tooling, which are deemed unsuitable for merging.
[0034] This embodiment overcomes the shortcomings of traditional methods in uniformly modeling and quantifying complex process features by extracting and constructing multi-dimensional feature vectors that quantify multiple dimensions such as process logic, execution code, physical clamping, and process parameters. This allows for a more comprehensive and objective representation of the essence of the work order process. By calculating the similarity between these multi-dimensional feature vectors, a quantitative assessment of the degree of process similarity between work orders is achieved, providing an objective and accurate basis for intelligent decision-making. By introducing a preset similarity threshold and combining it with the hard constraint of tooling compatibility for decision-making, the merging process is automated while effectively controlling merging risks, ensuring the feasibility of the decision results, and improving the automation level, decision accuracy, and production efficiency of work order merging in multi-variety, small-batch production.
[0035] In some embodiments of the present invention, such as Figure 2 As shown, step S101 extracts the process features of the work orders to be processed and constructs a multi-dimensional feature vector for each work order, including: S201. Obtain the process characteristics of the work order to be processed. The process characteristics include process path code, program code fingerprint, tooling type characteristics and processing parameter characteristics. S202. Vectorize each process feature to obtain the corresponding process feature vector. The process feature vector includes the process path encoding vector, the program code fingerprint vector, the tooling type vector, and the processing parameter feature vector. S203. Weight each process feature vector and combine the weighted process feature vectors to obtain the multi-dimensional feature vector corresponding to the work order to be processed.
[0036] This embodiment specifies the construction process of the multi-dimensional feature vector of a work order. The construction process includes three steps in sequence: process feature acquisition, feature vectorization, and weighted fusion.
[0037] In the process feature acquisition step (step S201), four types of key process features are extracted from the work order structured data source: process path code, which is used to characterize the type sequence of machining processes (such as "rough turning -> finish turning -> drilling"); program code fingerprint, which is used to characterize the CNC program logic structure after normalization; tooling type features, including clamping elements such as fixture model and positioning datum; and machining parameter features, covering quantitative process parameters such as spindle speed, feed rate, and depth of cut.
[0038] In the feature vectorization step (step S202), the above-mentioned features are mapped into numerical vectors respectively: the process path encoding is based on a preset process type dictionary and uses a bag-of-words model to generate sparse frequency vectors; the tooling type features are converted into fixed-length vectors through one-hot encoding or a pre-trained word embedding model; the program code fingerprint generates structured feature vectors according to the standardized process described in the previous embodiment (including annotation removal, tool sequence extraction, and motion segment recognition); the machining parameter features are normalized to form numerical vectors. This vectorization process enables heterogeneous process information to be uniformly mapped to a computable vector space.
[0039] In a specific example, a one-hot or embedding vector encoding method is used to construct the tooling feature vector V_fixture = [fixture model, positioning reference type, clamping posture, tool group number].
[0040] As an optional approach, this embodiment sets a fixture compatibility level, with the specific level settings as follows: Level A (Fully Compatible): The fixture models are exactly the same (the fixture model codes in the tooling feature vectors are the same), and the positioning reference and clamping posture are consistent (the positioning reference type and clamping posture codes in the tooling feature vectors are the same).
[0041] Level B (same fixture family): Fixtures belong to the same family (same installation interface / same positioning reference category). The positioning of the fixture can be adjusted within a small range or a new positioning block can be added. Manual confirmation is required.
[0042] Level C (Consistent Positioning Datum): The physical fixtures are different, but the positioning datum (e.g., hole datum, surface datum) and clamping posture are consistent, and the workpiece positioning tolerance is acceptable. Manual confirmation is used.
[0043] Level D (Incompatible): If the positioning reference is different or the clamping posture conflicts (such as requiring a 180° flip), merging will be refused.
[0044] In a specific example, vectorizing the process path encoding includes: using process codes (such as 10 -> roughing, 20 -> finishing, 30 -> drilling, etc.) to form a sequence, or using sparse vectors to represent the proportion of process categories. The dimension of the sparse vector is usually equal to the "number of process types".
[0045] For example, if the process type vocabulary contains 100 common processes (roughing, finishing, milling, drilling, tapping, etc.), then the dimension of the process sparse vector is 100. Assuming a work order process sequence is: [roughing, finishing, milling, drilling], then the sparse vector (length 100) can be represented as: [1, 1, 1, 2, 0, ..., 0]. Where: position 1 (roughing) = 1 (occurs once), position 2 (finishing) = 1 (occurs once), position 3 (drilling) = 1, position 4 (milling) = 2 (occurs twice), and the remaining positions are 0.
[0046] In the weighted fusion step (step S203), weight coefficients are assigned to each feature sub-vector before fusion. The weight coefficients are set according to the degree of influence of each feature dimension on the feasibility of work order merging: features that directly affect equipment changeover and clamping adjustments (such as program code fingerprints and tooling type features) are assigned higher weights; the weight values can be preset based on domain expert experience or determined through supervised learning methods using historical successful / failed work order merging samples. The weighted sub-vectors are combined using vector concatenation or weighted summation to generate a multi-dimensional feature vector of work orders with fixed dimensions and a unified structure.
[0047] Vectorization methods include, but are not limited to: bag-of-words model, one-hot encoding, word embedding, etc.
[0048] The weight configuration can be implemented using either static preset or dynamic learning modes.
[0049] Through the construction process of this embodiment, heterogeneous process information is transformed into a numerical representation with semantic distinguishability and computational consistency, enabling subsequent similarity calculations to reflect the actual impact weight of each process dimension in a differentiated manner, thereby improving the accuracy of work order merging decisions and production adaptability.
[0050] In some embodiments of the present invention, such as Figure 3 As shown, in step S202, the process feature is a program code fingerprint. Each process feature is vectorized to obtain the corresponding process feature vector, including: S301. Parse and clean the program code fingerprint to obtain structured text; S302. Extract tool call sequences and different types of machining paragraphs from structured text; S303. Generate structural feature representations based on the structural information of the tool call sequence and machining segments; S304. Generate a program code fingerprint vector based on the structured feature representation.
[0051] The process of generating program code fingerprint vectors includes standardizing the original CAM / G code, such as parsing the source program file and removing comments, spaces, and format-irrelevant characters; extracting continuous tool call instructions to form a tool operation sequence; identifying and classifying machining motion segments, including basic motion types such as rapid positioning, linear cutting, and circular interpolation; and finally generating fixed-dimensional feature vectors or compact fingerprint codes based on the above structured information to achieve a stable representation of the essential logic of the program while ignoring non-functional differences.
[0052] This embodiment provides specific implementation steps for vectorizing the program code fingerprint, a specific process feature. This process aims to extract and retain the essential structural information from CNC program code that may contain non-critical differences, ignoring surface parameter variations.
[0053] Specifically, the parsing and cleaning in step S301 are preprocessing operations for the original CAM / G code text.
[0054] Parsing refers to reading and understanding the syntactic structure of code, while cleaning is to remove redundant or variable information that interferes with the judgment of structural similarity.
[0055] This process is also known as code normalization, and its specific implementation methods include, but are not limited to: using regular expressions or dedicated parsers to remove all program comments (such as explanatory text within parentheses) and irrelevant whitespace characters; and replacing certain parameter values that only represent process strength rather than logical structure with uniform identifiers.
[0056] After processing in step S301, the codes with different formats corresponding to different work orders are converted into a structured text containing only the core instruction sequence.
[0057] In step S302, two types of key information are extracted from the structured text. The first is the tool call sequence, which involves identifying and recording all tool change instructions (e.g., "T01 M06") by sequentially scanning the code, resulting in an ordered list such as "[T01, T05, T02]". The second is different types of machining segments, which are identified and divided into different machining motion type units based on the G / M codes, such as rapid positioning segments (G00), linear cutting segments (G01), circular interpolation segments (G02 / G03), or fixed drilling cycle segments.
[0058] Next, in step S303, the extracted tool sequence and machining segment information are integrated to construct a structural feature representation. For example, the information can be serialized into a string with a specific format, such as "TOOLSEQ:T01->T02->T01|SEG:rapid:1;linear:1:length=125.7;arc:2;retract:1", generating a structured data object, such as JSON.
[0059] Finally, in step S304, the final program code fingerprint vector is generated based on the above structural feature representation. There are two main technical approaches to this generation: one is to perform a hash operation (such as SHA-256) on the structural representation string to generate a unique and fixed fingerprint hash value, used to quickly determine whether the structures are completely identical; the other is to map the elements in the structural representation (such as the frequency of occurrence of various types of tools, the number of various processing segments, etc.) into a fixed-dimensional numerical vector, facilitating subsequent calculations of metrics such as cosine similarity.
[0060] The vectorization process of the program code in this embodiment effectively strips away non-essential parameter details, focusing on the two crucial elements that determine equipment changeover and machining cycle time: the tool usage sequence and the machining motion type structure. This fundamentally solves the problem that traditional methods based on full text matching or file hashing cannot identify the essential consistency of the process due to minor adjustments in program parameters (such as feed rate optimization and tool compensation value updates). This enables the work order merging system to more accurately determine whether two CNC programs meet the conditions for merging, improving the robustness and practicality of process similarity assessment.
[0061] In some embodiments of the present invention, such as Figure 4 As shown, step S203, which involves weighting each process feature vector, includes: S401. The process feature vector is normalized using the Min-Max normalization method to obtain the normalized feature vector. The range value on which the normalization is based is determined based on the theoretical limit of the machine tool or the statistical quantile value of historical work orders. S402. Assign different weights to the process path encoding vector, program code fingerprint vector, tooling type vector, and machining parameter feature vector, wherein the weights of the program code fingerprint vector and tooling type vector are higher than the weights of the machining parameter feature vector. S403. Using the assigned weights, perform weighted processing on each normalized feature vector.
[0062] This embodiment provides a detailed explanation of the weighting process before feature vector fusion during the construction of multi-dimensional feature vectors for work orders. This weighting process includes three sub-steps: data normalization (step S401), weight allocation (step S402), and weight calculation (step S403).
[0063] In the data normalization sub-step (step S401), Min-Max normalization is performed on the numerical features in each process feature sub-vector to linearly map the feature values to the preset interval [0,1].
[0064] In a specific example, the determination of normalization boundary values adopts a differentiated strategy based on parameter attributes: for parameters involving the physical safety or capability limits of the equipment (such as spindle speed), the theoretical limit value of the machine tool (such as 0–12000 rpm) is used as the normalization boundary; for parameters reflecting the range of process experience (such as feed rate), the 5th and 95th percentiles of the corresponding parameter in the historical work order data of the process are used as the normalization boundary (such as 100–2000 mm / min) to suppress outlier interference and focus on the normal process window.
[0065] In the weight allocation sub-step (S402), weight coefficients are assigned to each normalized process feature vector.
[0066] In this embodiment, the weight configuration is set according to the degree of influence of each feature dimension on the feasibility of work order merging: the weight coefficients of the program code fingerprint vector and the tooling type vector are higher than those of the process path encoding vector and the processing parameter feature vector, so as to reflect their direct influence on equipment changeover operations.
[0067] The specific values of the weight coefficients can be determined in one of the following ways: (1) based on the experience of domain experts; (2) obtained by training and optimizing historical work order merged decision data through supervised learning models (such as logistic regression).
[0068] In a specific example, the weighting coefficients are configured as follows: program code fingerprint vector 0.35, tooling type vector 0.30, process path encoding vector 0.20, and processing parameter feature vector 0.15, and the sum of each weighting coefficient is 1.0.
[0069] In the weighted calculation sub-step (step S403), each normalized process feature sub-vector is multiplied by its corresponding weight coefficient to generate a weighted sub-vector; then the weighted sub-vectors are concatenated in a preset order to form a work order multi-dimensional feature vector with fixed dimensions and uniform structure, which is used for subsequent similarity calculation.
[0070] Through the weighted processing steps in this embodiment, the fusion bias caused by differences in the dimensions, magnitudes, and business importance of different process features is effectively eliminated, making the fused feature vectors comparable on a numerical scale. The feature representation explicitly reflects the actual impact weight of each process dimension on the merging decision, thereby providing a semantically clear data foundation for the quantitative evaluation of process similarity between work orders, enhancing the fit between merging decisions and actual production constraints, and helping to improve the accuracy of merging decisions.
[0071] In some embodiments of the present invention, such as Figure 5 As shown, step S103, based on similarity and a preset similarity threshold, and combined with tooling compatibility constraints, determines the merging decision result, including: S501. Obtain a first threshold and a second threshold, wherein the first threshold is higher than the second threshold; S502. When the similarity between two work orders is higher than the first threshold and the tooling compatibility constraint is met, the merging decision result is to automatically merge the work orders. S503. When the similarity between two work orders is between the first threshold and the second threshold, the merging decision is determined to be manual review and merging. S504. When the similarity between two work orders is less than the second threshold, the merging decision result is determined to be that they cannot be merged.
[0072] Specifically, two key similarity thresholds need to be obtained first and second, with the first threshold being higher than the second. These two thresholds divide the similarity range into three intervals with different decision implications.
[0073] In a specific example, the first threshold can be set to 0.85, and the second threshold can be set to 0.70. The decision-making process then follows these rules: If the calculated process similarity between two work orders is higher than the first threshold (e.g., 0.88) and tooling compatibility constraints are met, the decision is to perform automatic merging. This rule corresponds to the ideal situation where the processes are highly similar and there are no clamping conflicts, suitable for fully automated processing. If the similarity value is between the first and second thresholds (e.g., 0.78), even if tooling compatibility constraints are met, the system will still determine the decision to manually review and merge. This range represents situations where the processes are relatively similar but have some uncertainty or subtle differences, leaving the final decision to experienced production personnel to achieve a balance between improving efficiency and controlling risks. If the similarity value is lower than the second threshold (e.g., 0.65), the system determines the decision to not merge, regardless of tooling compatibility. This rule directly excludes work order pairs with excessively low process similarity, avoiding meaningless further processing.
[0074] It should be noted that the tooling compatibility constraint involved in this embodiment is a key decision-making prerequisite. It refers to the set of rules used to determine whether the tooling fixtures used in two work orders are allowed to be processed continuously on the same equipment without replacement or requiring only acceptable minor adjustments. Specific criteria typically include, but are not limited to: whether the physical model or serial number of the fixtures is exactly the same; whether the type and position of the positioning references (such as faces, holes, pins) are consistent; and whether the workpiece clamping posture is the same or can be made compatible through simple adjustments. Only after passing this constraint check will the work order pair enter the subsequent decision-making process based on a similarity threshold.
[0075] This embodiment transforms continuous similarity quantification results into three clearly structured decision instructions by setting hierarchical thresholds and a tooling compatibility pre-verification mechanism. This ensures that low-similarity work order pairs are efficiently excluded, high-similarity and tooling-compatible work order pairs are automatically merged, and medium-similarity work order pairs trigger a manual review process, thereby greatly improving the merging efficiency. At the same time, by embedding production feasibility constraints, the adaptability of the decision results to the actual manufacturing scenario is enhanced, providing an executable and traceable basis for work order merging operations.
[0076] In some embodiments of the present invention, such as Figure 6 As shown, before determining the merging decision based on similarity and a preset similarity threshold, combined with tooling compatibility constraints, the work order merging method also includes: S601. Collect historical work orders and historical merge results as training data; S602. Based on the training data, the first threshold and the second threshold are calibrated by evaluating the accuracy of the merged decision under different candidate thresholds.
[0077] This embodiment provides a calibration method for a first threshold and a second threshold in work order merging decisions. The calibration method includes steps S601 and S602.
[0078] Step S601 mainly involves collecting and organizing historical work orders and historical merge results as a training dataset. This training dataset contains multiple historical work order pairs and their corresponding historical merge result annotations.
[0079] Among them, historical merger results are marked as merger status information verified by actual production, including at least one of "successful merger with no abnormalities", "quality problems occurred after merger", or "not merged but confirmed to meet the merger conditions after post-analysis".
[0080] Step S602 performs threshold calibration based on the training dataset, mainly including: Sub-step 1: Set the candidate value range of the first threshold and the second threshold (e.g., 0.60 to 0.95), and generate multiple sets of candidate threshold pairs with a preset step size (e.g., 0.05). Each set of candidate threshold pairs satisfies that the candidate value of the first threshold is greater than the candidate value of the second threshold.
[0081] Sub-step 2: For each candidate threshold pair, perform the following operations on each historical work order pair in the training dataset: The process similarity value is obtained by using the feature extraction and similarity calculation process described in the foregoing embodiments; Based on the candidate threshold pairs and tooling compatibility constraints, the merging decision results are generated through simulation. The simulated decision results are compared with the corresponding historical merged results to calculate the evaluation indicators.
[0082] Sub-step 3: Determine the optimal threshold pair from the multiple candidate threshold pairs according to the evaluation index, and use them as the calibrated first threshold and second threshold.
[0083] The evaluation metrics include, but are not limited to, precision and recall.
[0084] In this embodiment, precision refers to the proportion of work order pairs that are determined to be mergeable in the simulation and have been historically marked as "successfully merged and without abnormalities"; In this embodiment, recall refers to the proportion of work order pairs historically marked as "successfully merged and without anomalies" that are correctly identified as mergingable by simulation.
[0085] Optionally, a business cost weighted index can be introduced to comprehensively calculate the rework cost caused by erroneous merging and the equipment replacement cost caused by missed inspection merging, with the goal of minimizing the overall expected cost.
[0086] In sub-step 3, the target operating point can be selected based on the precision-recall curve or the receiver operating characteristic curve: when the production scenario focuses on decision reliability, select the candidate threshold pair with a precision of not less than a preset value (such as 95%) and the highest corresponding recall; when focusing on merging opportunities, select the candidate threshold pair with a recall of not less than a preset value and the highest corresponding precision.
[0087] This embodiment enables the threshold parameter to adapt to the feature distribution and quality tolerance boundary of different production lines, product families or process types, thereby enhancing the applicability of the merged decision logic in diverse production environments.
[0088] To better implement the work order merging method in this embodiment of the invention, based on the work order merging method, the corresponding method is as follows: Figure 7As shown, this embodiment of the invention also provides a work order merging device, the work order merging device 700 including: The feature extraction module 701 is used to extract the process features of the work order to be processed, and to construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters. The similarity calculation module 702 is used to calculate the similarity between the multi-dimensional feature vectors of any two work orders and obtain the similarity value. The merging decision module 703 is used to determine the merging decision result based on the similarity and a preset similarity threshold, and in combination with tooling compatibility constraints.
[0089] The work order merging device 700 provided in the above embodiments can realize the technical solutions described in the above work order merging method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above work order merging method embodiments, and will not be repeated here.
[0090] like Figure 8 As shown, the present invention also provides an electronic device 800. The electronic device 800 includes a processor 801, a memory 802, and a display 803. Figure 8 Only some components of the electronic device 800 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0091] In some embodiments, processor 801 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 802 or process data, such as the work order merging method in this invention.
[0092] In some embodiments, processor 801 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 801 may be local or remote. In some embodiments, processor 801 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.
[0093] In some embodiments, memory 802 may be an internal storage unit of electronic device 800, such as a hard disk or memory of electronic device 800. In other embodiments, memory 802 may also be an external storage device of electronic device 800, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 800.
[0094] Furthermore, the memory 802 may include both internal storage units of the electronic device 800 and external storage devices. The memory 802 is used to store application software and various types of data installed on the electronic device 800.
[0095] In some embodiments, display 803 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 803 is used to display information from electronic device 800 and to display a visual user interface. Components 801-803 of electronic device 800 communicate with each other via a system bus.
[0096] In one embodiment, when the processor 801 executes the work order merging program in the memory 802, the following steps can be implemented: Extract the process features of the work orders to be processed, and construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters. For any two work orders, calculate the similarity between the multidimensional feature vectors of the two work orders and obtain the similarity value; Based on the aforementioned similarity and a preset similarity threshold, and in conjunction with tooling compatibility constraints, the merging decision result is determined.
[0097] It should be understood that when the processor 801 executes the work order merging program in the memory 802, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.
[0098] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 800 mentioned. Electronic device 800 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 800 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0099] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the work order merging methods provided in the above-described method embodiments.
[0100] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0101] The above provides a detailed description of the work order merging method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for merging work orders, characterized in that, include: Extract the process features of the work orders to be processed, and construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters. For any two work orders, calculate the similarity between the multidimensional feature vectors of the two work orders and obtain the similarity value; Based on the similarity and a preset similarity threshold, and in conjunction with tooling compatibility constraints, the merging decision result is determined. The tooling compatibility constraints are predefined constraint rules used to determine whether the tooling used by two work orders can be processed continuously on the same machine.
2. The work order merging method as described in claim 1, characterized in that, The multidimensional feature vector includes process path encoding vector, program code fingerprint vector, tooling type vector, and processing parameter feature vector.
3. The work order merging method as described in claim 2, characterized in that, The process of extracting the process features of the work orders to be processed and constructing a multi-dimensional feature vector for each work order includes: Obtain the process characteristics of the work order to be processed, including process path code, program code fingerprint, tooling type characteristics, and processing parameter characteristics; Each of the aforementioned process features is vectorized to obtain a corresponding process feature vector, which includes a process path encoding vector, a program code fingerprint vector, a tooling type vector, and a processing parameter feature vector. Each of the aforementioned process feature vectors is weighted, and the multidimensional feature vector corresponding to the work order to be processed is obtained by combining the weighted process feature vectors.
4. The work order merging method as described in claim 3, characterized in that, The process feature is a program code fingerprint, and the process feature vectorization for each process feature to obtain the corresponding process feature vector includes: The program code fingerprint is parsed and cleaned to obtain structured text; Extract tool call sequences and different types of machining segments from the structured text; Based on the structural information of the tool call sequence and machining segments, a structural feature representation is generated; Based on the structural features, a program code fingerprint vector is generated.
5. The work order merging method as described in claim 3, characterized in that, The weighting process for each of the process feature vectors includes: The process feature vector is normalized using the Min-Max normalization method to obtain a normalized feature vector. The range value used for normalization is determined based on the theoretical limit of the machine tool or the statistical quantile value of historical work orders. Different weights are assigned to the process path encoding vector, program code fingerprint vector, tooling type vector, and processing parameter feature vector, wherein the weights of the program code fingerprint vector and tooling type vector are higher than the weights of the processing parameter feature vector. Each normalized feature vector is weighted using assigned weights.
6. The work order merging method as described in claim 1, characterized in that, The determination of the merging decision result based on the similarity and a preset similarity threshold, combined with tooling compatibility constraints, includes: Obtain a first threshold and a second threshold, wherein the first threshold is higher than the second threshold; When the similarity between two work orders is higher than the first threshold and the tooling compatibility constraint is met, the merging decision result is determined to be to automatically merge the work orders. When the similarity between two work orders is between the first threshold and the second threshold, the merging decision result is determined to be manual review and merging. When the similarity between two work orders is less than the second threshold, the merging decision result is determined to be that they cannot be merged.
7. The work order merging method as described in claim 6, characterized in that, Before determining the merging decision result based on the similarity and a preset similarity threshold, combined with tooling compatibility constraints, the work order merging method further includes: Collect historical work orders and historical merge results as training data; Based on the training data, the first threshold and the second threshold are calibrated by evaluating the accuracy of the merged decision under different candidate thresholds.
8. A work order merging device, characterized in that, include: The feature extraction module is used to extract the process features of the work orders to be processed, and to construct a multi-dimensional feature vector for each work order based on the process features. The multi-dimensional feature vector is used to perform structured and quantitative characterization of the work order process from the dimensions of process logic, execution code, physical clamping and process parameters. The similarity calculation module is used to calculate the similarity between the multidimensional feature vectors of any two work orders and obtain a similarity value. The merging decision module is used to determine the merging decision result based on the similarity and a preset similarity threshold, combined with tooling compatibility constraints. The tooling compatibility constraints are predefined constraint rules used to determine whether the tooling used by the two work orders can be processed continuously on the same machine.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the work order merging method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the work order merging method according to any one of claims 1 to 7.