CN110750545B - Dynamic library heat updating method, device, medium and equipment - Google Patents

Dynamic library heat updating method, device, medium and equipment Download PDF

Info

Publication number
CN110750545B
CN110750545B CN201910828207.0A CN201910828207A CN110750545B CN 110750545 B CN110750545 B CN 110750545B CN 201910828207 A CN201910828207 A CN 201910828207A CN 110750545 B CN110750545 B CN 110750545B
Authority
CN
China
Prior art keywords
file
dynamic library
specified type
files
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910828207.0A
Other languages
Chinese (zh)
Other versions
CN110750545A (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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision 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

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 method, apparatus, medium and device for dynamic library heat update, the method comprising: creating a folder path named with 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 specified type file, modifying the import packet path of the specified type file; adding the modified specified type file into the first position of the folder path; receiving a compiling instruction for a dynamic library file at the first position; and loading the updated dynamic library to a specified main program to realize the updating of the dynamic library file. After the dynamic library file is updated, the main program does not need to make corresponding modification, and 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 must be restarted when the dynamic library is updated is solved, the convenience of upgrading the program is improved, and the program development efficiency is improved.

Description

Dynamic library heat updating method, device, medium and equipment
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a method, an apparatus, a medium, and a device for dynamic library heat update.
Background
The golang language provides a plug in mechanism starting from version 1.8, supporting compilation and loading of dynamic libraries. However, due to the limitation of the golang underlying code, updating the dynamic library without restarting the program cannot be achieved, which causes limitation of use of the dynamic library. golang calculates a corresponding hash value for each package based on the content. When the program content is changed, the calculated hash value is caused to change. When the golang is in hot loading, whether hash values corresponding to all the packages in the current dynamic library are changed or not is judged, and if yes, hot updating failure is caused. There are no known good solutions in the prior art to solve the problem of hot-updating of dynamic libraries. After each time of the dynamic library is updated, the main program needs to be updated correspondingly, and then the dynamic library file can be called and executed smoothly. This brings great trouble to development.
BRIEF SUMMARY OF THE PRESENT DISCLOSURE
The present disclosure aims to provide a method, an apparatus, a medium and a device for dynamic library heat update, which can solve at least one technical problem mentioned above. 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 heat updating method, including:
creating a folder path named with the current time;
traversing all files under the compiling catalogue, and judging whether the files are files of a specified type;
when the file is the specified type file, modifying the import packet path of the specified type file;
adding the modified specified type file into the first position of the folder path;
receiving a compiling instruction for a dynamic library file at the first position;
and loading the updated dynamic library to a specified main program to realize the updating of the dynamic library file.
Optionally, when the file is the specified type file, modifying the import packet path of the specified type file includes:
and when the file is the specified type file, modifying the import packet path of the specified type file into the folder path named with the current time.
Optionally, the traversing compiles all files under the directory, and determining whether the files are files of a specified type includes:
when the file is a file of a non-specified type, the file content is directly copied to a second location of the folder path.
Optionally, the specified type file is a go file in a golang language.
According to a second aspect of the present disclosure, there is provided a dynamic library heat updating apparatus comprising:
a creation unit configured to create a folder path named at a current time;
the judging unit is configured to traverse all files under the compiling catalogue and judge whether the files are files of a specified type or not;
a modifying unit configured to modify an import packet path of the specified type file when the file is the specified type file;
an adding unit configured to add the modified specified type file to the first location of the folder path;
the receiving unit is 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 appointed main program to realize the updating of the dynamic library file.
Optionally, the modifying unit is further configured to:
and when the file is the specified type file, modifying the import packet path of the specified type file into the folder path named with the current time.
Optionally, the method further comprises:
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 file of a non-specified type.
Optionally, the specified type file is a go file in a golang language.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as claimed in any one of the above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: one or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of the preceding claims.
Compared with the prior art, the scheme of the embodiment of the disclosure has at least the following beneficial effects: the method realizes the hot update of the golang dynamic library by modifying the compiling mode. After the dynamic library file is updated by the method, the main program does not need to make corresponding modification, and 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 must be restarted for updating the dynamic library 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 disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 illustrates a flow chart 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 according to an embodiment of the present disclosure;
FIG. 3 illustrates a dynamic library hot update process architecture diagram according to an embodiment of the present disclosure;
FIG. 4 illustrates a schematic diagram of a dynamic library hot update device according to an embodiment of the present disclosure;
fig. 5 shows a schematic diagram of an electronic device connection structure according to an embodiment of the present disclosure.
Detailed Description
For the purpose of promoting an understanding of the principles and advantages of the disclosure, reference will now be made in detail to the drawings, in which it is apparent that the embodiments described are only some, but not all embodiments of the disclosure. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The terminology used in the embodiments of the disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure of 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, the "plurality" generally includes at least two.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in the presently disclosed embodiments, these … … should not be limited to these terms. These terms are only used to distinguish … …. For example, the first … … may also be referred to as the second … …, and similarly the second … … may also be referred to as the first … …, without departing from the scope of the disclosed embodiments.
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 phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product 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 product or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or device comprising such element.
Alternative embodiments of the present disclosure are described in detail below with reference to the 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 heat updating method, which specifically includes the following method steps:
step S102: creating a folder path named at the current time.
A folder named { tmp-current time } is created before compiling, such as PluginA/tmp-20190606, pluginA/tmp-20190606/sub1, pluginA/tmp-20190606/sub2, etc.
After naming the latest tmp file path with the current time, the main program identifies the file under the latest time node when the updated plug-in is updated every time, so that the hash value table is updated simultaneously.
The time may be a specific time of day or a specific time of second, and is not particularly limited, and examples thereof are exemplified by a day.
Step S104: and traversing all files under the compiling directory, and judging whether the files are files of the specified type. The determination process is shown with reference to fig. 2.
Traversing refers to sequentially accessing each node in a tree (or graph) along a search route. The operations performed by the access node depend on the particular application problem, which may be checking the value of the node, updating the value of the node, etc. The order of access nodes is different in different traversal modes.
The traversing refers to checking file types line by line from front to back under the directory, and judging whether the checked types belong to file types needing special processing.
Wherein the specified type file is a. Go file in the golang language. And judging whether the file types are the. Go files line by line, and respectively performing different treatments according to whether the file types are the. Go files, as described below.
Wherein the file with extension of. Go is a go language source file. The golang language is a static strong type, compiled, concurrent programming language developed by Google and has garbage collection function.
Step S106: and when the file is the specified type file, modifying the import packet path of the specified type file.
Specifically, when the file is the specified type file, modifying the import packet path of the specified type file includes:
when the file is a. Go file, modifying an import package (import package) part in the code, and adding the constructed folder path into the import package path (package path). I.e. modifying the lead-in package path of the specified type of file to the folder path named at the current time, as shown in fig. 3.
Step S108: and adding the modified specified type file into the first position of the folder path.
The first location is a location where the. Go file is stored under the folder named tmp-current time, where the. Go file has been modified, including modification of the import package path, and then when the main program invokes the update dynamic library, the package file under the new path is invoked.
Step S110: and receiving a compiling instruction for the dynamic library file at the first position.
A dynamic library (DLL, dynamic Link Library), 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 a function that does not belong to its executable code. The executable code of 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 help to share data and resources. Multiple applications can access the contents of a single DLL copy in memory at the same time. A DLL is a library that contains code and data that can be used by multiple programs simultaneously. The dynamic library is the dll suffix and the so suffix under linux.
In this step, the developer may compile the corresponding code program to be changed 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 into the main program for execution, and compiled according to the requirements of the plug-in function.
Step S112: and loading the updated dynamic library to a specified main program to realize the updating of the dynamic library file.
And putting the compiled dynamic library into a machine operated by the program, triggering a program hot loading command, and loading a new dynamic library into the program to realize the function of updating codes under the condition that the program is not restarted.
As shown in FIG. 3, after the plug-in compilation is completed, the plug-in may be loaded into a designated calling main program, and the loading process may take the path or command that the main program called the plug-in before. When the main program needs to call the plug-in the execution process, the updated plug-in is directly called, and at the moment, the updated dynamic library file can be directly loaded without error due to the fact that the go file path of the dynamic library file is updated.
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 the update file at the latest time, and the hash value is updated at the same time, and the original package file and the hash value are not executed any more, so that the whole dynamic library file cannot be in error.
The hash value is a hash function, and the message or the data is compressed into a digest, so that the data quantity is reduced and fixed in the data format. And updating the dynamic library file and simultaneously updating the hash value in the dynamic library file.
Optionally, the traversing compiles all files under the directory, and determining whether the files are files of a specified type includes:
when the file is a file of a non-specified type, the file content is directly copied to a second location of the folder path.
When traversing the file directory from top to bottom, the contents under the non-goo file are directly copied to the folder directory named { tmp-current time }, for the non-goo file.
The method realizes the hot update of the golang dynamic library by modifying the compiling mode. After the dynamic library file is updated by the method, the main program does not need to make corresponding modification, and 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 must be restarted for updating the dynamic library 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 a device for implementing the foregoing embodiment, and the steps of the method in the present embodiment have the same technical effects and are not described herein.
According to a specific embodiment of the present disclosure, the present disclosure provides a dynamic library heat updating apparatus, including: the creation unit 402, the judgment unit 404, the modification unit 406, the joining 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, for example, pluginA/tmp-20190606, pluginA/tmp-20190606/sub1, pluginA/tmp-20190606/sub2, etc.
After naming the latest tmp file path with the current time, the main program identifies the file under the latest time node when the updated plug-in is updated every time, so that the hash value table is updated simultaneously.
And the judging unit 404 is configured to traverse all files under the compiled directory and judge whether the files are files of a specified type.
Optionally, the specified type file is a go file in a golang language.
The traversing refers to checking file types line by line from front to back under the directory, and judging whether the checked types belong to file types needing special processing.
Wherein the specified type file is a. Go file in the golang language. And judging whether the file types are the. Go files line by line, and respectively performing different treatments according to whether the file types are the. Go files, as described below.
Wherein the file with extension of. Go is a go language source file. The golang language is a static strong type, compiled, concurrent programming language developed by Google and has garbage collection function.
And a modifying unit 406 configured to modify the import packet 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 specified type file, modifying the import packet path of the specified type file into the folder path named with the current time.
And a joining unit 408 configured to join the modified specified type file to the first location of the folder path.
The first location is a location where the. Go file is stored under the folder named tmp-current time, where the. Go file has been modified, including modification of the import package path, and then when the main program invokes the update dynamic library, the package file under the new path is invoked.
The receiving unit 410 is configured to receive, at the first location, a compiling instruction for a dynamic library file.
The developer may compile the corresponding code program to be changed 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 into the main program for execution, and compiled according to the requirements of the plug-in function.
And the loading unit 412 is configured to load the updated dynamic library to the designated main program to realize the update of 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 the update file at the latest time, and the hash value is updated at the same time, and the original package file and the hash value are not executed any more, so that the whole dynamic library file cannot be in error.
Optionally, the method further comprises:
a copying unit (not shown) configured to directly copy the file content to the 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 make corresponding modification, and 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 must be restarted when the dynamic library is updated 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 liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the one processor to enable the at least one processor to perform the method steps described in the embodiments above.
The disclosed embodiments provide a non-transitory computer storage medium storing computer executable instructions that perform the method steps described in the embodiments above.
Referring now to fig. 5, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which 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 required for the operation of the electronic device are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 505. An input/output (I/O) interface 505 is also connected to bus 505.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 505 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; 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 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 505, or installed from storage means 508, or installed from ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.

Claims (6)

1. A method for dynamic library hot updating, comprising:
creating a folder path named with the current time;
traversing all files under the compiling catalogue, and judging whether the files are files of a specified type;
when the file is the file of the appointed type, modifying an import packet part in the code, and adding the folder path into an import packet path; the specified type file is a go file in a golang language;
adding the modified specified type file into the first position of the folder path;
receiving a compiling instruction for a dynamic library file at the first position;
and loading the updated dynamic library to a specified main program so that the main program can call the updated dynamic library and update the hash value table to realize the updating of the dynamic library file.
2. The method of claim 1, wherein traversing all files under the compiled directory, determining whether the files are of a specified type, then comprises:
when the file is a file of a non-specified type, the file content is directly copied to a second location of the folder path.
3. A dynamic library heat updating apparatus, comprising:
a creation unit configured to create a folder path named at a current time;
the judging unit is configured to traverse all files under the compiling catalogue and judge whether the files are files of a specified type or not;
a modifying unit configured to modify an import package portion in a code and add the folder path to the import package path when the file is the specified type file; the specified type file is a go file in a golang language;
an adding unit configured to add the modified specified type file to the first location of the folder path;
the receiving unit is 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 a specified main program so that the main program can call the updated dynamic library and update the hash value table to realize the updating of the dynamic library file.
4. The apparatus as recited in claim 3, 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 file of a non-specified type.
5. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to claim 1 or 2.
6. 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 implement the method of claim 1 or 2.
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 CN110750545A (en) 2020-02-04
CN110750545B true 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)

Families Citing this family (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
CN112114778B (en) * 2020-07-03 2024-04-02 上海金融期货信息技术有限公司 Cross-platform dynamic library algorithm management system supporting horizontal expansion
CN112764827B (en) * 2020-12-31 2023-04-07 重庆广播电视大学重庆工商职业学院 Java class hot loading method with safety verification
CN114546508B (en) * 2022-02-28 2024-04-12 广联达科技股份有限公司 Cloud access method and device for tool type application software
CN115048155B (en) * 2022-08-11 2022-11-15 成都智暄科技有限责任公司 Method and system for loading dynamic library, computer readable storage medium and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017096940A1 (en) * 2015-12-10 2017-06-15 深圳市华讯方舟软件技术有限公司 Data import method for spark-sql-based big-data processing platform
CN109376087A (en) * 2018-10-22 2019-02-22 北京奇艺世纪科技有限公司 A kind of method for testing software, device and electronic equipment
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504803B2 (en) * 2010-05-26 2013-08-06 Tethys Solutions LLC System and method for creating and executing portable software
CN105893094B (en) * 2016-03-31 2019-05-03 百度在线网络技术(北京)有限公司 The implementation method and device of application plug
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
CN109933350B (en) * 2019-03-07 2021-07-16 江苏通付盾信息安全技术有限公司 Method and device for embedding codes in application and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017096940A1 (en) * 2015-12-10 2017-06-15 深圳市华讯方舟软件技术有限公司 Data import method for spark-sql-based big-data processing platform
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
CN109376087A (en) * 2018-10-22 2019-02-22 北京奇艺世纪科技有限公司 A kind of method for testing software, device and electronic equipment

Also Published As

Publication number Publication date
CN110750545A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
CN110750545B (en) Dynamic library heat updating method, device, medium and equipment
CN107797820B (en) Method and device for generating patch
CN111240684B (en) Cutting method and device of JS codes, medium and electronic equipment
WO2022105563A1 (en) Indexed file generation method, terminal device, electronic device, and medium
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN111309375B (en) Method, device, medium and electronic equipment for generating remote procedure call toolkit
CN110968340A (en) Method and device for realizing multi-version dependence isolation
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN110764748A (en) Code calling method, device, terminal and storage medium
US20230259358A1 (en) Documentation enforcement during compilation
CN111400068B (en) Interface control method and device, readable medium and electronic equipment
CN110221877B (en) Application program running method and device, electronic equipment and storage medium
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
CN111240987B (en) Method and device for detecting migration program, electronic equipment and computer readable storage medium
CN113535254A (en) Micro-service processing method, micro-service deployment method and related device
CN112527302A (en) Error detection method and device, terminal and storage medium
CN113741951B (en) Local packing method and device
CN112689199B (en) Plug-in loading method and device for television homepage, television and storage medium
CN111796865B (en) Byte code file modification method, device, terminal equipment and medium
CN110502251B (en) Application installation method and device
CN112559394B (en) System library access method and device and electronic equipment
CN117349035B (en) Workload scheduling method, device, equipment and storage medium
CN116594630A (en) File generation method, device, medium and electronic equipment
US20230385075A1 (en) Networked Universal Code Package Provider

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