Plug-in architecture method and system, storage medium and program product

By adopting multi-level evaluation and restrictive introduction methods in CAD software, the problems of slow startup and unstable operation caused by the introduction of a large number of plug-ins are solved, and efficient plug-in loading and stable software operation are achieved.

CN120010954APending Publication Date: 2025-05-16SUZHOU CAD SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510143918.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

After introducing a large number of plug-ins, existing CAD software faces problems such as slow startup, unstable operation, and difficulty in maintenance and expansion, which affects user's work efficiency.

Method used

The restrictive introduction method of plug-in based on multi-level evaluation is adopted. Through the restrictive introduction method of hierarchical storage mode and the restrictive introduction method of combining dynamic and static, plug-ins are quickly evaluated and restricted to ensure the stable operation of CAD software.

Benefits of technology

It improves the loading efficiency of batch plug-ins, maintains the stable operation of plug-ins, reduces the resources occupied by software operation, and avoids conflicts between multiple plug-ins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010954A_ABST
    Figure CN120010954A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of CAD, in particular to a plug-in architecture method and system, a storage medium and a program product.The method comprises the steps that S101, a plug-in directory table is obtained, and the query value of at least one plug-in package is recorded in the plug-in directory table; wherein the plug-in package comprises a plug-in configuration file and a function file; wherein the plug-in configuration file comprises attribute information and operation information of the plug-in, the operation information comprises an operation environment version supported by the plug-in, and the function file comprises operation library data used for executing an extended function of the plug-in; s102, querying the plug-in package to be analyzed according to the query value; and S103, judging whether the currently queried plug-in package is allowed to be introduced into the current operation environment or not by adopting a hierarchical analysis rule. The problems that in existing CAD, batch plug-in introduction efficiency is low, and blockage is prone to occurring are solved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Divisional application This application is a divisional application of application number [202410591603.7] filed on May 13, 2024, and the invention name is [A plug-in architecture method, system, storage medium and program product]. Technical Field

[0002] The present invention relates to computer-aided design (CAD), and in particular to a plug-in architecture method, system, storage medium and program product. Background Art

[0003] Due to its heavy historical baggage, high complexity, and numerous functions, large-scale CAD software faces problems such as slow startup, unstable operation, and difficult maintenance and expansion.

[0004] With the gradual development of CAD software, users have higher and higher requirements for CAD extensions. In the actual operation of CAD, users usually need to introduce CAD plug-ins to assist in complex engineering drawings (for example, drawing large terrain maps, drawing super-large buildings, etc.). However, since the plug-in must be loaded into the software before it can be used normally by the user (for example, traditional CAD plug-ins have produced standard interfaces such as ARX to meet the needs of secondary development), as the types and numbers of CAD plug-ins gradually increase, the introduction of batch plug-ins will also cause the above-mentioned maintenance and expansion difficulties to increase exponentially, seriously interfering with the user's work efficiency.

[0005] Therefore, there is an urgent need for a CAD plug-in architecture method that can speed up startup, maintain operational stability, and simplify maintenance difficulty. Summary of the invention

[0006] The object of the present invention is to provide a plug-in architecture method, system, storage medium and program product, which partially solve or alleviate the above-mentioned deficiencies in the prior art, can improve the efficiency of batch plug-in loading, and maintain the stable operation of batch plug-ins.

[0007] One aspect of the present invention provides a plug-in architecture method, comprising: S101 obtains a plug-in catalog table, wherein the plug-in catalog table records a query value of at least one plug-in package; wherein the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: an operating environment version supported by the plug-in, and the function file includes: runtime library data for executing an extended function of the plug-in; S102 queries the plug-in package to be parsed according to the query value; S103 uses a hierarchical analysis rule to determine whether the currently queried plug-in package is allowed to be introduced into the current operating environment; wherein S103 includes: S31 obtains first parsing information of the current plug-in package, where the first parsing information includes: the runtime data; S32 determines whether the first parsed information is complete; if so, proceeds to S33; S33 obtains second parsed information of the plug-in package, where the second parsed information includes: the operating environment version; S34 determines whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment.

[0008] In some embodiments, the method further includes: S35 querying whether there are other query values ​​in the plug-in target table, and if so, returning to S102.

[0009] In some embodiments, before S31, the step further includes: S36 determining whether the attribute information of the plug-in package includes dependent object information, wherein the dependent object refers to another plug-in package that needs to be introduced in the current operating environment in order to enable the current plug-in package to operate normally in the current operating environment; if so, proceed to S37; if not, proceed to S31; S37 queries whether there is a corresponding plug-in package to be parsed in the plug-in directory table according to the dependent object information; If yes, the plug-in package to be parsed found is used as the plug-in package to be parsed currently, and the process returns to S36; If not, the plug-in package is not allowed to be introduced into the current operating environment, and the process returns to S35.

[0010] In some embodiments, the plug-in package is further associated with a preset function level; accordingly, the step of: Obtaining the functional level of the plug-in package; The type of the first parsed information of the plug-in package is determined according to the functional level; wherein, when the functional level of the plug-in package is greater than or equal to the first set functional level, the type of the first parsed information includes: runtime data, and one or more of the following types: UI resources, image resources, language resources; when the functional level of the plug-in package is less than the first set functional level, the type of the first parsed information includes: the runtime data.

[0011] In some embodiments, the function file also includes one or more of the following data: UI resources, image resources, and language resources; In some embodiments, the method further comprises the steps of: When the current plug-in package is allowed to be introduced into the current operating environment, a corresponding introduction method is selected according to the number of dependent objects; and selecting the corresponding introduction method according to the number of dependent objects includes: Acquire the number of the dependent objects of the current plug-in package, wherein the plug-in packages that need to depend on the running of the current plug-in package to run normally are the dependent objects of the current plug-in package; When the number of dependent objects is less than the set threshold, the current plug-in package is stored in a first storage method; wherein the first storage method requires that the runtime data is stored in a first storage space, and the plug-in configuration file is stored in a second storage space; When the number of dependent objects is greater than or equal to a set threshold, a second storage method is selected to store the current plug-in package; wherein, the second storage method requires that both the plug-in configuration file and the function file are stored in the second storage space; wherein, the current operating environment is the operating environment of the software, the first storage space is located in the external area of ​​the software, and the second storage space is located in the internal area of ​​the software.

[0012] In some embodiments, when a plug-in package is allowed to be introduced into the current operating environment, a corresponding introduction method is selected according to the introduction priority of the plug-in package; and selecting the corresponding introduction method according to the introduction priority of the plug-in package includes the steps of: Obtaining the application priority of the plug-in package; Get the historical number of times the plug-in package is introduced; Determining the import priority of the plug-in package according to the application priority and the historical import times; When the import priority is lower than the set priority, the first storage method is selected to store the plug-in package; the first storage method requires that the runtime data is stored in the first storage space, and the plug-in configuration file is stored in the second storage space; When the introduction priority is greater than or equal to the set priority, the second storage method is selected to store the plug-in package; wherein, the second storage method requires that the plug-in configuration file and the function file are both stored in the second storage space; wherein, the current operating environment is the operating environment of the software, the first storage space is located in the external area of ​​the software, and the second storage space is located in the internal area of ​​the software.

[0013] In some embodiments, it also includes: S105 determines whether the last operation of the current operating environment is abnormal; if so, proceeds to S106; S106: obtaining the historical operation record of the current operating environment, and obtaining the abnormal plug-in package causing the abnormality from the historical operation record; S107: when the plug-in package introduced into the current operating environment is the abnormal plug-in package, disabling the corresponding plug-in package; In some embodiments, it also includes: S108: receiving a disabling signal or enabling signal input by a user, wherein the disabling signal or the enabling signal includes: a query value of the plug-in package; S109 queries whether there is a dependent object in the plug-in package through the query value; if so, finds the plug-in package corresponding to the dependent object, and disables or enables the plug-in package accordingly.

[0014] The present invention also provides a plug-in architecture system, comprising: The directory table acquisition module is configured to acquire a plug-in directory table, wherein the plug-in directory table records a query value of at least one plug-in package; wherein the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: an operating environment version supported by the plug-in, and the function file includes: runtime library data for executing an extended function of the plug-in; A query module, configured to query the plug-in package to be parsed according to the query value; A hierarchical analysis module is configured to use hierarchical analysis rules to determine whether the currently queried plug-in package is allowed to be introduced into the current operating environment; wherein the hierarchical analysis module includes: A first parsing unit is configured to obtain first parsing information of the current plug-in package, wherein the first parsing information includes: the runtime data; A first determination unit is configured to determine whether the first parsing information is complete; if so, entering a second parsing unit; The second parsing unit is configured to obtain second parsing information of the plug-in package, wherein the second parsing information includes: the operating environment version; The second judgment unit is configured to judge whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment.

[0015] The present invention also provides a computer-readable storage medium of a plug-in architecture, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in any of the above embodiments is implemented.

[0016] The present invention also provides a computer program product configured to store computer-readable instructions, which, when executed, enable a computer to execute the method described in any of the above embodiments.

[0017] Beneficial technical effects: The present invention provides a method for restrictive introduction of plug-ins based on multi-level evaluation, so as to quickly evaluate the plug-ins through local information, and then strongly maintain a stable operating environment of CAD for users through restrictive introduction.

[0018] For the scenario where a large number of plug-ins are introduced, the present invention can, on the one hand, utilize a hierarchical storage mode to reduce the necessary resources occupied by the operation of the CAD software, and on the other hand, can utilize a restrictive introduction method combining dynamic and static methods to avoid conflicts among multiple plug-ins during the calling process. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale. Obviously, the drawings described below are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without paying creative labor.

[0020] Figure 1 It is a flowchart of a plug-in architecture method in an exemplary embodiment of the present invention; Figure 2 It is a flowchart of a plug-in architecture method in a specific embodiment of the present invention; Figure 3 is a flow chart of a plug-in management method in an exemplary embodiment of the present invention; Figure 4 It is a flowchart of a file adaptation method in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0022] Herein, suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings by themselves. Therefore, "module", "component" or "unit" can be used mixedly.

[0023] In this document, the terms "upper", "lower", "inner", "outer", "front", "back", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0024] In this document, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0025] Herein "and / or" includes any and all combinations of one or more of the associated listed items.

[0026] Herein, "plurality" means two or more than two, ie, it includes two, three, four, five, etc.

[0027] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0028] As used in this specification, the term "about" typically means + / - 5% of the stated value, more typically + / - 4% of the stated value, more typically + / - 3% of the stated value, more typically + / - 2% of the stated value, even more typically + / - 1% of the stated value, and even more typically + / - 0.5% of the stated value.

