Adaptation method and system, storage medium and program product

By adopting a multi-level evaluation and hierarchical storage approach to restrictively introduce plug-ins, the problems of slow startup, unstable operation, and difficult maintenance of large-scale CAD software in multi-plugin environments are solved, achieving stable and efficient plug-in management and resource optimization.

CN121597307APending Publication Date: 2026-03-03SUZHOU CAD SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing large-scale CAD software faces problems such as slow startup, unstable operation, and difficulty in maintenance and expansion after the introduction of multiple plug-ins. In particular, the increase in the types and number of plug-ins leads to low operating efficiency and frequent conflicts.

Method used

A multi-level evaluation-based plugin restriction method is adopted. By using hierarchical parsing rules and dependency object information, the compatibility of plugins is quickly evaluated, and the plugin package is introduced into the current operating environment to avoid conflicts. The hierarchical storage mode reduces resource consumption, and plugin hibernation mechanism and acceleration caching mechanism are provided to improve stability and efficiency.

Benefits of technology

It enables stable operation of CAD software in scenarios with a large number of plug-ins, reduces resource consumption, avoids conflicts, shortens startup time, improves user operation efficiency, and reduces system complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597307A_ABST
    Figure CN121597307A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of CAD, in particular to an adaptation method and system, a storage medium and a program product.The adaptation method comprises the steps that a plug-in directory table is obtained, and a query value is recorded in the plug-in directory table; querying a to-be-analyzed plug-in package according to the query value; a hierarchical analysis rule is adopted to judge whether a currently queried plug-in package is allowed to be introduced into a current operation environment or not, and the method comprises the steps that S31, first analysis information of the current plug-in package is obtained, and the first analysis information comprises runtime library data; s32, judging whether the first analysis information is complete or not; if yes, entering S33; s33, obtaining second analysis information of the plug-in package, wherein the second analysis information comprises an operation environment version; s34, judging whether the second analysis information is matched with the current operation environment or not; if yes, it is considered that the plug-in package is allowed to be introduced into the current operation environment. 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 patent application No. 202410591607.5, filed on May 13, 2024, entitled "An Adaptation Method, System, Storage Medium and Program Product". Technical Field

[0002] This invention relates to Computer Aided Design (CAD), specifically to an adaptation method, system, storage medium, and program product. Background Technology

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

[0004] Furthermore, with the gradual development of CAD software and the increasing sophistication of users' demands for CAD extensions, users often need to introduce CAD plugins to assist in completing complex engineering drawings (e.g., drawing large topographic maps, drawing super-large buildings, etc.). However, since plugins must be loaded into the software to be used normally (for example, traditional CAD plugins have developed standard interfaces such as ARX to meet secondary development needs), the increasing types and number of CAD plugins, and the introduction of batch plugins, will exponentially increase the aforementioned maintenance and extension difficulties, seriously interfering with users' work efficiency.

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

[0006] The purpose of this invention is to provide an adaptation method, system, storage medium, and program product that partially solves or alleviates the above-mentioned deficiencies in the prior art, improves the efficiency of batch plugin loading, and maintains the stable operation of batch plugins.

[0007] This invention provides an adaptation method, comprising: S301 retrieves the first file; S302 Obtain the first file type of the first file; S303 determines whether the current operating environment can adapt to the corresponding file type; if not, S304 is executed. S304 Selects at least one plugin package that needs to be adapted to the normal operation of the corresponding file according to the corresponding file type; S305 uses hierarchical parsing rules to determine whether the plug-in package is allowed to be imported into the current operating environment; wherein, S305 includes: S31 obtains the first parsing information of the current plugin package, the first parsing information including: runtime library data; S32 determines whether the first parsed information is complete; if so, proceed to S33. S33 obtains the second parsing information of the plugin package, the second parsing information including: 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 steps further include: S306 retrieves the second file; S307 obtains the second file type of the second file; S308 Obtain the first plugin package corresponding to the first file and the second plugin package corresponding to the second file selected according to step S304; S309 determines whether the first plugin package and the second plugin package conflict in function; if not, proceed to S305.

[0009] In some embodiments, the steps further include: When the result of S309 is yes, obtain the first file priority of the first file and the second file priority of the second file; The plugin package corresponding to the file with higher file priority is identified as the plugin package to be parsed, and the process proceeds to S305.

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

[0011] In some embodiments, the steps further include: S36 determines whether the attribute information of the plugin package includes dependency object information, wherein the dependency object refers to another plugin package that needs to be introduced in the current operating environment in order for the current plugin package to run normally in the current operating environment; if yes, proceed to S37; if no, proceed to S31. S37 Query the currently obtained plugin directory table to see if there is a corresponding plugin package to be parsed based on the dependency object information; If so, the queried plugin package to be parsed will be used as the current plugin package to be parsed, and return to S36; If not, the plugin package is not allowed to be imported into the current operating environment.

[0012] In some embodiments, the functional file may further include one or more of the following data: UI resources, image resources, and language resources.

[0013] The present invention also provides an adaptation system, comprising: The first file acquisition module is configured to acquire the first file; The first file type acquisition module is configured to acquire the first file type of the first file. The compatibility judgment module is configured to determine whether the current operating environment can adapt to the corresponding file type. If not, the selection module is then entered. The selection module is configured to select at least one plugin package that needs to be adapted to the normal operation of the corresponding file based on the file type. A hierarchical parsing module is configured to determine whether the plugin package is allowed to be imported into the current operating environment using hierarchical parsing rules; wherein, the hierarchical parsing module includes: The first parsing unit is configured to obtain first parsing information of the current plugin package, the first parsing information including: runtime library data; The first judgment unit is configured to determine whether the first parsed information is complete; if so, it proceeds to the second parsing unit. The second parsing unit is configured to obtain second parsing information of the plugin package, the second parsing information including: operating environment version; The second judgment unit is configured to determine 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.

[0014] In some embodiments, the system includes: The second file acquisition module is configured to acquire the second file; The second file type acquisition module is configured to acquire the second file type of the second file. The functional conflict determination module is configured to obtain a first plugin package corresponding to the first file and a second plugin package corresponding to the second file, selected by the selection module; and determine whether the first plugin package and the second plugin package conflict in function; if not, proceed to the hierarchical parsing module.

[0015] The present invention also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the method described in any of the above embodiments.

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

[0017] Beneficial technical effects: This invention provides a multi-level evaluation-based method for restrictively introducing plug-ins. This method rapidly evaluates plug-ins using local information, thereby strongly maintaining a stable CAD operating environment for users through restrictive introduction. Furthermore, the adaptation method implemented by this multi-level evaluation-based plug-in restriction introduction approach can automatically insert plug-ins when users import files into CAD, utilizing file type and hierarchical parsing rules, thus reducing the manual operation burden on users.

[0018] For scenarios involving the introduction of a large number of plugins, this invention can reduce the necessary resources occupied by CAD software by using a hierarchical storage mode, and avoid conflicts between multiple plugins during the calling process by using a combination of dynamic and static restrictive introduction methods. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. The elements or parts in the drawings are not necessarily drawn to scale. Obviously, the drawings described below are some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0020] Figure 1 This is a flowchart illustrating the plug-in architecture method in an exemplary embodiment of the present invention; Figure 2 This is a flowchart illustrating the plug-in architecture method in a specific embodiment of the present invention; Figure 3 This is a flowchart illustrating the plug-in management method in an exemplary embodiment of the present invention; Figure 4 This is a flowchart illustrating the file adaptation method in an exemplary embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0022] In this document, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" may be used interchangeably.

[0023] In this document, the terms "upper," "lower," "inner," "outer," "front," "rear," "one end," and "the other end," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the present invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0024] In this document, unless otherwise explicitly specified and limited, the terms "installed," "equipped with," "connected," etc., should be interpreted broadly. For example, "connection" 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; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0025] In this document, "and / or" includes any and all combinations of one or more of the listed related items.

[0026] In this article, "multiple" means two or more, that is, it includes two, three, four, five, etc.

[0027] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

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

