CN113885963B - Secondary development file execution method, device and storage medium - Google Patents
Secondary development file execution method, device and storage medium Download PDFInfo
- Publication number
- CN113885963B CN113885963B CN202111209337.XA CN202111209337A CN113885963B CN 113885963 B CN113885963 B CN 113885963B CN 202111209337 A CN202111209337 A CN 202111209337A CN 113885963 B CN113885963 B CN 113885963B
- Authority
- CN
- China
- Prior art keywords
- secondary development
- development file
- file
- entry function
- command
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a secondary development file executing method, which comprises the steps of acquiring and analyzing registration information of a secondary development file to be registered to obtain all commands corresponding to the secondary development file and the corresponding relation between the commands and an entry function, and storing the commands; then obtaining and analyzing a user input command, matching the user input command with the registered secondary development file according to the analysis result to obtain a corresponding secondary development file, and further obtaining an entry function corresponding to the user input command according to the corresponding relation between the command of the matched secondary development file and the entry function; and finally, calling codes corresponding to the secondary development files according to the entry function corresponding to the user input command and executing the codes. According to the method and the system, all codes are not required to be executed when the secondary development file is loaded each time, so that the system operation efficiency is improved, and the user experience is improved. The invention also discloses a secondary development file executing device and a storage medium.
Description
Technical Field
The present invention relates to execution of secondary development files, and in particular, to a method and apparatus for executing a secondary development file, and a storage medium.
Background
The files formed by the conventional secondary development, such as pycad and pycom, are generally executed sequentially in software, and all codes need to be reloaded and executed each time the files are used to realize corresponding functions. For example, a user writes a Python secondary development file in which the user writes several pieces of code. When a user loads the secondary development file using CAD, all the pieces of code in the secondary development file need to be executed, and for several pieces of code, sequential execution is required in turn, until all the pieces of code have been executed. When a user loads the file each time, all codes of the file are required to be executed, so that the file loading speed is low, and the use experience of the user is affected.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a secondary development file execution method which can solve the problems that in the prior art, when the secondary development file is loaded and used each time, all codes are required to be executed sequentially, so that the system operation efficiency is low and the use experience of a user is influenced.
The second purpose of the invention is to provide a secondary development file executing device, which can solve the problems that in the prior art, when the secondary development file is loaded and used each time, all codes are required to be executed sequentially, so that the system operation efficiency is low, and the use experience of a user is affected.
The third objective of the present invention is to provide a storage medium, which can solve the problem that in the prior art, when a secondary development file is loaded and used each time, all codes need to be executed sequentially, so that the system operation efficiency is low, and the use experience of a user is affected.
One of the purposes of the invention is realized by adopting the following technical scheme:
the secondary development file executing method is applied to the software application, and comprises the following steps:
registering: acquiring registration information of a secondary development file to be registered, analyzing the registration information to obtain all commands corresponding to the secondary development file and the corresponding relation between the commands and the entry function, storing the secondary development file and the corresponding relation between the commands and the entry function, and finishing registration of the secondary development file; the corresponding relation between the commands and the entry functions records the corresponding relation between each command and the corresponding entry relation in a secondary development file;
command acquisition step: acquiring a user input command and analyzing the user input command;
matching: matching the analysis result with the registered secondary development file to obtain a corresponding secondary development file, and further obtaining an entry function corresponding to the user input command according to the corresponding relation between the command of the matched secondary development file and the entry function;
the method comprises the following steps: and calling codes of the corresponding secondary development files according to the entry function corresponding to the user input command and executing the codes.
Further, the secondary development file comprises a plurality of codes; each command corresponds to a plurality of entry functions, and each entry function corresponds to a plurality of codes; the names of different commands and different entry functions are different.
Further, the secondary development file includes a registration entry function; the registering step further includes: acquiring a secondary development file to be registered, obtaining a corresponding registration entry function according to the secondary development file, and then executing codes of the corresponding registration entry function according to protocol rules to obtain registration information of the secondary development file.
Further, the registering step further includes: obtaining version information of the secondary development file according to registration information of the secondary development file and judging whether the secondary development file meets the requirement according to the version information of the secondary development file; if yes, continuing to analyze the registration information to finish the registration of the secondary development file; if not, the registration is exited or a registration error prompt is returned.
Further, the matching step further includes:
a file searching step: obtaining the names of the corresponding secondary development files according to the analysis result of the user input command, searching the storage positions of the secondary development files which are registered according to the names of the corresponding secondary development files, and further obtaining the corresponding secondary development files;
code searching: and obtaining an entry function corresponding to the user input command according to the analysis result of the user input command and the corresponding secondary development file.
Further, the executing step further includes: judging whether the execution is successful or not according to the execution result; if yes, the operation is ended; if not, prompting error information.
Further, in the executing step, after the operation is finished, the resource is released.
Further, storing the registered secondary development file and the corresponding relation between the corresponding command and the entry function in a database or a system; the corresponding relation between the command and the entry function is stored in a text form or an array form.
The second purpose of the invention is realized by adopting the following technical scheme:
a secondary development file execution device comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the computer program is a secondary development file execution program, and the steps of a secondary development file execution method adopted by one of the purposes of the invention are realized when the processor executes the secondary development file execution program.
The third purpose of the invention is realized by adopting the following technical scheme:
a storage medium which is a computer-readable storage medium having stored thereon a computer program which is a secondary development file execution program for executing steps of a secondary development file execution method employed as one of the objects of the present invention.
Compared with the prior art, the invention has the beneficial effects that:
according to the method and the system, the code sub-modules for realizing different functions in the secondary development file are divided and form the corresponding functions, and the corresponding relations between different function commands and the entry functions corresponding to the codes are registered in the software application in advance when the file is loaded, so that when a user needs to realize a certain function, the corresponding codes can be executed through the input of the corresponding commands through the provided input interface, the corresponding function operation can be realized, all the codes of the whole secondary development file are not required to be sequentially executed in sequence, the system operation efficiency is improved, and the user experience is improved.
Drawings
FIG. 1 is a flow chart of a method for executing a secondary development file provided by the invention;
FIG. 2 is a flowchart of step S3 in FIG. 1;
FIG. 3 is a flowchart of step S4 in FIG. 1;
FIG. 4 is a block diagram of a secondary development file execution device according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and detailed description, wherein it is to be understood that, on the premise of no conflict, the following embodiments or technical features may be arbitrarily combined to form new embodiments.
Example 1
The invention divides a plurality of codes for realizing the same or similar functions into one module by integrating the development codes of the existing secondary development files, thereby modularization of the codes in the secondary development files is realized, and each module realizes one function; meanwhile, a plurality of codes of each module are provided with an entry function, when one function is needed to be realized, the corresponding codes are directly called through the entry function corresponding to the function, all codes are not needed to be executed sequentially, the running efficiency of the system is improved, and the user experience is improved.
For better illustration, this embodiment is described by taking the example of loading Python secondary development files in CAD:
wherein, the Python secondary development file comprises a plurality of codes. Several pieces of code may implement one or more functions. The present embodiment represents each function in terms of commands. That is, each command includes several pieces of code, and each command is provided with a corresponding entry function through which the corresponding code is called.
Specifically, command 1 corresponds to 7 th to 9 th codes in the Python secondary development file, command 2 corresponds to 15 th to 20 th codes and 30 th to 45 th codes in the Python secondary development file, and command 3 corresponds to 21 st to 29 th codes in the Python secondary development file.
Therefore, when a user needs to execute a certain command in the CAD, the corresponding command name can be input through the interaction interface provided by the CAD, the entry function corresponding to the command can be found out in the Python secondary development file, and then the corresponding codes are called according to the entry function to execute, so that the CAD does not need to execute all the codes in the whole Python secondary development file, the system operation efficiency is improved, and the user experience is improved.
In addition, since the Python secondary development file is in the loading domain CAD software, the code is called by the CAD software when executing, and in order to facilitate the CAD software to find the corresponding code in the Python secondary development file according to the received user input command, the embodiment further configures the Python secondary development file when the Python secondary development file is first used, so as to store the correspondence between each command in the Python secondary development file and the corresponding entry function in the CAD software. Thus, after the CAD software obtains the user input command, the corresponding entry function can be found out from the corresponding relation stored in the CAD software according to the user input command, and then the corresponding code is called and executed.
In addition, to make writing of code easier, code for different commands can be reused.
Specifically, a python quadratic development file is used for realizing the functions of drawing a straight line and drawing a circle, that is, the file includes two commands: drawing a straight line CreateLine and drawing a circular CreateCircle, and writing several codes for these two commands, respectively, to form the python secondary development file.
Meanwhile, when the code is written, the entry functions corresponding to the two commands are functionLine, functionCircle respectively. The corresponding command is: drawing an entry function corresponding to a straight line CreateLine as a functionLine; an entry function corresponding to a circular CreateCircle is drawn as a functionCircle.
When the python secondary development file is used in the CAD software for the first time, the corresponding relation is firstly stored in the CAD software to finish the registration of the python secondary development file in the CAD software.
Furthermore, the embodiment also writes a registration entry function in the python secondary development file, where the registration entry function is used to store the correspondence between each command in the python secondary development file and the entry function.
When a user starts CAD and loads the python secondary development file for the first time by using a loading command, the python secondary development file is firstly analyzed to obtain a registration entry function, then the registration entry function is executed according to a protocol rule to obtain the corresponding relation between each command in the python secondary development file and the corresponding entry function, and the corresponding relation is stored in CAD software, so that the registration of the python secondary development file is completed.
More specifically, the corresponding relation between each command and the entry function is stored in a text or array form, and the formed file is stored in a database or CAD software, so that the CAD software only needs to record the storage path of the file.
In addition, when the CAD software loads the Python secondary development file, not only all commands in the Python secondary development file are acquired, but also the version information of the Python secondary development file is acquired, and whether the version information of the Python secondary development file meets the system requirements is judged by checking the version information. Specifically, judging whether the version information of the python secondary development file is consistent with the interior of the CAD software, if not, indicating that the version information supported by the CAD software is inconsistent with the version information of the python secondary development file, and ending the registration flow if the version information of the python secondary development file is not consistent with the version information of the python secondary development file; if the two steps are consistent, the next step is continued.
And after the version verification is successful, analyzing the corresponding relation between the command of the python secondary development file and the entry function, and finishing registration.
Further, in order to ensure that CAD can correctly identify and parse registration information in Python secondary development files, this embodiment also specifies Python secondary development files as follows:
1) A registration entry function is arranged in the Python secondary development file.
Of course, in the actual application process, the registration information can be written by a developer and then automatically imported into the system.
2) All commands in the python quadric file are included in the registration entry function. The commands may exist in the form of a list.
3) The naming of each command in the python quadric development file is not repeated, nor is the naming of the entry function repeated. By not repeating naming, call confusion can be avoided.
4) The python secondary development file needs to contain the name of each command, the name of the entry function corresponding to each command, the several codes corresponding to each entry function, and the like when registering.
5) The parameter sequence related in the python secondary development file is fixed, and CAD software sequentially analyzes according to the parameters.
When a user needs to realize a certain function operation, the name of a corresponding command is input on an input interface provided by the CAD according to the function operation, the CAD software can search and match to obtain a corresponding python secondary development file after obtaining the user input command, and then a corresponding entry function is obtained, and then the CAD software is called and executed according to a normal code execution method. Specifically, for example, the python context environment is called to execute the entry function corresponding to the user input command in the corresponding python secondary development file, so that the python context environment calls a plurality of codes through the python interpreter according to the storage path of the python secondary development file and the entry function of the user input command, and the secondary development function operation required by the user is completed.
For example, after registration of the python secondary development file is completed, the correspondence between commands in the python secondary development file and entry relations has been stored in CAD software. Thus, a user can input a command CreateCircle, CAD in an input interface provided by CAD software to obtain the command, then find the corresponding Python secondary development file, further obtain that the entry function corresponding to the command is funcitoncircle, then execute the code corresponding to the entry function funcitoncircle through a Python interpreter, thereby completing the operation of drawing circles, and then can see that a circle is drawn in the CAD.
Based on the above description, the present embodiment provides a preferred embodiment, a secondary development file execution method, as shown in fig. 1-3, comprising the steps of:
and S1, acquiring registration information of the secondary development file to be registered, analyzing the registration information to obtain all commands corresponding to the secondary development file and the corresponding relation between the commands and the entry function, and storing the secondary development file and the corresponding relation between the commands and the entry function to finish the registration of the secondary development file.
The registration information comprises data such as file names of secondary development files, file sizes, names of one or more commands, entry functions corresponding to each command and the like.
And according to the registration information, the registration of the secondary development file can be completed in the corresponding software application.
More specifically, the corresponding registration entry function is obtained by loading a secondary development file to be registered and obtaining the corresponding registration entry function according to the secondary development file, and then the corresponding registration entry function is executed according to the protocol rule to obtain the corresponding registration information.
The protocol rule refers to a file format, for example, when the secondary development file is registered in the CAD, the secondary development file needs to follow the following rules, so that the CAD can recognize and obtain the registration information according to the protocol rule. The protocol rule specifically includes: the Python secondary development file needs to have a command registration entry function, command registration is completed in the command registration entry function uniformly, the Python registration command is not repeated, command registration information needs to contain information such as command names, function names corresponding to the commands and the like, the sequence of each parameter is fixed, and CAD is analyzed according to the sequence of the parameters.
More specifically, the registration information also includes version information of the secondary development file. Before registration, judging whether version information of the secondary development file meets the system requirement or not, if so, continuing the next step; if not, the secondary development file is not matched with the software application, and the registration is exited.
And S2, acquiring a user input command and analyzing the user input command.
An input interface is provided by the software application to obtain user input commands.
And step S3, matching the analysis result with the registered secondary development file to obtain a corresponding secondary development file, and further obtaining an entry function corresponding to the user input command according to the corresponding relation between the command of the matched secondary development file and the entry function.
And S4, calling a plurality of codes corresponding to the secondary development file according to the entry function corresponding to the user input command and executing the codes.
Since one command has a corresponding entry function, execution of the code is performed by finding the corresponding code in the secondary development file according to the entry function. In addition, the present invention is not specifically described with respect to a process of calling and executing code in a secondary development file, which is well known to those skilled in the art.
Further, as shown in fig. 2, step S3 further includes:
and S31, obtaining the names of the corresponding secondary development files according to the analysis result of the user input command, searching the storage positions of the secondary development files which are registered according to the names of the corresponding secondary development files, and further obtaining the corresponding secondary development files. And searching and obtaining the secondary development file which has completed registration according to the user input command.
If the function cannot be found, the function is considered to be finished, and the user can exit.
And step S32, obtaining an entry function corresponding to the user input command according to the analysis result of the user input command and the corresponding secondary development file.
Because each secondary development file stores the corresponding relation between the corresponding command and the entry function during registration. Therefore, the corresponding entry function can be obtained by matching the user input command with the searched secondary development file.
Further, as shown in fig. 3, step S4 further includes:
step S41, calling and executing a plurality of codes corresponding to the secondary development files according to the entry function corresponding to the user input command.
Step S42, judging whether the execution is successful or not according to the execution result; if yes, the operation is ended; if not, prompting error information.
Judging whether the operation is correct or not according to the execution result, for example, the command for drawing a circle is input, judging whether a circular pattern is formed in the CAD software according to the execution result, if not, judging that the execution is failed, and prompting error information; if the circle is drawn, the operation is finished.
Further, for step S42, the resources are released when the operation is ended. By releasing the resources in time, the system resources are prevented from being occupied for a long time, and the use of software is prevented from being influenced.
The embodiment is mainly described in terms of loading secondary development files in CAD software, but the embodiment is not limited to CAD software applications, and can be applied to various software capable of loading secondary development files, such as QQ, PS, SOLIDWORKS, etc.
Example two
Based on the first embodiment, the invention also provides a secondary development file executing device. As shown in fig. 4, an internal structure diagram of a secondary development file executing apparatus according to an embodiment of the present invention is provided.
In this embodiment, a secondary development file executing device may be a PC (Personal Computer ), or may be a terminal device such as a smart phone, a tablet computer, or a portable computer. The secondary development file execution device at least comprises: a processor 12, a communication bus 13, a network interface 14 and a memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of a secondary development file execution device, such as a hard disk of the secondary development file execution device. The memory 11 may also be an external storage device of a secondary development file execution apparatus in other embodiments, for example, a plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash memory Card (Flash Card) or the like provided on the secondary development file execution apparatus. Further, the memory 11 may also include both an internal storage unit and an external storage device of a secondary development file execution apparatus. The memory 11 may be used not only for storing application software installed in a secondary development file execution apparatus and various types of data, for example, code of a secondary development file execution program or the like, but also for temporarily storing data that has been output or is to be output.
Processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program code or processing data stored in memory 11, such as executing a secondary development file execution program or the like.
The communication bus 13 is used to enable connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication connection between the one secondary development file execution device and other electronic devices.
Optionally, the secondary development file executing apparatus may further include a user interface, where the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or a display unit, as appropriate, for displaying information processed in a secondary development file execution device and for displaying a visual user interface.
Fig. 4 shows only one type of secondary development document delivery device having components 11-14 and a secondary development document delivery program, and those skilled in the art will appreciate that the configuration shown in fig. 4 is not limiting of one type of secondary development document delivery device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In one embodiment of the secondary development file execution apparatus shown in fig. 4, a secondary development file execution program is stored in the memory 11; the processor 12 executes the secondary development file execution program stored in the memory 11, and performs the following steps:
registering: acquiring registration information of a secondary development file to be registered, analyzing the registration information to obtain all commands corresponding to the secondary development file and the corresponding relation between the commands and the entry function, storing the secondary development file and the corresponding relation between the commands and the entry function, and finishing registration of the secondary development file; the corresponding relation between the commands and the entry functions records the corresponding relation between each command and the corresponding entry relation in a secondary development file;
command acquisition step: acquiring a user input command and analyzing the user input command;
matching: matching the analysis result with the registered secondary development file to obtain a corresponding secondary development file, and further obtaining an entry function corresponding to the user input command according to the corresponding relation between the command of the matched secondary development file and the entry function;
the method comprises the following steps: and calling codes of the corresponding secondary development files according to the entry function corresponding to the user input command and executing the codes.
Further, the secondary development file comprises a plurality of codes; each command corresponds to a plurality of entry functions, and each entry function corresponds to a plurality of codes; the names of different commands and different entry functions are different.
Further, the secondary development file includes a registration entry function; the registering step further includes: acquiring a secondary development file to be registered, obtaining a corresponding registration entry function according to the secondary development file, and then executing codes of the corresponding registration entry function according to protocol rules to obtain registration information of the secondary development file.
Further, the registering step further includes: obtaining version information of the secondary development file according to registration information of the secondary development file and judging whether the secondary development file meets the requirement according to the version information of the secondary development file; if yes, continuing to analyze the registration information to finish the registration of the secondary development file; if not, the registration is exited or a registration error prompt is returned.
Further, the matching step further includes:
a file searching step: obtaining the names of the corresponding secondary development files according to the analysis result of the user input command, searching the storage positions of the secondary development files which are registered according to the names of the corresponding secondary development files, and further obtaining the corresponding secondary development files;
code searching: and obtaining an entry function corresponding to the user input command according to the analysis result of the user input command and the corresponding secondary development file.
Further, the executing step further includes: judging whether the execution is successful or not according to the execution result; if yes, the operation is ended; if not, prompting error information.
Further, in the executing step, after the operation is finished, the resource is released.
Further, storing the registered secondary development file and the corresponding relation between the corresponding command and the entry function in a database; the corresponding relation between the command and the entry function is stored in a text form or an array form.
Example III
Based on the second embodiment provided by the present invention, the present invention further provides an embodiment, a storage medium, where the storage medium is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is a secondary development file execution program, where when the secondary development file execution program is executed by a processor, the following steps are implemented:
registering: acquiring registration information of a secondary development file to be registered, analyzing the registration information to obtain all commands corresponding to the secondary development file and the corresponding relation between the commands and the entry function, storing the secondary development file and the corresponding relation between the commands and the entry function, and finishing registration of the secondary development file; the corresponding relation between the commands and the entry functions records the corresponding relation between each command and the corresponding entry relation in a secondary development file;
command acquisition step: acquiring a user input command and analyzing the user input command;
matching: matching the analysis result with the registered secondary development file to obtain a corresponding secondary development file, and further obtaining an entry function corresponding to the user input command according to the corresponding relation between the command of the matched secondary development file and the entry function;
the method comprises the following steps: and calling codes of the corresponding secondary development files according to the entry function corresponding to the user input command and executing the codes.
Further, the secondary development file comprises a plurality of codes; each command corresponds to a plurality of entry functions, and each entry function corresponds to a plurality of codes; the names of different commands and different entry functions are different.
Further, the secondary development file includes a registration entry function; the registering step further includes: acquiring a secondary development file to be registered, obtaining a corresponding registration entry function according to the secondary development file, and then executing codes of the corresponding registration entry function according to protocol rules to obtain registration information of the secondary development file.
Further, the registering step further includes: obtaining version information of the secondary development file according to registration information of the secondary development file and judging whether the secondary development file meets the requirement according to the version information of the secondary development file; if yes, continuing to analyze the registration information to finish the registration of the secondary development file; if not, the registration is exited or a registration error prompt is returned.
Further, the matching step further includes:
a file searching step: obtaining the names of the corresponding secondary development files according to the analysis result of the user input command, searching the storage positions of the secondary development files which are registered according to the names of the corresponding secondary development files, and further obtaining the corresponding secondary development files;
code searching: and obtaining an entry function corresponding to the user input command according to the analysis result of the user input command and the corresponding secondary development file.
Further, the executing step further includes: judging whether the execution is successful or not according to the execution result; if yes, the operation is ended; if not, prompting error information.
Further, in the executing step, after the operation is finished, the resource is released.
Further, storing the registered secondary development file and the corresponding relation between the corresponding command and the entry function in a database; the corresponding relation between the command and the entry function is stored in a text form or an array form.
The above embodiments are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but any insubstantial changes and substitutions made by those skilled in the art on the basis of the present invention are intended to be within the scope of the present invention as claimed.
Claims (9)
1. The secondary development file execution method is applied to software application, and the secondary development file is a Python secondary development file; the method is characterized by comprising the following steps of:
registering: acquiring registration information of a secondary development file to be registered, analyzing the registration information to obtain all commands corresponding to the secondary development file and the corresponding relation between the commands and the entry function, storing the secondary development file and the corresponding relation between the commands and the entry function, and finishing registration of the secondary development file; the corresponding relation between each command and the corresponding entry function in a secondary development file is recorded;
command acquisition step: acquiring a user input command and analyzing the user input command;
matching: matching an analysis result obtained by analyzing the user input command with the registered secondary development file to obtain a corresponding secondary development file, and further obtaining an entry function corresponding to the user input command according to the corresponding relation between the command of the matched secondary development file and the entry function;
the method comprises the following steps: calling codes of corresponding secondary development files according to the entry function corresponding to the user input command and executing the codes; the secondary development file comprises a plurality of codes; each command corresponds to a plurality of entry functions, and each entry function corresponds to a plurality of codes; the names of different commands and different entry functions are different.
2. The secondary development file execution method according to claim 1, wherein the secondary development file includes a registration entry function; the registering step further includes: acquiring a secondary development file to be registered, obtaining a corresponding registration entry function according to the secondary development file, and then executing codes of the corresponding registration entry function according to protocol rules to obtain registration information of the secondary development file.
3. The secondary development file execution method according to claim 1, wherein the registering step further comprises: obtaining version information of the secondary development file according to registration information of the secondary development file and judging whether the secondary development file meets the requirement according to the version information of the secondary development file; if yes, continuing to analyze the registration information to finish the registration of the secondary development file; if not, the registration is exited or a registration error prompt is returned; where meeting the requirements means that the secondary development file matches the software application.
4. The secondary development file execution method according to claim 1, wherein the matching step further comprises:
a file searching step: obtaining the names of the corresponding secondary development files according to the analysis result of the user input command, searching the storage positions of the secondary development files which are registered according to the names of the corresponding secondary development files, and further obtaining the corresponding secondary development files;
code searching: and obtaining an entry function corresponding to the user input command according to the analysis result of the user input command and the corresponding secondary development file.
5. The secondary development file execution method according to claim 1, wherein the execution step further comprises: judging whether the execution is successful or not according to the execution result; if yes, the operation is ended; if not, prompting error information.
6. The secondary development file execution method according to claim 5, wherein the execution step releases the resource after the operation is completed.
7. The secondary development file execution method according to claim 1, wherein the registered secondary development file and the correspondence relationship between the corresponding command and the entry function are stored in a database or a system; the corresponding relation between the command and the entry function is stored in a text form or an array form.
8. A secondary development file execution apparatus comprising a memory, a processor, and a computer program stored on the memory and running on the processor, the computer program being a secondary development file execution program, characterized in that the processor, when executing the secondary development file execution program, implements the steps of a secondary development file execution method according to any one of claims 1-7.
9. A storage medium, which is a computer-readable storage medium, on which a computer program is stored, the computer program being a secondary development file execution program, characterized in that the secondary development file execution program is for executing the steps of a secondary development file execution method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111209337.XA CN113885963B (en) | 2021-10-18 | 2021-10-18 | Secondary development file execution method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111209337.XA CN113885963B (en) | 2021-10-18 | 2021-10-18 | Secondary development file execution method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113885963A CN113885963A (en) | 2022-01-04 |
CN113885963B true CN113885963B (en) | 2023-04-21 |
Family
ID=79003257
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111209337.XA Active CN113885963B (en) | 2021-10-18 | 2021-10-18 | Secondary development file execution method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113885963B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620536A (en) * | 2009-08-17 | 2010-01-06 | 用友软件股份有限公司 | Method and device for invoking performance function |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104899070B (en) * | 2015-05-19 | 2018-11-02 | 京信通信系统(中国)有限公司 | Implementation method, system and the device of device command row |
CN109739576B (en) * | 2018-12-29 | 2022-03-25 | 杭州迪普科技股份有限公司 | Configuration overview command execution method and device, computer equipment and storage medium thereof |
CN111045989A (en) * | 2019-10-25 | 2020-04-21 | 苏州浪潮智能科技有限公司 | Method, device and medium for querying CPLD version information |
-
2021
- 2021-10-18 CN CN202111209337.XA patent/CN113885963B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620536A (en) * | 2009-08-17 | 2010-01-06 | 用友软件股份有限公司 | Method and device for invoking performance function |
Also Published As
Publication number | Publication date |
---|---|
CN113885963A (en) | 2022-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108920370B (en) | Compatibility problem detection method, device and equipment | |
CN109558525B (en) | Test data set generation method, device, equipment and storage medium | |
CN110287098A (en) | Automatically create test script method, server and computer readable storage medium | |
CN107908553B (en) | Association testing method, application server and computer readable storage medium | |
CN110928802A (en) | Test method, device, equipment and storage medium based on automatic generation of case | |
CN108959067B (en) | Method and device for testing search engine and computer readable storage medium | |
CN107797823B (en) | Business rule management method and device, storage medium and computer equipment | |
CN109815141B (en) | Test method and device | |
CN111177113A (en) | Data migration method and device, computer equipment and storage medium | |
CN111124872A (en) | Branch detection method and device based on difference code analysis and storage medium | |
CN110659210A (en) | Information acquisition method and device, electronic equipment and storage medium | |
CN116245074A (en) | Chip verification method, device and storage medium | |
CN111352851A (en) | Program testing method and device, computer equipment and storage medium | |
CN108023905B (en) | Internet of things application system and method | |
CN111538672A (en) | Test case layered test method, computer device and computer-readable storage medium | |
CN112433935A (en) | Test method, test device, electronic equipment and storage medium | |
CN107766228B (en) | Multi-language-based automatic testing method and device | |
CN113885963B (en) | Secondary development file execution method, device and storage medium | |
CN110908882A (en) | Performance analysis method and device of application program, terminal equipment and medium | |
CN114020278B (en) | Data processing method, device, equipment and storage medium | |
CN109446105A (en) | Web application test method, device, readable medium and electronic equipment | |
CN115550826A (en) | MIC array detection and analysis method, device, equipment and storage medium | |
CN106844186B (en) | Offline test method of application and terminal equipment | |
CN112003837A (en) | Intelligent equipment adaptation method and device based on Modbus protocol and storage medium | |
CN111552634A (en) | Method and device for testing front-end system and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |