A CAD Context-Aware Intelligent Command Recommendation Method

By standardizing the window titles and module identifier values ​​of CAD software, identifying the current modeling environment and establishing command identifier correspondences, the problem of inconsistent command recommendation results in existing technologies is solved, thus improving the operational efficiency of CAD software.

CN122263201APending Publication Date: 2026-06-23HEFEI JIEMO INTELLIGENT TECHNOLOGY CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI JIEMO INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-03-24
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing CAD software struggles to accurately categorize and statistically analyze historical command usage across different modeling environments, leading to inconsistencies between command recommendations and the current work scenario, thus impacting design efficiency.

Method used

By acquiring and standardizing window title strings and module identifier values, the current CAD modeling environment is identified, and a correspondence between historical window title records and command identifiers is established. The number of times commands are used is counted by environment, and a candidate command recommendation list matching the current environment is generated.

Benefits of technology

It improves the consistency between command recommendation results and the current work scenario, reduces confusion caused by commands with the same name, shortens the command search path, and enhances the smoothness of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122263201A_ABST
    Figure CN122263201A_ABST
Patent Text Reader

Abstract

This application relates to the field of computer-aided design technology and discloses a command intelligent recommendation method based on CAD context awareness. The method includes: obtaining the original string of the window title and the module identifier value; normalizing the original string of the window title and identifying the current CAD modeling environment in conjunction with the module identifier value; determining the corresponding command identifier based on historical CAD modeling environments and historical normalized window title text, generating an environment-related command record; statistically analyzing the usage frequency of each command identifier according to the CAD modeling environment, generating candidate command recommendation results corresponding to the current CAD modeling environment, and outputting a list of recommended commands. This method improves the consistency between command recommendation results and the current working scenario, reduces confusion regarding command attribution in different CAD modeling environments, and enhances the accuracy and smoothness of command invocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design technology, and more specifically, to a command intelligent recommendation method based on CAD context awareness. Background Technology

[0002] Modern CAD software typically integrates multiple functions such as modeling, sketching, assembly, drafting, simulation, and machining. The operation interface, command entry points, and command sets corresponding to different functions vary. In actual use, users often need to switch between different working interfaces according to the current task and find the target command from a large number of commands. When the command hierarchy is deep, the command names are similar, or multiple types of commands are displayed on the current interface at the same time, users often need to repeatedly browse menus, toolbars, or function areas to complete the command location, which can easily interrupt the continuous operation process and affect design efficiency.

[0003] In existing CAD software, common command organization methods are mostly fixed menu structures, fixed toolbar structures, or preset shortcuts. While these methods can provide basic command invocation capabilities, they often lack a more tailored approach to situations where command requirements dynamically change with the task at different work interfaces. In particular, when switching between modeling, sketching, assembly, or drafting environments, the set of truly relevant commands changes, and the existing display methods often still present a large number of commands from different scenarios, resulting in the effective commands on the current interface not being highlighted, and the command search process still relying on manual judgment.

[0004] On the other hand, while existing technologies may record some historical operation information, this information typically lacks a stable correspondence with the user's specific work environment at the time. In other words, when a command is invoked in different CAD modeling environments, if only the command invocation result or scattered operation logs are retained, without simultaneously preserving environmental information sufficient to characterize the interface at that time, it becomes difficult to effectively categorize historical operations around the specific CAD modeling environment, and even more difficult to generate candidate command results that match the current work scenario. This results in historical actions being recorded but unable to be effectively used to support the current interface.

[0005] Furthermore, during the operation of CAD software, there is not always a one-to-one correspondence between interface titles, module information, and the actual working environment. Some title texts may change due to differences in file paths, file names, extended fragments, or display formats; some command names may also appear repeatedly or similarly in different CAD modeling environments. If existing technologies determine command attribution solely based on the original interface title text, or roughly determine the current state based solely on single module information, it is easy to encounter situations such as unstable judgment of the current working environment, confusion regarding the attribution of commands with the same name, and inconsistencies in historical statistical objects; especially for commands with the same name that may appear in different CAD modeling environments, processing based solely on the title text may lead to subsequent statistical and recommendation results that deviate from the user's current actual operating scenario.

[0006] Therefore, the existing technology has at least the following problems: during the operation of CAD software, there is a lack of stable and continuous correspondence between window title information, the current working environment and historical command behavior, making it difficult to accurately classify and statistically analyze the usage of historical commands around the current CAD modeling environment, and thus making it difficult to output command recommendation results that are highly consistent with the current working scenario. Summary of the Invention

[0007] To overcome the shortcomings of existing technologies where there is a lack of stable correspondence between window title information, the current working environment, and historical command behaviors, making it difficult to accurately classify and statistically analyze historical command usage within the current CAD modeling environment, and consequently, to output command recommendation results highly consistent with the current working scenario, this invention provides a CAD context-aware intelligent command recommendation method to achieve stable identification of the current CAD modeling environment, accurate classification of historical command behaviors, and targeted output of recommended command results. The method includes: A command intelligent recommendation method based on CAD context awareness includes: Step S1: Obtain the original string of the window title and the corresponding module identifier value during the operation of the CAD software, and perform normalization processing on the original string of the window title to generate normalized window title text; Step S2: Based on the module identifier value and the standardized window title text, identify the current CAD modeling environment and associate the standardized window title text with the current CAD modeling environment; Step S3: Read the historical window title records. For each historical window title record, based on the corresponding CAD modeling environment and the corresponding standardized window title text, determine the corresponding command identifier in the pre-built command reference data and generate an environment-related command record. Step S4: Group the environment-related command records according to the CAD modeling environment, count the number of times each command identifier is used in each CAD modeling environment, and generate candidate command recommendation results corresponding to the current CAD modeling environment based on the statistical results; Step S5: Output the list of recommended commands corresponding to the candidate command recommendation results; after receiving the execution instruction for the target command in the list of recommended commands, call the command identifier corresponding to the target command to execute the corresponding CAD command.

[0008] Furthermore, the method for generating standardized window title text includes: reading the original string of the window title from the current collection record; performing software name prefix removal processing on the original string of the window title to obtain the prefix removal result; performing path fragment and file extension fragment removal processing on the prefix removal result to obtain the fragment removal result; and performing encoding unification processing and space correction processing on the fragment removal result to generate standardized window title text.

[0009] Furthermore, the method for identifying the current CAD modeling environment includes: establishing an environment identification rule table, which includes module identifier values, title judgment conditions, and environment names; reading the module identifier values ​​and standardized window title text from the current collection records; when the module identifier value matches a direct mapping rule, outputting the corresponding environment name as the current CAD modeling environment; when the module identifier value matches a subdivision mapping rule, comparing the standardized window title text with the corresponding title judgment conditions, and outputting the corresponding environment name as the current CAD modeling environment based on the comparison result.

[0010] Furthermore, the method for associating the standardized window title text with the current CAD modeling environment includes: reading the standardized window title text and the current CAD modeling environment from the current acquisition record; generating a current environment title association record based on the standardized window title text, the current CAD modeling environment, and the acquisition time; writing the current environment title association record into a window title record file or an association record table; when the standardized window title text and the current CAD modeling environment are the same in two consecutive current environment title association records, and the acquisition time interval is less than a preset time interval, the latter current environment title association record is retained.

[0011] Furthermore, the method for generating environment-related command records includes: constructing command reference data, which includes a basic command reference table, environment-defined command correspondence, and priority source rules; reading the historical CAD modeling environment and historical normalized window title text from a historical window title record; calling the environment-defined command correspondence to determine whether there exists a priority command identifier that matches both the historical CAD modeling environment and the historical normalized window title text, and determining the priority command identifier as the command identifier if it exists; if there is no priority command identifier, calling the priority source rules to retrieve and filter candidate records that match the historical normalized window title text from the basic command reference table to determine the command identifier; and generating environment-related command records based on the historical CAD modeling environment, historical normalized window title text, command identifier, source, and recording time.

[0012] Furthermore, the method for statistically analyzing the usage frequency of each command identifier in each CAD modeling environment includes: reading all environment-related command records; grouping the environment-related command records based on the CAD modeling environment to generate a record set corresponding to each CAD modeling environment; for each record set, using the command identifier as the statistical object, summing the number of times the same command identifier appears in the corresponding record set to obtain the usage frequency of each command identifier in each CAD modeling environment; and generating environment statistical results based on the usage frequency of each command identifier in each CAD modeling environment.

[0013] Furthermore, the method for generating candidate command recommendation results corresponding to the current CAD modeling environment includes: reading the current CAD modeling environment from the current collection record; locating the command count result corresponding to the current CAD modeling environment in the total environment statistics results; sorting each command identifier in the command count result from largest to smallest usage frequency to obtain a sorting result; extracting candidate commands from the sorting result according to a preset number of output items to obtain a candidate set; calling the basic command reference table to supplement each command identifier in the candidate set with at least one of the following: command display name, source, and command description information, to generate candidate command recommendation results.

[0014] Furthermore, the method for outputting the recommended command list corresponding to the candidate command recommendation results includes: organizing the candidate command recommendation results into list output data, the list output data including the current CAD modeling environment identifier and the candidate command set, each candidate command record in the candidate command set including a command identifier and a command display name; sending the list output data to the recommendation display area; the recommendation display area reads each candidate command record in the candidate command set, and generates a corresponding list item based on the command display name and command identifier in each candidate command record, writes the command display name into the corresponding list item, and binds the command identifier to the corresponding list item; and generating a recommended command list according to the order of the candidate command records in the candidate command set.

[0015] Furthermore, the method for executing the corresponding CAD command by invoking the command identifier corresponding to the target command includes: saving the corresponding command identifier in each candidate command record in the recommended command list; upon receiving the execution instruction for the target command, reading the command identifier corresponding to the target command, and generating an execution request based on the command identifier and the trigger time; sending the execution request to the command invocation process; the command invocation process reading the command identifier, and invoking the corresponding CAD command execution interface when the command identifier is valid, and executing the corresponding CAD command; terminating the invocation when the command identifier is invalid, missing, or the corresponding execution entry point is not found, and retaining the execution request as an abnormal execution record.

[0016] Furthermore, the method for generating candidate command recommendation results also includes: when there are two or more command identifiers with the same number of uses in the command count results corresponding to the current CAD modeling environment, the order of the command identifiers with the same number of uses is adjusted based on at least one of the following: the source, recording time and historical normalized window title text and the current normalized window title text corresponding to each command identifier, and candidate command recommendation results are generated according to the adjusted order.

[0017] Compared with related technologies, the present invention has the following beneficial effects: Compared with existing technologies, this application provides a CAD context-aware intelligent command recommendation method. First, it obtains the original string of the window title and the module identifier value, identifies the current CAD modeling environment, then establishes a correspondence between historical window title records and command identifiers. Further, it statistically analyzes the usage of each command identifier according to the current CAD modeling environment and outputs a list of recommended commands corresponding to the current CAD modeling environment. This addresses the problem in existing technologies where there is a lack of stable correspondence between window title information, the current working environment, and historical command behaviors, making it difficult to form accurate command recommendation results around the current CAD modeling environment. It establishes a continuous processing chain from environment identification, historical association, group statistics to result output, which can improve the consistency between command recommendation results and the current working scenario, as well as the accuracy of the command invocation process.

[0018] First, this application standardizes the original string of the window title and combines it with the module identifier value to identify the current CAD modeling environment. This allows for the reorganization of software name prefixes, path fragments, file extension fragments, and format differences that may be contained in the original interface title. By combining the module identifier value and title judgment conditions, the current CAD modeling environment can be determined. This reduces the instability caused by directly judging the working environment based solely on the original title text, improves the consistency of the current CAD modeling environment identification results, and provides a unified environment foundation for subsequent history classification and command recommendation.

[0019] Secondly, this application associates standardized window title text with the current CAD modeling environment and generates current environment title association records or historical window title records, so that window title information no longer exists in the form of isolated text, but forms a record result that can be jointly invoked with the corresponding CAD modeling environment; when the continuous recorded content is the same and the time interval is small, the last record is retained, and the duplicate records formed by staying on the same interface for a short period of time can also be suppressed, thereby improving the problem in the prior art that although historical operation information is retained, it is difficult to transform it into a stable environment basis, and improving the effectiveness of subsequent historical behavior utilization process.

[0020] Third, this application reads historical CAD modeling environments and historical standardized window title texts, calls environment-defined command correspondences, basic command reference tables, and priority source rules to determine command identifiers, and generates environment-related command records containing historical CAD modeling environments, historical standardized window title texts, command identifiers, sources, and recording times. This allows historical window title records to be transformed from records that only reflect title content and environment information into record results that can be directly statistically processed around command identifiers, thereby reducing confusion between commands with the same name or similar commands in different CAD modeling environments and improving the accuracy of historical command attribution results.

[0021] Fourth, this application uses the CAD modeling environment as the grouping basis to group environment-related command records, and uses the command identifier as the statistical object to accumulate the number of times it is used in each CAD modeling environment. Then, it sorts the command count results corresponding to the current CAD modeling environment by the number of times it is used and extracts candidate commands. This can limit the historical command behavior to the environment consistent with the current work scenario for statistical purposes, thereby avoiding mixing the command usage of other CAD modeling environments into the current scenario and improving the correspondence between the candidate command recommendation results and the current work task.

[0022] Fifth, this application organizes the candidate command recommendation results into a list output data that includes the current CAD modeling environment identifier and the candidate command set, and binds the command display name with the command identifier to generate a recommended command list. After receiving the execution instruction of the target command, the corresponding CAD command is directly called to execute the corresponding command. This makes the recommendation results not only at the statistical level, but also form direct call results for the current operation interface. This shortens the command search path for users in the current CAD modeling environment, reduces interface switching and manual screening operations caused by deep menu levels and a large number of commands, and improves the smoothness of operation in the continuous modeling process.

[0023] Overall, this application does not merely make simple adjustments to the command display method, but rather focuses on the current CAD modeling environment as the core processing object, linking window title information acquisition, environment identification, historical association, command identification determination, group statistics, and recommended output into a continuous processing chain. This enables the establishment of a stable correspondence between the previously fragmented interface information, environment information, and historical command information, thereby improving the adaptability of the recommended command list to the current work scenario, the accuracy of command attribution, and the consistency of actual invocation. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating the steps of a CAD context-aware intelligent command recommendation method provided by the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Please see Figure 1 As shown, this embodiment provides a command intelligent recommendation method based on CAD context awareness, including the following steps: Step S1: Obtain the original string of the window title and the corresponding module identifier value during the operation of the CAD software, and perform normalization processing on the original string of the window title to generate normalized window title text.

[0027] In this embodiment, the method for obtaining the original string of the window title and the corresponding module identifier value during the operation of CAD software includes: First, establish a window listening process. The window listening process refers to the process of continuously sensing changes in the currently active window and synchronously reading the original string of the window title and the module identifier value during the operation of the CAD software. The window listening process can be implemented by a resident listening process after the software starts, or by a periodic triggering process or a process triggered by interface changes, as long as it can continuously output the original string of the window title and the module identifier value corresponding to the currently active window during the operation of the CAD software.

[0028] Read the raw string of the window title corresponding to the currently active window; then read the module identifier value corresponding to the currently active window; subsequently generate a current acquisition record; the current acquisition record includes at least a sequence number, session identifier, acquisition time, raw string of window title, and module identifier value; the sequence number is used to represent the record order, the session identifier is used to distinguish different running cycles, the acquisition time is used for subsequent sorting, the raw string of window title is used as input for normalization processing, and the module identifier value is used as input to identify the current CAD modeling environment; after the current acquisition record is generated, it is written to the window title record file as the basic input for subsequent steps.

[0029] Furthermore, before writing the current collection record, a duplicate record suppression process can be performed. This process includes: comparing the original string of the window title read this time with the original string of the window title written previously, and comparing the module identifier value read this time with the module identifier value written previously; if neither has changed, no new current collection record is added; if either has changed, a new current collection record is written. This process is used to reduce duplicate records formed when the same interface is continuously viewed. The purpose is to obtain original input data that can simultaneously characterize the text features of the current interface and the features of the current application category, and to solidify the original input data into a current collection record that can be called later, so that the next step can directly perform normalization processing based on the original string of the window title and perform environment recognition based on the module identifier value.

[0030] In this embodiment, after generating the current collection record, the original string of the window title is not directly used for environment identification and command identification. Instead, the original string of the window title in the current collection record is first normalized to generate normalized window title text. The normalized window title text refers to the unified title text obtained after performing prefix cleaning, path cleaning, extension cleaning, encoding unification and space correction on the original string of the window title.

[0031] In specific implementation, the steps for performing normalization processing on the original string of the window title to generate normalized window title text include: First, read the original string of the window title in the current acquisition record; then perform the removal process of the software name prefix to delete the software name prefix in the original string of the window title; subsequently, perform the removal process of the path segment and the file extension segment to delete the text content corresponding to the file path and the file extension in the original string of the window title; then perform the encoding unification process on the processed string to uniformly convert the title strings with inconsistent source encodings into a preset target encoding format; finally, perform the removal of leading and trailing spaces and the regularization process of consecutive spaces to obtain the normalized window title text; the preset target encoding format can be set to UTF-8, and its setting basis is to keep the same encoding format as the command titles in the subsequent command reference data to avoid subsequent matching failures caused by encoding differences.

