CN110750545A - Dynamic library hot update method, device, medium and equipment - Google Patents

Dynamic library hot update method, device, medium and equipment Download PDF

Info

Publication number
CN110750545A
CN110750545A CN201910828207.0A CN201910828207A CN110750545A CN 110750545 A CN110750545 A CN 110750545A CN 201910828207 A CN201910828207 A CN 201910828207A CN 110750545 A CN110750545 A CN 110750545A
Authority
CN
China
Prior art keywords
file
specified type
dynamic library
path
files
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.)
Granted
Application number
CN201910828207.0A
Other languages
Chinese (zh)
Other versions
CN110750545B (en
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910828207.0A priority Critical patent/CN110750545B/en
Publication of CN110750545A publication Critical patent/CN110750545A/en
Application granted granted Critical
Publication of CN110750545B publication Critical patent/CN110750545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a dynamic library hot update method, apparatus, medium, and device, the method comprising: creating a folder path named by the current time; traversing all files in the compiling directory, and judging whether the files are files of a specified type; when the file is the file of the specified type, modifying the path of the import package of the file of the specified type; adding the modified file of the specified type into a first position of the folder path; receiving a compiling instruction of the dynamic library file at the first position; and loading the updated dynamic library to a specified main program to realize the update of the dynamic library file. According to the method, after the dynamic library file is updated, the main program does not need to be correspondingly modified, the updated dynamic library file can be executed by directly calling the modified dynamic library file, the hot update of the golang dynamic library is changed into a file which can be conveniently called, the problem that the program needs to be restarted in the dynamic library update is solved, the convenience of upgrading the program is improved, and the program development efficiency is improved.

Description

Dynamic library hot update method, device, medium and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a dynamic library hot update method, apparatus, medium, and device.
Background
The golang language provides a mechanism for plugin from version 1.8, supporting compilation and loading of dynamic libraries. However, due to the limitation of the underlying code of the golang, the dynamic library cannot be updated under the condition that the program is not restarted, which causes the limitation of the use of the dynamic library. golang calculates a corresponding hash value for each package based on the content. When the program content changes, the calculated hash value changes. And the golang can judge whether hash values corresponding to all the packages in the current dynamic library are changed or not during hot loading, and if so, hot updating can be failed. There is no known good solution in the prior art to the problem of hot-update of dynamic libraries. After the dynamic library is updated every time, the main program is required to be correspondingly updated, so that the dynamic library file can be smoothly called and executed. This brings great trouble to development.
BRIEF SUMMARY OF THE PRESENT DISCLOSURE
It is an object of the present disclosure to provide a dynamic library thermal update method, apparatus, medium, and device, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a dynamic library hot update method, including:
creating a folder path named by the current time;
traversing all files under the compiling directory, and judging whether the files are files of a specified type;
when the file is the file of the specified type, modifying the path of the import package of the file of the specified type;
adding the modified file of the specified type into a first position of the folder path;
receiving a compiling instruction of the dynamic library file at the first position;
and loading the updated dynamic library to a specified main program to realize the update of the dynamic library file.
Optionally, when the file is the file of the specified type, modifying the path of the import package of the file of the specified type, including:
and when the file is the file of the specified type, modifying the path of the import package of the file of the specified type into the path of the folder named at the current time.
Optionally, the traversing all files in the compiled directory, determining whether the file is a file of a specified type, and then:
and when the file is a non-specified type file, directly copying the content of the file to a second position of the folder path.
Optionally, the file of the specified type is a go file in the golang language.
According to a second aspect, the present disclosure provides a dynamic bank hot-update apparatus, including:
a creating unit configured to create a folder path named at a current time;
the judging unit is configured to traverse all files in the compiling directory and judge whether the files are files of the specified type;
the modification unit is configured to modify the import package path of the specified type file when the file is the specified type file;
the adding unit is configured to add the modified file of the specified type to a first position of the folder path;
a receiving unit configured to receive a compiling instruction for the dynamic library file at the first position;
and the loading unit is configured to load the updated dynamic library to the specified main program to realize the update of the dynamic library file.
Optionally, the modifying unit is further configured to:
and when the file is the file of the specified type, modifying the path of the import package of the file of the specified type into the path of the folder named at the current time.
Optionally, the method further includes:
and the copying unit is configured to directly copy the file content to a second position of the folder path when the file is a non-specified type file.
Optionally, the file of the specified type is a go file in the golang language.
According to a third aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
According to a fourth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a method as claimed in any preceding claim.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects: the method realizes the hot update of the golang dynamic library by modifying the compiling mode. By the method, after the dynamic library file is updated, the main program does not need to be correspondingly modified, the updated dynamic library file can be executed by directly calling the modified dynamic library file, so that the hot update of the golang dynamic library is changed into a file which can be conveniently called, the problem that the program needs to be restarted in the dynamic library update is solved, the convenience of upgrading the program is improved, and the program development efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 illustrates a flow diagram of a dynamic library hot update method according to an embodiment of the present disclosure;
FIG. 2 illustrates a dynamic library hot update method decision flow diagram in accordance with an embodiment of the present disclosure;
FIG. 3 illustrates a dynamic library hot update process configuration diagram according to an embodiment of the present disclosure;
FIG. 4 illustrates a dynamic bank hot-update apparatus schematic in accordance with an embodiment of the present disclosure;
fig. 5 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, rather than all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in the disclosed embodiments and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present disclosure, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and, similarly, the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present disclosure.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
As shown in FIG. 1, FIG. 1 illustrates a flow chart of a dynamic library hot update method according to an embodiment of the present disclosure. According to a specific embodiment of the present disclosure, the present disclosure provides a dynamic library hot update method, which specifically includes the following method steps:
step S102: a folder path named at the current time is created.
Before compiling, a folder named { tmp-current time } is created, such as PluginA/tmp-20190606, PluginA/tmp-20190606/sub1, PluginA/tmp-20190606/sub2, and the like.
After the newest tmp file path is named at the current time, the main program can identify the file under the newest time node when the updated plug-in is inserted every time of updating, and the hash value table can be updated at the same time.
The time may be a specific day or a specific second, but is not limited thereto, and the day is exemplified as an example.
Step S104: and traversing all files under the compiling directory, and judging whether the files are files of the specified type. The judgment process is described with reference to fig. 2.
Traversal refers to making one visit to each node in the tree (or graph) in turn along a search route. The operation performed by the access node depends on the specific application problem, and the specific access operation may be to check the value of the node, update the value of the node, and the like. Different traversal methods have different access node orders.
Here, the traversal refers to viewing the file types line by line from front to back under the directory, and determining whether the viewed types belong to file types that need special processing.
And the specified type file is a go file in the golang language. That is, whether the file type is a go file is determined line by line, and different processing is performed according to whether the file type is a go file, as described below.
The file with the extension of go is a go language source file. The golang language is a programming language developed by Google, which is strong in static state, compiling, concurrent and has a garbage collection function.
Step S106: and when the file is the file of the specified type, modifying the path of the import package of the file of the specified type.
Specifically, when the file is the specified type file, modifying the path of the import package of the specified type file includes:
and when the file is a go file, modifying the part of an import package (import package) in the code, and adding the constructed folder path into an import package path (package path). Namely, the path of the import package of the file of the specified type is modified into the path of the folder named at the current time, which is shown in fig. 3.
Step S108: and adding the modified file of the specified type into a first position of the folder path.
The first position is the position of storing the go file in the folder named by { tmp-current time }, the go file is modified, including the modification of the imported package path, and then when the main program calls the updated dynamic library, the package file in the new path is called.
Step S110: at the first location, a compilation instruction for a dynamic library file is received.
Dynamic Link Library (DLL), which is a Library containing code and data that can be used by multiple programs simultaneously, is not an executable file. Dynamic linking provides a way for a process to call functions that do not belong to its executable code. The executable code for the functions is located in a DLL that contains one or more functions that have been compiled, linked and stored separately from the process in which they are used. DLLs also facilitate sharing of data and resources. Multiple applications can simultaneously access the contents of a single DLL copy in memory. A DLL is a library that contains code and data that can be used by multiple programs simultaneously. The dynamic library under Windows is the.dll suffix, under linux is the.so suffix.
In this step, the developer may compile a corresponding code program to be modified at the first location, where the compiled specific program is not limited, and may be any dynamic library file that needs to be dynamically loaded to the main program to be executed, and compiled according to the need of the plug-in function.
Step S112: and loading the updated dynamic library to a specified main program to realize the update of the dynamic library file.
And putting the compiled dynamic library into a machine for program operation, triggering a program hot loading command, and loading a new dynamic library into the program to realize the function of code updating under the condition that the program is not restarted.
As shown in FIG. 3, after the plug-in is compiled, the plug-in can be loaded to a specified calling main program, and the loading process can adopt a path or a command of the plug-in called by the main program. When the main program needs to call the plug-in the execution process, the updated plug-in can be directly called, and at the moment, because the go file path of the dynamic library file is updated, the updated dynamic library file can be directly loaded without error reporting.
As shown in fig. 3, when the package file name is called, the package file name loads the current update time, so that the main program can confirm that the called dynamic library file is an update file at the latest time, and update the hash value at the same time, without executing the original package file and hash value, so that the whole dynamic library file does not make mistakes.
The hash value is a hash function, and compresses a message or data into a digest, so that the amount of data becomes small and is fixed in the format of the data. And updating the hash value of the dynamic library file at the same time.
Optionally, the traversing all files in the compiled directory, determining whether the file is a file of a specified type, and then:
and when the file is a non-specified type file, directly copying the content of the file to a second position of the folder path.
When the file directory is traversed from top to bottom, the contents of the non-go file are directly copied to the folder directory named by { tmp-current time } for the non-go file.
The method realizes the hot update of the golang dynamic library by modifying the compiling mode. By the method, after the dynamic library file is updated, the main program does not need to be correspondingly modified, the updated dynamic library file can be executed by directly calling the modified dynamic library file, so that the hot update of the golang dynamic library is changed into a file which can be conveniently called, the problem that the program needs to be restarted in the dynamic library update is solved, the convenience of upgrading the program is improved, and the program development efficiency is improved.
As shown in fig. 4, the present embodiment is adapted to the above-mentioned embodiment for implementing the apparatus of the above-mentioned embodiment, and the same method steps of the present embodiment have the same technical effects, and are not described herein again.
According to a specific embodiment of the present disclosure, the present disclosure provides a dynamic bank hot-update apparatus, including: the creating unit 402, the judging unit 404, the modifying unit 406, the adding unit 408, the receiving unit 410, and the loading unit 412 are specifically as follows:
a creating unit 402 configured to create a folder path named at the current time.
A folder named { tmp-current time } is created by the compiler, such as PluginA/tmp-20190606, PluginA/tmp-20190606/sub1, PluginA/tmp-20190606/sub2, etc.
After the newest tmp file path is named at the current time, the main program can identify the file under the newest time node when the updated plug-in is inserted every time of updating, and the hash value table can be updated at the same time.
The determining unit 404 is configured to traverse all files in the compiled directory, and determine whether the files are files of a specified type.
Optionally, the file of the specified type is a go file in the golang language.
Here, the traversal refers to viewing the file types line by line from front to back under the directory, and determining whether the viewed types belong to file types that need special processing.
And the specified type file is a go file in the golang language. That is, whether the file type is a go file is determined line by line, and different processing is performed according to whether the file type is a go file, as described below.
The file with the extension of go is a go language source file. The golang language is a programming language developed by Google, which is strong in static state, compiling, concurrent and has a garbage collection function.
A modifying unit 406, configured to modify the import package path of the specified type file when the file is the specified type file.
Optionally, the modifying unit is further configured to:
and when the file is the file of the specified type, modifying the path of the import package of the file of the specified type into the path of the folder named at the current time.
The adding unit 408 is configured to add the modified file of the specified type to the first position of the folder path.
The first position is the position of storing the go file in the folder named by { tmp-current time }, the go file is modified, including the modification of the imported package path, and then when the main program calls the updated dynamic library, the package file in the new path is called.
A receiving unit 410 configured to receive a compiling instruction for the dynamic library file at the first location.
The developer can compile a corresponding code program to be changed at a first position, wherein the specific compiled program is not limited, and can be any dynamic library file which needs to be dynamically loaded to a main program to be executed, and the code program is compiled according to the requirement of a plug-in function.
And the loading unit 412 is configured to load the updated dynamic library to the specified main program, so as to update the dynamic library file.
As shown in fig. 3, when the package file name is called, the package file name loads the current update time, so that the main program can confirm that the called dynamic library file is an update file at the latest time, and update the hash value at the same time, without executing the original package file and hash value, so that the whole dynamic library file does not make mistakes.
Optionally, the method further includes:
a copying unit (not shown) configured to directly copy the contents of the file to a second location of the folder path when the file is a non-specified type of file.
The device realizes the hot update of the golang dynamic library by modifying the compiling mode. After the dynamic library file is updated, the main program does not need to be correspondingly modified, the updated dynamic library file can be executed by directly calling the modified dynamic library file, the hot update of the golang dynamic library is changed into a file which can be conveniently called, the problem that the program needs to be restarted in the dynamic library update is solved, the convenience of upgrading the program is improved, and the program development efficiency is improved.
As shown in fig. 5, the present embodiment provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method steps of the above embodiments.
The disclosed embodiments provide a non-volatile computer storage medium having stored thereon computer-executable instructions that may perform the method steps as described in the embodiments above.
Referring now to FIG. 5, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other by a bus 505. An input/output (I/O) interface 505 is also connected to bus 505.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 505 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 505. The communication means 505 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 505, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.

Claims (10)

1. A dynamic library hot update method, comprising:
creating a folder path named by the current time;
traversing all files under the compiling directory, and judging whether the files are files of a specified type;
when the file is the file of the specified type, modifying the path of the import package of the file of the specified type;
adding the modified file of the specified type into a first position of the folder path;
receiving a compiling instruction of the dynamic library file at the first position;
and loading the updated dynamic library to a specified main program to realize the update of the dynamic library file.
2. The method of claim 1, wherein modifying the path of the import package for the specified type of file when the file is the specified type of file comprises:
and when the file is the file of the specified type, modifying the path of the import package of the file of the specified type into the path of the folder named at the current time.
3. The method of claim 1, wherein said traversing compiles all files under a directory, determining whether said files are of a specified type, and thereafter comprising:
and when the file is a non-specified type file, directly copying the content of the file to a second position of the folder path.
4. A method according to any one of claims 1 to 3, wherein the document of the specified type is a go document in the golang language.
5. A dynamic bank thermal update apparatus, comprising:
a creating unit configured to create a folder path named at a current time;
the judging unit is configured to traverse all files in the compiling directory and judge whether the files are files of the specified type;
the modification unit is configured to modify the import package path of the specified type file when the file is the specified type file;
the adding unit is configured to add the modified file of the specified type to a first position of the folder path;
a receiving unit configured to receive a compiling instruction for the dynamic library file at the first position;
and the loading unit is configured to load the updated dynamic library to the specified main program to realize the update of the dynamic library file.
6. The apparatus of claim 5, wherein the modification unit is further configured to:
and when the file is the file of the specified type, modifying the path of the import package of the file of the specified type into the path of the folder named at the current time.
7. The apparatus of claim 5, further comprising:
and the copying unit is configured to directly copy the file content to a second position of the folder path when the file is a non-specified type file.
8. An apparatus according to any one of claims 5 to 7, wherein the specified type of file is a go file in the golang language.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 4.
CN201910828207.0A 2019-09-03 2019-09-03 Dynamic library heat updating method, device, medium and equipment Active CN110750545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910828207.0A CN110750545B (en) 2019-09-03 2019-09-03 Dynamic library heat updating method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910828207.0A CN110750545B (en) 2019-09-03 2019-09-03 Dynamic library heat updating method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN110750545A true CN110750545A (en) 2020-02-04
CN110750545B CN110750545B (en) 2023-07-25

Family

ID=69276107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910828207.0A Active CN110750545B (en) 2019-09-03 2019-09-03 Dynamic library heat updating method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN110750545B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352644A (en) * 2020-03-04 2020-06-30 深圳乐信软件技术有限公司 Applet updating method, device, server and storage medium
CN112114778A (en) * 2020-07-03 2020-12-22 上海金融期货信息技术有限公司 Cross-platform dynamic library algorithm management system supporting horizontal extension
CN112764827A (en) * 2020-12-31 2021-05-07 重庆广播电视大学重庆工商职业学院 Java class hot loading method with safety verification
CN114546508A (en) * 2022-02-28 2022-05-27 广联达科技股份有限公司 Cloud access method and device for tool type application software
CN115048155A (en) * 2022-08-11 2022-09-13 成都智暄科技有限责任公司 Method and system for loading dynamic library, computer readable storage medium and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296528A1 (en) * 2010-05-26 2011-12-01 Tethy Solutions Llc, Dba Automation Anywhere System and method for creating and executing portable software
CN105893094A (en) * 2016-03-31 2016-08-24 百度在线网络技术(北京)有限公司 Achieving method and device for application program plug-in
WO2017096940A1 (en) * 2015-12-10 2017-06-15 深圳市华讯方舟软件技术有限公司 Data import method for spark-sql-based big-data processing platform
CN108845813A (en) * 2018-06-14 2018-11-20 郑州云海信息技术有限公司 A kind of hot update method of application program
CN109299587A (en) * 2018-09-11 2019-02-01 平安科技(深圳)有限公司 Algorithm protection method, device, equipment and storage medium based on go language
CN109376087A (en) * 2018-10-22 2019-02-22 北京奇艺世纪科技有限公司 A kind of method for testing software, device and electronic equipment
CN109933350A (en) * 2019-03-07 2019-06-25 江苏通付盾信息安全技术有限公司 The method, apparatus and electronic equipment of embedded code in the application
WO2019148816A1 (en) * 2018-02-05 2019-08-08 Beijing Elex Technology Co., Ltd Method and apparatus for data compilation, electronic device and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296528A1 (en) * 2010-05-26 2011-12-01 Tethy Solutions Llc, Dba Automation Anywhere System and method for creating and executing portable software
WO2017096940A1 (en) * 2015-12-10 2017-06-15 深圳市华讯方舟软件技术有限公司 Data import method for spark-sql-based big-data processing platform
CN105893094A (en) * 2016-03-31 2016-08-24 百度在线网络技术(北京)有限公司 Achieving method and device for application program plug-in
WO2019148816A1 (en) * 2018-02-05 2019-08-08 Beijing Elex Technology Co., Ltd Method and apparatus for data compilation, electronic device and computer readable storage medium
CN108845813A (en) * 2018-06-14 2018-11-20 郑州云海信息技术有限公司 A kind of hot update method of application program
CN109299587A (en) * 2018-09-11 2019-02-01 平安科技(深圳)有限公司 Algorithm protection method, device, equipment and storage medium based on go language
CN109376087A (en) * 2018-10-22 2019-02-22 北京奇艺世纪科技有限公司 A kind of method for testing software, device and electronic equipment
CN109933350A (en) * 2019-03-07 2019-06-25 江苏通付盾信息安全技术有限公司 The method, apparatus and electronic equipment of embedded code in the application

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352644A (en) * 2020-03-04 2020-06-30 深圳乐信软件技术有限公司 Applet updating method, device, server and storage medium
CN112114778A (en) * 2020-07-03 2020-12-22 上海金融期货信息技术有限公司 Cross-platform dynamic library algorithm management system supporting horizontal extension
CN112114778B (en) * 2020-07-03 2024-04-02 上海金融期货信息技术有限公司 Cross-platform dynamic library algorithm management system supporting horizontal expansion
CN112764827A (en) * 2020-12-31 2021-05-07 重庆广播电视大学重庆工商职业学院 Java class hot loading method with safety verification
CN114546508A (en) * 2022-02-28 2022-05-27 广联达科技股份有限公司 Cloud access method and device for tool type application software
CN114546508B (en) * 2022-02-28 2024-04-12 广联达科技股份有限公司 Cloud access method and device for tool type application software
CN115048155A (en) * 2022-08-11 2022-09-13 成都智暄科技有限责任公司 Method and system for loading dynamic library, computer readable storage medium and device
CN115048155B (en) * 2022-08-11 2022-11-15 成都智暄科技有限责任公司 Method and system for loading dynamic library, computer readable storage medium and device

Also Published As

Publication number Publication date
CN110750545B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN110750545B (en) Dynamic library heat updating method, device, medium and equipment
CN110502357B (en) Stack backtracking method, device, medium and equipment
CN107797820B (en) Method and device for generating patch
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN112764756B (en) Software resource compiling method and corresponding device, equipment and medium thereof
CN111796865B (en) Byte code file modification method, device, terminal equipment and medium
CN110389899A (en) Detect square law device, medium and the equipment of the API data type of JS program
CN111400068B (en) Interface control method and device, readable medium and electronic equipment
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN113407165B (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN113127000B (en) Compiling method, compiling device, compiling equipment and compiling storage medium for application program component
CN112905220B (en) Thermal restoration method, device, equipment and storage medium
CN112527302B (en) Error detection method and device, terminal and storage medium
CN110502251B (en) Application installation method and device
CN114153462B (en) Client source code processing method and device, storage medium and electronic equipment
CN112689199B (en) Plug-in loading method and device for television homepage, television and storage medium
CN113741951B (en) Local packing method and device
US20150178060A1 (en) Creating a prerequisite checklist corresponding to a software application
CN111506904B (en) Method and device for online bug repair
CN116263824A (en) Resource access method and device, storage medium and electronic equipment
CN110119289B (en) Online page pasting method, device, medium and electronic equipment
CN109828781B (en) Source code version positioning method, device, medium and equipment for problem troubleshooting
CN111382076A (en) Application program testing method and device, electronic equipment and computer storage medium
CN111274082B (en) Memory performance analysis method, device, medium and electronic equipment
CN117472425A (en) Resource processing method and device, readable medium and electronic equipment

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant