Component calling method and related device

By obtaining component interface change information and utilizing reserved interfaces, the problem of call failure after component upgrade was solved, the system's stability and compatibility were improved, upgrade costs were reduced, and the ability to quickly adapt to technical and business needs was achieved.

CN121957786APending Publication Date: 2026-05-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

The upgraded component has issues with call failures, leading to system compatibility problems and increased upgrade costs.

Method used

By obtaining the component's interface change information, determining the current identifier of the target interface, and enabling the invocation of the current version of the component, the system can be extended and modified using reserved interfaces, reducing the need to modify external components.

Benefits of technology

It improves system stability and compatibility, reduces upgrade costs and risks, shortens upgrade time, and enhances system scalability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957786A_ABST
    Figure CN121957786A_ABST
Patent Text Reader

Abstract

The invention discloses a component calling method and a related device, and belongs to the technical field of computers. The method comprises the steps of obtaining interface change information corresponding to a first component in response to a first calling request of the first component; determining a current identifier of the target interface based on the historical identifier of the target interface and the interface change information; and calling the target interface based on the current identifier of the target interface to realize calling of the first component of the current version. The problem of system compatibility caused by component upgrading can be avoided, and the overall stability of the system is improved. Moreover, since the external components used by the user do not need to perceive symbol changes, technicians do not need to modify and test a large number of external components one by one, so that the upgrading cost and risk are reduced, the upgrading process of the components can be accelerated, and the system can more quickly adapt to new technology and business requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Component invocation methods and related devices Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, storage medium, and program product for invoking a component. Background Technology

[0002] As technology continues to develop and user needs evolve, components may expose various problems and vulnerabilities during use, such as performance bottlenecks, security vulnerabilities, and compatibility issues. Upgrading components can fix these problems and vulnerabilities. However, upgrading a component can lead to failures in calling it, which can impact the operation of the entire business logic it supports. Summary of the Invention

[0003] This application provides a method and related apparatus for invoking a component, which can solve the problem of component invocation failure in related technologies. The technical solution is as follows:

[0004] In a first aspect, a method for invoking a component is provided, applied to an electronic device, the electronic device having a first component deployed thereon, the first component including at least one interface; the method includes: in response to a first invocation request of the first component, obtaining interface change information corresponding to the first component; wherein the interface change information indicates the correspondence between historical identifiers and current identifiers of the at least one interface, the historical identifier being the identifier of the interface in a first historical version of the first component, the current identifier being the identifier of the interface in the current version of the first component, the first invocation request carrying the historical identifier of a target interface among the at least one interface; determining the current identifier of the target interface based on the historical identifier of the target interface and the interface change information; and invoking the target interface based on the current identifier of the target interface to realize the invocation of the first component in the current version.

[0005] This application can determine the current identifier of the target interface by obtaining the interface change information corresponding to the first component when the historical identifier of the target interface in the first component is called. Then, it calls the target interface based on the current identifier to achieve the invocation of the current version of the first component. In other words, the caller in this application does not need to be aware of the change in the target interface identifier of the first component (i.e., external components do not need to be modified to continue interacting with the upgraded first component), which avoids system compatibility issues caused by component upgrades and improves the overall stability of the system. Furthermore, since the external components used by users do not need to be aware of symbol changes, technicians do not need to modify and test a large number of external components one by one, thereby reducing upgrade costs and risks, accelerating the component upgrade process, and enabling the system to adapt to new technologies and business requirements more quickly.

[0006] In one possible implementation, the caller can send a first invocation request to the electronic device, which is used to invoke a first component. In this case, the electronic device can respond to the first invocation request.

[0007] It should be noted that the caller can be a component deployed on an electronic device other than the first component, or an external component deployed on other electronic devices besides the aforementioned electronic devices.

[0008] If the caller is an external component, the electronic device can accept the first call request sent by the external component, and then the electronic device can receive the first call request and respond to the first call request to obtain the interface change information corresponding to the first component.

[0009] In one possible implementation, the electronic device stores a correspondence between the first component and interface change information. In this case, the electronic device can directly obtain the interface change information corresponding to the first component.

[0010] In one possible implementation, the interface identifier includes the interface name and interface parameters.

[0011] It should be noted that the interface change information corresponding to the first component was determined by technical personnel based on the differences between the interfaces in the first historical version of the first component and the current version of the first component. Furthermore, the historical and current identifiers of the aforementioned interfaces have the same meaning as the interface identifiers mentioned above; that is, both the historical and current identifiers include the interface name and interface parameters. The only difference between the historical and current identifiers is that they correspond to different versions of the first component. In this case, the interface change information includes the correspondence between interface names and interface parameters.

[0012] In one possible implementation, a reserved interface exists in at least one interface of the first component in the first historical version. This reserved interface is used to implement interface expansion during subsequent component upgrades. In the first historical version, the reserved interface is not used to implement functionality.

[0013] This application provides reserved interfaces, allowing developers to easily extend and modify the system without breaking existing code or functionality. When new features need to be added to components or upgrades are required, these reserved interfaces can be used directly without large-scale refactoring or adjustments to the original code. This significantly improves the scalability and flexibility of components and reduces upgrade and maintenance costs.

[0014] Before responding to the first call request of the first component, the electronic device may also upgrade the first component to obtain the current version of the first component.

[0015] In one possible implementation, the electronic device provides a target service, which is implemented through one or more components, including a first component. In this case, the electronic device can determine a first silent set, which includes N components from the one or more components, where N is a positive integer. No component in the first silent set has a dependency with any component not belonging to the first silent set. The first silent set includes the first component. If N is greater than 1, any two components among the N components have a dependency. If all components included in the first silent set are in a stopped state, the first component is upgraded to obtain the current version of the first component. Since the target service is implemented through one or more components, for ease of description, this application refers to these one or more components as one or more components of the target service.

[0016] It's important to note that a dependency between two components refers to a data dependency and / or a control dependency. A control dependency means that the execution of instructions in one component depends on the execution of instructions in another component. A data dependency means that the determination of data in one component requires data processed by another component; in this case, a data dependency exists between the two components.

[0017] In one possible implementation, the target service can be any one of the multiple services included in the OS service set. In another possible implementation, the electronic device has business layer software installed, and the target service can be a service provided by any one of the software programs in the business layer.

[0018] In one possible implementation, based on the code segment corresponding to the target service running in the electronic device, the control flow graph and data flow graph corresponding to the target service are determined. The code segment corresponding to the target service is the sum of the code segments corresponding to one or more components of the target service. Based on the control flow graph and data flow graph corresponding to the target service, the components in one or more components of the target service that have a dependency relationship with the first component are determined. The components in one or more components that have a dependency relationship with the first component and the first component are determined as the N components included in the first silent set.

[0019] The process of upgrading the first component includes: obtaining symbol change information corresponding to the first component, the symbol change information indicating the difference between the symbols in the historical code segment of the first component and the symbols in the current code segment of the first component, the historical code segment being the code segment corresponding to the first component in the second historical version, and the current code segment being the code segment corresponding to the first component in the current version; upgrading the first component based on the symbol change information and the current code segment to obtain the first component in the current version.

[0020] It should be noted that the symbol change information corresponding to the first component is determined by technicians based on the historical code segment and the current code segment of the first component. In one possible implementation, this symbol change information includes at least one of the following: added symbol information, deleted symbol information, and symbol mapping information. Specifically, added symbol information indicates symbols added to the current code segment compared to the historical code segment, deleted symbol information indicates symbols deleted from the current code segment compared to the historical code segment, and symbol mapping information indicates the mapping relationship between added and deleted symbols.

[0021] In one possible implementation, the symbols include function names, interface names, etc. When the symbols include function names, the symbol mapping information includes function name mapping information and function parameter mapping information. The function name mapping information indicates the correspondence between newly added and deleted function names, and the function parameter mapping information indicates the correspondence between the parameters of newly added and deleted functions. Similarly, when the symbols include interface names, the symbol mapping information includes interface name mapping information and interface parameter mapping information. The interface name mapping information indicates the correspondence between newly added and deleted interface names, and the interface parameter mapping information indicates the correspondence between the parameters of newly added and deleted interfaces.

[0022] It should be noted that the first historical version and the second historical version can be the same version or different versions; this application does not limit this. If the first historical version and the second historical version are the same version, then the above symbols include the interface name, the interface name mapping information corresponds to the correspondence of interface names, and the interface parameter mapping information corresponds to the correspondence of interface parameters.

[0023] The process of upgrading the first component based on symbol change information and the current code segment to obtain the current version of the first component includes: obtaining the state data of the first component of the second historical version, the state data being saved when all components included in the first silent set are in a stopped running state; loading the first component of the current version based on the current code segment; and migrating the state data of the first component of the second historical version to the memory space corresponding to the first component of the current version based on symbol change information.

[0024] In one possible implementation, the first silent set includes components that are in a busy state, meaning there is at least one unfinished task. In this case, for a target component in a busy state, if the first task is included among the at least one unfinished task, the first task continues to be executed, and no other tasks are executed after the first task is completed, so that all components included in the first silent set are in a stopped state. The first task is a task that the target component has started executing but has not yet completed. If the first task is not included among the at least one unfinished task, the execution of at least one unfinished task is stopped, so that all components included in the first silent set are in a stopped state.

[0025] In another possible implementation, if a second call request is received from a component in the first silent set, the second call request is intercepted so that all components included in the first silent set are in a stopped state.

[0026] Of course, in addition to intercepting call requests for components in the first silent set before upgrading the first component, if a second call request for a component in the first silent set is received during the upgrade of the first component, the second call request can also be intercepted so that the components in the first silent set remain silent.

[0027] In one possible implementation, if a third call request is received from the second component, the third call request is executed. The second component is a component that does not belong to the first silent set among one or more components.

[0028] During the upgrade of the first component, this application only stops the operation of components within the first silent set. Unrelated components (i.e., components that do not depend on the first component) can continue to operate. This means that most of the target service's functionality can remain unchanged, thereby reducing service interruption time caused by the upgrade. This is particularly important for systems requiring high availability, such as online services and financial systems. Furthermore, because this application only stops components that depend on the first component during the upgrade process, it reduces the potential scope of failures caused by the upgrade. If the upgrade fails, the impact will be limited to a smaller area, making troubleshooting and repair easier.

[0029] In one possible implementation, the target service is implemented through multiple components, where N is greater than 1, and the first silent set also includes a third component, the operation of which depends on the third component; in this case, the electronic device can also upgrade the third component to obtain the current version of the third component before upgrading the first component.

[0030] In one possible implementation, the third component also needs to be upgraded. If the operation of the first component depends on the third component, then the third component needs to be upgraded before the first component is upgraded. That is, when all components in the first silent set are in a stopped state, the third component is upgraded first, and then the first component is upgraded after the third component is upgraded.

[0031] In one possible implementation, the target service is implemented through multiple components, where N is greater than 1. The first silent set also includes a fourth component, the operation of which depends on the first component. After upgrading the first component, the fourth component can also be upgraded to obtain the current version of the fourth component.

[0032] In one possible implementation, the fourth component also needs to be upgraded. If the operation of the fourth component depends on the first component, then the first component must be upgraded before upgrading the fourth component. That is, if all components in the first silent set are in a stopped state, the first component is upgraded first, and then the fourth component is upgraded after the first component is upgraded. Of course, the first silent set can include the first, third, and fourth components mentioned above. If all three components need to be upgraded, then if all components in the first silent set are in a stopped state, the third component is upgraded first, then the first component is upgraded after the third component is upgraded, and finally the fourth component is upgraded after the first component is upgraded.

[0033] Secondly, a component invocation device is provided, which has the function of implementing the component invocation method behavior described in the first aspect above. The component invocation device includes at least one module for implementing the component invocation method provided in the first aspect above.

[0034] Thirdly, an electronic device is provided, comprising a processor and a memory, the memory being used to store a computer program for executing a method of invoking the components provided in the first aspect. The processor is configured to execute the computer program stored in the memory to implement the method of invoking the components described in the first aspect.

[0035] Optionally, the electronic device may further include a communication bus for establishing a connection between the processor and the memory.

[0036] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is run on a computer or processor, the computer or processor performs the steps of the method for invoking the component described in the first aspect.

[0037] Fifthly, a computer program product is provided, the computer program product comprising computer instructions that, when executed on a computer or processor, cause the computer to perform the steps of the method for invoking the component described in the first aspect. Alternatively, a computer program is provided that, when executed on a computer or processor, causes the computer or processor to perform the steps of the method for invoking the component described in the first aspect.

