Application access method, apparatus and system

WO2026166059A1PCT designated stage Publication Date: 2026-08-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-08-13

Smart Images

  • Figure CN2025110850_13082026_PF_FP_ABST
    Figure CN2025110850_13082026_PF_FP_ABST
Patent Text Reader

Abstract

An application access method, apparatus and system, which can ensure the access performance between applications, thereby ensuring the quality of service and user experience of the applications. The method comprises: firstly, a first computing node starting a first application therein; secondly, the first computing node identifying that an access target of the first application is a second application in a second computing node; subsequently, the first computing node acquiring information of the second computing node from a registration center corresponding to the second application; and when the information of the second computing node indicates that the second computing node supports a first communication mode, the first computing node adding a first code to a program code of the first application, such that the first application uses the first code to access the second application by means of the first communication mode.
Need to check novelty before this filing date? Find Prior Art

Description

An application access method, apparatus and system

[0001] This application claims priority to Chinese Patent Application No. 202510150254.X, filed on February 10, 2025, entitled “An Application Access Method, Apparatus and System”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular to an application access method, apparatus and system. Background Technology

[0003] With the development of communication technology, high-performance communication methods are constantly emerging, such as the unified bus (UB). Compared with traditional communication methods such as Hypertext Transfer Protocol (HTTP), the unified bus has higher communication performance and can achieve sub-microsecond access.

[0004] Due to early development time or other reasons, some applications may not support high-performance communication methods such as the unified bus. Therefore, even if the device hosting the application supports high-performance communication methods, the application cannot use these methods to access other applications. This results in poor inter-application access performance, leading to poor service quality and a subpar user experience. Summary of the Invention

[0005] This application provides an application access method, apparatus, and system that can ensure the access performance between applications, thereby ensuring the service quality and user experience of the applications.

[0006] Firstly, an application access method executable by a first computing node is provided. The first computing node may support a first communication method and has first code. The first code is code used by an application to access other applications via the first communication method. In one example, the first communication method may be a unified bus. In another example, the first communication method may be a remote procedure call.

[0007] In this method, firstly, a first computing node starts and runs a first application. During operation, the first application may request access to other applications, such as a second application on a second computing node; that is, the first computing node can identify that the first application's access target is the second application on the second computing node. Next, the first computing node obtains information about the second computing node from the registry corresponding to the second application. This information indicates whether the second computing node supports a first communication method. Specifically, when the second computing node's information indicates that it supports the first communication method, the first computing node adds first code to the program code of the first application, enabling the first application to access the second application via the first communication method under the action of the first code.

[0008] Thus, this method ensures that applications on a computing node can access other applications using the communication methods supported by the computing node (such as unified bus or remote procedure call), thereby guaranteeing the access performance between applications and thus ensuring the service quality and user experience of the applications.

[0009] In one possible implementation, the information of the second computing node includes the address of the second computing node in the first communication method; wherein, under the action of the first code, the first application sends an access request to the address through the first communication method, and the access request is used by the first application to access the second application.

[0010] In this implementation, the first application can obtain the address of the second computing node from its information. This address can be used by the second computing node to receive access requests via the first communication method. Thus, under the action of the first code, the first application can send an access request to the second computing node via the first communication method and the address. The second computing node can then pass the access request to the second application, enabling the first application to access the second application via the first communication method.

[0011] In one possible implementation, the registration center also corresponds to the first application, and the method further includes: sending information of the first computing node to the registration center; wherein the information of the first computing node is used to indicate that the first computing node supports the first communication method.

[0012] In this implementation, the first computing node can send information to the registry center indicating that it supports the first communication method, and the registry center records this information. Thus, when applications on other computing nodes request access to applications on the first computing node, the other computing nodes can obtain this information from the registry center and, based on this information, identify that the first computing node supports the first communication method. This allows them to access applications on the first computing node through the first communication method, ensuring the performance of inter-application access.

[0013] In one possible implementation, the program code of the first application includes second code, which is used by the first application to access the second application through a second communication method, wherein the communication performance of the second communication method is less than that of the first communication method; adding the first code to the program code of the first application includes: replacing the second code in the program code of the first application with the first code.

[0014] In this implementation, replacing the second code in the program code of the first application with the first code can prevent the first application from executing the second code, thereby ensuring that the first application can access the second application through the first communication method.

[0015] In one possible implementation, the program code of the first application is bytecode; adding the first code to the program code of the first application includes: adding the first code to the program code of the first application through bytecode enhancement techniques.

[0016] In this implementation, bytecode enhancement technology allows the first code to be added to the first application's program code while the first application is running, eliminating the need for manual modification of the first application's program code. This improves the efficiency of program code modification and avoids modification of the first application's source code, thus ensuring the integrity of the source code.

[0017] In one possible implementation, adding the first code to the program code of the first application includes adding the first code to the program code of the first application using just-in-time (JIT) compilation technology.

[0018] In this implementation, by using just-in-time compilation technology, the first code can be added to the program code of the first application while the first application is running, without the need for manual modification of the program code of the first application. This improves the efficiency of program code modification and avoids modification of the source code of the first application, thus ensuring the integrity of the source code.

[0019] Secondly, an application access device is provided, configured on a first computing node. The first computing node supports a first communication method, and the first computing node has a first code for an application to access other applications via the first communication method. The device includes: a startup module for starting a first application on the first computing node; an identification module for identifying that the access target of the first application is a second application on a second computing node; an acquisition module for acquiring information about the second computing node from a registry center corresponding to the second application; and an addition module for adding the first code to the program code of the first application when the information of the second computing node indicates that the second computing node supports the first communication method, so that the first application can access the second application via the first communication method under the action of the first code.

[0020] In one possible implementation, the information of the second computing node includes the address of the second computing node in the first communication method; wherein, under the action of the first code, the first application sends an access request to the address through the first communication method, and the access request is used by the first application to access the second application.

[0021] In one possible implementation, the registration center also corresponds to the first application, and the acquisition module is further used to: send information of the first computing node to the registration center; wherein, the information of the first computing node is used to indicate that the first computing node supports the first communication method.

[0022] In one possible implementation, the program code includes second code, which is used by the first application to access the second application via a second communication method, wherein the communication performance of the second communication method is less than that of the first communication method; the added module is used to replace the second code in the program code with the first code.

[0023] In one possible implementation, the program code is bytecode; the added module is used to: add the first code to the program code through bytecode enhancement techniques.

[0024] In one possible implementation, the module is used to add the first code to the program code using just-in-time (JIT) compilation.

[0025] In one possible implementation, the first communication method includes a unified bus or remote procedure call.

[0026] Thirdly, a computing device cluster is provided, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method provided in the first aspect.

[0027] Fourthly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a cluster of computing devices, execute the method provided in the first aspect.

[0028] Fifthly, a computer program product containing instructions is provided, which, when executed by a cluster of computer devices, causes the cluster of computer devices to perform the method provided in the first aspect.

[0029] Sixthly, an application access system is provided, comprising: a first computing node on which a first application is deployed, the first computing node supporting a first communication method, and the first computing node having first code for the application to access other applications via the first communication method; a second computing node on which a second application is deployed; and a registry center corresponding to the second application; wherein the first computing node is configured to: start the first application; identify that the access target of the first application is the second application; obtain information about the second computing node from the registry center; and when the information about the second computing node indicates that the second computing node supports the first communication method, add the first code to the program code of the first application so that the first application can access the second application via the first communication method under the action of the first code.

[0030] The beneficial effects of aspects two through six can be found in the above description of the beneficial effects of aspect one, and will not be repeated here. Attached Figure Description

[0031] Figure 1 is a schematic diagram of a system provided in an embodiment of this application;

[0032] Figure 2 is a schematic diagram of registration information provided in an embodiment of this application;

[0033] Figure 3 is a schematic diagram of another type of registration information provided in an embodiment of this application;

[0034] Figure 4 is a flowchart of an application access method provided in an embodiment of this application;

[0035] Figure 5 is a flowchart of another application access method provided in an embodiment of this application;

[0036] Figure 6 is a schematic diagram of the structure of an application access device provided in an embodiment of this application;

[0037] Figure 7 is a schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0038] Figure 8 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of this application;

[0039] Figure 9 is a schematic diagram of another computing device cluster provided in an embodiment of this application. Detailed Implementation

[0040] The solutions provided in the embodiments of this application will now be described with reference to the accompanying drawings. In the embodiments of this application, "multiple" refers to two or more objects, and "various types" refers to two or more types. Terms such as "first," "second," etc., are only used to distinguish similar objects and are not necessarily used to describe a specific order or number of objects.

[0041] To facilitate understanding of the solutions provided in the embodiments of this application, the technical terms that may be involved in the embodiments of this application will be introduced first.

[0042] An application (APP) is a computer program used to perform one or more tasks. An application consists of program code that runs on a computer to accomplish the corresponding work.

[0043] Microservices are applications that break down complex tasks or services into smaller, manageable parts. Each microservice is responsible for implementing independent business logic. Microservices are built around business functions and can be deployed independently. They communicate with each other to provide a range of functionalities. Typically, microservices run in containers.

[0044] A container is a virtual computing instance, a kernel virtualization technology used to isolate processes and resources. Containers and virtual machines share similar resource isolation and allocation methods; however, compared to virtual machines, containers virtualize the operating system rather than the hardware, making them more portable and efficient.

[0045] Bytecode, also known as a bytecode file, is a binary file containing an executable program, consisting of a sequence of operation (op) code and / or data pairs. Bytecode is an intermediate binary file compiled from source code and is more abstract than machine code.

[0046] Compute node: Often simply called a node, it is a device, equipment, or platform with resources that can run applications. A node can be a virtual computing device, such as a container, virtual machine (VM), or elastic cloud server (ECS). A node can also be a physical computing device, such as a computer or bare metal server. Applications within a compute node can perform related business operations, such as providing or accessing services.

[0047] The registry center, also known as the microservice registry, is a key component in a microservice system (MS). It's used for registering and discovering microservices, acting as the system's "address book." With numerous microservices in a microservice system, the registry center records and manages their names, addresses (e.g., internet protocol (IP) addresses, port numbers), enabling microservices to discover and access each other. Specifically, when a microservice is deployed, its name and address are registered with the registry center, which then records this information. When a microservice needs to access other microservices, it can query the registry center for the address and other information of the desired microservice.

[0048] Bytecode, also known as a bytecode file, is a binary file containing an executable program, consisting of a sequence of operation (op) code / data pairs. Bytecode is an intermediate representation of code between source code and machine code. It is compiled from source code and is more abstract than machine code.

[0049] Bytecode enhancement is a technique that modifies the bytecode of an application during startup and runtime to enhance its functionality. Modifications can include adding, deleting, or replacing code segments within the bytecode. Enhancements are commonly used in scenarios such as aspect-oriented programming (AOP) and dynamic proxies. Bytecode enhancement can be implemented using Java bytecode manipulation libraries (such as ByteBuddy and Javassist). These libraries provide application programming interfaces (APIs) that allow developers to modify the application's bytecode at runtime, thereby enhancing its functionality. Bytecode enhancement can modify application functionality without altering the source code. This avoids breaking the application's source code and facilitates application maintenance and upgrades. Common bytecode enhancement techniques include method interception, field injection, and class enhancement. These techniques can be used to implement functions such as logging, performance monitoring, transaction management, and security control.

[0050] A Java Agent is a component used to augment bytecode in applications. Specifically, a Java Agent can modify bytecode during application startup and runtime using the instrumentation API provided by the Java Virtual Machine (JVM). After the JVM reads the bytecode file into memory and before generating Java objects in the Java heap using the class bytecode, the Java Agent allows developers to modify the bytecode. This enables the JVM to use the modified bytecode to generate Java objects in the Java heap, thus achieving non-intrusive modification and replacement of business logic in Java applications. A Java Agent is a special type of Java program that acts as an instrumentation client. Unlike ordinary Java programs that are started via the main method, a Java Agent is not a standalone program. It typically resides on the JVM, runs in the same process as the JVM, and interacts with the JVM through the instrumentation API.

[0051] The Java Virtual Machine (JVM) is the language runtime used to execute Java code. Designed to achieve the "compile once, run anywhere" characteristic, Java code is compiled into bytecode during compilation—a format that is easy to distribute but cannot be directly executed. The JVM can interpret or compile the bytecode and provides support for operations such as class loading and garbage collection.

[0052] Just-in-time (JIT) compilation, also known as runtime compilation, real-time compilation, or dynamic compilation, is a method of compiling computer code during program execution. Compilation refers to converting source code or bytecode into machine code that a computer can directly execute. JIT compilation is performed by a just-in-time (JIT) compiler.

[0053] Unified Bus (UB) is a high-performance communication method that provides memory-semantic-based data center resource pooling and efficient sharing mechanisms, as well as direct reference mechanisms based on program addresses. Furthermore, UB supports distributed execution of remote function calls and offers high storage access performance, enabling sub-microsecond access, device decoupling, pooling, and sharing.

[0054] Remote procedure call (RPC) is a high-performance communication method used to communicate and invoke functions between different processes or computers. RPC allows developers to call functions on remote computers as if they were local functions, thus enabling distributed computing.

[0055] Applications using high-performance communication methods to access other applications can improve access efficiency and thus service performance. Many applications may not support high-performance communication methods. In related technologies, to enable these applications to access other applications using high-performance communication methods, the application's source code is manually modified by introducing a new software development kit (SDK) and its accompanying code, allowing the application to access other applications using high-performance communication methods at runtime.

[0056] Applications are diverse and numerous, especially microservice applications, which are massive in scale. Manually modifying application source code is not only costly but also inefficient, failing to meet the application's demand for high-performance communication methods. Furthermore, manually modifying application source code requires stopping the application and even reinstalling it, leading to service interruptions and impacting user experience.

[0057] This application provides an application access method. When both the source application's and target application's computing nodes support a certain communication method, relevant code is added to the source application's program code. This allows the source application to access the target application via that communication method under the influence of the relevant code. The source application is the application that initiates the access request, and the target application is the application the source application wants to access. The communication method can be any method, such as a unified bus or high-performance RPC. In this way, relevant code can be automatically added to the application's program code based on the computing nodes of both the source and target applications, enabling applications to access each other using the appropriate communication method. This improves inter-application access performance, thereby enhancing application service quality and ensuring a better user experience.

[0058] Next, the application access method provided in the embodiments of this application will be described.

[0059] Figure 1 illustrates a system that can be used to implement this method. The system may include multiple computing nodes, such as computing node 100, computing node 200, etc. Each of these computing nodes may deploy one or more applications. For example, computing node 100 deploys application 110, and computing node 200 deploys application 210. The applications deployed in the computing nodes may be microservice applications or other forms of applications.

[0060] In the following description, compute node 100 and compute node 200 may be referred to simply as compute nodes unless otherwise specified. Similarly, application 110 and application 210 may be referred to simply as applications unless otherwise specified.

[0061] In some embodiments, as shown in FIG1, the system may further include a registration center 300. The registration center 300 is used to record the registration information of its corresponding applications. The registration center 300 corresponds to an application in each computing node of the system and can record the registration information of each application in each computing node. The application registration information may include the application's name, address, and information about the computing node where the application resides. The computing node may include this information in the application's registration information and send the application's registration information to the registration center 300. The registration center 300 can record this registration information, thereby registering the application with the registration center 300. This application is the one deployed on that computing node.

[0062] Information about the compute node hosting the application can indicate the communication methods supported by that node. In some embodiments, the compute node information may include the address of the compute node in a certain communication method, which is a communication method supported by the compute node. Communication with the compute node can be achieved through that communication method, for example, sending an access request to the compute node with that address as the destination address, where the access request is used to access an application on the compute node. For example, if the compute node supports the Unified Bus communication method, its information may include its address on the Unified Bus, and correspondingly, the registration information of the application on the compute node includes that address. For example, the address on the Unified Bus may be the compute node's entity identifier (EID). If the compute node does not support the Unified Bus, its information does not include the Unified Bus address, and correspondingly, the registration information of the application on the compute node does not include the Unified Bus address. Taking compute node 200 as an example, if compute node 200 supports the unified bus, as shown in Figure 2, the registration information of application 210 includes the EID, and this EID is the EID of compute node 200. If compute node 200 does not support the unified bus, as shown in Figure 3, the registration information of application 210 does not include the EID.

[0063] In some embodiments, as shown in Figure 1, a computing node may include a management module. The management module can determine whether its computing node supports a certain communication method, such as a unified bus. If the computing node where the management module resides supports the communication method, the management module can add the address of its computing node in that communication method to the application's registration information. This application is the application located on the computing node where the management module resides.

[0064] A compute node contains code that enables applications to access other applications via communication methods supported by the compute node. The compute node can add this code to the application code running on the compute node, enabling the application to access other applications via the communication methods supported by the compute node. For example, this code can be configured by a user on the compute node. For example, the user can be an administrator or operations personnel of the system hosting the compute node.

[0065] In some embodiments, a management module in a compute node can acquire and record the code, and add the code to the application's program code within that compute node. In one example of this embodiment, the management module can be a Java Agent. During application runtime, the Java Agent can add code to the application's bytecode (i.e., the application's program code) using bytecode enhancement techniques. In another example of this embodiment, the management module can be a just-in-time (JIT) compiler. During application runtime, the JIT compiler can add code to the application's program code using just-in-time (JIT) compilation techniques.

[0066] The above example illustrates the system provided in the embodiments of this application. Next, taking the implementation of this system as an example, the application access method provided in the embodiments of this application will be described. As shown in Figure 4, the method may include the following steps.

[0067] Before registering application 110 with the registration center 300, compute node 100 can perform step 401a to obtain the communication methods supported by compute node 100. For example, it can determine whether compute node 100 itself supports communication method A1. If compute node 100 supports communication method A1, it can be confirmed that the communication methods supported by compute node 100 include communication method A1. If compute node 100 does not support communication method A1, it can be confirmed that the communication methods supported by compute node 100 do not include communication method A1. For example, communication method A1 can be a unified bus. For example, communication method A1 can be RPC.

[0068] Computing node 100 can generate its own information based on the result obtained in step 401a. This information indicates the communication methods supported by computing node 100. Computing node 100 can include this information in the registration information of application 110. For example, if the communication methods supported by computing node 100 include communication method A1, then the information of computing node 100 includes the address of computing node 100 in communication method A1. For instance, communication method A1 is a unified bus, and the address of computing node 100 in communication method A1 is the EID of computing node 100. If the communication methods supported by computing node 100 do not include communication method A1, then the information of computing node 100 does not include the address of computing node 100 in communication method A1.

[0069] Additionally, in the following description, the communication methods supported by compute node 100 may include communication method A1, compute node 100 may have code B1, and the program code of application 110 may not include code B1. Here, code B1 refers to the code used by the application to access other applications via communication method A1.

[0070] In step 402a, computing node 100 can send the registration information of application 110 to registration center 300. In step 403a, registration center 300 can record the registration information of application 110 sent by computing node 100, thereby registering application 110 in registration center 300.

[0071] In some embodiments, the computing node 100 may also prepare for the application 110 to access other applications via communication method A1, such as assigning an interface in communication method A1 to the application 110. This preparation may be referred to as registering the application 110 to communication method A1.

[0072] Similarly, before registering application 210 with the registration center 300, compute node 200 can execute step 401b to obtain the communication methods supported by compute node 200. Compute node 200 can generate its own information based on the result of step 401b. This information indicates the communication methods supported by compute node 200. Compute node 200 can include this information in the registration information of application 210. For example, if the communication methods supported by compute node 200 include communication method A1, then the information of compute node 200 includes the address of compute node 200 in communication method A1. For instance, communication method A1 is a unified bus, and the address of compute node 200 in communication method A1 is the EID of compute node 200. If the communication methods supported by compute node 200 do not include communication method A1, then the information of compute node 200 does not include the address of compute node 200 in communication method A1.

[0073] In step 402b, compute node 200 can send the registration information of application 210 to registration center 300. In step 403b, registration center 300 can record the registration information of application 210 sent by compute node 200, thereby registering application 210 in registration center 300.

[0074] In some embodiments, if the computing node 200 supports communication method A1, the computing node 200 can also prepare for the application 210 to access other applications through communication method A1, such as allocating an interface in communication method A1 to the application 210. This preparation can be referred to as registering the application 210 to communication method A1.

[0075] In step 404, compute node 100 can start application 110. Starting application 110 means starting to run application 110. That is, in subsequent steps of step 404 (e.g., steps 405, 406, 407, 408, and 409), application 110 is in a running state.

[0076] In step 405, compute node 100 identifies application 210 as the access target of application 110.

[0077] In this context, the access target of an application is the application that the application requests access to. The access target of application 110 is application 210, indicating that application 110 requests access to application 210.

[0078] In some embodiments, compute node 100 can identify the code executed by application 110 and / or the data processed by application 110, and identify that the access target of application 110 is application 210. For example, if compute node 100 recognizes that application 110 has set the name of application 210 as the name of the access target, then it can identify application 210 as the access target of application 110.

[0079] In some embodiments, the compute node 100 may also identify the access target of application 110 as application 210 in other ways. These will not be elaborated further here.

[0080] In step 406, compute node 100 can obtain the registration information of application 210 from registry center 300.

[0081] As described above, the registry center 300 records the registration information of application 210. When the compute node 100 recognizes that the access target of application 110 is application 210, the compute node 100 can query and obtain the registration information of application 210 from the registry center 300.

[0082] In step 407, computing node 100 can identify the communication methods supported by computing node 200 based on the registration information of application 210.

[0083] Specifically, compute node 100 can obtain information about the compute node where application 210 resides, i.e., information about compute node 200, from the registration information of application 210. Based on this information, compute node 100 identifies the communication methods supported by compute node 200. As described above, the information of compute node 200 indicates the communication methods it supports. Thus, the communication methods supported by compute node 200 can be identified based on the information of compute node 100.

[0084] For example, if the information of computing node 100 includes the address in communication mode A1, it can be identified that the communication mode supported by computing node 200 includes communication mode A1. Here, the address in communication mode A1 included in the information of computing node 100 is the address of computing node 200 in communication mode A1. If the information of computing node 100 does not include the address in communication mode A1, it can be identified that the communication mode supported by computing node 200 does not include communication mode A1.

[0085] In step 408, computing node 100 may add or not add code B1 to the program code of application 110 based on the identification result of step 407. Specifically, computing node 100 may add or not add code B1 to the program code to be executed in application 110.

[0086] If the identification result of step 407 indicates that the communication methods supported by computing node 200 include communication method A1, then computing node 100 adds code B1 to the program code of application 110. In some embodiments, the program code of application 110 is bytecode, and computing node 100 can add code B1 to the program code of application 110 through bytecode enhancement technology. In some embodiments, computing node 100 can add code B1 to the program code of application 110 through just-in-time compilation technology.

[0087] In some embodiments, the program code of application 110 may include code B2. Code B2 is used by the application to access other applications via communication method A2. That is, code B2 can be used by application 110 to access application 210 via communication method A2. In step 408, computing node 100 can replace code B2 in the program code of application 110 with code B1, so that application 110 can access application 210 via communication method A1 instead of accessing application 210 via communication method A2.

[0088] In this context, the communication performance of communication method A2 is lower than that of communication method A1. For example, communication method A2 can be HTTP, while communication method A1 can be a unified bus or RPC.

[0089] If the identification result of step 407 indicates that the communication methods supported by computing node 200 do not include communication method A1, then computing node 100 will not add code B1 to the program code of application 210.

[0090] In some embodiments, both compute node 100 and compute node 200 may be configured to support communication method A2, and the program code of application 110 may include code B2. If the communication method supported by compute node 200 does not include communication method A1, then in step 408, code B2 is retained in the program code of application 110. Thus, if application 110 cannot access application 210 via communication method A1, application 110 can access application 210 via communication method A2.

[0091] Step 409, Application 110 accesses Application 210.

[0092] If code B1 is added to the program code of application 110, application 110 can execute code B1 to access application 210 via communication method A1. In other words, under the action of code B1, application 110 accesses application 210 via communication method A1.

[0093] In some embodiments, under the action of code B1, application 110 can encapsulate the access request for application 210 according to the relevant protocol of communication method A1, obtain a data packet suitable for communication method A1, and then send the data packet.

[0094] In some embodiments, as described above, computing node 100 allocates an interface in communication method A1 to application 110. Application 110 can use this interface to issue an access request for application 210 in order to access application 210 via communication method A1.

[0095] The access request for application 210 refers to the access request used by application 110 to access application 210. This access request can be used to request application 210 to handle related matters, such as storing data, model inference, or screen rendering.

[0096] In some embodiments, the information of computing node 200 may include the address of the computing node in communication mode A1. Under the action of code B1, application 110 can send an access request for application 210 to the address of computing node 200 through communication mode A1, so as to access application 210 through communication mode A1.

[0097] Upon receiving an access request for application 210, compute node 200 can forward the request to application 210. Application 210 can respond to the access request and perform related processing, such as storing data, model inference, or rendering images. For example, the access request may include the name of application 210 or other forms of identification. Compute node 200 can identify that the access request is for accessing application 210 based on the name or other forms of identification of application 210, and then forward the access request to application 210.

[0098] In some embodiments, after receiving an access request, application 210 may need to return response information to application 110. Application 210 can send a response message to application 110 via communication method A1. However, the program code of application 210 may not include code that enables application 210 to return the desired information to other applications via communication method A1, such as code B3. In this case, when application 210 needs to send response information back to application 110, computing node 200 can add code B3 to the program code of application 210. Thus, application 210 can return a response message to application 100 under the action of code B3. The related implementation is similar to the implementation where application 110 accesses application 210 via communication method A1 under the action of code B1, and will not be described again here.

[0099] If code B1 is not added to the program code of application 110, application 110 cannot execute code B1, and therefore cannot access application 210 through communication method A1. The program code of application 110 includes code B2, which application 110 can execute to access application 210 through communication method A2.

[0100] In summary, the application access method provided in this application embodiment can automatically add relevant code to the application's program code based on the computing node where the application to be accessed is located, enabling applications to access each other in a high-performance communication manner, thereby improving the access performance between applications, enhancing the service quality of applications, and ensuring user experience.

[0101] Based on the above description, this application embodiment also provides an application access method. This method can be applied to a first computing node, the first computing node supporting communication methods including a first communication method, and the first computing node having first code, the first code being used by an application to access other applications through the first communication method. The first computing node can be implemented with reference to the computing node 100 described above, the first communication method can be implemented with reference to communication method A1 described above, and the first code can be implemented with reference to code B1 described above.

[0102] As shown in Figure 5, the method includes the following steps.

[0103] First, in step 501, the first computing node starts the first application in the first computing node.

[0104] The first application can be implemented by referring to the above description of application 110, and step 501 can be implemented by referring to the above description of step 404 in Figure 4, and will not be repeated here.

[0105] Secondly, in step 502, the first computing node identifies that the access target of the first application is the second application in the second computing node.

[0106] The second application can be implemented by referring to the above description of application 210, and step 502 can be implemented by referring to the above description of step 405 in Figure 4, and will not be repeated here.

[0107] Next, in step 503, the first computing node obtains the information of the second computing node from the registry center corresponding to the second application.

[0108] The registration center can be implemented by referring to the above description of registration center 300, and step 503 can be implemented by referring to the above description of step 406 in Figure 4, and will not be repeated here.

[0109] And, in step 504, when the information of the second computing node indicates that the second computing node supports the first communication method, the first computing node adds the first code to the program code of the first application, so that the first application can access the second application through the first communication method under the action of the first code.

[0110] Step 504 can be implemented by referring to the above description of steps 407-409 in Figure 4, and will not be repeated here.

[0111] In some embodiments, the program code of the first application is bytecode. In step 504, the first computing node can add the first code to the program code through bytecode enhancement technology.

[0112] In some embodiments, in step 504, the first computing node may add the first code to the program code using just-in-time compilation technology.

[0113] In some embodiments, the program code of the first application includes second code, which is used by the first application to access the second application via the second communication method, wherein the communication performance of the second communication method is lower than that of the first communication method. In step 504, the first computing node replaces the second code in the program code of the first application with the first code to add the first code to the program code of the first application.

[0114] In some embodiments, the information of the second computing node includes the address of the second computing node in the first communication method. After the first code is added to the program code of the first application, the first application can send an access request to the address through the first communication method under the action of the first code. The access request is used by the first application to access the second application.

[0115] In some embodiments, the registry center also corresponds to the first application, and the first computing node can also send its own information to the registry center; wherein the information of the first computing node is used to indicate that the first computing node supports the first communication method. Thus, other computing nodes can obtain the information of the first computing node from the registry center and identify that the first computing node supports the first communication method based on this information.

[0116] In summary, the application access method provided in this application embodiment can automatically add relevant code to the application's program code based on the computing node where the application to be accessed is located, enabling applications to access each other in a high-performance communication manner, thereby improving the access performance between applications, enhancing the service quality of applications, and ensuring user experience.

[0117] Based on the above description, this application embodiment also provides an application access device 600. The device 600 is configured on a first computing node, the first computing node supports a first communication method, and the first computing node has first code, the first code being used by an application to access other applications through the first communication method. As shown in FIG6, the device 600 includes:

[0118] The startup module 610 is used to start the first application in the first computing node;

[0119] The identification module 620 is used to identify that the access target of the first application is the second application in the second computing node;

[0120] The acquisition module 630 is used to obtain information about the second computing node from the registration center corresponding to the second application;

[0121] Add module 640, which is used to add the first code to the program code of the first application when the information of the second computing node indicates that the second computing node supports the first communication method, so that the first application can access the second application through the first communication method under the action of the first code.

[0122] In some embodiments, the information of the second computing node includes the address of the second computing node in the first communication method; wherein, the first application, under the action of the first code, sends an access request to the address through the first communication method, and the access request is used by the first application to access the second application.

[0123] In some embodiments, the registration center also corresponds to the first application, and the acquisition module 630 is further configured to: send information of the first computing node to the registration center; wherein, the information of the first computing node is used to indicate that the first computing node supports the first communication method.

[0124] In some embodiments, the program code includes second code, which is used by the first application to access the second application through a second communication method, wherein the communication performance of the second communication method is less than that of the first communication method; the adding module 640 is used to replace the second code in the program code with the first code.

[0125] In some embodiments, the program code is bytecode; the adding module 640 is used to add the first code to the program code using bytecode enhancement technology.

[0126] In some embodiments, the adding module 640 is used to add the first code to the program code using just-in-time compilation technology.

[0127] In some embodiments, the first communication method includes a unified bus or a remote procedure call.

[0128] The startup module 610, identification module 620, acquisition module 630, and addition module 640 can all be implemented in software or hardware. For example, the implementation of the startup module 610 will be described below. Similarly, the implementation of the identification module 620, acquisition module 630, and addition module 640 can refer to the implementation of the startup module 610.

[0129] As an example of a software functional unit, the startup module 610 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, the startup module 610 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0130] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0131] As an example of a hardware functional unit, the startup module 610 may include at least one computing device, such as a server. Alternatively, the startup module 610 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0132] The multiple computing devices included in the startup module 610 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the startup module 610 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the startup module 610 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0133] It should be noted that, in other embodiments, the startup module 610 can be used to execute any step in the method shown in FIG. 5, the identification module 620 can be used to execute any step in the method shown in FIG. 5, the acquisition module 630 can be used to execute any step in the method shown in FIG. 5, and the addition module 640 can be used to execute any step in the method shown in FIG. 5. The steps implemented by the startup module 610, identification module 620, acquisition module 630, and addition module 640 can be specified as needed. By implementing different steps in the method shown in FIG. 5 through the startup module 610, identification module 620, acquisition module 630, and addition module 640 respectively, all functions of the device 600 can be realized.

[0134] This application also provides a computing device 700. As shown in FIG7, the computing device 700 includes: a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700.

[0135] Bus 702 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 7, but this does not imply that there is only one bus or one type of bus. Bus 702 can include pathways for transmitting information between various components of computing device 700 (e.g., memory 706, processor 704, communication interface 708).

[0136] Processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0137] Memory 706 may include volatile memory, such as random access memory (RAM). Memory 706 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0138] The memory 706 stores executable program code, and the processor 704 executes this executable program code to implement the functions of the aforementioned startup module 610, identification module 620, acquisition module 630, and addition module 640, thereby realizing the method shown in FIG5. That is, the memory 706 stores instructions for executing the method shown in FIG5.

[0139] The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.

[0140] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0141] As shown in Figure 8, the computing device cluster includes at least one computing device 700. The memory 706 of one or more computing devices 700 in the computing device cluster may store the same instructions for executing the method shown in Figure 5.

[0142] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the method shown in FIG. 5. In other words, a combination of one or more computing devices 700 can jointly execute the instructions for executing the method shown in FIG. 5.

[0143] It should be noted that the memory 706 in different computing devices 700 within the computing device cluster can store different instructions, each used to execute a portion of the functions of device 600. That is, the instructions stored in the memory 706 of different computing devices 700 can implement the functions of one or more modules among the startup module 610, identification module 620, acquisition module 630, and addition module 640.

[0144] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 9 illustrates one possible implementation. As shown in Figure 9, two computing devices 700A and 700B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 706 in computing device 700A stores instructions for executing the functions of the startup module 610 and the identification module 620. Simultaneously, the memory 706 in computing device 700B stores instructions for executing the functions of the acquisition module 630 and the addition module 640.

[0145] It should be understood that the functions of computing device 700A shown in Figure 9 can also be performed by multiple computing devices 700. Similarly, the functions of computing device 700B can also be performed by multiple computing devices 700.

[0146] This application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similarly referred to the connection method of the computing device cluster described in Figures 8 and 9. The difference is that the memory 706 of one or more computing devices 700 in this computing device cluster can store the same instructions for executing the method shown in Figure 5.

[0147] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the method shown in FIG. 5. In other words, a combination of one or more computing devices 700 can jointly execute the instructions for executing the method shown in FIG. 5.

[0148] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, the at least one computing device performs the method shown in FIG5.

[0149] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a host migration device such as a data center that includes 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., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform the method shown in FIG5.

[0150] Based on the above description, this application also provides an application access system. The system includes: a first computing node deployed with a first application, the first computing node supporting a first communication method, and the first computing node having first code for the application to access other applications via the first communication method; a second computing node deployed with a second application; and a registration center corresponding to the second application.

[0151] The first computing node is configured to: launch the first application; identify the access target of the first application as the second application; obtain information about the second computing node from the registry center; and when the information of the second computing node indicates that the second computing node supports the first communication method, add the first code to the program code of the first application so that the first application can access the second application through the first communication method under the action of the first code.

[0152] The first computing node can be implemented by referring to the description of computing node 100 above; the second computing node can be implemented by referring to the description of computing node 200 above; the first application can be implemented by referring to the description of application 110 above; the second application can be implemented by referring to the description of application 210 above; the first communication method can be implemented by referring to the description of communication method A1 above; the first code can be implemented by referring to the description of code B1 above; and the registration center can be implemented by referring to the description of registration center 300 above. Further details will not be provided here.

[0153] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. An application access method characterized by comprising: The method is applied to a first computing node, the first computing node supports communication methods including a first communication method, and the first computing node has first code, the first code being used by an application to access other applications through the first communication method; the method includes: Start the first application in the first computing node; The access target of the first application is identified as a second application in the second computing node; Obtain the information of the second computing node from the registry center corresponding to the second application; When the information of the second computing node indicates that the second computing node supports the first communication method, the first code is added to the program code of the first application so that the first application can access the second application through the first communication method under the action of the first code.

2. The method of claim 1, wherein, The information of the second computing node includes the address of the second computing node in the first communication method; wherein, under the action of the first code, the first application sends an access request to the address through the first communication method, and the access request is used by the first application to access the second application.

3. The method according to claim 1 or 2, characterized in that, The registration center also corresponds to the first application, and the method further includes: Send the information of the first computing node to the registration center; wherein, the information of the first computing node is used to indicate that the first computing node supports the first communication method.

4. The method according to any one of claims 1-3, characterized in that, The program code includes second code, which is used by the first application to access the second application through a second communication method, wherein the communication performance of the second communication method is less than that of the first communication method. Adding the first code to the program code of the first application includes replacing the second code in the program code with the first code.

5. The method according to any one of claims 1-4, characterized in that, The program code is bytecode; adding the first code to the program code of the first application includes: adding the first code to the program code through bytecode enhancement technology; or, Adding the first code to the program code of the first application includes: adding the first code to the program code using just-in-time (JIT) compilation technology.

6. The method according to any one of claims 1-5, characterized in that, The first communication method includes a unified bus or a remote procedure call.

7. An application access device, characterized by The device is configured on a first computing node, the first computing node supports a first communication method, and the first computing node has first code, the first code being used by an application to access other applications through the first communication method; the device includes: A startup module is used to start the first application in the first computing node; An identification module is used to identify that the access target of the first application is a second application in the second computing node; The acquisition module is used to obtain information about the second computing node from the registration center corresponding to the second application; An add module is used to add the first code to the program code of the first application when the information of the second computing node indicates that the second computing node supports the first communication method, so that the first application can access the second application through the first communication method under the action of the first code.

8. The apparatus of claim 7, wherein, The information of the second computing node includes the address of the second computing node in the first communication method; wherein, under the action of the first code, the first application sends an access request to the address through the first communication method, and the access request is used by the first application to access the second application.

9. The apparatus of claim 7 or 8, wherein, The registration center also corresponds to the first application, and the acquisition module is further used for: Send the information of the first computing node to the registration center; wherein, the information of the first computing node is used to indicate that the first computing node supports the first communication method.

10. The apparatus of any one of claims 7-9, wherein, The program code includes second code, which is used by the first application to access the second application through a second communication method, wherein the communication performance of the second communication method is less than that of the first communication method. The adding module is used to replace the second code in the program code with the first code.

11. The apparatus according to any one of claims 7-10, characterized in that, The program code is bytecode; the adding module is used to: add the first code to the program code using bytecode enhancement technology; or, The adding module is used to add the first code to the program code using just-in-time compilation technology.

12. The apparatus of any one of claims 7-11, wherein, The first communication method includes a unified bus or a remote procedure call.

13. A cluster of computing devices, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1 to 6.

15. A computer program product comprising instructions, characterized in that, When the instructions are executed by a cluster of computer devices, the cluster of computer devices performs the method as described in any one of claims 1 to 6.

16. An application access system, characterized by The system includes: A first computing node is deployed with a first application, the first computing node supports communication methods including a first communication method, and the first computing node has first code, the first code being used by the application to access other applications through the first communication method; A second computing node with a second application deployed; The registration center corresponding to the second application; Wherein, the first computing node is used for: Launch the first application; The first application's access target is identified as the second application; Obtain the information of the second computing node from the registration center; When the information of the second computing node indicates that the second computing node supports the first communication manner, the first code is added into the program code of the first application, so that the first application accesses the second application through the first communication manner under the action of the first code.