[0029] In this specification, certain embodiments may be disclosed in a range-bound format. It should be understood that this "range-bound" description is merely for convenience and brevity and should not be construed as a rigid limitation on the disclosed range. Therefore, the description of a range should be considered as having specifically disclosed all possible subranges and the individual numerical values ​​within those ranges. For example, a description of the range 1-6 should be considered as having specifically disclosed subranges 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., and the individual numbers within those ranges, such as 1, 2, 3, 4, 5, and 6. This rule applies regardless of the breadth of the range.

[0030] In this document, "functional files" refers to the extended functionalities that the plugin package can provide after being integrated into the software. Functional files primarily include runtime library data. Of course, functional files may further include UI resources, image resources, language resources, etc.

[0031] Here, "runtime library data" refers to the functional modules of the plugin (also known as the plugin package). The functional modules refer to the extended functions implemented by the plugin after it is integrated into the software. In other words, runtime library data refers to the computer program instructions written to execute the extended functions of the object.

[0032] UI resources provide users with a functional interface in CAD (such as clicking function buttons). Image resources refer to the image format files corresponding to the function buttons in CAD, while language resources refer to the text description format files corresponding to different function buttons in CAD.

[0033] In this document, "query value" refers to the data required to query the plugin configuration file or function file of the plugin package. For example, the query value can be the name of the plugin package (such as its ID), or the storage location information of the plugin configuration file or function file.

[0034] In this article, "attribute information" refers to basic information about a plugin package, such as its name, size, and version. For example, attribute information can also include the plugin's dependencies or objects it depends on. Specifically, if plugin package A requires plugin package B to function properly, then plugin package A is considered to depend on plugin package B. In other words, plugin package B is a dependency of plugin package A, and plugin package A is a dependent of plugin package B.

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

[0036] In existing CAD operating environments, users can freely introduce multiple plugins into CAD software to expand CAD functionality and improve drawing efficiency. However, increasing the number of plugins can severely impact CAD's operating efficiency (even causing lag, crashes, and other issues). Furthermore, due to the wide variety of plugin types and sources, functional conflicts between two plugins can easily lead to CAD software crashes.

[0037] To address the issues of low operating efficiency and lag that may result from the introduction of batch plugins, this application proposes a plugin restriction method based on multi-level evaluation. This method uses local information to quickly evaluate plugins and then uses restrictive introduction to strongly maintain a stable CAD operating environment for users.

[0038] For scenarios involving the introduction of a large number of plugins, this invention can reduce the necessary resources occupied by CAD software by using a hierarchical storage mode, and avoid conflicts between multiple plugins during the calling process by using a combination of dynamic and static restrictive introduction methods.

[0039] Example 1 See Figure 1 , Figure 2 As shown, this invention provides a plugin architecture method suitable for batch plugin insertion scenarios, including: S101 obtains a plugin directory table, which records the query value of at least one plugin package; wherein, the plugin package includes: a plugin configuration file and a function file; wherein, the plugin configuration file includes: the plugin's attribute information and runtime information, and the runtime information includes: the operating environment version supported by the plugin, and the function file includes: runtime library data for executing the extended functions of the plugin; S102 retrieves the plugin package to be parsed based on the query value; For example, the query value can refer to the name of the plugin package, and the storage location of the plugin package can be found on the computer by using the name of the plugin package.

[0040] S103 uses hierarchical parsing rules to determine whether the currently queried plugin package is allowed to be imported into the current operating environment; wherein, S103 includes: S31 obtains the first parsing information of the current plugin package, the first parsing information including: the runtime library data; S32 determines whether the first parsed information is complete; if yes, proceed to S33; if no, it is considered that the plugin package is not allowed to be introduced into the current operating environment, and proceed directly to S35. For example, in some embodiments, the completeness of the first parsed information can be determined by judging the length of the first parsed information.

[0041] For example, in some embodiments, the completeness of the corresponding information can be determined based on the parsing result of the first parsed information. For instance, if the parsing is successful, the data is considered complete; otherwise, the data is considered incomplete.

[0042] S33 obtains the second parsing information of the plugin package, the second parsing information including: the operating environment version; S34 determines whether the second parsed information matches the current operating environment; if yes, it considers the plugin package to be allowed to be imported into the current operating environment and proceeds to S35. If no, it proceeds directly to S35.