[0038] The technical effects achieved by the second, third, fourth, and fifth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description

[0039] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0040] Figure 2 is a flowchart of an encoding method provided in an embodiment of this application;

[0041] Figure 3 is a schematic diagram of symbol change information provided in an embodiment of this application;

[0042] Figure 4 is a schematic diagram of a component upgrade process provided in an embodiment of this application;

[0043] Figure 5 is a schematic diagram of the structure of a component calling device provided in an embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0045] To facilitate understanding, before providing a detailed explanation of the methods for calling the components provided in the embodiments of this application, the terms, application scenarios, and implementation environments involved in the embodiments of this application will be introduced first.

[0046] First, the terms used in the embodiments of this application will be introduced.

[0047] An object is an entity that contains data (attributes or state) and methods that can manipulate that data.

[0048] Attributes: Attributes are data associated with a class that represent the state or characteristics of an object. For example, in a class named Car, attributes might include manufacturer, model, year, and color. Each attribute typically has a specific data type, such as string, integer, or floating-point number.

[0049] Object-oriented programming (OOP) is a programming paradigm that uses "objects" to design software. The core idea of ​​OOP is to abstract real-world things into objects and implement software functionality through the interaction between these objects.

[0050] A class is a core concept in object-oriented programming. A class defines a set of attributes (also called fields or variables) and methods (also called functions or operations) that collectively describe the state and behavior of a specific type of thing. A class consists of attributes and methods.

[0051] Component: In software development, a component is usually regarded as an independent, reusable unit of code, which is a collection of one or more classes that implement a specific function.

[0052] Interfaces: Since a component can provide multiple functionalities, it typically provides a series of available interfaces, each corresponding to a specific function. The caller can choose the appropriate interface to invoke based on its needs. If the caller needs to access multiple functionalities of the component, it may need to call multiple different interfaces. In other words, a component's interface is a specification for communication and interaction between components, defining the input parameters the component can receive, the output results it can return, and the operations it can perform. A class can implement the functionality corresponding to one or more interfaces.

[0053] An interface includes an interface name and interface parameters; the interface name, also known as the interface identifier, is used to distinguish different interfaces. Interface parameters include request parameters, which are the input parameters required by the interface, including parameter name, parameter type, and parameter description. In some embodiments, interface parameters also include response parameters, which are the output results returned by the interface, including the type, name, and description of the return value.

[0054] Operating system (OS) services: OS is the core software of a computer system, designed to manage and control the computer's hardware resources. OS services refer to a series of basic functions and operations provided by the operating system to computer users, applications, and hardware. OS services (also known as OS service set) include, but are not limited to, process management, memory management, disk and file system management, network communication management, and security mechanisms.

[0055] Business layer software: Business layer software includes at least one software that carries business functions. Each application provides corresponding services externally to ensure the normal operation of the corresponding business. For example, business layer software can be software installed on an in-vehicle infotainment system, such as navigation software, music software, etc. Alternatively, business layer software can be software deployed on a server, etc. This application does not limit this specific application.

[0056] Symbols: In programming and computer science, symbols typically refer to names or identifiers used to represent elements such as variables and functions. These symbols have specific meanings and functions in the code. In programming, the interface names and parameters mentioned above are themselves symbols; they are used to reference and call the interface, acting as specific identifiers in the code that allow developers to access the interface's functionality.

[0057] The relationship between interface names, method names, and function names: An interface name identifies an interface, while a method name identifies the methods defined within that interface. An interface can contain one or more methods, each with its own name. Method names and function names are functionally similar, but method names are more commonly used in classes and interfaces in object-oriented programming, while function names are more commonly used in procedural or functional programming. However, in languages ​​that support object-oriented programming, function names can also be considered method names.

[0058] A control flow graph (CFG) is an important concept in software engineering that describes all paths traversed during program execution. It represents the possible flow of execution for all basic blocks within a process in graph form. Each node represents a basic block of code, a straight line of code without any jumps or jump targets; a jump target begins a block, and a jump ends a block. Directed edges are used to represent jumps in the control flow. In most cases, a control flow graph contains two specifically designated blocks: an entry block and an exit block, representing the points where control flow enters and exits, respectively.

[0059] Data flow graph (DFG): From the perspective of data transmission and processing, it graphically represents the logical function of a system, the logical flow of data within the system, and the logical transformation process.

[0060] Control dependency: If the execution of an instruction depends on the execution of a preceding instruction (or in other words, it will only be executed after a preceding instruction has been executed), then there is a control dependency between the two instructions.

[0061] Data dependency: When determining a piece of data requires information based on previously processed data, a data dependency is established between the two pieces of data. For example, if x = 10 and y = x + c, since a change in x will cause a change in y, then y can be considered dependent on x, or in other words, there is a data dependency between x and y.

[0062] LLVM (Low Level Virtual Machine): Originally an abbreviation for Low Level Virtual Machine, it was developed by UIUC (University of Illinois at Urbana-Champaign). Currently, LLVM has transcended its original meaning and become the name of the entire project. The LLVM project includes a series of modular, reusable compilers and toolchain libraries / technologies.

[0063] LLVM static analyzer: An open-source static analysis tool based on LLVM, specifically designed for analyzing C, C++, and Objective-C code.

[0064] The application scenarios involved in the embodiments of this application will be introduced next.

[0065] As technology continues to develop and user needs change, components may expose various problems and vulnerabilities during use. For example, the old interfaces of the components may not meet the new technical requirements or standards, or the old interfaces may have security vulnerabilities or stability issues. In this case, in order to maintain the compatibility and interoperability of the components, it is necessary to upgrade the components. During the upgrade process, the identifiers corresponding to the component interfaces may be modified.

[0066] If a caller continues to invoke a component using the old interface identifier after the component's identifier changes, call failures will occur. Therefore, related technologies require that after upgrading a component, the interface changes be synchronized with the caller so that the caller can invoke the component using the upgraded interface identifier. However, in the above technologies, whenever the component interface changes, the change information needs to be promptly notified to all relevant callers, which increases the time and communication costs of the upgrade. Furthermore, in some cases, to improve system compatibility, callers do not directly delete the old version of the interface identifier but maintain both the old and new versions of the interface simultaneously, further increasing the component's operational costs.