[0029] In this specification, some embodiments may be disclosed in a format of being in a range. It should be understood that this description of "being in a range" is only for convenience and brevity, and should not be interpreted as a rigid limitation on the disclosed range. Therefore, the description of the range should be considered to have specifically disclosed all possible sub-ranges and independent numerical values ​​within this range. For example, the description of the range 1-6 should be considered to have specifically disclosed sub-ranges such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., as well as individual numbers within this range, such as 1, 2, 3, 4, 5 and 6. Regardless of the breadth of the range, the above rules apply.

[0030] Herein, "function files" include the extended functions that the plug-in package can provide after being connected to the software, wherein the function files mainly include: runtime data. Of course, the function files can also further include: UI resources, image resources, language resources, etc.

[0031] Among them, "runtime data" refers to the functional module of the plug-in (also known as the plug-in package), and the functional module refers to the extended function implemented by the plug-in after it is connected to the software. In other words, runtime data refers to the computer program instructions written to execute the object extension function.

[0032] Among them, UI resources can provide users with functional operation interfaces in CAD (such as clicking function buttons, etc.). Image resources refer to image format files corresponding to function buttons in CAD, and language resources refer to text description format files corresponding to different function buttons in CAD.

[0033] Herein, the "query value" is the data required to query the plug-in configuration file or function file of the plug-in package. For example, the query value can be the name of the plug-in package (such as ID), or the storage location information of the plug-in configuration file or function file.

[0034] In this article, "attribute information" refers to the basic information of the plugin package, such as the plugin name, size, and version. For example, attribute information can also include the dependent objects or dependent objects included in the plugin. Among them, when plugin package A must be used normally based on the operation of plugin package B, it is considered that plugin package A depends on plugin package B. In other words, plugin package B is the dependent object of plugin package A, and plugin package A is the dependent object of plugin package B.

[0035] In this article, "operation information" may include supported software versions, operating system versions, paths to dynamic libraries and resources, etc.

[0036] In the existing CAD operating environment, in order to expand CAD functions and improve drawing efficiency, users can freely introduce multiple plug-ins into CAD software. However, once the number of plug-ins introduced increases, it will seriously affect the operating efficiency of CAD (even causing problems such as freezing and crashes). At the same time, due to the large number of plug-ins and their sources, once there is a functional conflict between two plug-ins, it is very easy to cause the CAD software to crash.

[0037] In order to solve the problems of low operating efficiency and jamming that may be caused by the introduction of batch plug-ins, this application proposes a plug-in restrictive introduction method based on multi-level evaluation, so as to quickly evaluate the plug-ins through local information, and then maintain a stable operating environment of CAD for users through restrictive introduction.

[0038] For the scenario where a large number of plug-ins are introduced, the present invention can, on the one hand, utilize a hierarchical storage mode to reduce the necessary resources occupied by the operation of the CAD software, and on the other hand, can utilize a restrictive introduction method combining dynamic and static methods to avoid conflicts among multiple plug-ins during the calling process.

[0039] Embodiment 1 See also Figure 1 , Figure 2 As shown, the present invention provides a plug-in architecture method suitable for batch plug-in insertion scenarios, including: S101 obtains a plug-in catalog table, wherein the plug-in catalog table records a query value of at least one plug-in package; wherein the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: an operating environment version supported by the plug-in, and the function file includes: runtime library data for executing an extended function of the plug-in; S102 queries the plug-in package to be parsed according to the query value; For example, the query value may refer to the name of the plug-in package, and correspondingly, the storage location of the plug-in package can be found in the computer through the name of the plug-in package.

[0040] S103 uses a hierarchical analysis rule to determine whether the currently queried plug-in package is allowed to be introduced into the current operating environment; wherein S103 includes: S31 obtains first parsing information of the current plug-in package, where the first parsing information includes: the runtime data; S32 determines whether the first parsed information is complete; if so, proceeds to S33; if not, it is considered that the plug-in package is not allowed to be introduced into the current operating environment, and directly proceeds to S35; For example, in some embodiments, whether the first parsed information is complete may be determined by judging the length of the first parsed information.

[0041] For another example, in some embodiments, it is possible to determine whether the corresponding information is complete based on the parsing result of the first parsing information. For example, if the parsing is successful, the data is considered complete, otherwise, the data is considered incomplete.

[0042] S33 obtains second parsed information of the plug-in package, where the second parsed information includes: the operating environment version; S34 determines whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment, and the process proceeds to S35. If not, the process directly proceeds to S35.

[0043] For example, in some embodiments, when the operating environment version is consistent with or compatible with the current operating environment version, the two are considered to match.

[0044] In this embodiment, the plug-in package is introduced into the current operating environment only when the plug-in package pre-satisfies the above-mentioned multi-level evaluation mechanism, so as to quickly determine whether the plug-in package is suitable for the current operating environment through limited information.

[0045] In some embodiments, the method further includes: S35 querying whether there are other plug-in packages to be parsed in the plug-in target table (ie, whether there are other uncalculated query values), if so, returning to S102. Otherwise, the current parsing procedure may be terminated.