[0043] For example, in some embodiments, the two are considered to be matched if the operating environment version is the same as or compatible with the current operating environment version.

[0044] In this embodiment, the plugin package is only introduced into the current operating environment if it meets the above-mentioned multi-level evaluation mechanism in advance, so as to quickly determine whether the plugin package is suitable for the current operating environment with limited information.

[0045] In some embodiments, the method further includes: S35 querying the plugin target table to see if there are other plugin packages to be parsed (i.e., whether there are other uncalculated query values); if so, returning to S102. Otherwise, the current parsing process can be terminated.

[0046] In some embodiments, prior to S31, the following step is also included: S36 determines whether the attribute information of the plugin package includes dependency object information, wherein the dependency object refers to another plugin package that needs to be introduced in the current operating environment in order for the current plugin package to run normally in the current operating environment; if yes, proceed to S37; if no, proceed to S31. S37 queries the plugin directory table to see if there is a corresponding plugin package to be parsed based on the dependency object information; If so, the queried plugin package to be parsed is taken as the current plugin package to be parsed, and S36 is returned to continue to determine whether the current plugin package to be parsed has a dependency object; If not, the plugin package is not allowed to be imported into the current operating environment, and the process returns to S35. For example, if the plugin package pointed to by the dependent object does not exist in the plugin directory table, it indicates that there is an abnormal risk in the current plugin package when running in the software, and the import of the plugin package can be directly rejected. Alternatively, a corresponding prompt signal can be issued to the user so that the user can manually determine whether to import it.

[0047] In this embodiment, the dependency object information is checked step by step until a plugin package without dependent objects is found, and it is introduced into the current operating environment first. Then, the dependent objects of the plugin package are introduced in turn.

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

[0049] In some embodiments, the plug-in package is also associated with a preset functional level; correspondingly, the step before S31 is further included: Obtain the functional level of the plugin package; The type of the first parsed information of the plugin package is determined according to the functional level; wherein, when the functional level of the plugin package is greater than or equal to the first set functional level, the type of the first parsed information includes: runtime library data, and one or more of the following types: UI resources, image resources, and language resources; when the functional level of the plugin 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 library data.

[0050] For example, in practical applications, there are plugins with different functional levels. Plugin 1 has more functions and requires more necessary files and materials to run. Plugin 2 has relatively simple functions and only requires a basic database to run.

[0051] Therefore, for plugin 2, it is preferable to simply determine whether the running database is complete before directly connecting the plugin in CAD. However, for plugin 1, it is necessary to additionally determine whether at least one other necessary file of plugin 1 exists before plugin 1 can be connected to CAD.

[0052] In some embodiments, the functional file may further include one or more of the following data: UI resources, image resources, and language resources.

[0053] In some embodiments, the steps further include: When the current plugin package I (i.e., the importable plugin package output after step S34) is allowed to be imported into the current operating environment, the 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: Get the number of dependent objects of the current plugin package I, wherein the plugin package II that needs to run normally to rely on the running of the current plugin package I is the dependent object of the current plugin package I. When the number of dependent objects is less than the set threshold, the plugin package is stored using the first storage method; wherein, the first storage method requires the runtime database to be stored in the first storage space and the plugin configuration file to be stored in the second storage space (or, the plugin configuration file and other function files are both 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 plugin package; wherein, the second storage method requires that both the plugin configuration file and the function file be 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, plugin packages with a large number of dependent objects can be stored in a modular and differentiated manner. For example, when plugin package 1 has a large number of dependent objects (i.e., it is used frequently), it can be stored directly in the CAD software file. However, for plugin package 2, which has a relatively small number of dependent objects (i.e., it is used less frequently), the runtime library data and other files can be divided into different file modules and stored in partitions to reduce the impact of plugin packages on software running efficiency.

[0055] Alternatively, in other embodiments, the plugin package can be dynamically and hierarchically stored according to its historical usage status.

[0056] For example, when a plugin package is allowed to be imported into the current operating environment, the corresponding import method is selected according to the import priority of the plugin package; and selecting the corresponding import method according to the import priority of the plugin package includes the following steps: Obtain the application priority of the plugin package; Obtain the historical import count of the plugin package; The import priority of the plugin package is determined based on the application priority and the historical import count. For example, in some embodiments, the historical priority can be divided into different historical priorities (such as level 1 and level 2) according to the number of times the application is introduced; and 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 1, the introduction priority is level 1; when the application priority and the historical priority are both level 2, the introduction priority is level 3; otherwise, the introduction priority is level 2).