[0067] Based on this, embodiments of this application provide a method for invoking a component. When the historical identifier of a target interface in a first component is invoked, the current identifier of the target interface is determined by obtaining the interface change information corresponding to the first component. Then, the target interface is invoked based on its current identifier to achieve the invocation of the current version of the first component. In other words, the caller in this application does not need to be aware of changes in the target interface identifier of the first component (i.e., external components can continue to interact with the upgraded first component without any modifications), which avoids system compatibility issues caused by component upgrades and improves the overall stability of the system. Furthermore, since the external components used by users do not need to be aware of symbol changes, technicians do not need to modify and test a large number of external components one by one, thereby reducing upgrade costs and risks, accelerating the component upgrade process, and enabling the system to adapt to new technologies and business requirements more quickly.

[0068] The execution subject of the component invocation method provided in this application embodiment can be an electronic device, which can be a network element device (such as a base station, router, switch, etc.), a general computer, a server, etc. This application embodiment does not limit this.

[0069] It should be noted that the application scenarios and execution entities described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0070] Please refer to Figure 1, which is a schematic diagram of an electronic device according to an embodiment of this application. The electronic device may be the electronic device 101 shown in Figure 1. The electronic device includes at least one processor 101, a communication bus 102, a memory 103, and at least one communication interface 104.

[0071] Processor 101 can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0072] The communication bus 102 is used to transmit information between the aforementioned components. The communication bus 102 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not mean that there is only one bus or one type of bus.

[0073] The memory 103 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile optical disc, a Blu-ray disc, etc.), a magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited thereto. The memory 103 may exist independently and be connected to the processor 101 via the communication bus 102. The memory 103 may also be integrated with the processor 101.

[0074] Communication interface 104 uses any transceiver-like device for communicating with other devices or communication networks. Communication interface 104 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0075] In a specific implementation, as one embodiment, the processor 101 may include one or more CPUs, such as CPU0 and CPU1 as shown in FIG1.

[0076] In a specific implementation, as one embodiment, the electronic device may include multiple processors, such as processor 101 and processor 105 shown in FIG1. ​​Each of these processors may be a single-core processor or a multi-core processor. Here, a processor may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0077] In a specific implementation, as one embodiment, the electronic device may further include an output device 106 and an input device 107. The output device 106 communicates with the processor 101 and can display information in various ways. For example, the output device 106 may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device 107 communicates with the processor 101 and can receive user input in various ways. For example, the input device 107 may be a mouse, keyboard, touchscreen device, or sensing device, etc.

[0078] In some embodiments, memory 103 is used to store program code 110 for executing the scheme of this application, and processor 101 can execute the program code 110 stored in memory 103. The program code 110 may include one or more software modules, and the electronic device can implement the component calling method provided in the embodiment of FIG2 below through processor 101 and program code 110 in memory 103.

[0079] Figure 2 is a flowchart of an encoding method provided in an embodiment of this application. The method is applied to the aforementioned electronic device, which has a first component deployed thereon, the first component including at least one interface. Referring to Figure 2, the method includes the following steps.

[0080] Step 201: In response to the first call request of the first component, obtain the interface change information corresponding to the first component. The interface change information indicates the correspondence between the historical identifier and the current identifier of at least one interface. The historical identifier is the identifier corresponding to the interface in the first historical version of the first component, and the current identifier is the identifier corresponding to the interface in the current version of the first component. The first call request carries the historical identifier of the target interface in at least one interface.

[0081] In some embodiments, a caller can send a first call request to an electronic device for invoking a first component. In this case, the electronic device can respond to the first call request.

[0082] It should be noted that the caller can be a component deployed on an electronic device other than the first component, or an external component deployed on other electronic devices other than the aforementioned electronic devices. This application embodiment does not limit this.

[0083] If the caller is an external component, the electronic device can accept the first call request sent by the external component, and then the electronic device can receive the first call request and respond to the first call request to obtain the interface change information corresponding to the first component.

[0084] In some embodiments, the electronic device stores a correspondence between a first component and interface change information. In this case, the electronic device can directly obtain the interface change information corresponding to the first component.

[0085] In one possible implementation, the interface identifier includes the interface name and interface parameters. For example, the interface identifier could be Func1(arg1, arg2), where Func1 is the interface name, and arg1 and arg2 are the interface parameters.

[0086] It should be noted that the interface change information corresponding to the first component was determined by technical personnel based on the differences between the interfaces in the first historical version of the first component and the current version of the first component. Furthermore, the historical and current identifiers of the aforementioned interfaces have the same meaning as the interface identifiers mentioned above; that is, both the historical and current identifiers include the interface name and interface parameters. The only difference between the historical and current identifiers is that they correspond to different versions of the first component. In this case, the interface change information includes the correspondence between interface names and interface parameters.

[0087] For example, if at least one interface includes interface 1, then the historical identifier of interface 1 can be Func1(arg1), and the current identifier of interface 1 can be _com_func1(arg1, arg2). The correspondence between the historical identifier and the current identifier of interface 1 includes the correspondence between the interface name and the correspondence between the interface parameters. The correspondence between the interface name can be expressed as Func1 = _com_func1, and the correspondence between the interface parameters can be Func1(arg1) = _com_func1(arg1, arg2).

[0088] In some embodiments, at least one interface in the first component of the first historical version has a reserved interface, which is used to implement interface expansion during subsequent component upgrades. In the first historical version, the reserved interface is not used to implement functionality.

[0089] This application's embodiments, through reserved interfaces, allow developers to easily extend and modify the system without breaking existing code or functionality. When it is necessary to add new features or upgrade components, these reserved interfaces can be used directly without large-scale refactoring or adjustment of the original code. This significantly improves the scalability and flexibility of components and reduces upgrade and maintenance costs.

[0090] In one possible implementation, the electronic device may also upgrade the first component to obtain the current version of the first component before responding to the first call request of the first component.

[0091] In some embodiments, the electronic device provides a target service, which is implemented through one or more components, including a first component. In this case, the electronic device can determine a first silent set, which includes N components from the one or more components, where N is a positive integer. No component in the first silent set has a dependency relationship with any component not belonging to the first silent set. The first silent set includes the first component. If N is greater than 1, a dependency relationship exists between any two of the N components. If all components included in the first silent set are in a stopped state, the first component is upgraded to obtain the current version of the first component. Since the target service is implemented through one or more components, for ease of description, this embodiment refers to these one or more components as one or more components of the target service.