[0046] In some embodiments, before S31, the step further includes: S36 determines whether the attribute information of the plug-in package includes dependent object information, wherein the dependent object refers to another plug-in package that needs to be introduced in the current operating environment in order to enable the current plug-in package to operate normally in the current operating environment; if so, enter S37; if not, enter S31; S37 queries whether there is a corresponding plug-in package to be parsed in the plug-in directory table according to the dependent object information; If yes, the plug-in package to be parsed found is used as the plug-in package to be parsed currently, and the process returns to S36 to continue to determine whether the plug-in package to be parsed currently has a dependent object; If not, the plug-in package is not allowed to be introduced into the current operating environment, and the process returns to S35. For example, when the plug-in package referred to by the dependent object does not exist in the plug-in directory table, it means that there is an abnormal risk when the current plug-in package is running in the software, and the plug-in package can be directly rejected. Alternatively, a corresponding prompt signal can be sent to the user, so that the user can manually decide whether to introduce it.

[0047] In this embodiment, the dependent object information is checked level by level until a plug-in package without dependent objects is found, and it is introduced into the current operating environment first, and then the dependent objects of the plug-in package are introduced in sequence.

[0048] In some embodiments, the dependent object information refers to a query value of the dependent object, such as an ID or an address.

[0049] In some embodiments, the plug-in package is further associated with a preset function level; accordingly, the step of: Obtaining the functional level of the plug-in package; The type of the first parsed information of the plug-in package is determined according to the functional level; wherein, when the functional level of the plug-in package is greater than or equal to the first set functional level, the type of the first parsed information includes: runtime data, and one or more of the following types: UI resources, image resources, language resources; when the functional level of the plug-in package is less than the first set functional level (and greater than or equal to the second set functional level), the type of the first parsed information includes: the runtime data.

[0050] For example, in actual application, there are plug-ins with different functional levels. For example, plug-in 1 has more functions and requires more necessary files and information to run plug-in 1. Plug-in 2 has relatively simple functions and only requires basic runtime library data to complete.

[0051] Therefore, for plug-in 2, it is preferred to only determine whether the runtime library data is complete and directly connect the plug-in to CAD, while for plug-in 1, it is necessary to additionally determine whether at least one other necessary file of plug-in 1 exists before plug-in 1 can be connected to CAD.

[0052] In some embodiments, the function file also includes one or more of the following data: UI resources, image resources, and language resources.

[0053] In some embodiments, the steps include: When the current plug-in package I (i.e. the importable plug-in package outputted in step S34) is allowed to be imported into the current operating environment, a corresponding import method is selected according to the number of dependent objects; and the corresponding import method selected according to the number of dependent objects includes: Obtaining the number of the dependent objects of the current plug-in package I, wherein the plug-in package II that needs to depend on the operation of the current plug-in package I to run normally is the dependent object of the current plug-in package I; When the number of the dependent objects is less than the set threshold, the plug-in package is stored in the first storage mode; wherein the first storage mode requires that the runtime data is stored in the first storage space, and the plug-in configuration file is stored in the second storage space (or the plug-in configuration file and the remaining function files are stored in the second storage space); When the number of dependent objects is greater than or equal to a set threshold, a second storage method is selected to store the plug-in package; wherein, the second storage method requires that both the plug-in configuration file and the function file are stored in the second storage space; wherein, the current operating environment is the operating environment of the software, the first storage space is located in the external area of ​​the software, and the second storage space is located in the internal area of ​​the software.

[0054] In this embodiment, plug-in packages with a large number of dependent objects can be stored in a modularized and differentiated manner. For example, when plug-in package 1 has a large number of dependent objects (i.e., a high activation frequency), it can be directly stored in the CAD software file, while for plug-in package 2, the number of dependent objects is relatively small (i.e., the activation frequency is also relatively low), the runtime data and other files can be divided into different file modules and stored in partitions to reduce the impact of the plug-in package on the software operation efficiency.

[0055] Alternatively, in some other embodiments, the plug-in packages may be dynamically stored in a hierarchical manner according to their historical usage status.

[0056] For example, when the plug-in package is allowed to be introduced into the current operating environment, a corresponding introduction method is selected according to the introduction priority of the plug-in package; and selecting the corresponding introduction method according to the introduction priority of the plug-in package includes the steps of: Obtaining the application priority of the plug-in package; Get the historical number of times the plug-in package is introduced; Determining the import priority of the plug-in package according to the application priority and the historical import times; For example, in some embodiments, different historical priorities (such as level one and level two) can be divided according to the number of historical introduction times; the introduction priority can be further determined according to the application priority and the historical priority (for example, when the application priority and the historical priority are both level one, the introduction priority is level one; when the application priority and the historical priority are both level two, the introduction priority is level three, otherwise, the introduction priority is level two).

[0057] It is understandable that the specific import priority calculation rule can be set by the user.

[0058] When the import priority is lower than the set priority, the first storage method is selected; the first storage method requires that the runtime data is stored in the first storage space, and the plug-in configuration file and other function files are stored in the second storage space; When the introduction priority is greater than or equal to the set priority, the second storage method is selected; wherein, the second storage method requires that the plug-in configuration file and the function file are both stored in the second storage space; wherein, the current operating environment is the operating environment of the software, the first storage space is located in the external area of ​​the software, and the second storage space is located in the internal area of ​​the software.

[0059] In some embodiments, it also includes: S105 determines whether the last operation of the current operating environment is abnormal; if so, proceeds to S106; otherwise, the imported plug-in package can be enabled normally; S106: obtaining the historical operation record of the current operating environment, and obtaining the abnormal plug-in package causing the abnormality from the historical operation record; S107: When the plug-in package introduced into the current operating environment is the abnormal plug-in package, disabling the corresponding plug-in package.

