Reducing delivery size of software updates
Patent Information
- Application Number
- CN202211243550.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-10-14
- Filing Date
- 2022-10-11
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-10-11
AI Technical Summary
然而,该代码段可能影响依赖源代码的也需要被改变的大得多的部分
[0025]除了上文或下文所述的一个或多个特征之外,或作为替换,所述操作由增量编译器或标准编译器执行。
Smart Images

Figure CN115981654B_ABST
Abstract
Description
Technical Field
[0001] This invention generally relates to programmable computing systems, and more particularly to programmable computing systems configured to reduce the transmission size of software updates. Background Technology
[0002] Software engineers use computing tools to manage the lifecycle of software applications from their inception to their end-of-life. These tools allow engineers located remotely to collaboratively develop applications by sharing resources via a central repository. After the software application is deployed, engineers continue to use these tools to correct application bugs and improve its functionality.
[0003] In some cases, software engineers may create software updates that require changes to a small segment of code. However, this segment might affect much larger parts of the source code that also need to be changed. This increases the overall size of the software update and impacts its delivery and execution on the target computer system. This impact includes a significant amount of memory consumed during delivery and execution. Additionally, the target computer system must allocate significantly more processing resources over a longer period to accommodate the delivery and execution of the larger software update. Summary of the Invention
[0004] Embodiments of the present invention relate to a computer-implemented method for reducing the size of software updates. Non-limiting examples of the computer-implemented method include: detecting changes to a code segment of source code relative to a reference code segment; creating an incremental segment in the target code, the incremental segment including a target code segment and a symbolic segment, the target code segment describing the changes to the code segment, and the symbolic segment describing changes to symbols associated with the changed code segment; attaching the incremental segment to a software update; and sending the software update to a target computer system.
[0005] By using incremental fragments, the target computer system only needs to relocate the parts of the code that are being updated. Furthermore, the target computer system only needs to perform symbol evaluation on the code being changed. The target computer receiving the software update uses its binder to install the package, and the target computer's compiler is not used to install the updated code fragments.
[0006] In addition to one or more of the features described above or below, or as an alternative, the creation of the incremental fragment is initiated after the source code has been compiled into object code.
[0007] In addition to one or more features described above or below, or as an alternative, the method further includes: compiling the source code into object code; comparing the object code with reference object code to identify modified code segments; and, based on the identification, determining to include the modified code segments in the incremental segments.
[0008] In addition to one or more features described above or below, or as an alternative, the method further includes initiating the creation of the incremental fragment before compiling the source code into object code.
[0009] In addition to one or more features described above or below, or as an alternative, the method further includes: generating a symbol table based on the source code, wherein the symbol table includes a set of nodes; comparing symbol table nodes in the set of nodes with nodes of a reference symbol table of a reference dependency graph, wherein the symbol table nodes are associated with the modified code segment; traversing paths from the reference symbol table nodes to reference binary code nodes of the reference dependency graph, wherein the binary code nodes depend on the symbol table nodes; and determining, based on the binary code nodes' dependence on the symbol table nodes, that the modified code segment needs to be compiled into object code and included in the incremental segment.
[0010] In addition to one or more of the features described above or below, or as an alternative, the method also includes invoking a daemon to initiate the creation of the incremental fragment.
[0011] In addition to one or more features described above or below, or as an alternative, the method is executed by an incremental compiler or a standard compiler.
[0012] Embodiments of the present invention relate to a system for reducing the size of software updates. A non-limiting example of the system includes: a memory having computer-readable instructions; and one or more processors for executing the computer-readable instructions, the computer-readable instructions controlling the one or more processors to perform operations including: detecting a change in a code segment of source code relative to a reference code segment; creating an incremental segment in target code, the incremental segment including a target code segment and a symbolic segment, the target code segment describing the change in the code segment, and the symbolic segment describing a change in a symbol associated with the changed code segment; attaching the incremental segment to a software update; and sending the software update to a target computer system.
[0013] In addition to one or more of the features described above or below, or as an alternative, the creation of the incremental fragment is initiated after the source code has been compiled into object code.
[0014] In addition to one or more features described above or below, or alternatively, the operation further includes: compiling the source code into object code; comparing the object code with reference object code to identify the modified code segment; and, based on the identification, determining to include the modified code segment in the incremental segment.
[0015] In addition to one or more of the features described above or below, or as an alternative, the creation of the incremental fragment is initiated before the source code is compiled into object code.
[0016] In addition to one or more features described above or below, or alternatively, the operation further includes: generating a symbol table based on the source code, wherein the symbol table includes a set of nodes; comparing symbol table nodes in the set of nodes with nodes of a reference symbol table of a reference dependency graph, wherein the symbol table nodes are associated with the modified code segment; traversing paths from the reference symbol table nodes to reference binary code nodes of the reference dependency graph, wherein the binary code nodes depend on the symbol table nodes; and determining, based on the binary code nodes' dependence on the symbol table nodes, that the modified code segment needs to be compiled into object code and included in the incremental segment.
[0017] In addition to one or more of the features described above or below, or as an alternative, the operation also includes: invoking a daemon to initiate the creation of the incremental fragment.
[0018] In addition to one or more features described above or below, or as an alternative, the operation is performed by an incremental compiler or a standard compiler.
[0019] Embodiments of the present invention relate to a computer program product for reducing the size of software updates. A non-limiting example of the computer program product includes a computer-readable storage medium storing program instructions executable by a processor to cause the processor to perform operations including: detecting a change in a code segment of source code relative to a reference code segment; creating an incremental segment in target code, the incremental segment including a target code segment and a symbolic segment, the target code segment describing the change in the code segment and the symbolic segment describing a change to a symbol associated with the changed code segment; attaching the incremental segment to a software update; and sending the software update to a target computer system.
[0020] In addition to one or more of the features described above or below, or as an alternative, the creation of the incremental fragment is initiated after the source code has been compiled into object code.
[0021] In addition to one or more features described above or below, or alternatively, the operation further includes: compiling the source code into object code; comparing the object code with reference object code to identify the modified code segment; and based on the identification, determining to include the modified code segment in the incremental segment.
[0022] In addition to one or more of the features described above or below, or as an alternative, the creation of the incremental fragment is initiated before the source code is compiled into object code.
[0023] In addition to one or more features described above or below, or alternatively, the operation further includes: generating a symbol table based on the source code, wherein the symbol table includes a set of nodes; comparing symbol table nodes in the set of nodes with nodes of a reference symbol table in a reference dependency graph, wherein the symbol table nodes are associated with the modified code fragment entry; traversing paths from the reference symbol table nodes to reference binary code nodes in the reference dependency graph, wherein the binary code nodes depend on the symbol table nodes; and determining, based on the binary code nodes' dependence on the symbol table nodes, that the modified code fragment needs to be compiled into object code and included in the incremental fragment.
[0024] In addition to one or more of the features described above or below, or as an alternative, the operation also includes: invoking a daemon to initiate the creation of the incremental fragment.
[0025] In addition to one or more features described above or below, or as an alternative, the operation is performed by an incremental compiler or a standard compiler.
[0026] Additional technical features and benefits are achieved through the technology of this invention. Embodiments and aspects of the invention are described in detail herein and are considered part of the claimed subject matter. For a better understanding, refer to the detailed description and accompanying drawings. Attached Figure Description
[0027] The details of the proprietary rights described herein are specifically pointed out and clearly claimed in the claims at the end of the specification. The above and other features and advantages of embodiments of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings, wherein:
[0028] Figure 1 A system for reducing the size of software updates is illustrated according to one or more embodiments of the present invention;
[0029] Figure 2 The processing flow of a standard compiler according to one or more embodiments of the present invention is illustrated;
[0030] Figure 3 A dependency graph for use with an incremental compiler according to one or more embodiments of the present invention is shown;
[0031] Figure 4 An incremental segment is shown according to one or more embodiments of the present invention;
[0032] Figure 5 A processing flow for reducing the size of software patches according to one or more embodiments of the present invention is shown;
[0033] Figure 6 This illustrates a process flow for updating software using incremental patches according to one or more embodiments of the present invention; and
[0034] Figure 7 A block diagram of a computer system for implementing one or more embodiments of the present invention is shown.
[0035] The figures depicted herein are illustrative. Many variations may be made to the figures or operations described therein without departing from the spirit of the invention. For example, actions may be performed in a different order, or actions may be added, deleted, or modified. Furthermore, the term "coupled" and its variations describe a communication path between two elements and do not imply a direct connection between elements without intermediate elements / connections. All such variations are considered part of the specification. Detailed Implementation
[0036] One or more embodiments of the present invention provide a computer-implemented method, computing system, and computer program product for determining which segment of source code is being modified. Modifications to the source code are identified in incremental segments appended to a software update. The software update is delivered to a target computer, which reads the incremental segments to guide the update process.
[0037] A software patch is a set of code intended to modify the source code of a target application. Modifications can be temporary or permanent and are used for a variety of purposes, including security improvements, bug fixes, and feature enhancements. Large software updates increase the overall size of the update and affect its delivery and execution on the target computer system. In response to receiving a software update, the target computer system relocates the source code from one segment of memory to another. This includes parts of the source code that remain unchanged. For larger applications, this consumes a significant amount of available memory on the target computer system. In addition to relocation, the target computer system performs symbolic evaluation on the entire source code by assigning appropriate addresses to all external entities referenced by the source code. In other words, it assigns appropriate addresses to every location in the loaded source code that references external symbols. As a result, the target computer system spends considerable time and consumes significant computational resources due to the size of the source code being updated.
[0038] One or more embodiments of the present invention address one or more of the aforementioned disadvantages by providing a computer-implemented method, computing system, and computer program product for an incremental compiler configured to reduce patch size. The compiler detects updated code for software updates to a target application or computer system. A binder creates an incremental fragment written in the target code and describing changes to the source code. A package builder creates a software patch including the incremental fragment and any updated target code. The software patch is delivered to the target computer system. A linker at the target computer system uses the software patch to update the target application or computer system. By reading the incremental fragment, the target computer system reads only the portion of the source code to be updated into memory. Furthermore, relocation and symbol evaluation are performed only if the length of the updated code fragment has changed from the length of the original code fragment.
[0039] refer to Figure 1 A system 100 for reducing the size of software updates according to one or more embodiments of the present invention is illustrated. System 100 includes a compiler 106 and a binder 110 for performing a first process 102, which includes converting source code 104 into object code 108 and detecting that the source code 104 has changed from a previous version of the code. System 100 also includes a daemon 154 for performing a second process 150, which identifies the changed portions of the code and initiates the creation of incremental fragments 158 for cataloging the changes.
[0040] During the first process 102, compiler 106 receives source code 104 for conversion into object code 108. Source code 104 is code written in a high-level language that is understandable to programmers, while object code 108 is machine-level code (i.e., machine code) that has not yet been linked into binary code 112. Source code 104 includes updated code to be delivered to the target application or computer system.
[0041] If compiler 106 detects modifications to source code 104, it triggers second process 150 by generating event 152, which invokes daemon 154. Daemon 154 is a background process that invokes binder interface 156 to generate incremental fragment 158. Binder interface 156 reads the modified portions of source code 104 and identifies the algorithms that alter the source code. Binder interface 156 then creates incremental fragment 158, which is written into the object code, describing these differences. Incremental fragment 158, either a separate file or part of the object code, is used to guide the compiler of the target computing system to update the target program using software updates.
[0042] Figure 1 The compiler 106 shown can be implemented as a standard compiler or an incremental compiler. Depending on whether compiler 106 is a standard compiler or an incremental compiler, compiler 106 identifies any changes to source code 104 at different points in time during the compilation process. In fact, if a standard compiler receives updated source code, the standard compiler recompiles all source code 104 before determining that any changes exist.
[0043] refer to Figure 2 A standard compiler typically performs four basic steps. First, the standard compiler parses the source code 104 into a symbol table 202. The symbol table 202 is a data structure used to store the names of entities in the source code 104, verify whether variables have been declared, verify the semantics of assignments and expressions in the source code 104, and determine the scope of names in the code. The standard compiler then analyzes the symbol table 202, identifies and generates an intermediate representation 204 of the source code 104. The standard compiler then translates the intermediate representation 204 into object code 108. Finally, a binder 110 associated with the standard compiler links the object code 108 together to form binary code 112 for the computer to execute.
[0044] After the standard compiler translates the intermediate representation 204 into object code 108, it obtains reference object code 114 and compares each segment of object code 108 with comparable segments of reference object code 114 to check for differences. In response to the detection of changes in source code 104, the standard compiler determines that at least a portion of source code 104 needs to be recompiled for software updates. After compilation is complete, the standard compiler then generates event 152, which invokes daemon 154 to call binder interface 156. Binder interface 156 creates incremental segments 158 describing the differences in object code 108.
[0045] Alternatively, Figure 1 The compiler 106 shown may be an incremental compiler that identifies differences in the code before the source code 104 is recompiled. Instead, the incremental compiler attempts to recompile only the updated portions of the source code 104 and any dependent portions. According to one or more embodiments of the invention, the incremental compiler creates a reference dependency graph 300 to track each piece of data created for tracking reference target code 114. Reference Figure 3 The dependency graph 300 includes a symbol table node set 302 (input node), an intermediate representation node set 304, an object code node set 306, and a binary code node set 308. Edges in the dependency graph 300 represent dependencies between two nodes. For example, if an intermediate representation node 312 depends on a symbol table node 310, then the symbol table node 310 is linked to the intermediate representation node 312 via an edge. If a target code node 314 depends on an intermediate representation node 312, then the intermediate representation node 312 is linked to the target code node 314. If a binary code node 316 depends on the target code node 314, then the binary code node 316 is linked to the target code node 314.
[0046] The incremental compiler receives source code 104 and begins generating a symbol table. The incremental compiler obtains reference dependency graph 300 and compares the nodes of the generated symbol table with symbol table nodes 302 of reference dependency graph 300 to detect any changes. Symbol table nodes 302 include variable names and constants, procedure and function names, literal constants and strings, compiler-generated temporary variables, and source language tags. Intermediate representation node 304 represents a source code instruction segment where portions of the source code have been replaced with symbols. Object code node 306 represents the object code segment before linking. Binary code node 308 represents a binary code segment (e.g., instructions written in binary). The compiler uses the symbol table to determine data types, names, declaration procedures, offsets in storage, whether parameters are passed by value or reference, the number and type of parameters passed by value or reference, and base addresses. For example, a change could be a modification to any of the nodes referenced above. These changes could be based on updates to the code or on address changes caused by code segments being relocated from one location to another in memory. Upon detecting a change, the incremental compiler traverses the reference dependency graph 300 and determines whether any binary code node in the binary code node set 308 depends on the modified symbol table node. If a binary code node depends on the modified symbol table node, the incremental compiler generates event 152 to invoke daemon 154. Daemon 154 then invokes binder interface 156 to generate incremental fragment 158.
[0047] Regardless of whether compiler 106 is an incremental compiler or a standard compiler, compiler 106 detects changes and notifies daemon 154 to invoke binder interface 156 and create incremental fragment 158. Binder interface 156 represents the detected updated code. Examples of determinations and actions performed by binder interface 156 include, but are not limited to, the following: If source code 104 includes code of the same length as the reference code, binder interface 156 writes "replace (address, length, content)" in incremental fragment 158. If a set of code fragments is deleted, binder interface 156 writes "delete (address, length, content)" in incremental fragment 158. If differences exist in the external symbol dictionary class, binder interface 156 describes the differences in incremental fragment 158. If binder interface 156 identifies differences in the relocation symbol dictionary class, binder interface 156 describes the differences in incremental fragment 158. Binder interface 156 may also describe differences in the compiler information class within incremental fragment 158. The binder interface 156 also recognizes classes that have been modified, including but not limited to external symbol tables and compilation information. The binder interface 156 also recognizes any changed addresses, any changed data types, and any changed content. The binder interface 156 also recognizes any actions required by modifications in source code 104, such as additions, deletions, replacements, and moves.
[0048] Reference Figure 4 This illustrates an exemplary incremental fragment 400 created by a binder interface 156 according to one or more embodiments of the present invention. As seen in the exemplary incremental fragment 400, modifications to source code 104 require changes to three classes: code 402, external symbol dictionary 404, and compilation information 406. For illustration, the exemplary incremental fragment 400 indicates the addition of symbol 22FEB and the removal of symbol ISHABC at the target application or computer system. The exemplary incremental fragment 400 package is a new fragment of the software update. In some embodiments of the invention, the incremental fragment is written into target code 108 or binary code 112, while in other embodiments, the incremental fragment is an isolated file. Incremental fragment 158 includes the updated code fragment in a single location. By using incremental fragment 158, the target computer system only needs to relocate those parts of the code being updated. Furthermore, the target computer system only needs to perform symbol evaluation against the code being changed. The target computer receiving the software update uses its binder to install the package, and the target computer's compiler is not used to install the updated code fragment.
[0049] refer to Figure 5The diagram illustrates a process flow 500 for reducing the size of software updates according to one or more embodiments of the present invention. In block 502, compiler 106 detects that a portion of source code 104 has been updated. The timing of compiler 106's update detection depends on whether compiler 106 is a standard compiler or an incremental compiler. If compiler 106 is a standard compiler, it compiles source code 104 and then detects the change. However, if compiler 106 is an incremental compiler, it detects the change before completing the compilation of source code 104. Upon detecting that a portion of source code 104 has changed, the incremental compiler generates event 152 to initiate the creation of an incremental fragment 158.
[0050] In box 504, binder interface 156 creates incremental fragment 158 to describe changes to source code 104. Event 152 invokes daemon 154 to initiate the creation of incremental fragment 158. Daemon 154 invokes binder interface 156. Binder interface 156 is the algorithm describing the code differences in incremental fragment 158. Incremental fragment 158 is a standalone file, object code, or binary code used to guide the compiler of the target computing system to update the target application using software patches.
[0051] In box 506, the package builder (not shown) appends incremental fragment 158 to the software update. The software update can then be delivered to the target application or computer system.
[0052] refer to Figure 6 This illustrates a process 600 for updating source code of a target application or target computer system using a software patch, according to one or more embodiments of the present invention. In block 602, a linker of the target computer system (not shown) receives the software update and reads the software patch, and identifies incremental fragments 158. For each class fragment of incremental fragment 158, the linker identifies the class fragment name (e.g., external symbol dictionary 404). The linker then relocates the original class fragment from one part of memory to another part of memory.
[0053] In box 604, the linker reads the original class fragment and determines whether the class fragment is related to the code fragment (e.g., code 402). If the class fragment is related to the code fragment, the linker calculates the length of the original code fragment in box 606 and proceeds to box 610. In box 610, the linker compares the length of the original code fragment with the length of the code described in incremental fragment 158 to determine whether the length of the code described by incremental fragment 158 is greater than or less than the original code length (i.e., the code length has changed?). If the length of the code described by incremental fragment 158 has changed, the process proceeds to box 612, and the linker updates the original code fragment of the target application or target computer system. The linker uses instructions from incremental fragment 158 (e.g., ...) Figure 4 The incremental snippet 158 updates the original code snippet using code 402. From box 612, the process moves to box 616, where the linker updates the symbol table at the target application or target computer system based on the new code. The incremental snippet 158 includes the relevant symbols for replacement, so the linker does not need to evaluate all the symbols in the source code. Instead, the linker follows the instructions of the incremental snippet 158 (e.g., ...). Figure 4 The external symbol dictionary 404 is used to update the symbols. Then, the process proceeds to box 620, where the link editor checks the next class fragment of incremental fragment 158.
[0054] In box 610, if the length of the code described by incremental fragment 158 has not changed, the process proceeds to box 614, and the linker uses instructions from incremental fragment 158 (e.g., Figure 4 The code snippet 402 is used to update the original code snippet. Then, the process proceeds to box 620, where the linker examines the next class snippet after incremental snippet 158.
[0055] Returning to box 604, if the current class fragment is not a code fragment, the procedure proceeds to box 608. In box 608, the linker reads the class fragment identifier and determines if the class fragment is a symbol table fragment. If the class fragment is a symbol table fragment, the procedure proceeds to box 616. In box 616, the instructions of incremental fragment 158 are followed (e.g., ...). Figure 4 The linker updates the symbols using the external symbol dictionary 404 and proceeds to box 620. In box 620, the linker checks the next class segment of incremental segment 158. For example, the linker can add or delete symbols based on the description in incremental segment 158. However, if the class segment is not a symbol segment, the process proceeds to box 618. In box 618, the linker creates a temporary segment of the symbol table. After creating the temporary segment, the process proceeds to box 620, where the linker checks the next class segment of incremental segment 158.
[0056] In one or more embodiments of the present invention Figure 1 The hardware / software modules in System 100 can be Figure 7 Implemented on the 700 computer system, now moving to Figure 7 The document generally illustrates a computer system 700 according to one embodiment. The computer system 700 can be an electronic computer framework including and / or employing any number of computing devices and networks and combinations thereof, utilizing various communication technologies as described herein. The computer system 700 can be easily scalable, extensible, and modular, with the ability to change to different services or reconfigure some features independently of others. The computer system 700 can be, for example, a server, desktop computer, laptop computer, tablet computer, or smartphone. The computer system 700 can be described in the general context of computer system executable instructions, such as program modules executed by the computer system. Typically, program modules can include routines, programs, objects, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. The computer system 700 can be practiced in a distributed cloud computing environment, where tasks are performed by remote processing devices linked via a communication network. In a distributed cloud computing environment, program modules can reside in local and remote computer system storage media, including memory storage devices.
[0057] like Figure 7 As shown, the computer system 700 has one or more central processing units (CPUs) 701a, 701b, 701c, etc. (collectively or collectively referred to as processor 701). Processor 701 can be a single-core processor, a multi-core processor, a computing cluster, or any other configuration. Processor 701 (also referred to as processing circuitry) is coupled to system memory 703 and various other components via system bus 702. System memory 703 may include read-only memory (ROM) 704 and random access memory (RAM) 705. ROM 704 is coupled to system bus 702 and may include a basic input / output system (BIOS), which controls certain basic functions of computer system 700. RAM is a read-write memory coupled to system bus 702 for use by processor 701. System memory 703 provides temporary storage space for the operation of the aforementioned instructions during operation. System memory 703 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.
[0058] Computer system 700 includes an input / output (I / O) adapter 706 and a communication adapter 707 coupled to system bus 502. I / O adapter 706 may be a Small Computer System Interface (SCSI) adapter that communicates with hard disk 708 and / or any other similar components. I / O adapter 706 and hard disk 708 are collectively referred to herein as mass storage device 710.
[0059] Software 711 for execution on computer system 700 may be stored in mass storage device 710. Mass storage device 710 is an example of a tangible storage medium readable by processor 701, wherein software 711 is stored as instructions executed by processor 701 to cause computer system 700 to operate (as described herein with reference to the various figures). Examples of computer program products and the execution of such instructions are discussed in more detail here. Communication adapter 507 interconnects system bus 702 with network 712, which may be an external network, enabling computer system 700 to communicate with other such systems. In one embodiment, a portion of system memory 703 and mass storage device 710 jointly store an operating system, which may be any suitable operating system, such as z / OS or AIX from IBM, to coordinate... Figure 7 The functions of the various components shown are illustrated.
[0060] Additional input / output devices are shown connected to system bus 702 via display adapter 715 and interface adapter 516. In one embodiment, adapters 706, 707, 715, and 716 may be connected to one or more I / O buses, which are connected to system bus 702 via an intermediate bus bridge (not shown). Display 719 (e.g., screen or display monitor) is connected to system bus 702 via display adapter 715, and may include a graphics controller and video controller for improving performance in graphics-intensive applications. Keyboard 721, mouse 722, speaker 723, etc., may be interconnected to system bus 702 via interface adapter 716, which may include, for example, a super I / O chip integrating multiple device adapters into a single integrated circuit. Suitable I / O buses for connecting peripheral devices such as hard disk controllers, network adapters, and graphics adapters typically include common protocols such as Peripheral Component Interconnect (PCI). Therefore, as Figure 7 The computer system 700 configured therein includes processing capabilities in the form of a processor 701, storage capabilities including system memory 703 and mass storage device 710, input devices such as keyboard 721 and mouse 722, and output capabilities including speaker 723 and display 719.
[0061] In some embodiments, the communication adapter 707 may use any suitable interface or protocol to transmit data, such as an Internet Minicomputer System Interface (IMSI). The network 712 may be a cellular network, radio network, wide area network (WAN), local area network (LAN), or the Internet. External computing devices may connect to the computer system 700 via the network 712. In some examples, the external computing device may be an external network server or a cloud computing node.
[0062] It should be understood that Figure 7 The block diagram is not intended to indicate that the computer system 700 will include Figure 7 Instead of all the components shown, computer system 700 may include... Figure 7 Any suitable fewer or additional components not shown herein (e.g., additional memory components, embedded controllers, modules, additional network interfaces, etc.). Furthermore, the embodiments described herein with respect to computer system 700 can be implemented with any suitable logic, wherein the logic mentioned herein can include any suitable hardware (e.g., processor, embedded controller, or application-specific integrated circuit, etc.), software (e.g., applications, etc.), firmware, or any suitable combination of hardware, software, and firmware in various embodiments.
[0063] Various embodiments of the invention are described herein with reference to the accompanying drawings. Alternative embodiments of the invention may be devised without departing from the scope thereof. Various connections and positional relationships (e.g., above, below, adjacent, etc.) between elements are illustrated in the specification and drawings. Unless otherwise stated, these connections and / or positional relationships may be direct or indirect, and the invention is not intended to be limiting in this respect. Therefore, coupling of entities may refer to direct or indirect coupling, and positional relationships between entities may be direct or indirect positional relationships. Furthermore, the various tasks and process steps described herein may be incorporated into a more comprehensive procedure or process with additional steps or functions not described in detail herein.
[0064] One or more methods described herein can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logic functions based on data signals, application-specific integrated circuits (ASICs) having appropriately combined logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0065] For the sake of brevity, conventional techniques related to the manufacture and use of aspects of the present invention may or may not be described in detail herein. In particular, various aspects of the computing systems and specific computer programs used to implement the various technical features described herein are well known. Therefore, for the sake of brevity, many conventional implementation details are only briefly mentioned or omitted entirely herein, without providing well-known system and / or process details.
[0066] In some embodiments, various functions or actions may occur at a given location and / or in combination with the operation of one or more devices or systems. In some embodiments, a portion of a given function or action may be performed at a first device or location, while the remainder of the function or action may be performed at one or more additional devices or locations.
[0067] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the terms “comprising” and / or “including” as used in this specification specify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.
[0068] The equivalent substitutions for the corresponding structures, materials, operations, and all functionally defined means or steps in the following claims are intended to include any structure, material, or operation used to perform the function in combination with other elements specifically pointed out in the claims. This disclosure is intended for illustration and description and is not intended to be exhaustive or limited to the disclosed forms. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of this disclosure. The examples were chosen and described in order to best explain the principles and practical application of this disclosure, enabling those skilled in the art to understand that this disclosure can be implemented with various modifications to suit a particular purpose.
[0069] The diagrams described herein are illustrative. Many variations of the diagrams or steps (or operations) described herein may exist without departing from the spirit of this disclosure. For example, actions may be performed in a different order, or actions may be added, deleted, or modified. Furthermore, the term "coupled" describes a signal path between two elements and does not imply a direct connection between elements without intermediate elements / connections. All such variations are considered part of this disclosure.
[0070] The following definitions and abbreviations are used to interpret the claims and specification. As used herein, the terms “comprising,” “including,” “having,” “containing,” or any other variations thereof are intended to cover non-exclusive inclusion. For example, a composition, mixture, process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such compositions, mixtures, processes, methods, articles, or apparatus.
[0071] Additionally, the term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. The terms "at least one" and "one or more" are understood to include any integer greater than or equal to one, i.e., one, two, three, four, etc. The term "multiple" should be understood to include any integer greater than or equal to two, i.e., two, three, four, five, etc. The term "connection" can include both indirect "connection" and direct "connection."
[0072] The terms “about,” “substantially,” “approximately,” and variations thereof are intended to include a degree of error associated with a measurement of a specific quantity based on the equipment available at the time of filing this application. For example, “about” may include a range of ±8%, 5%, or 2% of a given value.
[0073] This invention can be a system, method, and / or computer program product with any possible level of technical detail integration. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions thereon for causing a processor to execute aspects of the invention.
[0074] Computer-readable storage media can be tangible means for retaining and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital universal disk (DVD), memory sticks, floppy disks, mechanical encoding devices such as punch cards or protrusions in slots having instructions recorded thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses passing through fiber optic cables), or electrical signals transmitted through wires.
[0075] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a suitable computing / processing device via a network (e.g., the Internet, a local area network, a wide area network, and / or a wireless network), or to an external computer or external storage device. The network may include copper cables, optical fibers, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to a computer-readable storage medium within the suitable computing / processing device.
[0076] Computer-readable program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages (such as Smalltalk, C++, etc.) and procedural programming languages (such as the "C" programming language or similar programming languages). The computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as a standalone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)) or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) may execute computer-readable program instructions by utilizing state information from the computer-readable program instructions to personalize the electronic circuitry in order to perform aspects of this invention.
[0077] The present invention will be described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0078] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner, such that the computer-readable storage medium storing the instructions comprises an article of manufacture containing instructions that implement aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram.
[0079] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce computer-implemented processing, such that the instructions executed on the computer, other programmable apparatus, or other device perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than indicated in the figures. For example, two blocks shown consecutively may actually be executed substantially simultaneously, or these blocks may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action or executes a combination of dedicated hardware and computer instructions.
[0081] Various embodiments of the invention have been described for illustrative purposes, but are not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been chosen to best explain the principles of the embodiments, their practical application, or improvements to existing technologies on the market, or to enable others skilled in the art to understand the embodiments described herein.
Claims
1. A computer-implemented method, comprising: The processor detects changes in a code segment of the source code relative to a reference code segment; The processor creates an incremental fragment in the target code, the incremental fragment including a target code fragment and a symbol fragment, the target code fragment describing the changes to the code fragment, and the symbol fragment describing the changes to the symbols associated with the changed code fragment. The incremental fragment is configured to guide the compiler of the target computer system to update the target code, without relocating the unchanged parts of the source code, only relocating the changed parts of the source code, and without performing symbol evaluation on the entire source code, only performing symbol evaluation on the changed source code. The processor attaches the incremental fragment to the software update; as well as The processor sends the software update to the target computer system.
2. The computer-implemented method according to claim 1, wherein, The creation of the incremental fragment is initiated after the source code is compiled into object code.
3. The computer-implemented method according to claim 2, wherein, The method further includes: Compile the source code into object code; The target code is compared with a reference target code to identify the modified code segments; and Based on the identification, it is determined that the modified code segment will be included in the incremental segment.
4. The computer-implemented method according to claim 1, wherein, The creation of the incremental fragment is initiated before the source code is compiled into object code.
5. The computer-implemented method according to claim 4, wherein, The method further includes: Based on the source code, a symbol table is generated, wherein the symbol table includes a set of nodes; The symbol table nodes in the node set are compared with the nodes of the reference symbol table in the reference dependency graph, wherein the symbol table nodes are associated with the modified code segments; Traverse the path from the reference symbol table node to the reference binary code node in the reference dependency graph, wherein the binary code node depends on the symbol table node; and Based on the fact that the binary code node depends on the symbol table node, it is determined that the modified code segment needs to be compiled into object code and included in the incremental segment.
6. The computer-implemented method according to claim 1, wherein, The method further includes: invoking a daemon to initiate the creation of the incremental fragment.
7. The computer-implemented method according to claim 1, wherein, The method is executed by an incremental compiler or a standard compiler.
8. A computer system, comprising: Memory having computer-readable instructions; as well as One or more processors are configured to execute the computer-readable instructions, which control the one or more processors to perform operations including: Detect changes in a code snippet from the source code compared to a reference code snippet; An incremental fragment is created in the target code, the incremental fragment comprising a target code fragment and a symbol fragment, the target code fragment describing the changes to the code fragment, and the symbol fragment describing the changes to the symbols associated with the changed code fragment. The incremental fragment is configured to guide the compiler of the target computer system to update the target code, without relocating the unchanged parts of the source code, only relocating the changed parts of the source code, and without performing symbol evaluation on the entire source code, only performing symbol evaluation on the changed source code. Attach the incremental fragment to the software update; and Send the software update to the target computer system.
9. The system according to claim 8, wherein, The creation of the incremental fragment is initiated after the source code is compiled into object code.
10. The system according to claim 9, wherein, The operation also includes: Compile the source code into object code; The target code is compared with a reference target code to identify the modified code segments; and Based on the identification, it is determined that the modified code segment will be included in the incremental segment.
11. The system according to claim 8, wherein, The creation of the incremental fragment is initiated before the source code is compiled into object code.
12. The system according to claim 11, wherein, The operation also includes: Based on the source code, a symbol table is generated, wherein the symbol table includes a set of nodes; The symbol table nodes in the node set are compared with the nodes of the reference symbol table in the reference dependency graph, wherein the symbol table nodes are associated with the modified code segments; Traverse the path from the reference symbol table node to the reference binary code node in the reference dependency graph, wherein the binary code node depends on the symbol table node; and Based on the fact that the binary code node depends on the symbol table node, it is determined that the modified code segment needs to be compiled into object code and included in the incremental segment.
13. The system according to claim 8, wherein, The operation also includes: invoking a daemon to initiate the creation of the incremental fragment.
14. The system according to claim 8, wherein, The operation is performed by either the incremental compiler or the standard compiler.
15. A computer program product comprising program instructions, said program instructions being executable by a processor to cause the processor to perform operations including the steps of the method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and device for generating patch
CN107797820A