[0057] Understandably, the specific rules for calculating the priority of the introduction can be set by the user.

[0058] When the introduced priority is less than the set priority, the first storage method is selected; the first storage method requires that the running database be stored in the first storage space, and the plug-in configuration file and other function files be stored in the second storage space. When the introduced priority is greater than or equal to the set priority, the second storage method is selected; 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.

[0059] In some embodiments, it also includes: S105 determines whether the previous operation of the current operating environment was abnormal; if so, proceed to S106; otherwise, the imported plugin package can be enabled normally. S106 Obtain the historical operation records of the current operating environment, and obtain the exception plugin package that caused the exception from the historical operation records; S107 When the plugin package introduced in the current operating environment is the abnormal plugin package, disable the corresponding plugin package.

[0060] In some embodiments, it also includes: S108 receives a disable signal or enable signal input by the user, wherein the disable signal or enable signal includes: a query value of the plug-in package; S109 queries the plugin package to see if there is a dependent object; if so, the plugin package corresponding to the dependent object is found, and the plugin package is disabled or enabled accordingly.

[0061] In this embodiment, users can dynamically enable or disable specified plugins at runtime. After disabling, all UI resources and functional modules will be removed. If the software crashes, the CAD software will automatically analyze and disable the plugin that caused the crash upon the next startup, significantly reducing the impact of infrequently used or unstable functions on the system.

[0062] It is worth noting that in this embodiment, the functional modules (i.e., runtime data) and UI resources in the plugin 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 functional modules and UI resources, this embodiment supports prioritizing the loading of UI resources, while functional modules are only loaded when the user uses the software. This effectively shortens the startup time of the CAD software and improves the overall stability of the software. In other words, this invention provides a hibernation mechanism suitable for plug-in packages.

[0064] Correspondingly, the present invention also provides a system that corresponds one-to-one with the above-described methods, comprising: The directory table acquisition module is configured to acquire a plugin directory table, which records the query value of at least one plugin package; wherein, the plugin package includes: a plugin configuration file and a function file; wherein, the plugin configuration file includes: plugin attribute information and runtime information, and the runtime information includes: the operating environment version supported by the plugin, and the function file includes: runtime library data for executing the extended functions of the plugin; The query module is configured to retrieve the plugin package to be parsed based on the query value; A hierarchical parsing module is configured to determine, using hierarchical parsing rules, whether the currently queried plugin package is allowed to be imported into the current operating environment; wherein, the hierarchical parsing module includes: The first parsing unit is configured to obtain first parsing information of the current plugin package, the first parsing information including: the runtime library data; The first judgment unit is configured to determine whether the first parsed information is complete; if so, it proceeds to the second parsing unit. The second parsing unit is configured to obtain second parsing information of the plugin package, the second parsing information including: the operating environment version; The second judgment unit is configured to determine 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 plugin target table, and if so, return to the query module.

[0066] In some embodiments, the hierarchical parsing module includes: a dependency object analysis unit, configured to determine, before entering the first parsing unit, whether the attribute information of the plugin package includes dependency object information, wherein a dependency object refers to another plugin package that needs to be introduced in the current operating environment so that the current plugin package can run normally in the current operating environment; if yes, then proceed to the second query unit; if no, then proceed to the first parsing unit. The second query unit is configured to query whether a corresponding plugin package to be parsed exists in the plugin directory table based on the dependency object information; if so, the queried plugin package to be parsed is taken as the current plugin package to be parsed, and it is determined again whether the attribute information of the plugin package includes dependency object information; if not, the plugin package is not allowed to be introduced into the current operating environment, and the process returns to the first query unit.

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

[0068] In some embodiments, the system further includes an anomaly analysis module configured to perform the following steps: S105 determining whether the previous operation of the current operating environment was abnormal; if so, proceeding to S106; S106 obtaining the historical operation records of the current operating environment and obtaining the abnormal plugin package that caused the anomaly from the historical operation records; S107 when the plugin package introduced in the current operating environment is the abnormal plugin package, disabling the corresponding plugin package.

[0069] In some embodiments, the system further includes a dynamic disabling module configured to perform the following steps: S108 receiving a user-inputted disabling signal or enabling signal, the disabling signal or enabling signal including a query value of the plugin package; S109 querying the plugin package for the existence of a dependent object using the query value; if so, finding the plugin package corresponding to the dependent object and disabling or enabling the plugin package accordingly. Otherwise, only disabling the plugin package selected by the user.

[0070] Example 2 Furthermore, in order to improve the efficiency of plugin package introduction and reduce the slowdown effect of uncommon plugin packages on the software running process, this invention also provides an acceleration caching mechanism.

[0071] In this embodiment, the acceleration cache is primarily used to speed up the parsing and access of plugin configuration information in the second storage space. When the software starts, it prioritizes accessing the acceleration cache content in the first storage space and then transfers it to the second storage space for parsing, thereby improving plugin loading speed. See also... Figure 3As shown, the plug-in management method in this embodiment includes the following steps: S201 Obtain runtime library data for at least one plug-in package, wherein the runtime library data is a series of computer program instructions for executing the extended functions of the plug-in package; S202 obtains data from the multiple computer program instructions to describe a first field and multiple second fields. The first field includes one or more of the following: the on / off state, health state, and 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 the storage location of the actual data information, and the actual data information is used to describe the function of the runtime library. S203 The first field and the plurality of second fields are stored sequentially and continuously into the first storage space; S204 responds to the user's enable signal for the plug-in package and reads the data content of the first field and multiple second fields from the first storage space; For example, the enable signal may include the name of the plugin package or the current storage address. Alternatively, the enable signal may include a lookup value from the directory table.

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

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

[0074] In this embodiment, by adopting asynchronous storage and real-time dynamic parsing (for example, parsing of runtime data is only initiated when UI resources are recorded or enabled), the resource consumption of batch plugin package files is effectively reduced. Furthermore, by using 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 parsing or updating through the first field and header information, thus effectively improving the efficiency of off-site parsing.

[0075] The method of storing the continuous field structure in the first storage space is also a kind of accelerated caching mechanism. In this embodiment, the accelerated caching preferably uses a quicklist structure to store plugin information in 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 multiple fields and store them on disk to save storage space and improve the efficiency of persistence operations.

[0076] The quicklist structure combines compressed lists and other optimization techniques to efficiently store large amounts of data in memory and provide fast insertion, deletion, and search operations. This enables the plug-in system in this embodiment to easily handle large-scale plug-in information while maintaining system responsiveness.

[0077] The LZF algorithm is a fast and efficient compression algorithm that can significantly reduce storage space without data loss. 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 operational efficiency.

[0078] In some embodiments, it also includes: S207 Obtain the actual running status of the plug-in package in the software; S208 generates a new first field and at least one header information according to the actual operating state, and adaptively performs partial updates on the first field and at least one header information in the first storage space.

[0079] In some embodiments, prior to S204, the following step is also included: (1) Determine whether the attribute information of the plugin package includes dependency object information, wherein the dependency object refers to another plugin package that needs to be introduced in the current operating environment in order to enable the current plugin package to run normally in the current operating environment; if yes, proceed to step (2); if no, proceed to S204. (2) The dependency objects of the current plugin package are parsed.

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

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

[0082] In some embodiments, the functional file may further include one or more of the following data: UI resources, image resources, and language resources.

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

[0084] It is understood that the order in which the plugins are introduced in this embodiment can also refer to the above embodiment one, and will not be repeated here.

[0085] The present invention also provides a plug-in management system, comprising: The acquisition module is configured to acquire runtime data of at least one plugin package, the runtime data being a series of computer program instructions for executing extended functions of the plugin package; The field generation module is configured to obtain data from the multiple computer program instructions to describe a first field and multiple second fields. The first field includes one or more of the following: the on / off state, health state, and 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 the storage location of the actual data information, and the actual data information is used to describe the function of the runtime library. The field storage module is configured to store the first field and the plurality of second fields sequentially and continuously into a first storage space; The field reading module is configured to read the data content of the first field and a plurality of second fields from the first storage space in response to an enable signal issued by the 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 the external area of ​​the software that enables the plug-in package, and the second storage space is located in the internal area of ​​the software; The runtime module is configured to run the plugin package in the software based on the corresponding parsing results.