[0060] In some embodiments, it also includes: S108: receiving a disabling signal or enabling signal input by a user, wherein the disabling signal or the enabling signal includes: a query value of the plug-in package; S109 queries whether there is a dependent object in the plug-in package through the query value; if so, finds the plug-in package corresponding to the dependent object, and disables or enables the plug-in package accordingly.

[0061] In this embodiment, the user can dynamically enable or disable a specified plug-in at runtime. After disabling, all UI resources and functional modules will be removed. When the software crashes during use, the CAD software will automatically analyze the plug-in that caused the crash and disable it the next time it is started, greatly reducing the impact of uncommon or unstable functions on the system.

[0062] It is worth noting that in this embodiment, the functional modules (i.e., runtime library data) and UI resources in the plug-in package are separated into two relatively independent data modules (i.e., partitioned storage and step-by-step calling), which improves the modularity of the software and reduces the complexity of the system.

[0063] Furthermore, by separating the functional modules from the UI resources, the present embodiment supports loading UI resources first, and the functional modules are loaded only when the user uses them, which effectively shortens the startup time of the CAD software and improves the stability of the entire software. In other words, the present invention provides a dormancy mechanism applicable to plug-in packages.

[0064] Correspondingly, the present invention also provides a system corresponding to the above method, comprising: The directory table acquisition module is configured to acquire a plug-in directory table, wherein the plug-in directory table records a query value of at least one plug-in package; wherein the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: an operating environment version supported by the plug-in, and the function file includes: runtime library data for executing an extended function of the plug-in; A query module, configured to query the plug-in package to be parsed according to the query value; A hierarchical analysis module is configured to use hierarchical analysis rules to determine whether the currently queried plug-in package is allowed to be introduced into the current operating environment; wherein the hierarchical analysis module includes: A first parsing unit is configured to obtain first parsing information of the current plug-in package, wherein the first parsing information includes: the runtime data; A first determination unit is configured to determine whether the first parsing information is complete; if so, entering a second parsing unit; The second parsing unit is configured to obtain second parsing information of the plug-in package, wherein the second parsing information includes: the operating environment version; The second judgment unit is configured to judge whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment.

[0065] In some embodiments, the hierarchical parsing module includes: a first query unit, configured to query whether there are other unparsed query values ​​in the plug-in target table, and if so, return to the query module.

[0066] In some embodiments, the hierarchical parsing module includes: a dependent object analysis unit, configured to determine whether the attribute information of the plug-in package includes dependent object information before entering the first parsing unit, wherein the dependent object refers to another plug-in package that needs to be introduced in the current operating environment in order to enable the current plug-in package to operate normally in the current operating environment; if so, enter the second query unit; if not, enter the first parsing unit; The second query unit is configured to query whether there is a corresponding plug-in package to be parsed in the plug-in directory table according to the dependent object information; if so, the queried plug-in package to be parsed is used as the current plug-in package to be parsed, and it is determined again whether the attribute information of the plug-in package includes the dependent object information; if not, the plug-in package is not allowed to be introduced into the current operating environment, and the query returns to the first query unit.

[0067] In some embodiments, the plug-in package is also associated with a preset functional level; correspondingly, it also includes a parsing information type determination unit, which is configured to perform the steps of: obtaining the functional level of the plug-in package; determining the type of first parsing information of the plug-in package according to the functional level; wherein, when the functional level of the plug-in package is greater than or equal to the first set functional level, the type of the first parsing information includes: runtime data, and one or more of the following types: UI resources, image resources, language resources; when the functional level of the plug-in package is less than the first set functional level, the type of the first parsing information includes: the runtime data.

[0068] In some embodiments, it also includes: an abnormality analysis module, which is configured to perform the following steps: S105 determines whether the last operation of the current operating environment is abnormal; if so, enters S106; S106 obtains the historical operation record of the current operating environment, and obtains the abnormal plug-in package that causes the exception from the historical operation record; S107 when the plug-in package introduced in the current operating environment is the abnormal plug-in package, disables the corresponding plug-in package.

[0069] In some embodiments, it further includes: a dynamic disabling module configured to perform the following steps: S108 receiving a disabling signal or enabling signal input by a user, wherein the disabling signal or enabling signal includes: a query value of a plug-in package; S109 querying whether there is a dependent object in the plug-in package through the query value; if so, finding the plug-in package corresponding to the dependent object, and disabling or enabling the plug-in package accordingly. Otherwise, only disabling the plug-in package selected by the user.

[0070] Embodiment 2 Furthermore, in order to improve the efficiency of introducing plug-in packages and reduce the impact of uncommon plug-in packages on the slowing down of software running processes, the present invention also provides an accelerated cache mechanism.

[0071] In this embodiment, the acceleration cache is mainly used to accelerate the parsing and access speed of the plug-in configuration information in the second storage space. When the software is started, the acceleration cache content in the first storage space will be accessed first and transferred to the second storage space for parsing to increase the plug-in loading speed. Figure 3As shown, the plug-in management method in this embodiment includes the steps of: S201 acquires runtime data of at least one plug-in package, wherein the runtime data is a plurality of computer program instructions for executing extended functions of the plug-in package; S202: acquiring data for describing a first field and a plurality of second fields from the plurality of computer program instructions, wherein the first field includes one or more of the following: a switch state, a health state, and a loading time of the plug-in package; and the second field includes: header information and actual data information, wherein the header information is used to define a storage location of the actual data information, and the actual data information is used to describe a function of a runtime library; S203: storing the first field and the plurality of second fields sequentially and continuously in a first storage space; S204: in response to an activation signal sent by a user to the plug-in package, reading data contents of the first field and a plurality of the second fields from the first storage space; For example, the enable signal includes the name of the plug-in package, or the current storage address, or the enable signal includes a corresponding query value in the directory table.

[0072] S205: parsing the read data content in a second storage space, wherein the first storage space is located in an external area of ​​the software that introduces and enables the plug-in package, and the second storage space is located in an internal area of ​​the software; S206: Run the plug-in package in the software according to the corresponding analysis result.

[0073] In some embodiments, the first storage space is a disk, and the second storage space is a memory space.

[0074] In this embodiment, the use of asynchronous storage and real-time dynamic analysis (for example, the analysis of runtime data is started only when the UI resource is recorded or enabled) effectively reduces the consumption of software resources by batch plug-in package files, and adopts a specific continuous field structure for storage. The second storage space can also quickly read the key data information that needs to be read or modified during real-time analysis or update through the first field and header information, thereby effectively improving the efficiency of remote analysis.

[0075] Among them, the way of storing the continuous field structure in the first storage space is also an accelerated cache mechanism. In this embodiment, the accelerated cache preferably uses a quicklist structure to store plug-in information in the memory to improve the speed and efficiency of read and write operations. At the same time, the LZF (Lempel-Ziv-Florian) compression algorithm can also be used to compress and store multiple fields on the disk to save storage space and improve the efficiency of persistence operations.

[0076] The quicklist structure combines compression lists and other optimization techniques to efficiently store large amounts of data in memory and provide fast insert, delete, and search operations, which enables the plug-in system in this embodiment to easily process large amounts of plug-in information and maintain the system's responsiveness.

[0077] The LZF algorithm is a fast and effective compression algorithm that can significantly reduce storage space without losing data. By using the LZF algorithm, plug-in information can be stored on disk in a compact manner, thereby saving storage costs and improving data persistence and operation efficiency.

[0078] In some embodiments, it also includes: S207 obtains the actual running status of the plug-in package in the software; S208: Generate a new first field and at least one header information according to the actual running state, and adaptively locally update the first field and at least one header information in the first storage space.

[0079] In some embodiments, before S204, the step of: (1) determining whether the attribute information of the plug-in package includes dependent object information, wherein the dependent object refers to another plug-in package that needs to be introduced in the current operating environment in order for the current plug-in package to run normally in the current operating environment; if so, proceeding to step (2); if not, proceeding to S204; (2) Parsing the dependent objects of the current plug-in package.

[0080] In some embodiments, the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: the operating environment version supported by the plug-in, and the function file includes: runtime library data for executing the extended function of the plug-in.

[0081] In some embodiments, the plug-in configuration file is stored in the second storage space.

[0082] In some embodiments, the function file also includes one or more of the following data: UI resources, image resources, and language resources.

[0083] Furthermore, in some embodiments, the UI resources, picture resources or language resources are stored in the second storage space.

[0084] It can be understood that the order of introducing plug-ins in this embodiment can also refer to the above-mentioned embodiment 1, and will not be repeated here.

[0085] The present invention also provides a plug-in management system, including: An acquisition module is configured to acquire runtime data of at least one plug-in package, wherein the runtime data is a plurality of computer program instructions for executing an extended function of the plug-in package; A field generation module is configured to obtain data for describing a first field and a plurality of second fields from the plurality of computer program instructions, wherein the first field includes one or more of the following: a switch state, a health state, and a loading time of the plug-in package; and the second field includes: header information and actual data information, wherein the header information is used to define a storage location of the actual data information, and the actual data information is used to describe the function of the runtime library; A field storage module, configured to store the first field and the plurality of second fields sequentially and continuously into a first storage space; A field reading module, configured to read data contents of the first field and a plurality of the second fields from the first storage space in response to an activation signal sent by a user to the plug-in package; A field parsing module is configured to parse the read data content in a second storage space, wherein the first storage space is located in an external area of ​​the software that introduces and enables the plug-in package, and the second storage space is located in an internal area of ​​the software; The running module is configured to run the plug-in package in the software according to the corresponding parsing result.

[0086] Embodiment 3 In order to improve the efficiency of plug-in package insertion and reduce the manual operation of users, the present invention also provides an adaptation method, which can automatically complete the plug-in insertion by using file type and hierarchical parsing rules when the user imports files into CAD, so as to reduce the manual operation pressure of users.

[0087] See also Figure 4 As shown, in some embodiments, the adaptation method includes: S301 obtains a first file; For example, the first file may be a CAD drawing file.

[0088] S302 obtains a first file type of the first file; S303 determines whether the current operating environment can adapt to the corresponding file type, if not, executes S304; In this embodiment, "adaptation" means that the current operating environment can normally read all the contents in the file. For example, in some embodiments, the file type includes: video format, and the current CAD software cannot directly read the video, so it is necessary to introduce a plug-in package to assist in reading the video data.

[0089] For example, in some embodiments, the file type also includes: audio format.

[0090] S304 selects at least one plug-in package that needs to be adapted to the normal operation of the file according to the file type; S305 uses a hierarchical analysis rule to determine whether the plug-in package is allowed to be introduced into the current operating environment; In some embodiments, a corresponding plug-in catalog table is generated according to at least one plug-in package, and the plug-in catalog table includes at least one query value corresponding to the at least one plug-in package.

[0091] Among them, S305 includes: S31 obtains first parsing information of the current plug-in package, where the first parsing information includes: runtime data; S32 determines whether the first parsed information is complete; if so, proceeds to S33; if not, it is considered that the plug-in package is not allowed to be introduced into the current operating environment; For example, in some embodiments, when S32 is no, the process may directly proceed to S35, where S35 is to query whether there are other query values ​​in the plug-in target table; S33 obtains second parsed information of the plug-in package, where the second parsed information includes: an operating environment version; S34 determines whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment, and enters S35.

[0092] In some embodiments, it also includes: S306 obtains a second file; S307 obtains a second file type of the second file; S308: obtaining the first plug-in package corresponding to the first file and the second plug-in package corresponding to the second file selected in step S304; S309 determines whether the first plug-in package and the second plug-in package conflict in function; if not, proceed to S305.

[0093] In some embodiments, the steps include: When the result of S309 is yes, obtaining a first file priority of the first file and a second file priority of the second file; The plug-in package corresponding to the file with a higher file priority is identified as the plug-in package to be currently parsed, and the process proceeds to S305.

[0094] For example, when the priority of the first file is higher than the priority of the second file, the first plug-in package is enabled and the second plug-in package is disabled.

[0095] In this embodiment, when two or more files need to be opened in the CAD interface, it will be determined in advance whether there is a functional conflict between the plug-ins required by the two files (it can be understood that the specific rules for determining whether there is a functional conflict between the two files can be set by the user in combination with the actual operating system or file type and other conditions). If so, the plug-in type to be enabled will be determined.

[0096] For example, when there is a conflict between the two, the type of plug-in that is started first is driven by the file opening priority. If the file priority is higher, the corresponding plug-in activation priority is also higher.

[0097] In some embodiments, the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: the operating environment version supported by the plug-in, and the function file includes: runtime library data for executing the extended function of the plug-in.

[0098] In some embodiments, the steps include: S36 determines whether the attribute information of the plug-in package includes dependent object information, wherein the dependent object refers to another plug-in package that needs to be introduced in the current operating environment in order to enable the current plug-in package to operate normally in the current operating environment; if so, enter S37; if not, enter S31; S37 queries whether there is a corresponding plug-in package to be parsed in the plug-in directory table according to the dependent object information; If yes, the plug-in package to be parsed found is used as the plug-in package to be parsed currently, and the process returns to S36; If not, the plug-in package is not allowed to be introduced into the current operating environment, and the process returns to S35.

[0099] Alternatively, in some other embodiments, the dependent objects and other information may also be determined based on the runtime data. For example, in some embodiments, when at least one of the plug-in packages is introduced into the current operating environment and runs, the steps are also included: Acquire first runtime data I of at least one plug-in package; acquire second runtime data II of another plug-in package; when the first runtime data I includes the second runtime data II, the other plug-in package is considered to be a dependent object of the plug-in package.

[0100] The present invention also provides an adaptation system, including: A first file acquisition module is configured to acquire a first file; A first file type acquisition module, configured to acquire a first file type of the first file; The adaptability judgment module is configured to judge whether the current operating environment can adapt to the corresponding file type, and if not, enter the selection module; A selection module is configured to select at least one plug-in package that needs to be adapted to the normal operation of the corresponding file according to the corresponding file type; A hierarchical analysis module is configured to use hierarchical analysis rules to determine whether the plug-in package is allowed to be introduced into the current operating environment; wherein the hierarchical analysis module includes: A first parsing unit is configured to obtain first parsing information of the current plug-in package, wherein the first parsing information includes: runtime data; A first determination unit is configured to determine whether the first parsing information is complete; if so, entering a second parsing unit; The second parsing unit is configured to obtain second parsing information of the plug-in package, wherein the second parsing information includes: an operating environment version; The second judgment unit is configured to judge whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment.

[0101] In some embodiments, including: A second file acquisition module is configured to acquire a second file; A second file type acquisition module, configured to acquire a second file type of the second file; The function conflict judgment module is configured to obtain a first plug-in package corresponding to the first file and a second plug-in package corresponding to the second file selected by the selection module; and to judge whether the first plug-in package and the second plug-in package conflict in function; if not, enter the hierarchical analysis module.

[0102] The present invention further provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in any of the above embodiments is implemented.

[0103] The present invention also provides a computer program product configured to store computer-readable instructions, which, when executed, enable a computer to execute the method described in any of the above embodiments.

[0104] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a computer terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0106] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A plug-in architecture method, characterized in that: include: S101 obtains a plug-in catalog table, wherein the plug-in catalog table records a query value of at least one plug-in package; wherein the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: an operating environment version supported by the plug-in, and the function file includes: runtime library data for executing an extended function of the plug-in; S102 queries the plug-in package to be parsed according to the query value; S103 uses a hierarchical analysis rule to determine whether the currently queried plug-in package is allowed to be introduced into the current operating environment; wherein S103 includes: S31 obtains first parsing information of the current plug-in package, where the first parsing information includes: the runtime data; S32 determines whether the first parsed information is complete; if so, proceeds to S33; S33 obtains second parsed information of the plug-in package, where the second parsed information includes: the operating environment version; S34 determines whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment.