[0032] Furthermore, the normalized window title text can be written back to the current acquisition record, so that the current acquisition record includes both the original string of the window title and the normalized window title text; when an empty string is obtained after the normalization process, the result of removing the leading and trailing spaces from the original string of the window title is used as the replacement text and written into the current acquisition record to ensure that there is always an available title text input for the subsequent steps.

[0033] For example, when the original string of the window title is "NX-E:\Projects\Upper Mold.prt - Stretch", after removing the software name prefix, the path segment, and the extension segment, "Stretch" is obtained; when the original string of the window title is "NX - Sketch", "Sketch" is obtained after processing; through the above operations, the original strings of the window titles with inconsistent sources, formats, and encodings are sorted into a unified normalized window title text, enabling the next step to identify the current CAD modeling environment based on the unified title text and ensuring that the subsequent command identifiers use the same title text caliber.

[0034] Step S2, based on the module identification value and the normalized window title text, identify the current CAD modeling environment and associate the normalized window title text with the current CAD modeling environment.

[0035] In this embodiment, the current CAD modeling environment is not determined only based on the module identification value, nor only based on the normalized window title text, but is determined based on the combined result of the two; the current CAD modeling environment refers to the CAD software working environment category corresponding to the current acquisition record, which is used to represent the modeling environment, sketch environment, assembly environment, drawing environment, or general environment where the user is currently located.

[0036] Specifically, when implementing, the steps of identifying the current CAD modeling environment based on the module identification value and the normalized window title text include: First, an environment identification rule table is established. This table includes at least module identifier values, title judgment conditions, and environment names. The environment identification rule table can be pre-written into a configuration file during software deployment or built into the program. Its formation is based on the correspondence between module identifier values ​​and the CAD software's working environment, as well as the identification requirement of further subdividing the environment using title keywords under the same module identifier value. Then, the module identifier values ​​and standardized window title text in the currently collected records are read, and identification is performed in the following order: when the module identifier value matches a direct mapping rule, the corresponding environment name is directly output; when the module identifier value matches a subdivided mapping rule, the standardized window title text is compared item by item with the title judgment conditions corresponding to that module identifier value. The title judgment conditions include at least one of the following: keyword inclusion condition, keyword exclusion condition, and default output condition. The keyword inclusion condition is used to determine whether the standardized window title text contains preset environment keywords, and the keyword exclusion condition is used to exclude interference keywords unrelated to the target subdivided environment. The default output condition is used to provide a default environment name when no sub-keyword is matched. Specifically, when the module identifier value matches the sub-mapping mapping rule, the normalized window title text is compared with the title judgment condition corresponding to the module identifier value one by one. The title judgment condition includes at least one of the following: keyword inclusion condition, keyword exclusion condition, and default output condition. The keyword inclusion condition is used to determine whether the normalized window title text contains a preset environment keyword. The keyword exclusion condition is used to exclude interfering keywords that are unrelated to the target sub-environment. The default output condition is used to provide a default environment name when no sub-keyword is matched. Specifically, when the module identifier value is 40, it is first determined whether the normalized window title text contains the keyword "sketch". If the keyword "sketch" is contained, the sketch environment is output. If the keyword "sketch" is not contained, the modeling environment is output. When the module identifier value indicates that it is in a modeling application and the normalized window title text does not match any sub-keyword, the modeling environment is used as the default output environment name.

[0037] In some embodiments, the method for establishing the environment identification rule table may include: first, reading the basic correspondence between the module identifier value and the module name corresponding to each application module of the CAD software to obtain a basic mapping set of module identifiers; then, extracting the standardized window title text that appears repeatedly under the same module identifier value from the historical window title record, and filtering out the title keywords that can represent the subdivided work scenarios to obtain a set of title subdivision keywords; then, generating environment identification rule items according to the correspondence between module identifier value, title judgment conditions and environment name, wherein, if the environment name can be determined solely by the module identifier value, a direct mapping rule item is established; if, under the same module identifier value, it is still necessary to further distinguish subdivided environments based on the standardized window title text, a subdivision mapping rule item is established; finally, summarizing all direct mapping rule items and subdivision mapping rule items to form an environment identification rule table; the title subdivision keywords can be extracted based on the environment name text, command category text or function entry text that appears stably in the CAD software interface; the environment identification rule table can be pre-written into a configuration file during the system deployment phase, or it can be saved in the program with a built-in mapping relationship.

[0038] After recognition is complete, the current CAD modeling environment is written into the current acquisition record, ensuring that the current acquisition record includes at least the original string of the window title, the normalized window title text, the module identifier value, and the current CAD modeling environment. This allows the next step to directly read the normalized window title text and the current CAD modeling environment from the same current acquisition record and associate them. Through the above steps, the current CAD modeling environment reflecting the current real working scenario is output and written into the current acquisition record as direct input for the next step to establish the association between the environment and the title.

[0039] In this embodiment, after the current acquisition record already contains the standardized window title text and the current CAD modeling environment, the two are written into the same current environment title association record instead of being saved separately. The current environment title association record refers to the record formed by combining and saving the standardized window title text and the current CAD modeling environment, which is used as the joint input for subsequent command identification.

[0040] In specific implementation, the steps for associating the standardized window title text with the current CAD modeling environment include: Read the standardized window title text and the current CAD modeling environment from the current acquisition record; then generate a current environment title association record; the current environment title association record includes at least the standardized window title text, the current CAD modeling environment, and the acquisition time; then write the current environment title association record to the window title record file or to the association record table.

[0041] Further, when the normalized window title text and the current CAD modeling environment in two consecutive current environment title association records are the same, and the acquisition time interval is less than the preset time interval, only the latter record can be retained; the preset time interval is used to suppress duplicate association records formed when the user stays on the same operation interface in a very short time; its setting basis can be the average response period of window title changes, the log acquisition period, or the de-duplication requirement for short-term repeated operations; for example, the preset time interval can be set according to several times of the log acquisition period.

[0042] For example, when the current CAD modeling environment is the modeling environment and the normalized window title text is "Rotate", a corresponding current environment title association record is generated; when the current CAD modeling environment is the sketch environment and the normalized window title text is "Circle", another corresponding current environment title association record is generated; the next step is to read the historical CAD modeling environment and the historical normalized window title text for the saved historical window title records to determine the command identifier; through the above operations, the normalized window title text and the current CAD modeling environment are solidified into a jointly callable current environment title association record, so that the next step no longer determines the command identifier only based on the title text alone, but jointly determines the command identifier by combining the environment and the title.

[0043] In some embodiments, to illustrate the generation process of the current environment title association record, for example, in the same session, the module identifier value of a certain current acquisition record is 40, the original window title string is "NX - Sketch", and after normalization, the normalized window title text "Sketch" is obtained, and accordingly, the current CAD modeling environment is identified as the sketch environment; subsequently, another current acquisition record is collected, whose module identifier value is still 40, the original window title string is "NX - E:\Projects\Upper Mold.prt - Line", and after normalization, the normalized window title text "Line" is obtained. Since the current operation corresponding to this record is still in the sketch environment, the generated current environment title association record at least includes "Sketch environment", "Line", and the corresponding acquisition time; further, the original window title string "NX - E:\Projects\Upper Mold.prt - Extrusion" is subsequently collected, and after normalization, the normalized window title text "Extrusion" is obtained, and the current CAD modeling environment corresponding to this record is the modeling environment, then another current environment title association record is generated, and this current environment title association record at least includes "Modeling environment", "Extrusion", and the corresponding acquisition time; through this example, it can be seen that different original window title strings are written as jointly callable environment title association inputs after normalization and combined with the module identifier value recognition, enabling the subsequent determination of the command identifier to utilize both title information and environment information.

[0044] Step S3: Read the historical window title records. For each historical window title record, based on the corresponding CAD modeling environment and the corresponding standardized window title text, determine the corresponding command identifier in the pre-built command reference data and generate an environment-related command record.

[0045] In this embodiment, the historical window title record refers to the existing record written into the window title record file or the associated record table. Each historical window title record includes at least the historical normalized window title text and the historical CAD modeling environment. The pre-built command reference data is used to provide the basis for determining the command identifier for the historical window title record. In order to close the object relationship, the pre-built command reference data further includes a basic command reference table, an environment-limited command correspondence relationship, and a priority source rule.

[0046] In practice, the steps for generating environment-associated command records include: The basic command reference table stores the basic correspondence between command titles and command identifiers, including at least the command title, command identifier, and source information. The environment-defined command correspondence stores the command identifiers that are preferentially assigned to specific titles in a specific CAD modeling environment, including at least the CAD modeling environment, command title, and preferred command identifier. The specific CAD modeling environment refers to the target environment name that needs to be distinguished separately during the command identifier determination process, including at least one of the modeling environment, sketching environment, assembly environment, and drafting environment. The specific title refers to the standardized window title text that appears repeatedly, approximately, or corresponds to multiple candidate command identifiers under the same title in two or more CAD modeling environments. The priority source rule stores the source priority order corresponding to different CAD modeling environments when there are multiple candidate commands with the same name, including at least the CAD modeling environment and the priority source order. The environment-defined command correspondence and priority source rule can be pre-configured during the system deployment phase based on the distribution of high-frequency commands with the same name and the distribution of main command definition files in each environment, or they can be provided by the built-in default configuration.

[0047] Based on the pre-built command reference data, the implementation steps for generating environment-related command records include: first, reading the historical CAD modeling environment and historical normalized window title text from a historical window title record; then, calling the environment-limited command correspondence to determine whether there exists a priority command identifier that matches both the historical CAD modeling environment and the historical normalized window title text; if it exists, determining the priority command identifier as the corresponding command identifier; if it does not exist, calling the priority source rule to search for candidate records matching the historical normalized window title text in the basic command reference table, and filtering the candidate records according to the priority source order corresponding to the historical CAD modeling environment to determine the corresponding command identifier; if multiple candidate records still exist after filtering by the priority source rule, taking the command identifier corresponding to the first candidate record from the remaining candidate records as a fallback result; if no candidate records are found, marking the historical window title record as a record to be supplemented for mapping.

[0048] After the command identifier is determined, an environment-related command record is generated. This environment-related command record includes at least the historical CAD modeling environment, historical normalized window title text, command identifier, source, and recording time. The historical CAD modeling environment is used for subsequent grouping statistics. The historical normalized window title text is used to record the title source corresponding to the command identifier when it was determined, and serves as the basis for supplementary mapping configuration when the command identifier is not determined. The command identifier is used as the statistical object, the source information is used to track the basis for determining the command identifier, and the recording time is used for subsequent sorting. Through this step, the historical window title record is converted into an environment-related command record that can be directly used for frequency statistics. The purpose is to convert the historical window title record from a record containing only historical normalized window title text and historical CAD modeling environment into an environment-related command record containing the command identifier, so that the next step can perform grouping statistics based on the command identifier rather than on the potentially ambiguous title text.

[0049] In some implementations, to illustrate the generation process of environment-associated command records, for example, there are three records in the historical window title record: the first record's historical CAD modeling environment is the modeling environment, and the historical normalized window title text is "Extrude"; the second record's historical CAD modeling environment is the modeling environment, and the historical normalized window title text is "Rotate"; the third record's historical CAD modeling environment is the sketching environment, and the historical normalized window title text is "Circle". For the first record, the environment-limited command correspondence or basic command reference table is first called for retrieval. When the priority command identifier corresponding to "Modeling Environment - Extrude" is found to be "UG_MODELING_EXTRUDED_FEATURE", this command identifier is determined as the corresponding command identifier, and an environment-associated command record is generated. For the second record, when the priority command identifier corresponding to "Modeling Environment - Rotate" is found to be "UG_MODELING_REVOL",... When "VED_FEATURE" is found, another environment-related command record is generated. For the third record, when the command identifier corresponding to "Sketch Environment - Circle" is "UG_SKETCH_CIRCLE", a third environment-related command record is generated. Furthermore, each environment-related command record includes at least the corresponding historical CAD modeling environment, the corresponding historical normalized window title text, the command identifier, the source, and the record time. As an example, if another historical window title record has a historical normalized window title text of "Rotate", but its historical CAD modeling environment is a sketch environment, then this record will first enter the source filtering process corresponding to the sketch environment, rather than directly reusing the command identifier of "Rotate" in the modeling environment. This example illustrates that the command identifier is not determined solely based on the title text, but rather based on the combination of the historical CAD modeling environment and the historical normalized window title text, thereby reducing ambiguity of the same title in different CAD modeling environments.

[0050] Step S4: Group the environment-related command records according to the CAD modeling environment, count the number of times each command identifier is used in each CAD modeling environment, and generate candidate command recommendation results corresponding to the current CAD modeling environment based on the statistical results.

[0051] In this embodiment, after the environment-related command records are formed, they are first grouped by CAD modeling environment, and then the command identifiers in each group are counted and statistically analyzed. The environment statistical results refer to the statistical results obtained with CAD modeling environment as the grouping dimension and command identifier as the counting object.

[0052] In practice, the steps for counting the usage frequency of each command identifier in each CAD modeling environment include: First, establish environment grouping results, using the CAD modeling environment name as the grouping basis. Then, traverse all environment-related command records and place each environment-related command record into the record set of the corresponding CAD modeling environment. Subsequently, establish command counting results for each record set, using the command identifier as the statistical object. Calculate the number of times the same command identifier appears in the record set one by one to obtain the usage frequency of each command identifier in each CAD modeling environment. For historical window title records where the command identifier cannot be determined, as well as abnormal records generated from such historical window title records, they can be kept separately as abnormal mapping records and not included in the formal frequency statistics.

[0053] In one implementation, to make the statistical results more consistent with current usage habits, before performing grouping, environment-related command records can be filtered according to a preset time range, and then the above grouping and counting can be performed on the filtered environment-related command records. The preset time range can be set according to the session cycle, the most recent several days, or the most recent batches of records. The setting is based on whether the recommended results are intended to reflect recent usage habits or long-term usage habits. By generating environment statistical results through the above operations, the next step can directly extract candidate commands from the environment statistical results corresponding to the current CAD modeling environment, without having to re-statistically count all environment-related command records.

[0054] In this embodiment, the candidate command recommendation result refers to the set of candidate commands extracted from the environmental statistics results that correspond to the current CAD modeling environment, and the result formed after supplementing each candidate command with the required display content.

[0055] In specific implementation, the steps for generating candidate command recommendations corresponding to the current CAD modeling environment based on statistical results include: first, reading the current CAD modeling environment from the current collection records; then, locating the command count result corresponding to the current CAD modeling environment in all environment statistical results; subsequently, sorting each command identifier in the command count result from largest to smallest usage frequency to obtain a sorting result; then, sequentially extracting candidate commands from the positions ranked highest in usage frequency according to a preset number of output entries, until the number of extracted entries reaches the preset number of output entries, thus obtaining a candidate set; wherein, when the sorting result is arranged from largest to smallest usage frequency, the "highest ranking position" refers to the position of several records with higher usage frequency in the sorting result; the preset number of output entries is used to control the number of candidate commands output in the recommended display area, and its setting can be based on the capacity of the recommended display area, the distribution density of candidate commands, or the coverage requirements of commonly used commands; for example, when the recommended display area can accommodate twenty commands, the preset number of output entries can be set to twenty.

[0056] After obtaining the candidate set, the basic command reference table is called to supplement each command identifier in the candidate set with at least one of the following: command display name, source, and command description information, forming a candidate command recommendation result. The candidate command recommendation result includes both the sorting criteria and the content required for subsequent display and selection. Through the above operations, the environmental statistics results are transformed into candidate command recommendation results corresponding to the current CAD modeling environment, so that the next step can directly output a recommended command list based on the candidate command recommendation results.

[0057] In some implementations, to illustrate the formation process of the candidate command recommendation results, for example, within a certain statistical period, in the environment-related command records corresponding to the modeling environment, "UG MODELING EXTRUDED FEATURE" appears 12 times, "UG MODELING REVOLVED FEATURE" appears 7 times, and "UG MODELING HOLE" appears 5 times; in the environment-related command records corresponding to the sketching environment, "UG SKETCH LINE" appears 15 times, and "UG SKETCH CIRCLE" appears 11 times; after sorting the command count results corresponding to the modeling environment from largest to smallest usage frequency, the command identifiers at the top of the sorted results are "UG MODELING EXTRUDED FEATURE", "UG MODELING REVOLVEDFEATURE", and "UG MODELING HOLE" in that order; when the preset number of output entries is set to 3, the first three records are extracted from the sorted results to obtain the candidate set corresponding to the modeling environment; furthermore, the basic command reference table is called, which is "UG_MODELINGEXTRUDED". The command display name "Extrude" is added to "FEATURE", "Rotate" is added to "UG MODELING REVOLVED FEATURE", and "Hole" is added to "UG MODELING HOLE", thus forming the candidate command recommendation results corresponding to the modeling environment. As another example, when the current CAD modeling environment is a sketch environment, "UG SKETCH LINE" and "UG SKETCHCIRCLE" with the highest usage frequency are extracted from the command count results corresponding to the sketch environment, and the command display names "Line" and "Circle" are added respectively, forming the candidate command recommendation results corresponding to the sketch environment. This example illustrates that the candidate command recommendation results are formed by sorting, truncating, and adding display content from the environment statistics results, and different CAD modeling environments correspond to different sets of candidate commands.