[0092] It's important to note that a dependency between two components refers to a data dependency and / or a control dependency. A control dependency means that the execution of instructions in one component depends on the execution of instructions in another component. A data dependency means that the determination of data in one component requires data processed by another component; in this case, a data dependency exists between the two components.

[0093] In some embodiments, the target service can be any one of the multiple services included in the OS service set. In other embodiments, the electronic device has business layer software installed, and the target service can be a service provided by any one of the business layer software programs.

[0094] In some embodiments, based on the code segment corresponding to the target service running in the electronic device, the control flow graph and data flow graph corresponding to the target service are determined. The code segment corresponding to the target service is the sum of the code segments corresponding to one or more components of the target service. Based on the control flow graph and data flow graph corresponding to the target service, the components in one or more components of the target service that have a dependency relationship with the first component are determined. The components in one or more components that have a dependency relationship with the first component and the first component are determined as N components included in the first silent set.

[0095] In some embodiments, the code segment corresponding to the target service is analyzed using LLVM Static Analyzer to obtain the control flow graph and data flow graph corresponding to the target service. Of course, the control flow graph and data flow graph corresponding to the target service can also be determined by other methods. This application embodiment does not limit this.

[0096] It's important to note that LLVM Static Analyzer can be deployed either inside or outside electronic devices. When deployed outside, after obtaining the control flow graph and data flow graph corresponding to the target service through LLVM Static Analyzer, the electronic device can then access these graphs externally. When deployed inside an electronic device, the device can directly obtain the control flow graph and data flow graph corresponding to the target service through LLVM Static Analyzer.

[0097] Based on the control flow graph and data flow graph corresponding to the target service, the dependencies between one or more components are determined. From these dependencies, the components that depend on the first component are identified. For the specific implementation process of determining the dependencies between one or more components based on the control flow graph and data flow graph corresponding to the target service, please refer to relevant technologies; this embodiment will not elaborate on it.

[0098] In one possible implementation, the process of upgrading the first component includes: obtaining symbol change information corresponding to the first component, the symbol change information indicating the difference between the symbols in the historical code segment of the first component and the symbols in the current code segment of the first component, the historical code segment being the code segment corresponding to the first component in the second historical version, and the current code segment being the code segment corresponding to the first component in the current version; and upgrading the first component based on the symbol change information and the current code segment to obtain the first component in the current version.

[0099] In some embodiments, the electronic device stores symbol change information corresponding to the first component, in which case the symbol change information corresponding to the first component can be directly obtained.

[0100] It should be noted that the symbol change information corresponding to the first component is determined by technicians based on the historical code segment and the current code segment of the first component. For example, this symbol change information includes at least one of the following: added symbol information, deleted symbol information, and symbol mapping information. Specifically, added symbol information indicates symbols added to the current code segment compared to the historical code segment; deleted symbol information indicates symbols deleted from the current code segment compared to the historical code segment; and symbol mapping information indicates the mapping relationship between added and deleted symbols.

[0101] In some embodiments, symbols include function names, interface names, etc. When a symbol includes a function name, the symbol mapping information includes function name mapping information and function parameter mapping information. The function name mapping information indicates the correspondence between newly added and deleted function names, and the function parameter mapping information indicates the correspondence between the parameters of the newly added and deleted functions. Similarly, when a symbol includes an interface name, the symbol mapping information includes interface name mapping information and interface parameter mapping information. The interface name mapping information indicates the correspondence between newly added and deleted interface names, and the interface parameter mapping information indicates the correspondence between the parameters of the newly added and deleted interfaces.

[0102] For example, please refer to Figure 3, which is a schematic diagram of symbol change information provided in an embodiment of this application. The deleted symbol information is Fun1 = NULL, indicating that the deleted function name in the current code segment is Fun1. The added symbol information is extFunc[0] = _com_func1, indicating that the added function name in the current code segment is _com_func1. The function name mapping information is Fun1 = _com_func1, and there is a correspondence between the added symbol _com_func1 and the deleted symbol Fun1. The function parameter mapping information is Func1(arg1) = _com_func1(arg1, arg2), and there is a correspondence between the parameters arg1 and arg2 of the added symbol _com_func1 and the parameter arg1 of the deleted symbol Fun1.

[0103] It should be noted that the first historical version and the second historical version can be the same version or different versions, and this application embodiment does not limit this. If the first historical version and the second historical version are the same version, then the above symbols include interface names, the interface name mapping information is equivalent to the correspondence of interface names, and the interface parameter mapping information is equivalent to the correspondence of interface parameters.

[0104] In one possible implementation, the process of upgrading the first component based on symbol change information and the current code segment to obtain the current version of the first component includes: obtaining the state data of the first component of the second historical version, the state data being saved when all components included in the first silent set are in a stopped running state; loading the current version of the first component based on the current code segment; and migrating the state data of the first component of the second historical version to the memory space corresponding to the current version of the first component based on symbol change information.

[0105] For example, based on the current code segment, the first component of the current version is loaded into the electronic device using the insmod command. Of course, in practical applications, the first component can also be loaded into the electronic device in other ways, and this application embodiment does not limit this.

[0106] For details on how to migrate the state data of the first component in the second historical version to the memory space corresponding to the first component in the current version based on symbol change information, please refer to the relevant component state migration technology. This application embodiment will not elaborate on this.

[0107] In some embodiments, before upgrading the first component, when all components in the first silent set are in a stopped state, the electronic device may also respond to a freeze command to control the components in the first silent set to stop running, so that all components in the first silent set are in a stopped state. The freeze command is used to instruct the components in the first silent set to stop running.

[0108] It should be noted that the freeze command can be triggered by the electronic device at any time after the first silent set is determined, and the electronic device can respond to the freeze command to control the components included in the first silent set to stop running. This application embodiment does not limit this.

[0109] In one possible implementation, the first silent set includes components that are in a busy state, meaning there is at least one unfinished task. In this case, for a target component in a busy state, if the first task is included among the at least one unfinished task, the first task continues to be executed, and no other tasks are executed after the first task is completed, so that all components included in the first silent set are in a stopped state. The first task is a task that the target component has started executing but has not yet completed. If the first task is not included among the at least one unfinished task, the execution of at least one unfinished task is stopped, so that all components included in the first silent set are in a stopped state.

[0110] In other words, for any component in a busy state, if the component has unfinished tasks but is not currently executing them, then the component should be controlled to stop executing those unfinished tasks. If the component has unfinished tasks and is currently executing a task, then the component can be controlled to continue executing that task, but once that task is completed, no other tasks will be executed.

[0111] In another possible implementation, if a second call request is received from a component in the first silent set, the second call request is intercepted so that all components included in the first silent set are in a stopped state.

[0112] Of course, in addition to intercepting call requests for components in the first silent set before upgrading the first component, if a second call request for a component in the first silent set is received during the upgrade of the first component, the second call request can also be intercepted so that the components in the first silent set remain silent.

[0113] In some embodiments, if a third invocation request is received from the second component, the third invocation request is executed. The second component is a component that does not belong to the first silent set among one or more components.

[0114] During the upgrade of the first component, this embodiment only stops the operation of components in the first silent set. Unrelated components (i.e., components that do not depend on the first component) can continue to operate. This means that most of the target service's functionality can remain unchanged, thereby reducing service interruption time caused by the upgrade. This is particularly important for systems requiring high availability, such as online services and financial systems. Furthermore, since this embodiment only stops components that depend on the first component during the upgrade process, the potential scope of failures caused by the upgrade is reduced. If the upgrade fails, the impact is limited to a smaller area, making troubleshooting and repair easier.

[0115] In some embodiments, the target service is implemented through multiple components, where N is greater than 1, and the first silent set also includes a third component, the operation of which depends on the third component; in this case, the electronic device can also upgrade the third component before upgrading the first component to obtain the current version of the third component.

[0116] In one possible implementation, the third component also needs to be upgraded. If the operation of the first component depends on the third component, then the third component needs to be upgraded before the first component is upgraded. That is, when all components in the first silent set are in a stopped state, the third component is upgraded first, and then the first component is upgraded after the third component is upgraded.

[0117] In other embodiments, the target service is implemented through multiple components, where N is greater than 1. The first silent set also includes a fourth component, the operation of which depends on the first component. After upgrading the first component, the fourth component can also be upgraded to obtain the current version of the fourth component.

[0118] In one possible implementation, the fourth component also needs to be upgraded. If the operation of the fourth component depends on the first component, then the first component needs to be upgraded before upgrading the fourth component. That is, if all components in the first silent set are in a stopped state, the first component is upgraded first, and then the fourth component is upgraded after the first component is upgraded.

[0119] Of course, the first silent set may include the first component, the third component, and the fourth component mentioned above. If the first component, the third component, and the fourth component all need to be upgraded, then the third component will be upgraded first, and the first component will be upgraded after the third component is upgraded. After the first component is upgraded, the fourth component will be upgraded.

[0120] The component upgrade process will now be described with reference to Figure 4. Figure 4 is a schematic diagram of a component upgrade process provided in an embodiment of this application. The components corresponding to the target service are components 1-5. Components 1-3 are all components to be upgraded. The operation of component 1 depends on component 2, the operation of component 2 depends on component 3, and the operation of component 3 depends on component 4. Component 5 has no dependency relationship with components 1-4. Therefore, components 1-4 belong to the same silent set (silent set 1). If a freeze command is triggered at time t1, and components 1-4 are all busy at time t1, and components 1-3 are executing tasks (i.e., components 1-3 all have a first task), for any component among components 1-3, in response to the freeze command, the first task continues to be executed. After the first task is completed, no other tasks are executed, and component 4 stops executing unfinished tasks. While all components in the silent set 1 are in a stopped state (i.e., time t2 in Figure 4), components 1-3 are upgraded. Component 1 is upgraded first, then component 2, and finally component 3. After the upgrade is completed (corresponding to time t3 in Figure 4), the execution of tasks for components 1-4 is resumed. Component 5 runs normally throughout the entire process.

[0121] Step 202: Determine the current identifier of the target interface based on its historical identifier and interface change information.

[0122] In some embodiments, the electronic device may determine the current identifier of the target interface based on the historical identifier of the target interface, from the correspondence between the historical identifier and the current identifier of at least one interface.

[0123] Step 203: Invoke the target interface based on the current identifier of the target interface to realize the invocation of the first component of the current version.

[0124] This application embodiment can determine the current identifier of the target interface by obtaining the interface change information corresponding to the first component when the historical identifier of the target interface in the first component is called. Then, it calls the target interface based on the current identifier of the target interface to realize the invocation of the current version of the first component. In other words, the caller in this application does not need to be aware of the change in the target interface identifier of the first component (i.e., external components do not need to be modified to continue interacting with the upgraded first component), which avoids system compatibility issues caused by component upgrades and improves the overall stability of the system. Furthermore, since the external components used by the user do not need to be aware of symbol changes, technicians do not need to modify and test a large number of external components one by one, thereby reducing upgrade costs and risks, helping to accelerate the component upgrade process, and enabling the system to adapt to new technologies and business requirements more quickly. Moreover, during the upgrade process of the first component, this application embodiment only stops the operation of components in the first silent set. Unrelated components (i.e., components that have no dependency on the first component) can still continue to run. This means that most of the functions of the target service can remain unchanged, thereby reducing service interruption time caused by upgrades. This is particularly important for systems requiring high availability, such as online services and financial systems. Furthermore, since this embodiment only stops components that depend on the first component during the upgrade process, the potential scope of failures caused by the upgrade is reduced. If the upgrade fails, the impact is limited to a smaller area, making troubleshooting and repair easier.

[0125] Figure 5 is a schematic diagram of a component invocation device provided in an embodiment of this application. This component invocation device can be implemented as part or all of the aforementioned electronic device by software, hardware, or a combination of both. Referring to Figure 5, the device includes: an acquisition module 501, a first determination module 502, and an invocation module 503.

[0126] The acquisition module 501 is used to acquire interface change information corresponding to the first component in response to the first call request of the first component. The interface change information indicates the correspondence between the historical identifier and the current identifier of at least one interface. The historical identifier is the identifier of the interface in the first historical version of the first component, and the current identifier is the identifier of the interface in the current version of the first component. The first call request carries the historical identifier of the target interface among at least one interface. For detailed implementation process, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0127] The first determining module 502 is used to determine the current identifier of the target interface based on the historical identifier and interface change information of the target interface. For detailed implementation details, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0128] Module 503 is used to invoke the target interface based on the current identifier of the target interface, so as to realize the invocation of the first component of the current version. For detailed implementation process, please refer to the corresponding content in the above embodiments, which will not be repeated here.

[0129] In one possible implementation, the electronic device is used to provide a target service, which is implemented by one or more components, including a first component;

[0130] The device also includes:

[0131] The second determining module is used to determine the first silent set. The first silent set includes N components from one or more components, where N is a positive integer. There is no dependency between any component in the first silent set and any component that does not belong to the first silent set. The first silent set includes the first component. When N is greater than 1, there is a dependency between any two components among the N components.

[0132] The upgrade module is used to upgrade the first component when all components in the first silent set are in a stopped state, so as to obtain the current version of the first component.

[0133] In one possible implementation, the upgrade module is specifically used for:

[0134] Obtain the symbol change information corresponding to the first component. The symbol change information indicates the difference between the symbols in the historical code segment of the first component and the symbols in the current code segment of the first component. The historical code segment is the code segment corresponding to the first component in the second historical version, and the current code segment is the code segment corresponding to the first component in the current version.

[0135] Based on the symbol change information and the current code segment, the first component is upgraded to obtain the current version of the first component.

[0136] In one possible implementation, the upgrade module is specifically used for:

[0137] Get the state data of the first component in the second historical version. The state data is saved when all components included in the first silent set are in a stopped state.

[0138] Based on the current code segment, load the first component of the current version;

[0139] Based on symbol change information, the state data of the first component in the second historical version is migrated to the memory space corresponding to the first component in the current version.

[0140] In one possible implementation, the first silent set includes components that are in a busy state, where a busy state means that there is at least one unfinished task.

[0141] The upgrade module is specifically used for:

[0142] For a target component that is in a busy state, if the first task is included in at least one unfinished task, the first task continues to be executed. After the first task is completed, no other tasks are executed, so that all components included in the first silent set are in a stopped state. The first task is the task that the target component has started executing but has not yet completed.

[0143] If the first task is not included in at least one incomplete task, stop executing at least one incomplete task so that all components included in the first silent set are in a stopped state.

[0144] In one possible implementation, the device further includes:

[0145] The interception module is used to intercept the second call request if it receives a second call request from a component in the first silent set, so that all components included in the first silent set are in a stopped state.

[0146] In one possible implementation, the device further includes:

[0147] The execution module is used to execute the third call request if a third call request is received from the second component, wherein the second component is a component that does not belong to the first silent set among one or more components.

[0148] In one possible implementation, the target service is implemented through multiple components, where N is greater than 1, and the first silent set also includes a third component, the operation of the first component depends on the third component;

[0149] The upgrade module is specifically used for:

[0150] Upgrade the third component to obtain the current version of the third component.

[0151] In one possible implementation, the target service is implemented through multiple components, where N is greater than 1, and the first silent set also includes a fourth component, the operation of which depends on the first component;

[0152] The upgrade module is specifically used for:

[0153] Upgrade the fourth component to obtain the current version of the fourth component.

[0154] This application embodiment can determine the current identifier of the target interface by obtaining the interface change information corresponding to the first component when the historical identifier of the target interface in the first component is called. Then, it calls the target interface based on the current identifier of the target interface to realize the invocation of the current version of the first component. In other words, the caller in this application does not need to be aware of the change in the target interface identifier of the first component (i.e., external components do not need to be modified to continue interacting with the upgraded first component), which avoids system compatibility issues caused by component upgrades and improves the overall stability of the system. Furthermore, since the external components used by the user do not need to be aware of symbol changes, technicians do not need to modify and test a large number of external components one by one, thereby reducing upgrade costs and risks, helping to accelerate the component upgrade process, and enabling the system to adapt to new technologies and business requirements more quickly. Moreover, during the upgrade process of the first component, this application embodiment only stops the operation of components in the first silent set. Unrelated components (i.e., components that have no dependency on the first component) can still continue to run. This means that most of the functions of the target service can remain unchanged, thereby reducing service interruption time caused by upgrades. This is particularly important for systems requiring high availability, such as online services and financial systems. Furthermore, since this embodiment only stops components that depend on the first component during the upgrade process, the potential scope of failures caused by the upgrade is reduced. If the upgrade fails, the impact is limited to a smaller area, making troubleshooting and repair easier.

[0155] It should be noted that the component invocation device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the component invocation device and the component invocation method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0156] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the component invocation method described in the above embodiments.

[0157] This application also provides a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the component invocation method described in the above embodiments. Alternatively, a computer program is provided that, when executed on a computer or processor, causes the computer or processor to perform the steps of the component invocation method described in the above embodiments.

[0158] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.

[0159] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.

[0160] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the interface change information involved in the embodiments of this application was obtained under full authorization.

[0161] The above descriptions are embodiments provided in this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for invoking a component, characterized in that, An application is made to an electronic device, the electronic device having a first component, the first component including at least one interface; the method includes: in response to a first invocation request of the first component, obtaining interface change information corresponding to the first component; wherein the interface change information indicates the correspondence between historical identifiers and current identifiers of the at least one interface, the historical identifier being the identifier of the interface in a first historical version of the first component, the current identifier being the identifier of the interface in the current version of the first component, and the first invocation request carrying the historical identifier of a target interface among the at least one interface; determining the current identifier of the target interface based on the historical identifier of the target interface and the interface change information; and invoking the target interface based on the current identifier of the target interface to realize the invocation of the first component in the current version.

2. The method as described in claim 1, characterized in that, The electronic device is used to provide a target service, which is implemented through one or more components, including the first component; before responding to a first invocation request from the first component, the method further includes: determining a first silent set, wherein the first silent set includes N components from the one or more components, where N is a positive integer, and there is no dependency between any component in the first silent set and any component not belonging to the first silent set, and the first silent set includes the first component, wherein when N is greater than 1, there is a dependency between any two components among the N components; and upgrading the first component to obtain the current version of the first component when all components included in the first silent set are in a stopped state.

3. The method as described in claim 2, characterized in that, Upgrading the first component includes: obtaining symbol change information corresponding to the first component, wherein the symbol change information indicates the difference between the symbols in the historical code segment of the first component and the symbols in the current code segment of the first component, wherein the historical code segment is the code segment corresponding to the first component in a second historical version, and the current code segment is the code segment corresponding to the first component in the current version; and upgrading the first component based on the symbol change information and the current code segment to obtain the first component in the current version.

4. The method as described in claim 3, characterized in that, The step of upgrading the first component based on the symbol change information and the current code segment to obtain the current version of the first component includes: obtaining the state data of the first component of the second historical version, wherein the state data is saved when all components included in the first silent set are in a stopped state; loading the current version of the first component based on the current code segment; and migrating the state data of the first component of the second historical version to the memory space corresponding to the current version of the first component based on the symbol change information.

5. The method according to any one of claims 2-4, characterized in that, The first silent set includes components that are in a busy state, where a busy state means there is at least one unfinished task. Before upgrading the first component when all components in the first silent set are in a stopped state, the method further includes: for the target component in the busy state, if the first task is included among the at least one unfinished task, continuing to execute the first task, and not executing other tasks after the first task is completed, so that all components in the first silent set are in a stopped state, where the first task is a task that the target component has started executing but has not yet completed; if the first task is not included among the at least one unfinished task, stopping the execution of the at least one unfinished task, so that all components in the first silent set are in a stopped state.

6. The method according to any one of claims 2-5, characterized in that, Before upgrading the first component when all components in the first silent set are in a stopped state, the method further includes: if a second call request is received from a component in the first silent set, intercepting the second call request so that all components in the first silent set are in a stopped state.

7. The method according to any one of claims 2-6, characterized in that, The method further includes: if a third call request is received from the second component, executing the third call request, wherein the second component is a component among the one or more components that does not belong to the first silent set.

8. The method according to any one of claims 2-7, characterized in that, The target service is implemented through multiple components, where N is greater than 1, and the first silent set also includes a third component, the operation of the first component depends on the third component; Before upgrading the first component, the method further includes upgrading the third component to obtain the current version of the third component.

9. The method according to any one of claims 2-8, characterized in that, The target service is implemented through multiple components, where N is greater than 1, and the first silent set also includes a fourth component, the operation of which depends on the first component; After upgrading the first component, the method further includes upgrading the fourth component to obtain the current version of the fourth component.

10. A component invocation device, characterized in that, The device is included in an electronic device, the electronic device having a first component, the first component including at least one interface; the device includes: an acquisition module, configured to acquire interface change information corresponding to the first component in response to a first call request of the first component; wherein the interface change information indicates the correspondence between the historical identifier and the current identifier of the at least one interface, the historical identifier being the identifier of the interface in a first historical version of the first component, the current identifier being the identifier of the interface in the current version of the first component, and the first call request carrying the historical identifier of a target interface among the at least one interface; a first determination module, configured to determine the current identifier of the target interface based on the historical identifier of the target interface and the interface change information; and a call module, configured to call the target interface based on the current identifier of the target interface to realize the call of the first component in the current version.

11. The apparatus as claimed in claim 10, characterized in that, The electronic device is used to provide a target service, which is implemented through one or more components, including the first component; the device further includes: a second determining module, used to determine a first silent set, wherein the first silent set includes N components from the one or more components, where N is a positive integer, and there is no dependency between any component in the first silent set and any component not belonging to the first silent set, wherein the first silent set includes the first component, and when N is greater than 1, there is a dependency between any two components among the N components; and an upgrading module, used to upgrade the first component when all components included in the first silent set are in a stopped state, to obtain the current version of the first component.

12. The apparatus as claimed in claim 11, characterized in that, The upgrade module is specifically used to: obtain symbol change information corresponding to the first component, wherein the symbol change information indicates the difference between the symbols in the historical code segment of the first component and the symbols in the current code segment of the first component, wherein the historical code segment is the code segment corresponding to the first component in the second historical version, and the current code segment is the code segment corresponding to the first component in the current version; Based on the symbol change information and the current code segment, the first component is upgraded to obtain the current version of the first component.

13. The apparatus as claimed in claim 12, characterized in that, The upgrade module is specifically used to: obtain the status data of the first component of the second historical version, the status data being saved when all components included in the first silent set are in a stopped running state; and load the first component of the current version based on the current code segment. Based on the symbol change information, the state data of the first component in the second historical version is migrated to the memory space corresponding to the first component in the current version.

14. The apparatus according to any one of claims 11-13, characterized in that, The first silent set includes components that are in a busy state, where a busy state means that there is at least one unfinished task. The upgrade module is specifically used to: for a target component in the busy state, if the first task is included among the at least one unfinished task, continue to execute the first task, and do not execute other tasks after the first task is completed, so that all components included in the first silent set are in a stopped state, where the first task is a task that the target component has started executing but has not yet completed; if the first task is not included among the at least one unfinished task, stop executing the at least one unfinished task, so that all components included in the first silent set are in a stopped state.

15. The apparatus according to any one of claims 11-14, characterized in that, The device further includes an interception module, configured to intercept the second call request if a second call request is received from a component in the first silent set, so that all components included in the first silent set are in a stopped state.

16. The apparatus according to any one of claims 11-15, characterized in that, The device further includes an execution module, configured to execute the third invocation request if a third invocation request is received from the second component, wherein the second component is a component among the one or more components that does not belong to the first silent set.

17. The apparatus according to any one of claims 11-16, characterized in that, The target service is implemented through multiple components, where N is greater than 1. The first silent set also includes a third component, and the operation of the first component depends on the third component. The upgrade module is specifically used to upgrade the third component to obtain the current version of the third component.

18. The apparatus according to any one of claims 11-17, characterized in that, The target service is implemented through multiple components, where N is greater than 1. The first silent set also includes a fourth component, the operation of which depends on the first component. The upgrade module is specifically used to upgrade the fourth component to obtain the current version of the fourth component.

19. An electronic device, characterized in that, The electronic device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the steps of the method according to any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on a computer or processor, causes the computer or processor to perform the method as described in any one of claims 1 to 9.

21. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a computer or processor, cause the steps of the method as described in any one of claims 1 to 9 to be performed.