2. A plug-in architecture method according to claim 1, characterized in that: The method further includes: S35 querying whether there are other query values ​​in the plug-in target table, and if so, returning to S102.

3. A plug-in architecture method according to claim 2, characterized in that: Before S31, the steps include: S36 determines whether the attribute information of the plug-in package includes dependent object information, wherein the dependent object refers to another plug-in package that needs to be introduced in the current operating environment in order to enable the current plug-in package to operate normally in the current operating environment; if so, enter S37; if not, enter S31; S37 queries whether there is a corresponding plug-in package to be parsed in the plug-in directory table according to the dependent object information; If yes, the plug-in package to be parsed found is used as the plug-in package to be parsed currently, and the process returns to S36; If not, the plug-in package is not allowed to be introduced into the current operating environment, and the process returns to S35.

4. A plug-in architecture method according to claim 3, characterized in that: The plug-in package is also associated with a preset function level; accordingly, the step before S31 also includes: Obtaining the functional level of the plug-in package; The type of the first parsed information of the plug-in package is determined according to the functional level; wherein, when the functional level of the plug-in package is greater than or equal to the first set functional level, the type of the first parsed information includes: runtime data, and one or more of the following types: UI resources, image resources, language resources; when the functional level of the plug-in package is less than the first set functional level, the type of the first parsed information includes: the runtime data.

5. A plug-in architecture method according to claim 1, characterized in that: The function file also includes one or more of the following data: UI resources, image resources and language resources; And / or, the method further comprises the steps of: When the current plug-in package is allowed to be introduced into the current operating environment, a corresponding introduction method is selected according to the number of dependent objects; And according to the number of dependent objects, the corresponding introduction method includes: Acquire the number of the dependent objects of the current plug-in package, wherein the plug-in packages that need to depend on the running of the current plug-in package to run normally are the dependent objects of the current plug-in package; When the number of dependent objects is less than a set threshold, the current plug-in package is stored in a first storage method; wherein the first storage method requires that the runtime data is stored in a first storage space, and the plug-in configuration file is stored in a second storage space; When the number of dependent objects is greater than or equal to a set threshold, a second storage method is selected to store the current plug-in package; wherein, the second storage method requires that both the plug-in configuration file and the function file are stored in the second storage space; wherein, the current operating environment is the operating environment of the software, the first storage space is located in the external area of ​​the software, and the second storage space is located in the internal area of ​​the software.

6. A plug-in architecture method according to claim 5, characterized in that: When the plug-in package is allowed to be introduced into the current operating environment, a corresponding introduction method is selected according to the introduction priority of the plug-in package; and selecting the corresponding introduction method according to the introduction priority of the plug-in package includes the steps of: Obtaining the application priority of the plug-in package; Get the historical number of times the plug-in package is introduced; Determining the import priority of the plug-in package according to the application priority and the historical import times; When the import priority is lower than the set priority, the first storage method is used to store the plug-in package; The first storage mode requires that the runtime data is stored in a first storage space, and the plug-in configuration file is stored in a second storage space; When the introduction priority is greater than or equal to the set priority, the second storage method is selected to store the plug-in package; wherein, the second storage method requires that the plug-in configuration file and the function file are both stored in the second storage space; wherein, the current operating environment is the operating environment of the software, the first storage space is located in the external area of ​​the software, and the second storage space is located in the internal area of ​​the software.

7. A plug-in architecture method according to claim 1, characterized in that: Also includes: S105 determines whether the last operation of the current operating environment is abnormal; If yes, proceed to S106; S106: obtaining the historical operation record of the current operating environment, and obtaining the abnormal plug-in package causing the abnormality from the historical operation record; S107: when the plug-in package introduced into the current operating environment is the abnormal plug-in package, disabling the corresponding plug-in package; and / or, also include: S108: receiving a disabling signal or enabling signal input by a user, wherein the disabling signal or the enabling signal includes: a query value of the plug-in package; S109 queries whether there is a dependent object in the plug-in package through the query value; if so, finds the plug-in package corresponding to the dependent object, and disables or enables the plug-in package accordingly.

8. A plug-in architecture system, characterized in that: include: The directory table acquisition module is configured to acquire a plug-in directory table, wherein the plug-in directory table records a query value of at least one plug-in package; wherein the plug-in package includes: a plug-in configuration file and a function file; wherein the plug-in configuration file includes: attribute information and operation information of the plug-in, and the operation information includes: an operating environment version supported by the plug-in, and the function file includes: runtime library data for executing an extended function of the plug-in; A query module, configured to query the plug-in package to be parsed according to the query value; A hierarchical analysis module is configured to use hierarchical analysis rules to determine whether the currently queried plug-in package is allowed to be introduced into the current operating environment; wherein the hierarchical analysis module includes: A first parsing unit is configured to obtain first parsing information of the current plug-in package, wherein the first parsing information includes: the runtime data; A first determination unit is configured to determine whether the first parsing information is complete; if so, entering a second parsing unit; The second parsing unit is configured to obtain second parsing information of the plug-in package, wherein the second parsing information includes: the operating environment version; The second judgment unit is configured to judge whether the second parsed information matches the current operating environment; if so, it is considered that the plug-in package is allowed to be introduced into the current operating environment.

9. A computer-readable storage medium of a plug-in architecture, characterized in that: Computer program instructions are stored thereon, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The method is configured to store computer-readable instructions, which, when executed, cause a computer to perform the method according to any one of claims 1 to 7.