[0058] Step S5: Output the list of recommended commands corresponding to the candidate command recommendation results; after receiving the execution instruction for the target command in the list of recommended commands, call the command identifier corresponding to the target command to execute the corresponding CAD command.

[0059] In this embodiment, the recommended command list is a list-based output of the candidate command recommendation results, which is used for users to view and select directly; the recommended command list displays the command display names of the candidate commands in at least sorted order, and may further display at least one of the following: usage count, command description, or icon path.

[0060] In specific implementation, the steps for outputting the recommended command list corresponding to the candidate command recommendation results include: first, organizing the candidate command recommendation results into list output data; the list output data includes at least the current CAD modeling environment identifier and the candidate command set; the candidate command set consists of multiple candidate command records, each candidate command record including at least a command identifier and a command display name; then, sending the list output data to the recommendation display area; the recommendation display area reads the current CAD modeling environment identifier and the candidate command set from the list output data, and then reads the candidate command records in the candidate command set one by one, extracting the command from each candidate command record. The process displays the command name and command identifier, generates a list item corresponding to the candidate command record, writes the command display name into the list item, and binds the command identifier to the list item. When the candidate command record also includes usage counts, command descriptions, or icon paths, the usage counts, command descriptions, or icon content are also written into the list item. Finally, all list items are generated sequentially according to the order of the candidate command records in the candidate command set, forming a recommended command list corresponding to the current CAD modeling environment, and displayed according to the sorting order of the candidate command recommendation results. Through this process, each list item in the recommended command list has both displayable content and executable binding information.

[0061] In one implementation, the recommended display area can be set in the resource bar, sidebar, floating panel, or other visible area, as long as it can display the candidate command set in a list format; this display location is the display implementation location and does not change the conversion logic from candidate command recommendation results to recommended command list; through the above operations, the candidate command recommendation results are converted into a recommended command list that users can directly view and select, so that the next step can receive execution instructions around the target command in the recommended command list.

[0062] In this embodiment, each candidate command record in the recommended command list is pre-bound with a corresponding command identifier; after the user issues an execution command for a target command in the recommended command list, the system generates an execution request based on the command identifier already bound in the target command record, and calls the corresponding CAD command accordingly.

[0063] In specific implementation, after receiving the execution instruction for the target command in the recommended command list, the steps of calling the command identifier corresponding to the target command to execute the corresponding CAD command include: First, the corresponding command identifier is saved in each candidate command record of the recommended command list. When a user selects a target command, an execution request is generated. The execution request includes at least the command identifier corresponding to the target command and the trigger time. Then, the execution request is sent to the command invocation process. The command invocation process reads the command identifier and, if the command identifier is valid, calls the corresponding CAD command execution interface to execute the corresponding CAD command. If the command identifier is invalid, missing, or the corresponding execution entry cannot be found in the current system, the call is terminated, and the execution request is retained as an abnormal execution record.

[0064] Furthermore, after the command is executed, the execution result can be written back to the history record. The written-back content includes at least the command identifier, execution time, and execution source. The execution source is used to identify whether the command execution was triggered by the recommended command list or by other entry points. Through this write-back process, the command execution behavior triggered by the recommended command list can continue to participate in the subsequent generation of environment-related command records and frequency statistics. Through the above operations, the target command in the recommended command list is transformed into the actual execution action in the CAD software, and the execution action is written back as a historical behavior that can continue to be statistically analyzed, so that the entire recommendation processing chain forms a closed loop.

[0065] In some implementations, to illustrate the execution and write-back process of the recommended command list, for example, when the current CAD modeling environment is a modeling environment, the recommended command list output in the recommended display area includes three list items in sequence: "Extrude," "Revolve," and "Hole." The command identifier bound to the "Extrude" list item is "UG MODELING EXTRUDEDFEATURE," and the command identifier bound to the "Revolve" list item is "UG MODELING REVOLVED FEATURE." When the user selects the "Extrude" list item in the recommended display area, the system generates an execution request. This execution request includes at least the command identifier "UG MODELING EXTRUDED FEATURE" and the trigger time. Subsequently, the command invocation process reads the command identifier and calls the corresponding CAD command execution interface to execute the extrusion command. After execution, the command identifier "UG MODELING EXTRUDED" is reset. The execution time and execution source "recommended command list trigger" are written into the history, so that this execution behavior is counted in the number of times the "extrude" command is used in the modeling environment during subsequent statistics. Furthermore, when the current CAD modeling environment is a sketch environment, the recommended command list includes two list items: "line" and "circle". When the user selects the list item corresponding to "circle", the system reads the command identifier "UG SKETCH CIRCLE" bound to the list item and calls the corresponding CAD command execution interface to execute the circle command. After the execution is completed, the execution result is written back to the history so that it can continue to participate in the frequency statistics in the sketch environment. This example illustrates that the list items in the recommended command list are not only used for display, but also serve as the command identifier call entry point, and are written back to the history after execution, forming a closed loop of processing from recommendation to execution and then to re-statistics.

[0066] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A command intelligent recommendation method based on CAD context awareness, characterized in that, include: Step S1: Obtain the original string of the window title and the corresponding module identifier value during the operation of the CAD software, and perform normalization processing on the original string of the window title to generate normalized window title text; Step S2: Based on the module identifier value and the standardized window title text, identify the current CAD modeling environment and associate the standardized window title text with the current CAD modeling environment; Step S3: Read the historical window title records. For each historical window title record, based on the corresponding CAD modeling environment and the corresponding standardized window title text, determine the corresponding command identifier in the pre-built command reference data and generate an environment-related command record. Step S4: Group the environment-related command records according to the CAD modeling environment, count the number of times each command identifier is used in each CAD modeling environment, and generate candidate command recommendation results corresponding to the current CAD modeling environment based on the statistical results; Step S5: Output the list of recommended commands corresponding to the candidate command recommendation results; Upon receiving an execution instruction for a target command from the recommended command list, the corresponding CAD command is executed by calling the command identifier corresponding to the target command.

2. The command intelligent recommendation method based on CAD context awareness according to claim 1, characterized in that, The method for generating standardized window title text includes: reading the original string of the window title from the current collection record; performing software name prefix removal processing on the original string of the window title to obtain the prefix removal result; performing path fragment and file extension fragment removal processing on the prefix removal result to obtain the fragment removal result; and performing encoding unification processing and space correction processing on the fragment removal result to generate standardized window title text.

3. The command intelligent recommendation method based on CAD context awareness according to claim 1, characterized in that, The method for identifying the current CAD modeling environment includes: establishing an environment identification rule table, which includes module identifier values, title judgment conditions, and environment names; reading the module identifier values ​​and standardized window title text from the current collection records; when the module identifier value matches a direct mapping rule, outputting the corresponding environment name as the current CAD modeling environment; when the module identifier value matches a subdivision mapping rule, comparing the standardized window title text with the corresponding title judgment conditions, and outputting the corresponding environment name as the current CAD modeling environment based on the comparison result.

4. The command intelligent recommendation method based on CAD context awareness according to claim 1, characterized in that, The method for associating standardized window title text with the current CAD modeling environment includes: reading the standardized window title text and the current CAD modeling environment from the current acquisition record; generating a current environment title association record based on the standardized window title text, the current CAD modeling environment, and the acquisition time; writing the current environment title association record into a window title record file or an association record table; when the standardized window title text and the current CAD modeling environment are the same in two consecutive current environment title association records, and the acquisition time interval is less than a preset time interval, the latter current environment title association record is retained.

5. The command intelligent recommendation method based on CAD context awareness according to claim 1, characterized in that, The method for generating environment-related command records includes: constructing command reference data, which includes a basic command reference table, environment-defined command correspondence, and priority source rules; reading the historical CAD modeling environment and historical normalized window title text from a historical window title record; calling the environment-defined command correspondence to determine whether there exists a priority command identifier that matches both the historical CAD modeling environment and the historical normalized window title text, and if so, determining the priority command identifier as the command identifier; if no priority command identifier exists, calling the priority source rules to retrieve and filter candidate records that match the historical normalized window title text from the basic command reference table to determine the command identifier; and generating environment-related command records based on the historical CAD modeling environment, historical normalized window title text, command identifier, source, and recording time.

6. The CAD context-aware intelligent command recommendation method according to claim 1 or 5, characterized in that, The method for counting the usage frequency of each command identifier in each CAD modeling environment includes: reading all environment-related command records; grouping the environment-related command records according to the CAD modeling environment to generate a record set corresponding to each CAD modeling environment; for each record set, using the command identifier as the statistical object, accumulating the number of times the same command identifier appears in the corresponding record set to obtain the usage frequency of each command identifier in each CAD modeling environment; and generating environment statistics results based on the usage frequency of each command identifier in each CAD modeling environment.

7. The command intelligent recommendation method based on CAD context awareness according to claim 6, characterized in that, The method for generating candidate command recommendation results corresponding to the current CAD modeling environment includes: reading the current CAD modeling environment from the current collection record; locating the command count result corresponding to the current CAD modeling environment in the total environment statistics results; sorting each command identifier in the command count result from largest to smallest usage frequency to obtain the sorting result; extracting candidate commands from the sorting result according to the preset number of output items to obtain the candidate set; calling the basic command reference table to supplement each command identifier in the candidate set with at least one of the following: command display name, source, and command description information, to generate candidate command recommendation results.

8. The command intelligent recommendation method based on CAD context awareness according to claim 1, characterized in that, The method for outputting the recommended command list corresponding to the candidate command recommendation results includes: organizing the candidate command recommendation results into a list output data, which includes the current CAD modeling environment identifier and the candidate command set. Each candidate command record in the candidate command set includes a command identifier and a command display name; sending the list output data to the recommendation display area; the recommendation display area reads each candidate command record in the candidate command set, and generates a corresponding list item based on the command display name and command identifier in each candidate command record, writes the command display name into the corresponding list item, and binds the command identifier to the corresponding list item; and generating a recommended command list according to the order of the candidate command records in the candidate command set.

9. The command intelligent recommendation method based on CAD context awareness according to claim 8, characterized in that, The method for executing a corresponding CAD command by invoking the command identifier corresponding to the target command includes: saving the corresponding command identifier in each candidate command record in the recommended command list; upon receiving an execution instruction for the target command, reading the command identifier corresponding to the target command, and generating an execution request based on the command identifier and trigger time; sending the execution request to the command invocation process; the command invocation process reading the command identifier, and invoking the corresponding CAD command execution interface when the command identifier is valid, executing the corresponding CAD command; terminating the invocation when the command identifier is invalid, missing, or the corresponding execution entry point is not found, and retaining the execution request as an abnormal execution record.

10. The CAD context-aware intelligent command recommendation method according to claim 7, characterized in that, The method for generating candidate command recommendation results also includes: when there are two or more command identifiers with the same number of uses in the command count results corresponding to the current CAD modeling environment, further adjust the order of the command identifiers with the same number of uses based on at least one of the following: the source, recording time and historical normalized window title text and the current normalized window title text corresponding to each command identifier, and generate candidate command recommendation results according to the adjusted order.