Artificial intelligence-based cad operation prediction method, device and electronic equipment
By constructing a CAD prediction knowledge graph based on users' historical operation data, the problem of existing CAD software being unable to dynamically predict operations is solved, achieving accurate and efficient CAD operation prediction and improving design efficiency and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FANHUA DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2025-10-17
- Publication Date
- 2026-05-01
AI Technical Summary
Existing CAD software lacks intelligent understanding of user intentions and cannot dynamically predict subsequent operations, resulting in low design efficiency. In particular, it is difficult to capture the semantic relationships and temporal dependencies between operational entities in complex projects.
A CAD prediction knowledge graph is constructed based on users' historical operation data. Through the division of operation commands, continuous sequence analysis of features, and entity association coefficients, accurate operation prediction prompts are generated.
It improves CAD operation efficiency, reduces repetitive work, has good personalized learning ability, adapts to the operating habits of different users or project types, and significantly improves the accuracy and context adaptability of predictions.
Smart Images

Figure CN121580771B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CAD operation prediction technology, and in particular to a CAD operation prediction method, device and electronic device based on artificial intelligence. Background Technology
[0002] In computer-aided design (CAD) systems, user operations are typically highly repetitive and procedural, especially in certain types of engineering projects where designers often follow similar operational paths to complete modeling tasks. However, existing CAD software generally lacks the ability to intelligently understand user intent and cannot dynamically predict subsequent operations based on historical behavior, leading to frequent manual command invocations by users and impacting design efficiency.
[0003] Current mainstream CAD operation assistance technologies mostly rely on static templates or simple command recommendation mechanisms, making it difficult to capture the semantic relationships and temporal dependencies between operation entities. Especially in complex projects, transitional operations, invalid commands, and multiple types of commands are intertwined, making it difficult for traditional methods to extract effective operation patterns. Therefore, there is an urgent need for a method that integrates artificial intelligence technology, can automatically learn from historical projects, and build personalized predictive knowledge graphs to achieve accurate and efficient CAD operation prediction. Summary of the Invention
[0004] The purpose of this invention is to provide a CAD operation prediction method, apparatus, and electronic device based on artificial intelligence, so as to solve at least one of the problems existing in the prior art.
[0005] To achieve the above objectives, according to one aspect of this application, the present invention provides an artificial intelligence-based CAD operation prediction method, comprising:
[0006] The user's operation commands are divided based on the user's historical project operation data, and the operation entities are determined based on the division results of the operation commands to obtain the operation command set of each operation entity.
[0007] Based on the set of the simplest operation commands for each operation entity, construct the characteristic commands for each operation entity and establish a continuous sequence of characteristics for each operation entity;
[0008] Calculate the entity association coefficients between each feature command entity, and establish an entity association matrix based on the entity association coefficients. Then, use the entity association matrix and feature command entities as the user's CAD prediction knowledge graph.
[0009] It acquires users' CAD operation data in real time and outputs predictive prompts to users based on the user's CAD operation data and CAD prediction knowledge graph.
[0010] Optionally, the operation entity is obtained according to the entity operation command type, and each operation entity is denoted as S(i), where i is a numeric subscript representing the operation entity number;
[0011] Set an interval command threshold, and extract the command sequence for the same operation entity whose interval command count is lower than the interval command threshold as the operation command set of that operation entity. Then, denote the operation command set of the i-th operation entity as ST(i).
[0012] Optionally, the set of operation commands for each operation entity can be filtered based on the final project data to obtain the simplest set of operation commands;
[0013] The operation command set of each operation entity is filtered based on the final project data: when S(i) exists in the final project data, the operation entity is determined to be a continuing entity. At this time, if ST(i)[j] does not belong to ZST(i), the j-th operation command of the i-th operation entity is determined to be a transitional command and the operation command is deleted from ST(i); when S(i) does not exist in the final project data, the operation entity is determined to be an invalid entity and the operation entity is deleted.
[0014] Optionally, each operation entity is classified by entity type, and the frequency of operation commands of the same type of operation entity is counted. Then, operation commands with a frequency threshold are selected as the feature commands of that type of operation entity.
[0015] The characteristic commands of each operation entity are analyzed for continuity, and the characteristic continuous sequence of each operation entity is constructed based on the analysis results. The characteristic continuous sequence of each operation entity is then packaged to obtain the characteristic command entity.
[0016] Optionally, the process of performing continuity analysis on the characteristic commands of each operation entity is as follows:
[0017] The command interval between the feature commands of the operation entity is denoted as d(i,j,p), where d(i,j,p) represents the number of interval operation commands between the j-th feature command and the p-th feature command of the i-th operation entity;
[0018] The continuous exponent between each feature command is calculated as follows:
[0019] α(i,j,p)=a1×d(i,j,p) / D+a2×△t(i,j,p) / T;
[0020] In the formula, α(i,j,p) is the continuity exponent between the j-th feature command and the p-th feature command within the i-th operation entity, D is the interval constant, △t(i,j,p) is the operation time interval between the j-th feature command and the p-th feature command within the i-th operation entity, T is the preset interval duration, a1 and a2 are the distance interval weight and the time interval weight, respectively, and a1+a2=1;
[0021] A continuous exponential threshold is set to determine the continuity of the feature commands of each operation entity. When α(i,j,p) is greater than the continuous exponential threshold, the j-th feature command and the p-th feature command in the i-th operation entity are determined to be a continuous command. Otherwise, they are determined to be discontinuous commands.
[0022] Perform transitivity judgment on each group of continuous commands, and combine the continuous commands that meet the transitivity into a characteristic continuous sequence.
[0023] Optionally, weights are assigned to each feature command based on the user's operation command classification results, such that the weight of the feature command of the constraint operation command type is assigned to 1.1, the weight of the feature command of the entity operation command type is assigned to 1, and the weights of the attribute operation command type and the view operation command type are assigned to 0.7.
[0024] The updated continuous index is obtained by multiplying the product of the weights assigned to each feature command and the product of the continuous index between the corresponding feature commands, and the updated continuous index is used to update the feature continuous sequence.
[0025] Optionally, the expression for the entity association coefficient is as follows:
[0026] R(i,k)=N(i,k) / N(i)×lg[10+n(i,k)]; where N(i,k) represents the number of operations that immediately follow S(k) after the feature command entity S(i), N(i) is the total number of times S(i) appears in the operation command, and n(i,k) represents the number of feature commands of the unidirectional constraint operation command type from the feature command entity S(i) to S(k);
[0027] Based on the user's CAD operation data, extract the user's real-time operation entities, and match the real-time operation entities with the same type of feature command entities one by one, and calculate the matching rate. If the matching rate is greater than or equal to 10% and less than 90%, the feature commands of the feature command entities after excluding the user's CAD operation data are used as the predicted commands.
[0028] If the matching rate is less than 10%, the matching is deemed to have failed, and the next feature command entity is matched.
[0029] If the matching rate is greater than or equal to 90%, the feature commands of the feature command entity after excluding the user's CAD operation data are used as the predicted commands. At the same time, the feature command entity corresponding to the entity association matrix and the feature command entity with the largest entity association coefficient is used as the predicted entity.
[0030] The predicted entity and the prediction command are used as prediction prompts.
[0031] Optionally, collect the user's historical project operation data;
[0032] User operation commands are categorized according to preset operation command types, including entity operation command types, constraint operation command types, attribute operation command types, and view operation command types.
[0033] According to another aspect of this application, an artificial intelligence-based CAD operation prediction device is provided, comprising:
[0034] The data acquisition unit is used to collect users' historical project operation data;
[0035] The entity determination unit is used to divide the user's operation commands based on the user's historical project operation data, and determine the operation entities according to the division results of the operation commands, so as to obtain the operation command set of each operation entity.
[0036] The data filtering unit is used to filter the set of operation commands for each operation entity based on the final data of the project in order to obtain the simplest set of operation commands.
[0037] The feature analysis unit is used to construct the feature commands of each operation entity based on the simplest set of operation commands for each operation entity, and to establish a continuous sequence of features for each operation entity.
[0038] The graph construction unit is used to calculate the entity association coefficient between each feature command entity, and to establish an entity association matrix based on the entity association coefficient. Then, the entity association matrix and the feature command entities are used as the user's CAD prediction knowledge graph.
[0039] The real-time prediction unit is used to acquire the user's CAD operation data in real time and output prediction prompts to the user based on the user's CAD operation data and CAD prediction knowledge graph.
[0040] According to another aspect of this application, an electronic device is provided, comprising:
[0041] One or more processors;
[0042] Storage device for storing one or more programs;
[0043] When the one or more programs are executed by the one or more processors, the one or more processors implement the AI-based CAD operation prediction method.
[0044] Compared with existing technologies, the advantages of this invention are as follows: By constructing a CAD prediction knowledge graph based on users' historical operation data, intelligent prediction and accurate prompts for operation commands are achieved. This method first extracts and filters the simplest command sequences of operation entities, then combines command type weights and continuity analysis to generate a continuous sequence of features with temporal logic, effectively eliminating redundant and excessive operations. Furthermore, by establishing an association matrix through entity association coefficients, user behavior patterns are structured into a knowledge graph, significantly improving prediction accuracy and context adaptability. The overall solution not only improves CAD operation efficiency and reduces repetitive work, but also possesses excellent personalized learning capabilities, adapting to the operating habits of different users or project types, providing reliable technical support for intelligent CAD systems. Attached Figure Description
[0045] 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.
[0046] Figure 1 This is a flowchart illustrating the AI-based CAD operation prediction method of this embodiment.
[0047] Figure 2 This is a flowchart illustrating the method for constructing a continuous feature sequence in this embodiment.
[0048] Figure 3 This is a schematic diagram of the structure of the AI-based CAD operation prediction device provided in this embodiment.
[0049] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this embodiment. Detailed Implementation
[0050] To more clearly illustrate the present invention, the following description, in conjunction with preferred embodiments and accompanying drawings, further explains the invention. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of the present invention.
[0051] It should be noted that although the terms first, second, third, etc., may be used in the embodiments of this application for description, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of this application, first can also be referred to as second, and similarly, second can also be referred to as first.
[0052] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0053] Specifically, the AI-based CAD operation prediction method described in this application is applied to the prediction of CAD operations during the engineering drawing process; the users to whom the CAD operation prediction method described in this application is applied are specifically users creating projects of a single type or category.
[0054] To apply the above-mentioned application scenarios, this application provides an artificial intelligence-based CAD operation prediction method, the flowchart of which can be found in the document. Figure 1 As shown, it includes:
[0055] Step S101: Collect the user's historical project operation data;
[0056] The user's historical project operation data refers to the user's operation data within a completed historical CAD project, including the user's operation commands, operation object type ID, operation timestamp, operation time, and project final data; the project final data refers to the project's final modeling data.
[0057] Specifically, the process of collecting users' historical project operation data in this application is as follows: the final project data is obtained by collecting completed project files, and operation commands, operation object type ID, operation timestamp, and operation time are collected in real time.
[0058] Specifically, this application collects operation data and geometric feature data of each project file through the API interface within the CAD system. For example, Hook technology can be used to listen to the CAD command stream and convert each CAD command in the CAD command stream into JSON format.
[0059] Specifically, this step comprehensively collects user operation commands, timestamps, operation objects, and final model data from historical projects through API interfaces, providing a high-quality, structured raw data foundation for subsequent analysis. Complete and accurate data collection ensures the traceability of operational behavior, effectively supporting in-depth analysis of user operating habits and laying the groundwork for building personalized predictive models.
[0060] Please continue reading. Figure 1 As shown, the AI-based CAD operation prediction method further includes:
[0061] Step S102: Divide the user's operation commands based on the user's historical project operation data, and determine the operation entities according to the division results of the operation commands, so as to obtain the operation command set of each operation entity.
[0062] Specifically, in step S102, the process of dividing the user's operation commands is as follows:
[0063] The user's operation commands are categorized according to preset operation command types to classify the user's operation commands into various command types.
[0064] Specifically, the command types described in this application include entity operation command types, constraint operation command types, attribute operation command types, and view operation command types; the entity operation command types are operation commands on entity objects such as points, lines, surfaces, volumes, text, and annotations; the constraint operation command types are commands that act on non-geometric logical objects such as dimensional constraints, geometric constraints, parameters, and formulas; the attribute operation command types are commands that manipulate attribute data such as layers, blocks and block references, line types, colors, line widths, annotation styles, and text styles; and the view operation command types are commands that affect the way graphics are displayed on the screen rather than the graphics themselves, such as viewports, views, visual styles, cameras, and light sources.
[0065] Specifically, in step S102, the process of determining the operation entities to obtain the operation command set for each operation entity is as follows:
[0066] Obtain the operation entity according to the entity operation command type, and denote each operation entity as S(i), where i is a numeric subscript representing the operation entity number;
[0067] Set an interval command threshold, and extract the command sequence for the same operation entity whose interval command count is lower than the interval command threshold as the operation command set of that operation entity. Then, denote the operation command set of the i-th operation entity as ST(i).
[0068] Specifically, the process of "obtaining the operation entity based on the entity operation command type" in this application is as follows: obtain the object that the entity operation command type applies to, and use that object as the operation entity; it can be understood that the operation entity applied to by an entity operation command type is not unique; the value of the interval command threshold mentioned in this application is 3.
[0069] Specifically, by categorizing operation commands by type and associating them with specific operation entities, this step transforms the raw command flow into structured operation units. Combining this with interval command thresholding to extract effective command sequences effectively focuses on continuous operations on the same entity, avoiding interference from irrelevant commands and improving the relevance of subsequent analysis and the accuracy of entity modeling.
[0070] Please continue reading. Figure 1 As shown, the AI-based CAD operation prediction method further includes:
[0071] Step S103: Filter the set of operation commands for each operation entity based on the final project data to obtain the simplest set of operation commands.
[0072] Specifically, in step S103, the process of obtaining the simplest set of operation commands is as follows:
[0073] The operation command set of each operation entity is filtered based on the final project data: when S(i) exists in the final project data, the operation entity is determined to be a continuing entity. At this time, if ST(i)[j] does not belong to ZST(i), the j-th operation command of the i-th operation entity is determined to be a transitional command and the operation command is deleted from ST(i); when S(i) does not exist in the final project data, the operation entity is determined to be an invalid entity and the operation entity is deleted.
[0074] Specifically, invalid entities and transitional commands are removed from the final model data of the project, retaining only the core operations that constitute the final design result, thereby obtaining a "minimal set of operation commands". This significantly reduces noise interference, ensures that subsequent feature extraction is based solely on valid design behaviors, and improves the practicality and reliability of the prediction model.
[0075] Please continue reading. Figure 1 As shown, the AI-based CAD operation prediction method further includes:
[0076] Step S104: Construct the characteristic commands of each operation entity based on the set of the simplest operation commands of each operation entity, and establish the characteristic continuous sequence of each operation entity.
[0077] Please see Figure 2 As shown, it is a flowchart illustrating the method for constructing continuous feature sequences in this application, including:
[0078] Step S401: Construct the characteristic commands of each operation entity based on the set of the simplest operation commands for each operation entity.
[0079] Specifically, the process of constructing the characteristic commands for each operational entity is as follows:
[0080] Each operation entity is classified by entity type, and the frequency of operation commands of the same type of operation entity is counted. Then, operation commands with a frequency greater than a threshold are selected as the characteristic commands of that type of operation entity.
[0081] Specifically, the process of "classifying each operational entity by entity type" in this application is based on entity objects such as points, lines, surfaces, volumes, text, and annotations; the frequency threshold value mentioned in this application is 0.2.
[0082] Please continue reading. Figure 2 As shown, the method for constructing feature continuous sequences further includes:
[0083] Step S402: Perform continuity analysis on the feature commands of each operation entity, construct a feature continuous sequence of each operation entity based on the analysis results, and package the feature continuous sequence of each operation entity to obtain a feature command entity; In this application, the process of packaging the feature continuous sequence of each operation entity to obtain a feature command entity is to perform feature continuous sequence operation on the operation entity and use the operation entity after the operation as the feature command entity.
[0084] Specifically, the process of performing continuity analysis on the characteristic commands of each operational entity is as follows:
[0085] The command interval between the feature commands of the operation entity is denoted as d(i,j,p), where d(i,j,p) represents the number of interval operation commands between the j-th feature command and the p-th feature command of the i-th operation entity;
[0086] The continuous exponent between each feature command is calculated as follows:
[0087] α(i,j,p)=a1×d(i,j,p) / D+a2×△t(i,j,p) / T;
[0088] In the formula, α(i,j,p) is the continuity exponent between the j-th feature command and the p-th feature command within the i-th operation entity, D is the interval constant, △t(i,j,p) is the operation time interval between the j-th feature command and the p-th feature command within the i-th operation entity, T is the preset interval duration, a1 and a2 are the distance interval weight and the time interval weight, respectively, and a1+a2=1;
[0089] A continuous exponential threshold is set to determine the continuity of the feature commands of each operation entity. When α(i,j,p) is greater than the continuous exponential threshold, the j-th feature command and the p-th feature command in the i-th operation entity are determined to be a continuous command. Otherwise, they are determined to be discontinuous commands.
[0090] Perform transitivity judgment on each group of continuous commands, and combine the continuous commands that meet the transitivity into a characteristic continuous sequence.
[0091] Specifically, the "transitivity judgment" mentioned in this application refers to the judgment in logical judgments that the relations have the same transitivity.
[0092] Specifically, step S402 further includes updating the feature continuous sequence based on the partitioning result of the user's operation command, the process of which is as follows:
[0093] Based on the classification of user operation commands, weights are assigned to each feature command, with the weight of constraint operation command type feature commands assigned to 1.1, the weight of entity operation command type feature commands assigned to 1, and the weight of attribute operation command type and view operation command type assigned to 0.7.
[0094] The updated continuous index is obtained by multiplying the product of the weights assigned to each feature command and the product of the continuous index between the corresponding feature commands, and the updated continuous index is used to update the feature continuous sequence.
[0095] Specifically, by statistically analyzing high-frequency commands and calculating a continuity index based on time and command intervals, this step identifies operation patterns with strong temporal correlations and introduces command type weights to optimize continuity judgment. This not only enhances the understanding of user operation logic but also makes the feature sequences more aligned with actual design processes, improving the consistency and rationality of predictions.
[0096] Please continue reading. Figure 1 As shown, the AI-based CAD operation prediction method further includes:
[0097] Step S105: Calculate the entity association coefficients between each feature command entity, and establish an entity association matrix based on the entity association coefficients. Then, use the entity association matrix and the feature command entities as the user's CAD prediction knowledge graph.
[0098] Specifically, the process of establishing the entity association matrix in step S105 is as follows:
[0099] The expression for the entity association coefficient is as follows:
[0100] R(i,k)=N(i,k) / N(i)×lg[10+n(i,k)]; where N(i,k) represents the number of operations that immediately follow S(k) after the feature command entity S(i), N(i) is the total number of times S(i) appears in the operation commands, and n(i,k) represents the number of feature commands of the unidirectional constraint operation command type from the feature command entity S(i) to S(k).
[0101] Specifically, this step quantifies the characteristic command entities and their relationships into entity association coefficients and constructs an association matrix to form a structured user operation knowledge graph. This graph integrates frequency, temporal sequence, and constraint logic, enabling the system not only to predict the next command but also to identify cross-entity operational intentions, significantly enhancing the breadth and depth of prediction.
[0102] Please continue reading. Figure 1 As shown, the AI-based CAD operation prediction method further includes:
[0103] Step S106: Acquire the user's CAD operation data in real time, and output prediction prompts to the user based on the user's CAD operation data and CAD prediction knowledge graph.
[0104] Specifically, in this application, the user's CAD operation data can be obtained in real time by listening to the current user's operation flow through the API interface and extracting the most recent 30 operation commands as the user's CAD operation data.
[0105] Specifically, in step S106, the process of outputting prediction prompt information to the user is as follows:
[0106] Based on the user's CAD operation data, extract the user's real-time operation entities, and match the real-time operation entities with the same type of feature command entities one by one, and calculate the matching rate. If the matching rate is greater than or equal to 10% and less than 90%, the feature commands of the feature command entities after excluding the user's CAD operation data are used as the predicted commands.
[0107] If the matching rate is less than 10%, the matching is deemed to have failed, and the next feature command entity is matched.
[0108] If the matching rate is greater than or equal to 90%, the feature commands of the feature command entity after excluding the user's CAD operation data are used as the predicted commands. At the same time, the feature command entity corresponding to the entity association matrix and the feature command entity with the largest entity association coefficient is used as the predicted entity.
[0109] The predicted entity and the prediction command are used as prediction prompts.
[0110] Specifically, dynamic matching based on real-time operational data and knowledge graphs allows for the intelligent output of predictive commands or recommended related entities based on the matching rate. By differentiating strategies according to varying matching levels, false positives in low-confidence scenarios are avoided, while accurate guidance is provided in high-confidence scenarios, effectively improving interaction efficiency and user experience.
[0111] Please see Figure 3 As shown, it is a structural schematic diagram of the CAD operation prediction device based on artificial intelligence of this application, including:
[0112] The data acquisition unit is used to collect users' historical project operation data;
[0113] The entity determination unit is used to divide the user's operation commands based on the user's historical project operation data, and determine the operation entities according to the division results of the operation commands, so as to obtain the operation command set of each operation entity.
[0114] The data filtering unit is used to filter the set of operation commands for each operation entity based on the final data of the project in order to obtain the simplest set of operation commands.
[0115] The feature analysis unit is used to construct the feature commands of each operation entity based on the simplest set of operation commands for each operation entity, and to establish a continuous sequence of features for each operation entity.
[0116] The graph construction unit is used to calculate the entity association coefficient between each feature command entity, and to establish an entity association matrix based on the entity association coefficient. Then, the entity association matrix and the feature command entities are used as the user's CAD prediction knowledge graph.
[0117] The real-time prediction unit is used to acquire the user's CAD operation data in real time and output prediction prompts to the user based on the user's CAD operation data and CAD prediction knowledge graph.
[0118] The AI-based CAD operation prediction device provided in this application embodiment can execute the AI-based CAD operation prediction method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method.
[0119] From a hardware perspective, to realize the functionality of the AI-based CAD operation prediction method in a computer, this application also provides an electronic device; please refer to [link / reference needed]. Figure 4 As shown, it is a schematic diagram of the structure of the electronic device described in this application, including:
[0120] The system comprises a processor 1, a memory 2, a communication interface 3, and a bus 4; wherein the processor 1 and the memory 2, and the memory 2 and the communication interface 3, transmit data via the bus 4; the processor is used to process data in the memory and generate commands, the memory is used to store data, the communication interface is used to receive and send data, and the bus is used to realize data transmission between the processor, the memory, and the communication interface.
[0121] In this embodiment, the AI-based CAD operation prediction method can be implemented as a runnable computer program. When the computer program is loaded into the processor or memory and processed by the processor via a bus, one or more steps of the AI-based CAD operation prediction method can be executed.
[0122] This embodiment also provides a computer-readable storage medium for storing the computer-executable instructions. The computer-readable storage medium is a tangible physical storage medium that can store the computer program and various types of data used in the program. The physical storage medium includes, but is not limited to, existing physical storage media or combinations thereof, such as random access memory, read-only memory, optical disk, and hard disk.
[0123] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A CAD operation prediction method based on artificial intelligence, characterized in that, include: The user's operation commands are divided based on the user's historical project operation data, and the operation entities are determined based on the division results of the operation commands to obtain the operation command set of each operation entity. Based on the set of the simplest operation commands for each operation entity, construct the characteristic commands for each operation entity and establish a continuous sequence of characteristics for each operation entity; Calculate the entity association coefficients between each feature command entity, and establish an entity association matrix based on the entity association coefficients. Then, use the entity association matrix and feature command entities as the user's CAD prediction knowledge graph. It acquires users' CAD operation data in real time and outputs predictive prompts to users based on the users' CAD operation data and CAD prediction knowledge graph; Each operation entity is classified by entity type, and the frequency of operation commands of the same type of operation entity is counted. Then, operation commands with a frequency threshold are selected as the feature commands of that type of operation entity. The characteristic commands of each operation entity are analyzed for continuity, and the characteristic continuous sequence of each operation entity is constructed based on the analysis results. The characteristic continuous sequence of each operation entity is then packaged to obtain the characteristic command entity. The process of performing continuous analysis on the characteristic commands of each operational entity is as follows: The command interval between the feature commands of the operation entity is denoted as d(i,j,p), where d(i,j,p) represents the number of interval operation commands between the j-th feature command and the p-th feature command of the i-th operation entity; The continuous exponent between each feature command is calculated as follows: α(i,j,p)=a1×d(i,j,p) / D+a2×△t(i,j,p) / T; In the formula, α(i,j,p) is the continuity exponent between the j-th feature command and the p-th feature command within the i-th operation entity, D is the interval constant, △t(i,j,p) is the operation time interval between the j-th feature command and the p-th feature command within the i-th operation entity, T is the preset interval duration, a1 and a2 are the distance interval weight and the time interval weight, respectively, and a1+a2=1; A continuous exponential threshold is set to determine the continuity of the feature commands of each operation entity. When α(i,j,p) is greater than the continuous exponential threshold, the j-th feature command and the p-th feature command in the i-th operation entity are determined to be a continuous command. Otherwise, they are determined to be discontinuous commands. Perform transitivity judgment on each group of consecutive commands, and combine consecutive commands that meet the transitivity into a characteristic consecutive sequence; The expression for the entity association coefficient is as follows: R(i,k)=N(i,k) / N(i)×lg[10+n(i,k)]; where N(i,k) represents the number of operations that immediately follow S(k) after the feature command entity S(i), N(i) is the total number of times S(i) appears in the operation command, and n(i,k) represents the number of feature commands of the unidirectional constraint operation command type from the feature command entity S(i) to S(k); When classifying user operation commands, the command types include entity operation command types, constraint operation command types, attribute operation command types, and view operation command types; the entity operation command types are operation commands for points, lines, surfaces, volumes, text, and annotations; the constraint operation command types are operation commands for dimensional constraints, geometric constraints, parameters, and formulas; the attribute operation command types are operation commands for layers, blocks and block references, line types, colors, line widths, annotation styles, and text styles; and the view operation command types are operation commands for viewports, views, visual styles, cameras, and light sources.
2. The CAD operation prediction method based on artificial intelligence according to claim 1, characterized in that, Obtain the operation entity according to the entity operation command type, and denote each operation entity as S(i), where i is a numeric subscript representing the operation entity number; Set an interval command threshold, and extract the command sequence for the same operation entity whose interval command count is lower than the interval command threshold as the operation command set of that operation entity. Then, denote the operation command set of the i-th operation entity as ST(i).
3. The CAD operation prediction method based on artificial intelligence according to claim 2, characterized in that, The operation command set of each operation entity is filtered based on the final data of the project to obtain the simplest operation command set; The operation command set of each operation entity is filtered based on the final data of the project: when S(i) exists in the final data of the project, the operation entity is determined to be a continuing entity. At this time, if ST(i)[j] does not belong to ZST(i), the j-th operation command of the i-th operation entity is determined to be a transitional command, and the operation command is deleted from ST(i). If S(i) does not exist in the final data of the project, the operation entity is determined to be an invalid entity and is deleted.
4. The CAD operation prediction method based on artificial intelligence according to claim 3, characterized in that, Based on the classification of user operation commands, weights are assigned to each feature command, with the weight of constraint operation command type feature commands assigned to 1.1, the weight of entity operation command type feature commands assigned to 1, and the weight of attribute operation command type and view operation command type assigned to 0.
7. The updated continuous index is obtained by multiplying the product of the weights assigned to each feature command and the product of the continuous index between the corresponding feature commands, and the updated continuous index is used to update the feature continuous sequence.
5. The CAD operation prediction method based on artificial intelligence according to claim 4, characterized in that, Based on the user's CAD operation data, extract the user's real-time operation entities, and match the real-time operation entities with the same type of feature command entities one by one, and calculate the matching rate. If the matching rate is greater than or equal to 10% and less than 90%, the feature commands of the feature command entities after excluding the user's CAD operation data are used as the predicted commands. If the matching rate is less than 10%, the matching is deemed to have failed, and the next feature command entity is matched. If the matching rate is greater than or equal to 90%, the feature commands of the feature command entity after excluding the user's CAD operation data are used as the predicted commands. At the same time, the feature command entity corresponding to the entity association matrix and the feature command entity with the largest entity association coefficient is used as the predicted entity. The predicted entity and the prediction command are used as prediction prompts.
6. The CAD operation prediction method based on artificial intelligence according to claim 1, characterized in that, Collect users' historical project operation data; User operation commands are categorized according to preset operation command types, including entity operation command types, constraint operation command types, attribute operation command types, and view operation command types.
7. An AI-based CAD operation prediction device, applied to the AI-based CAD operation prediction method as described in any one of claims 1-6, characterized in that, include: The data acquisition unit is used to collect users' historical project operation data; The entity determination unit is used to divide the user's operation commands based on the user's historical project operation data, and determine the operation entities according to the division results of the operation commands, so as to obtain the operation command set of each operation entity. The data filtering unit is used to filter the set of operation commands for each operation entity based on the final data of the project in order to obtain the simplest set of operation commands. The feature analysis unit is used to construct the feature commands of each operation entity based on the simplest set of operation commands for each operation entity, and to establish a continuous sequence of features for each operation entity. The graph construction unit is used to calculate the entity association coefficient between each feature command entity, and to establish an entity association matrix based on the entity association coefficient. Then, the entity association matrix and the feature command entities are used as the user's CAD prediction knowledge graph. The real-time prediction unit is used to acquire the user's CAD operation data in real time and output prediction prompts to the user based on the user's CAD operation data and CAD prediction knowledge graph.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the AI-based CAD operation prediction method according to any one of claims 1-6.
Citation Information
Patent Citations
Multi-modal knowledge graph construction method and system, storage medium and electronic equipment
CN116843028A
Legal affair information processing method and system fusing knowledge graph and large language model
CN119474257A