[0086] Example 3 To improve the efficiency of plug-in package insertion and reduce the amount of manual operation for users, this invention also provides an adaptation method. This adaptation method can automatically complete the plug-in insertion when users import files into CAD by utilizing file type and hierarchical parsing rules, thereby reducing the manual operation burden on users.

[0087] See Figure 4 As shown, in some embodiments, the adaptation method includes: S301 retrieves the first file; For example, the first file can refer to a CAD drawing file.

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

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

[0090] S304 Select at least one plugin package that needs to be adapted to the normal operation of the file according to the file type; S305 uses hierarchical parsing rules to determine whether the plug-in package is allowed to be imported into the current operating environment; In some embodiments, a corresponding plugin directory table is generated based on at least one plugin package, and the plugin directory table includes at least one query value corresponding to at least one plugin package.

[0091] S305 includes: S31 obtains the first parsing information of the current plugin package, the first parsing information including: runtime library data; S32 determines whether the first parsed information is complete; if yes, proceed to S33; if no, it is considered that the plugin package is not allowed to be introduced into the current operating environment. For example, in some embodiments, when S32 is not true, the process can proceed directly to S35, where S35 is to query whether other query values ​​exist in the plug-in target table; S33 obtains the second parsing information of the plugin package, the second parsing information including: 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 proceeds to S35.

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

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

[0094] For example, if the first file has a higher priority than the second file, then the first plugin package is enabled and the second plugin package is disabled.

[0095] In this embodiment, when two or more files need to be opened in the CAD interface, it will be pre-determined whether there is a functional conflict between the plugins required by the two files (it is understood that the specific rules for determining whether the two are functionally conflicting can be set by the user in combination with the actual operating system or file type, etc.). If so, the preferred plugin type will be determined.

[0096] For example, when there is a conflict between the two, the plugin type that is prioritized for activation is driven by the file's opening priority. If the file has a higher priority, the corresponding plugin will also have a higher activation priority.

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

[0098] In some embodiments, the steps further include: S36 determines whether the attribute information of the plugin package includes dependency object information, wherein the dependency object refers to another plugin package that needs to be introduced in the current operating environment in order for the current plugin package to run normally in the current operating environment; if yes, proceed to S37; if no, proceed to S31. S37 queries the plugin directory table to see if there is a corresponding plugin package to be parsed based on the dependency object information; If so, the queried plugin package to be parsed will be used as the current plugin package to be parsed, and return to S36; If not, the plugin package is not allowed to be imported into the current operating environment, and the process returns to S35.

[0099] Alternatively, in other embodiments, information such as dependent objects can be determined based on runtime library data. For example, in some embodiments, when at least one of the plugin packages is introduced into the current operating environment and runs, the step further includes: Obtain first runtime library data I of at least one plugin package; obtain second runtime library data II of another plugin package; when the first runtime library data I includes the second runtime library data II, the other plugin package is considered to be a dependency of the plugin package.

[0100] The present invention also provides an adaptation system, comprising: The first file acquisition module is configured to acquire the first file; The first file type acquisition module is configured to acquire the first file type of the first file. The compatibility judgment module is configured to determine whether the current operating environment can adapt to the corresponding file type. If not, the selection module is then entered. The selection module is configured to select at least one plugin package that needs to be adapted to the normal operation of the corresponding file based on the file type. A hierarchical parsing module is configured to determine whether the plugin package is allowed to be imported into the current operating environment using hierarchical parsing rules; wherein, the hierarchical parsing module includes: The first parsing unit is configured to obtain first parsing information of the current plugin package, the first parsing information including: runtime library data; The first judgment unit is configured to determine whether the first parsed information is complete; if so, it proceeds to the second parsing unit. The second parsing unit is configured to obtain second parsing information of the plugin package, the second parsing information including: operating environment version; The second judgment unit is configured to determine 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: The second file acquisition module is configured to acquire the second file; The second file type acquisition module is configured to acquire the second file type of the second file. The functional conflict determination module is configured to obtain a first plugin package corresponding to the first file and a second plugin package corresponding to the second file, selected by the selection module; and determine whether the first plugin package and the second plugin package conflict in function; if not, proceed to the hierarchical parsing module.

