CN117707643A - Plug-in building method and device and plug-in running method and device - Google Patents

Plug-in building method and device and plug-in running method and device Download PDF

Info

Publication number
CN117707643A
CN117707643A CN202311659221.5A CN202311659221A CN117707643A CN 117707643 A CN117707643 A CN 117707643A CN 202311659221 A CN202311659221 A CN 202311659221A CN 117707643 A CN117707643 A CN 117707643A
Authority
CN
China
Prior art keywords
plug
data
program
changeable
package
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.)
Pending
Application number
CN202311659221.5A
Other languages
Chinese (zh)
Inventor
禹业藂
杨蕾
张奥爽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311659221.5A priority Critical patent/CN117707643A/en
Publication of CN117707643A publication Critical patent/CN117707643A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a plug-in building method and device and a plug-in running method and device. The method comprises the steps of obtaining original layered data of a plug-in, wherein the number of the original layered data is multiple; dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data; in response to the data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address; responding to the creation operation of the universal base program, creating the universal base program, and storing the target download address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in. The method for constructing the plug-in unit is realized, the problem of low plug-in unit development efficiency caused by image non-variability and the problem of coupling of layered data are solved, the flexibility and the universality of the plug-in unit construction method are improved, the plug-in unit development efficiency is effectively improved, and the use requirement of a cloud primary assembly line is met.

Description

Plug-in building method and device and plug-in running method and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a plug-in building method and device, and a plug-in running method and device.
Background
Along with the development of cloud computing, a cloud native pipeline is also increasingly widely applied, and the implementation form of a cloud native pipeline plug-in is that a pipeline tool is generally manufactured into a Docker mirror image, and a pipeline platform can sequentially call up the execution of the Docker mirror image corresponding to the plug-in according to a pre-arranged plug-in flow in the pipeline, so that the pipeline operation is realized.
The mirror image is a carrier of the plug-in function, when the plug-in is normally released towards a user, the mirror image corresponding to the plug-in is not changed at will, otherwise, the use of the user is affected, the integrity and the non-variability of the plug-in are limited, all layers are used as a whole, if the situation that the plug-in core function layer needs to be changed exists, the whole mirror image corresponding to the plug-in needs to be manufactured again once the plug-in core function layer is changed, and the plug-in also needs to be released again, so that the unnecessary mirror image changing range is enlarged, the release efficiency is reduced, the quick repair requirement of the functional defect of the plug-in is difficult to meet in time, the problem that the development efficiency of the plug-in is low is solved, and the use requirement of a cloud primary assembly line cannot be met.
Disclosure of Invention
The invention provides a plug-in building method and device and a plug-in running method and device, which are used for solving the problem of low plug-in development efficiency in the prior art.
According to an aspect of the present invention, there is provided a plug-in building method, including:
obtaining the original layered data of the plug-in, wherein the number of the original layered data is multiple;
dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data;
in response to the data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address;
responding to the creation operation of the universal base program, creating the universal base program, and storing the target download address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in.
Optionally, dividing the original hierarchical data into the change data and the plug-in base mirror data based on the historical change frequency of the original hierarchical data includes:
counting historical change frequencies corresponding to a plurality of original layered data of the plug-in;
and determining the original layered data with the history change frequency larger than or equal to a preset frequency threshold value as change data, and determining the original layered data with the history change frequency smaller than the preset frequency threshold value as plug-in base mirror image data.
Optionally, the original layered data includes a control program start script, a tool control program, tool software and base software;
the changeable data packet comprises a control program starting script and a tool control program; the plug-in base image data includes tool software and base software.
Optionally, the universal base program is configured to download the changeable package based on the target download address, decompress the changeable package, and call up the changeable package when activated.
According to another aspect of the invention, a plug-in running method is provided, and is applied to a plug-in, wherein the plug-in comprises a universal base program and plug-in base mirror image data; the method comprises the following steps:
responding to the plug-in starting operation, starting a universal base program of the plug-in, and acquiring a changeable program package through a target downloading address prestored in the universal base program;
and calling up the changeable program package and calling up basic mirror image data of the plug-in to realize the operation of the plug-in.
Optionally, the changeable data packet includes a control program start script and a tool control program; the plug-in basic mirror image data comprises tool software and basic software;
the method for calling up the changeable program package and calling up the plug-in basic mirror image data comprises the following steps:
decompressing the changeable program package to obtain a control program starting script and a tool control program;
calling a control program starting script, and starting a tool control program to execute preset logic;
and calling the tool software, and calling the operation of the basic software through the tool software.
Alternatively, according to another aspect of the present invention, there is provided an insert-building apparatus including:
the device comprises an original layered data acquisition module, a processing module and a processing module, wherein the original layered data acquisition module is used for acquiring original layered data of a plug-in unit, and the number of the original layered data is multiple;
the original layered data dividing module is used for dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data;
the changeable data acquisition module is used for responding to the data storage operation, carrying out data compression on the changeable data to form a changeable data packet, and storing the changeable data packet to a target download address;
the target hierarchical data acquisition module is used for responding to the creation operation of the universal base program, creating the universal base program and storing a target downloading address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in.
Optionally, according to another aspect of the present invention, there is provided a plug-in running device, including:
the changeable program package determining module is used for responding to the plug-in starting operation, starting a universal base program of the plug-in, and acquiring a changeable program package through a target downloading address prestored in the universal base program;
and the changeable program package execution module is used for calling the changeable program package and calling the basic mirror image data of the plug-in to realize the operation of the plug-in.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the plug-in building method and/or the plug-in running method of any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the plug-in building method and/or the plug-in running method of any of the embodiments of the present invention when executed.
According to the technical scheme, the original layered data of the plug-in are obtained, and the number of the original layered data is multiple; dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data; in response to the data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address; responding to the creation operation of the universal base program, creating the universal base program, and storing the target download address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in. The method for constructing the plug-in unit in a layered manner is realized through the scheme, meanwhile, the method for reconstructing the plug-in unit can be realized by changing the changeable program package only and without changing the target layered data, the problem of low development efficiency caused by the non-variability of the mirror image of the plug-in unit is solved, the flexibility and the universality of the plug-in unit construction method are improved, the plug-in unit development efficiency is effectively improved, and therefore, the quick repair requirement of the functional defects of the plug-in unit is met, and the use requirement of a cloud primary assembly line is met.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a plug-in building method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a plug-in operation method according to a second embodiment of the present invention;
FIG. 3 is a schematic structural view of an apparatus for constructing an insert according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a plug-in running device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a plug-in building method and/or a plug-in running method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a plug-in building method according to a first embodiment of the present invention, where the method may be performed by a plug-in building device, and the plug-in building device may be implemented in hardware and/or software, and the plug-in building device may be configured in a computer. As shown in fig. 1, the method includes:
s110, acquiring the original layered data of the plug-in, wherein the number of the original layered data is multiple.
Plug-in (Plug-in) is specifically understood as a program developed according to a certain specification, usually running in a specific environment, relying on specific basic software, relying on a piece of program logic to implement an atomization function, and each Plug-in can be independently developed, tested and deployed. The original layered data can be specifically understood as a carrier developed according to the plug-in logic layering principle and used for realizing the plug-in function, and it should be noted that the original layered data can be stored in a mirror image manner, and the original layered data is executed when the plug-in is called. Optionally, the raw hierarchical data includes control program start-up scripts, tool control programs, tool software, and base software.
Specifically, corresponding custom plug-in source codes, namely, original layered data corresponding to plug-ins are written according to the function of the plug-ins and the layered development principle, wherein the original layered data comprises a control program start script, a tool control program, tool software and basic software.
The cloud native pipeline plugin is realized by manufacturing a pipeline tool into a Docker mirror image, and a pipeline platform can sequentially call up execution of the Docker mirror image corresponding to the plugin according to a preset plugin flow in the pipeline, so that the operation of the pipeline is realized. In this process, the Docker mirror image is a carrier of a plug-in function, that is, the manufacture of the Docker mirror image is a key for constructing the plug-in, in this embodiment, corresponding custom plug-in source codes, that is, original layered data corresponding to the plug-in, are written according to the plug-in function, it is understood that the original layered data of the plug-in can be matched from a custom mirror image library, if there is data matched with the plug-in function in the mirror image library can be directly read, and if there is no data matched with the plug-in function, corresponding custom plug-in source codes can be written according to the plug-in function according to a layered development principle, that is, the original layered data of the plug-in is obtained.
S120, dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data.
The history change frequency can be specifically understood as the number of changes corresponding to various types of data in the original layered data in a preset history period. The change times corresponding to various data can be compared with a preset threshold value to judge whether the original layered data belongs to the change data or the basic mirror image data of the plug-in.
Specifically, the number of times of changing various data in the original layered data in a preset time period can be counted according to the version numbers corresponding to the various data, so that the historical changing frequency corresponding to the various data in the original layered data is obtained, and further, the original layered data is divided into changed data and plug-in basic mirror image data based on the historical changing frequency of the original layered data. Optionally, the original layered data includes a control program start script, a tool control program, tool software and basic software, where the tool software refers to open source software or enterprise purchasing software, has a function guarantee, is low in coupling with other plugins, and exemplary, can set a history change frequency corresponding to the tool software to 0; the basic software is universal and has good functional compatibility, and the history change frequency corresponding to the basic software can be set to be 0 by way of example; the tool control program is tool control logic, is mainly used for calling tool software, and is also used for detecting the execution progress of the tool software, acquiring an execution result, judging whether the execution result meets the requirement, cleaning the execution environment and the like, and the history change frequency corresponding to the tool control program can be counted according to the corresponding version number; the control program starting script is used for calling the execution of the tool control program, and the history change frequency corresponding to the control program starting script can be counted according to the corresponding version number; after the historical change frequencies corresponding to various data in the original layered data are determined, the original layered data are divided based on the historical change frequencies of the original layered data, a control program starting script and a tool control program with relatively high change frequencies are divided into changeable data packets, and tool software and basic software with relatively low change frequencies are divided into plug-in basic mirror image data.
Optionally, dividing the original hierarchical data into the change data and the plug-in base mirror data based on the historical change frequency of the original hierarchical data includes: counting historical change frequencies corresponding to a plurality of original layered data of the plug-in; and determining the original layered data with the history change frequency larger than or equal to a preset frequency threshold value as change data, and determining the original layered data with the history change frequency smaller than the preset frequency threshold value as plug-in base mirror image data.
Specifically, version numbers corresponding to a plurality of original layered data corresponding to the plug-in units can be obtained, historical change frequencies corresponding to the original layered data are counted based on the version numbers, the original divided data are divided by comparing the magnitude relation between the historical change frequencies and the preset frequency threshold, the original layered data with the historical change frequencies being greater than or equal to the preset frequency threshold are determined to be changed data, and the original layered data with the historical change frequencies being smaller than the preset frequency threshold are determined to be plug-in unit basic mirror image data.
It should be noted that, instead of the smaller and better preset frequency threshold, the performance of the plugin and the system needs to be comprehensively considered, if the preset frequency threshold is smaller, the more the divided change data will be, so that the longer the waiting time is needed when the change data is obtained later, the system response time is affected, and the performance of the system is also affected, therefore, the reasonable preset frequency threshold needs to be set by comprehensively considering the historical change frequency corresponding to the original layered data and the system response time of the plugin corresponding to the system call changeable data.
On the basis of the embodiment, by setting a reasonable preset frequency threshold, the original layered data is divided into the changed data and the basic image data of the plug-in based on the historical change frequency corresponding to the original layered data, so that the follow-up separation of the changed data from the original layered data is facilitated, the overall change frequency of the image corresponding to the plug-in can be reduced, the image data corresponding to the plug-in can be guaranteed not to be changed frequently, and the plug-in development efficiency is improved.
And S130, in response to the data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address.
The target download address may be specifically understood as an address for storing the change data, may be an address allocated on a server, may be an address on a code hosting platform, or may be an address corresponding to a cluster, and is not limited herein.
Specifically, when an instruction corresponding to the data storage operation is received, the modified data is compressed, and the obtained modified compressed packet is stored in the target download address.
S140, responding to the creation operation of the universal base program, creating the universal base program, and storing the target download address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in.
The general base program is specifically understood to be a software with a downloading function, a decompressing function and a function of calling a control program to start a script, and also provides a function of storing a target downloading address, so that the operation of at least one type of program package conforming to a unified specification can be completed, but the specific logic of the program package is not required to be concerned, the general base program is strong in universality, and an exemplary general base program is set as a base. The plug-in base image data includes tool software, illustratively set as tool. Jar, and base software, including but not limited to JRE, maven.
Specifically, under the condition of plug-in construction, a general base program is created, a target download address stored by a changeable data packet is stored in the general base program, the general base program and plug-in basic mirror image data are used as target layered data of the plug-in, mirror image storage can be performed on the target layered data, and corresponding target layered data are read from a mirror image library when the plug-in is executed.
In this embodiment, the target download address of the changeable data in the original layered data is stored in the universal base program, the universal base program and the basic image data are used as the target layered data of the plug-in, and the target download address corresponding to the changeable data is stored in the universal base program, so that the changeable data with large change frequency is replaced by the universal base program with relatively small change frequency, the problem of failure of the integral image caused by the change of a small part of files of the image of the plug-in is greatly reduced, the construction method of the plug-in is reasonably optimized, the development efficiency of the plug-in is improved, and the method supports the emergency repair scene of the plug-in defects.
Optionally, the universal base program is configured to download the changeable package based on the target download address, decompress the changeable package, and call up the changeable package when activated.
Specifically, under the condition of starting the universal base program, the universal base program downloads a corresponding changeable program package according to a stored target download address, decompresses the changeable program package to obtain a decompressed changeable program package, and transfers the decompressed changeable program package to a plug-in running environment, and the corresponding changeable program package can be called up through a call-up control program starting script in the universal base program, so that the tool software calls up the basic software to realize the tool function of the tool software.
In this embodiment, the general base program and the plug-in basic image data are used as the target layered data of the plug-in, and the target layered data are used as the image file of the plug-in, so that the changing frequency corresponding to the plug-in can be effectively reduced, and the development efficiency of the plug-in is improved.
According to the technical scheme of the embodiment, the original layered data of the plug-in are obtained, and the number of the original layered data is multiple; dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data; in response to the data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address; responding to the creation operation of the universal base program, creating the universal base program, and storing the target download address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in. The method for constructing the plug-in a layered manner is realized through the scheme, meanwhile, the method for reconstructing the plug-in is realized by only changing the changeable program package without changing the target layered data, the problem of low development efficiency caused by the non-variability of the mirror image of the plug-in is solved, the flexibility and the universality of the plug-in construction method are improved, the plug-in development efficiency is effectively improved, and the use requirement of a cloud native pipeline is met.
Example two
Fig. 2 is a flowchart of a plug-in operation method provided in the second embodiment of the present invention, where the present embodiment is applicable to a case of executing plug-in operation, the method may be performed by a plug-in operation device, where the plug-in operation device may be implemented in a form of hardware and/or software, and the plug-in operation device may be configured in a computer. The method is applied to the plug-in, and the plug-in comprises a universal base program and plug-in base mirror image data. As shown in fig. 2, the method includes:
s210, responding to the plug-in starting operation, starting a universal base program of the plug-in, and acquiring a changeable program package through a target downloading address prestored in the universal base program.
Specifically, plug-ins are sequentially called in the assembly line platform according to a plug-in flow pre-arranged in the assembly line to realize the operation of the assembly line, and under the condition that each plug-in receives a starting operation instruction, a universal base program of the plug-in is started first, and the universal base program downloads a corresponding changeable program package according to a pre-stored target download address.
S220, calling up the changeable program package and calling up basic mirror image data of the plug-in to realize operation of the plug-in.
Specifically, after the changeable program package is obtained, the changeable program package and the basic mirror image data of the plug-in are called up, the corresponding program package is executed, and the operation of the plug-in is completed.
Optionally, the changeable data packet includes a control program start script and a tool control program; the plug-in basic mirror image data comprises tool software and basic software; the method for calling up the changeable program package and calling up the plug-in basic mirror image data comprises the following steps: decompressing the changeable program package to obtain a control program starting script and a tool control program; calling a control program starting script, and starting a tool control program to execute preset logic; and calling the tool software, and calling the operation of the basic software through the tool software.
Specifically, the changeable data package includes a control program start script and a tool control program, and the plug-in base image data includes tool software and base software. After the general base program downloads the changeable program package, decompressing the changeable program package to obtain a decompressed changeable program package, calling a control program starting script in the decompressed changeable program package, and then calling a tool control program by the control program starting script; after the tool control program is started, the operation of the tool software is called according to preset logic, and the tool software calls the operation of the basic software to realize the self tool capacity, so that the operation process of the plug-in is completed.
According to the technical scheme of the embodiment, a universal base program of the plug-in is started by responding to plug-in starting operation, and a changeable program package is obtained through a target downloading address prestored in the universal base program; and calling up the changeable program package and calling up basic mirror image data of the plug-in to realize the operation of the plug-in. The method and the device can acquire the changeable program package from the prestored target download address by starting the universal base program of the plug-in, and transplant and execute the changeable program package into the plug-in operation environment, so that the operation of the plug-in is realized, and the flexibility and the high efficiency of the plug-in operation are improved.
Example III
Fig. 3 is a schematic structural diagram of an insert-building device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes:
the original layered data acquisition module 310 is configured to acquire original layered data of the plugin, where the number of the original layered data is multiple;
the original layered data dividing module 320 is configured to divide the original layered data into changed data and plug-in base mirror image data based on a historical change frequency of the original layered data;
a changeable data obtaining module 330, configured to perform data compression on the changed data in response to the data storage operation, form a changeable data packet, and store the changeable data packet to the target download address;
a target hierarchical data acquisition module 340 for creating a generic base program in response to a generic base program creation operation, and storing a target download address in the generic base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in.
According to the technical scheme, an original layered data acquisition module acquires original layered data of a plug-in unit, wherein the number of the original layered data is multiple; the original layered data dividing module divides the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data; the changeable data acquisition module is used for carrying out data compression on changeable data in response to data storage operation to form changeable data packets, and storing the changeable data packets to a target downloading address; the target hierarchical data acquisition module is used for responding to the creation operation of the universal base program, creating the universal base program and storing a target downloading address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in. The method for constructing the plug-in a layered manner is realized through the scheme, meanwhile, the method for reconstructing the plug-in is realized by only changing the changeable program package without changing the target layered data, the problem of low development efficiency caused by the non-variability of the mirror image of the plug-in is solved, the flexibility and the universality of the plug-in construction method are improved, the plug-in development efficiency is effectively improved, and the use requirement of a cloud native pipeline is met.
Based on the above embodiment, the raw hierarchical data partitioning module 320 is optionally specifically configured to:
counting historical change frequencies corresponding to a plurality of original layered data of the plug-in;
and determining the original layered data with the history change frequency larger than or equal to a preset frequency threshold value as change data, and determining the original layered data with the history change frequency smaller than the preset frequency threshold value as plug-in base mirror image data.
Optionally, the target hierarchical data acquisition module 340 is specifically configured to:
the universal base program is used for downloading the changeable program package based on the target download address, decompressing the changeable program package and calling the changeable program package when the universal base program is started.
The plug-in building device provided by the embodiment of the invention can execute the plug-in building method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of a plug-in operation device according to a fourth embodiment of the present invention. As shown in fig. 4, the apparatus includes:
a changeable package determining module 410, configured to start a universal base program of the plug-in response to a plug-in start operation, and obtain a changeable package through a target download address pre-stored in the universal base program;
the changeable package execution module 420 is configured to call up the changeable package and call up the plug-in base image data to implement the operation of the plug-in.
According to the technical scheme of the embodiment, a general base program of the plug-in is started through a changeable program package determining module in response to plug-in starting operation, and a changeable program package is obtained through a target downloading address prestored in the general base program; the changeable program package executing module calls up the changeable program package and calls up the basic mirror image data of the plug-in unit so as to realize the operation of the plug-in unit. The method and the device can acquire the changeable program package from the prestored target download address by starting the universal base program of the plug-in, and transplant and execute the changeable program package into the plug-in operation environment, so that the operation of the plug-in is realized, and the flexibility and the high efficiency of the plug-in operation are improved.
Based on the above embodiments, the package execution module 420 may be optionally modified, specifically configured to:
decompressing the changeable program package to obtain a control program starting script and a tool control program;
calling a control program starting script, and starting a tool control program to execute preset logic;
and calling the tool software, and calling the operation of the basic software through the tool software.
The plug-in operation device provided by the embodiment of the invention can execute the plug-in operation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the plug-in build method and/or the plug-in run method.
In some embodiments, the plug-in building method and/or the plug-in running method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the plug-in building method and/or the plug-in running method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the plug-in build method and/or the plug-in run method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
The computer program used to implement the plug-in building methods and/or plug-in running methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
Example six
The sixth embodiment of the present invention also provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to cause a processor to execute a plug-in building method, where the method includes:
obtaining the original layered data of the plug-in, wherein the number of the original layered data is multiple;
dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data;
in response to the data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address;
responding to the creation operation of the universal base program, creating the universal base program, and storing the target download address in the universal base program; the universal base program and the plug-in base image data are used as target hierarchical data of the plug-in.
Alternatively, the computer instructions are further for causing the processor to perform a plug-in building method comprising:
the plug-in running method is characterized by being applied to a plug-in, wherein the plug-in comprises a general base program and plug-in basic mirror image data; the method comprises the following steps:
responding to the plug-in starting operation, starting a universal base program of the plug-in, and acquiring a changeable program package through a target downloading address prestored in the universal base program;
and calling up the changeable program package and calling up basic mirror image data of the plug-in to realize the operation of the plug-in.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A plug-in building method, comprising:
obtaining original layered data of a plug-in, wherein the number of the original layered data is multiple;
dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data;
in response to a data storage operation, performing data compression on the change data to form a changeable data packet, and storing the changeable data packet to a target download address;
responding to a general base program creation operation, creating the general base program, and storing the target download address in the general base program; the universal base program and the plug-in base mirror image data are used as target hierarchical data of the plug-in.
2. The method of claim 1, wherein the dividing the original hierarchical data into change data and plug-in base image data based on the historical change frequency of the original hierarchical data comprises:
counting historical change frequencies corresponding to a plurality of original hierarchical data of the plug-in;
and determining the original layered data with the history change frequency larger than or equal to a preset frequency threshold value as change data, and determining the original layered data with the history change frequency smaller than the preset frequency threshold value as plug-in basic mirror image data.
3. The method according to claim 1 or 2, wherein the original hierarchical data comprises a control program start script, a tool control program, tool software and base software;
the changeable data packet comprises a control program starting script and a tool control program; the plug-in base image data includes tool software and base software.
4. The method of claim 1, wherein the generic base program is configured to download the alterable package based on the target download address, decompress the alterable package, and invoke the alterable package if initiated.
5. The plug-in running method is characterized by being applied to a plug-in, wherein the plug-in comprises a general base program and plug-in base mirror image data; the method comprises the following steps:
responding to a plug-in starting operation, starting a universal base program of the plug-in, and acquiring a changeable program package through a target downloading address prestored in the universal base program;
and calling up the changeable program package and calling up the basic mirror image data of the plug-in to realize the operation of the plug-in.
6. The method of claim 5, wherein the alterable data packet includes a control program start script and a tool control program; the plug-in basic mirror image data comprises tool software and basic software;
the invoking the changeable package and the invoking the plug-in base mirror image data comprise:
decompressing the changeable program package to obtain a control program starting script and a tool control program;
calling the control program starting script, and starting the tool control program to execute preset logic;
and calling the tool software, and calling the operation of the basic software through the tool software.
7. An insert-building apparatus, comprising:
the device comprises an original layered data acquisition module, a processing module and a processing module, wherein the original layered data acquisition module is used for acquiring original layered data of a plug-in unit, and the number of the original layered data is multiple;
the original layered data dividing module is used for dividing the original layered data into changed data and plug-in basic mirror image data based on the historical change frequency of the original layered data;
the changeable data acquisition module is used for responding to data storage operation, carrying out data compression on the changeable data to form changeable data packets, and storing the changeable data packets to a target download address;
the target hierarchical data acquisition module is used for responding to a general base program creation operation, creating the general base program and storing the target download address in the general base program; the universal base program and the plug-in base mirror image data are used as target hierarchical data of the plug-in.
8. A card running device, comprising:
the system comprises a changeable program package determining module, a program package processing module and a program package processing module, wherein the changeable program package determining module is used for responding to a plug-in starting operation, starting a universal base program of the plug-in, and acquiring a changeable program package through a target downloading address prestored in the universal base program;
and the changeable program package execution module is used for calling the changeable program package and calling the basic mirror image data of the plug-in to realize the operation of the plug-in.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the plug-in building method of any one of claims 1-4 and/or the plug-in running method of any one of claims 5-6.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the plug-in building method of any one of claims 1-4 and/or the plug-in running method of any one of claims 5-6 when executed.
CN202311659221.5A 2023-12-05 2023-12-05 Plug-in building method and device and plug-in running method and device Pending CN117707643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311659221.5A CN117707643A (en) 2023-12-05 2023-12-05 Plug-in building method and device and plug-in running method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311659221.5A CN117707643A (en) 2023-12-05 2023-12-05 Plug-in building method and device and plug-in running method and device

Publications (1)

Publication Number Publication Date
CN117707643A true CN117707643A (en) 2024-03-15

Family

ID=90152552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311659221.5A Pending CN117707643A (en) 2023-12-05 2023-12-05 Plug-in building method and device and plug-in running method and device

Country Status (1)

Country Link
CN (1) CN117707643A (en)

Similar Documents

Publication Publication Date Title
CN113703946B (en) Application recovery method and device, electronic equipment and computer readable storage medium
CN114721686A (en) Configuration data updating method and device, electronic equipment and storage medium
CN112817660A (en) Method, device, equipment and storage medium for expanding small program capacity
CN116521573A (en) Automatic test method, device, equipment and storage medium
CN113747423B (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN117707643A (en) Plug-in building method and device and plug-in running method and device
CN113377295B (en) Data storage and reading method, device and equipment for multi-producer single-consumer
CN113014675A (en) Data processing method and device, electronic equipment and storage medium
CN116560847B (en) Task processing method, device, electronic equipment and storage medium
CN113596129B (en) Restarting method, restarting device, restarting equipment and restarting storage medium of cloud mobile phone
CN117632149A (en) Control method and device of application program, electronic equipment and storage medium
CN117201481A (en) Method and device for downloading software update file, electronic equipment and readable medium
CN116341663A (en) Extension method, device, equipment and medium of deep learning reasoning framework
CN116016545A (en) High-availability deployment method, device and equipment for Redis cluster and storage medium
CN116527761A (en) Database proxy service adding method, device, equipment and storage medium
CN117742699A (en) Method, device, equipment and storage medium for generating functional module of application program
CN116719552A (en) Game heat updating method and device, electronic equipment and storage medium
CN117806702A (en) Target software acquisition method and device, electronic equipment and storage medium
CN117234779A (en) Exception recovery method, device, equipment and medium for distributed database
CN117827355A (en) Theme switching method and device, vehicle and medium
CN116307551A (en) Automatic bill conversion method and device, electronic equipment and storage medium
CN117271063A (en) File system reloading method and device, electronic equipment and storage medium
CN118363626A (en) Android application program upgrading method and device, electronic equipment and storage medium
CN117743467A (en) Agent node replacement method, device, equipment 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