[0102] The present invention also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the method described in any of the above embodiments.

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

[0104] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

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

[0106] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. An adaptation method, characterized in that, include: S301 retrieves the first file; S302 Obtain the first file type of the first file; S303 determines whether the current operating environment can adapt to the corresponding file type; if not, S304 is executed. S304 Selects at least one plugin package that needs to be adapted to the normal operation of the corresponding file according to the corresponding file type; S305 uses hierarchical parsing rules to determine whether the plug-in package is allowed to be imported into the current operating environment; wherein, S305 includes: S31 obtains the first parsing information of the current plugin package, the first parsing information including: runtime library data; S32 determines whether the first parsed information is complete; if so, proceed to S33. S33 obtains the second parsing information of the plugin package, the second parsing information including: 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. The adaptation method according to claim 1, characterized in that, It also includes the following steps: S306 retrieves the second file; S307 obtains the second file type of the second file; S308 Obtain the first plugin package corresponding to the first file and the second plugin package corresponding to the second file selected according to step S304; S309 determines whether the first plugin package and the second plugin package conflict in function; if not, proceed to S305.

3. The adaptation method according to claim 2, characterized in that, It also includes the following steps: When the result of S309 is yes, obtain the first file priority of the first file and the second file priority of the second file; The plugin package corresponding to the file with higher file priority is identified as the plugin package to be parsed, and the process proceeds to S305.

4. The adaptation method according to claim 1, characterized in that, The plugin package includes: a plugin configuration file and a function file; wherein, the plugin configuration file includes: plugin attribute information and runtime information, and the runtime information includes: the operating environment version supported by the plugin, and the function file includes: runtime library data for executing the extended functions of the plugin.

5. The adaptation method according to claim 4, characterized in that, It also includes the following steps: S36 determines whether the attribute information of the plugin package includes dependency object information, wherein the dependency object refers to another plugin package that needs to be introduced in the current operating environment in order for the current plugin package to run normally in the current operating environment; if yes, proceed to S37; if no, proceed to S31. S37 Query the currently obtained plugin directory table to see if there is a corresponding plugin package to be parsed based on the dependency object information; If so, the queried plugin package to be parsed will be used as the current plugin package to be parsed, and S36 will be returned; If not, the plugin package is not allowed to be imported into the current operating environment.

6. The plug-in management method according to claim 5, characterized in that, The functional file also includes one or more of the following data: UI resources, image resources, and language resources.

7. An adaptation system, characterized in that, include: The first file acquisition module is configured to acquire the first file; The first file type acquisition module is configured to acquire the first file type of the first file. The compatibility judgment module is configured to determine whether the current operating environment can adapt to the corresponding file type. If not, the selection module is then entered. The selection module is configured to select at least one plugin package that needs to be adapted to the normal operation of the corresponding file based on the file type. A hierarchical parsing module is configured to determine whether the plugin package is allowed to be imported into the current operating environment using hierarchical parsing rules; wherein, the hierarchical parsing module includes: The first parsing unit is configured to obtain first parsing information of the current plugin package, the first parsing information including: runtime library data; The first judgment unit is configured to determine whether the first parsed information is complete; if so, it proceeds to the second parsing unit. The second parsing unit is configured to obtain second parsing information of the plugin package, the second parsing information including: operating environment version; The second judgment unit is configured to determine 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.

8. The adaptation system according to claim 7, characterized in that, include: The second file acquisition module is configured to acquire the second file; The second file type acquisition module is configured to acquire the second file type of the second file. The function conflict determination module is configured to obtain a first plugin package corresponding to the first file and a second plugin package corresponding to the second file, as selected by the selection module. And determine whether the first plugin package and the second plugin package conflict in function; if not, proceed to the hierarchical parsing module.

9. A computer-readable storage medium, characterized in that, It stores computer program instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 7.

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