Resource integration method, related device and computer storage medium

By establishing a resource relationship model and unified management of API interfaces of different hosts, the cost waste problems of Internet companies in the later API resource management are solved, and efficient API resource management and dynamic maintenance are achieved.

CN113127579BActive Publication Date: 2025-04-01BEIJING DA MI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110459040.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-27
Publication Date
2025-04-01
Estimated Expiration
2041-04-27

AI Technical Summary

Technical Problem

In the business scenarios of Internet companies, each business scenario involves different API resources, which leads to the need to operate separately when querying, calling and maintaining API resources in the later stage, wasting manpower and material costs.

Method used

By obtaining information from multiple application program interfaces, based on preset metadata and attribute fields, the relationship between API interfaces of different hosts is determined, and a resource relationship model is established to realize unified call, update and delete operations of API resources.

Benefits of technology

It realizes unified management of each API interface, quickly sorts out the relationship between existing hosts and API interfaces, and supports dynamic maintenance of resource relationship models, reducing operational costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113127579B_ABST
    Figure CN113127579B_ABST
Patent Text Reader

Abstract

The present application discloses a resource integration method, related devices and computer storage medium, wherein the method includes: obtaining multiple application program interface information; determining the corresponding relationship between application program interfaces of different hosts based on preset metadata and attribute fields of each application program interface; and establishing a resource relationship model based on the corresponding relationship between application program interfaces of different hosts. Thus, the embodiment of the present application can establish a resource relationship model based on the corresponding relationship between the application program interface and the host, and perform unified operations such as calling, updating, and deleting each application program interface, so that not only the relationship between the existing host and the application program interface can be quickly sorted out, but also the resource relationship model can be dynamically maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource integration method, related devices, and computer media. Background Art

[0002] In the actual business scenarios of Internet companies, different API (Application Programming Interface) resources involved in each business scenario have corresponding hosts, and each host runs independently. However, when the company needs to query, call, and maintain API resources in the future, it needs to operate separately, which greatly wastes manpower and material costs. Summary of the invention

[0003] The embodiments of the present application provide a resource integration method, related devices and computer storage media to implement unified calling, updating, deleting and other operations on various application program interfaces.

[0004] In a first aspect, an embodiment of the present application provides a resource integration method, the method comprising:

[0005] Acquire multiple application program interface information; wherein the application program interface information includes: attribute fields and hosts corresponding to the interfaces;

[0006] Determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface;

[0007] A resource relationship model is established based on the corresponding relationships between the application program interfaces of the different hosts.

[0008] In a second aspect, an embodiment of the present application provides a resource integration device, the device comprising:

[0009] The acquisition module is used to acquire multiple application program interface information; wherein the application program interface information includes: attribute fields and hosts corresponding to the interfaces;

[0010] A determination module, used to determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface;

[0011] An establishing module is used to establish a resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts.

[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0013] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory;

[0014] The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above method steps.

[0015] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0016] In the embodiment of the present application, by obtaining multiple application program interface information; based on the preset metadata and the attribute fields of each application program interface, the corresponding relationship between the application program interfaces of different hosts is determined; based on the corresponding relationship between the application program interfaces of different hosts, a resource relationship model is established. Therefore, the embodiment of the present application can establish a resource relationship model based on the corresponding relationship between the application program interface and the host, and perform unified operations such as calling, updating, and deleting each application program interface, so that not only the relationship between the existing host and the application program interface can be quickly sorted out, but also the resource relationship model can be dynamically maintained. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 An application scenario diagram of a resource integration method provided in an embodiment of the present application;

[0019] Figure 2 A system architecture diagram of a resource integration method provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a resource integration method provided in an embodiment of the present application;

[0021] Figure 4 A flowchart of another resource integration method provided in an embodiment of the present application;

[0022] Figure 5 A flowchart of another resource integration method provided in an embodiment of the present application;

[0023] Figure 6 A flowchart of another resource integration method provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of the structure of a resource integration device provided in an embodiment of the present application;

[0025] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0027] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0028] Figure 1 An application scenario diagram of the resource integration method provided in an embodiment of the present application is exemplified. Figure 1 The application scenario shown may include device 10, cloud server 11, cloud server 12, cloud server 13, and cloud server 14. Among them: device 10 may centrally manage cloud server 11, cloud server 12, cloud server 13, and cloud server 14.

[0029] Specifically, the device 10 can be managed by the enterprise's operation and maintenance team to uniformly manage the cloud servers corresponding to each business scenario. A cloud server is a server that an enterprise can purchase on a cloud service provider platform (e.g., Alibaba Cloud, Tencent Cloud, Huawei Cloud, etc.). Among them, a cloud server may be used for a business scenario. For example, cloud server 11 can be used to manage data in an order business scenario.

[0030] It is understandable that a business scenario can realize multiple functions, each function may correspond to at least one API interface. Therefore, a business scenario can correspond to an application model containing multiple API interfaces, and each API interface is used to call a predefined function that can realize the corresponding function from the cloud server corresponding to the business scenario.

[0031] Specifically, the resource integration method adopted in the present application can determine the cloud server where each API interface is located, as well as the same API interface that may exist between different cloud servers, by constructing a corresponding relationship between the API interface and the cloud server.

[0032] Figure 2 The system architecture diagram of the resource integration method applied to the embodiment of the present application is shown. Among them, the resource integration method provided by the embodiment of the present application can be applied in a server. Specifically, the server can be connected to the terminal through a network. The network is used to provide a communication link between the terminal and the server. The network may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal includes but is not limited to: wearable devices, monitoring equipment, handheld devices, personal computers, tablet computers, vehicle-mounted equipment, smart phones, computing devices or other processing devices connected to wireless modems, etc. In different networks, terminal devices can be called different names, such as: monitoring equipment, user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), fifth generation mobile communication technology (5th generation mobile networks, 5G) network or terminal equipment in future evolution network, etc. The terminal system refers to an operating system that can be run on a terminal, a program for managing and controlling terminal hardware and terminal applications, and an indispensable system application for the terminal. The system includes but is not limited to Android system, IOS system, Windows phone (WP) system and Ubuntu mobile operating system.

[0033] It should be understood that Figure 2 The number of terminals, networks and servers in the example is only illustrative. Any number of terminals, networks and servers may be provided according to actual needs. For example, a server may be a server cluster composed of multiple servers. Users may use the server to interact with the terminal through the network to obtain an optimized version, etc.

[0034] Next, combine Figure 1 Application scenario diagram of the resource integration method introduced and Figure 2 The system architecture diagram introduced here is used to introduce the resource integration method provided in the embodiment of the present application.

[0035] In one embodiment, Figure 3 As shown in FIG, a flow chart of a resource integration method is provided. Figure 3 As shown, the resource integration method may include the following steps:

[0036] S301, obtaining multiple application program interface information.

[0037] In an embodiment of the present application, the application program interface information may include: an attribute field and a host corresponding to the interface.

[0038] Among them, the attribute field is used to indicate that the corresponding field is parsed from the API return data when obtaining the API interface return data according to the attribute information pre-defined in the API interface information. The attribute field of the application program interface may include: the application program interface name. For example, the attribute field of API interface 1 may be the API interface name aabbcc. The host is used to represent a cloud server. The cloud server can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and cloud computing services such as big data and artificial intelligence platforms. The host corresponding to the interface can be understood as the cloud server corresponding to the API interface. For example, API interface 1 may correspond to cloud server 1.

[0039] Possibly, before obtaining multiple application interface information in the embodiment of the present application, the attribute fields of the current host and the attribute fields of multiple application interfaces in the application model can also be obtained; when the application interface name of the current host matches the application interface name of at least one application interface in the application model, a host model of the corresponding relationship between the current host and at least one application interface is established based on the intranet Internet Protocol address of the current host; and multiple application interface information is determined based on the host model.

[0040] The attribute field of the host may include: an application program interface name and an intranet Internet Protocol (IP) address, and the attribute field of the current application program interface may include: an application program interface name.

[0041] In a specific example, the intranet IP address 192.168.1.3 of the current cloud server A in the database cluster, the API interface name corresponding to the current cloud server A, and the names of the API interfaces in the application model are obtained. When the API interface 1 name aabbcc and the API interface 3 name ccaabb corresponding to the current cloud server A match the API interface 1 name aabbcc and the API interface 3 name ccaabb in the application model, a host model of the corresponding relationship between the current cloud server A and the API interface 1 and API interface 3 is established based on the intranet IP address 192.168.1.3 of the current cloud server A. In this way, the API interface address corresponding to the target cloud server can be determined through the host model.

[0042] Possibly, the attribute field of the host in the embodiment of the present application may also include the name of the operator. For example, the name of Alibaba Cloud's cloud service platform may be aliyun, the name of Huawei Cloud's cloud service platform may be huaweiyun, etc., to distinguish the cloud server clusters of different operators. In this way, if the Alibaba Cloud cloud service platform of enterprise A fails, it can switch to the Huawei Cloud cloud service platform.

[0043] S302, determining corresponding relationships between application program interfaces of different hosts based on preset metadata and attribute fields of each application program interface.

[0044] Specifically, the embodiment of the present application can determine the attribute fields to be identified in each application program interface through preset metadata, and determine the corresponding relationship between the application program interfaces of different hosts when the attribute fields to be identified in each application program interface match each other.

[0045] It can be understood that the attribute fields of the application program interface may include: API interface name, API interface development department, developer identification, storage address, function identification, code structure and other information. The embodiment of the present application can determine the attribute fields that need to be identified through preset metadata. For example, the metadata can be set to the API interface name as the attribute field that needs to be identified.

[0046] Furthermore, based on the preset metadata and the attribute fields of each application program interface, the corresponding relationship between the application program interfaces of different hosts is determined. For example, according to the name of API interface 1 aabbcc, corresponding to cloud server 1, the name of API interface 2 bbccaa, corresponding to cloud server 2, and the name of API interface 3 ccaabb, corresponding to cloud servers 1 and 2, it can be determined that cloud server 1 corresponds to API interface 1 and API interface 3, and cloud server 2 corresponds to API interface 2 and API interface 3.

[0047] S303, establishing a resource relationship model based on the corresponding relationships between the application program interfaces of different hosts.

[0048] The resource relationship model is a model used to represent the relationship between the host and the application program interface.

[0049] Possibly, the embodiment of the present application may also store the host model and the resource relationship model in a database to prevent the loss of the host model and the resource relationship model.

[0050] Specifically, the resource relationship model in the embodiment of the present application can be understood as a model of the correspondence between a host model containing multiple cloud servers and an interface model containing multiple API interfaces.

[0051] As shown in Table 1, in the resource relationship model, the host model may include cloud server 1 and cloud server 2, and the application model may include API interface 1, API interface 2, and API interface 3. According to the name aabbcc of API interface 1, corresponding to cloud server 1, the name bbccaa of API interface 2, corresponding to cloud server 2, and the name ccaabb of API interface 3, corresponding to cloud servers 1 and 2, it can be determined that cloud server 1 corresponds to API interface 1 and API interface 3, and cloud server 2 corresponds to API interface 2 and API interface 3.

[0052] Table 1

[0053]

[0054] In the embodiment of the present application, by obtaining multiple application program interface information; based on the preset metadata and the attribute fields of each application program interface, the corresponding relationship between the application program interfaces of different hosts is determined; based on the corresponding relationship between the application program interfaces of different hosts, a resource relationship model is established. Therefore, the embodiment of the present application can establish a resource relationship model based on the corresponding relationship between the application program interface and the host, and perform unified operations such as calling, updating, and deleting each application program interface, so that not only the relationship between the existing host and the application program interface can be quickly sorted out, but also the resource relationship model can be dynamically maintained.

[0055] In some embodiments, Figure 4 The following is a schematic diagram showing a process flow of a resource integration method provided by an embodiment of the present application. Figure 4 As shown, the resource integration method may at least include the following steps:

[0056] S401, obtaining multiple application program interface information.

[0057] Specifically, S401 is consistent with S301 and will not be described in detail here.

[0058] S402, determining corresponding relationships between application program interfaces of different hosts based on preset metadata and attribute fields of each application program interface.

[0059] Specifically, S402 is consistent with S302 and will not be described in detail here.

[0060] S403, establishing a resource relationship model based on the corresponding relationship between the application program interfaces of different hosts.

[0061] Specifically, S403 is consistent with S303 and will not be described in detail here.

[0062] S404, displaying the resource relationship model in the electronic device.

[0063] The electronic device may be a monitoring device, a handheld device, a personal computer, a tablet computer, a computing device, or other processing device connected to a wireless modem, etc. The technician may observe the established resource relationship model through the electronic device, so that the corresponding relationship between the corresponding cloud server and its API interface can be directly obtained through the display terminal of the electronic device.

[0064] In a specific example, the host model may include cloud server 1, cloud server 2, and cloud server 3, and the application model may include API interface 1, API interface 2, and API interface 3. According to the name aabbcc of API interface 1, corresponding to cloud server 1 and cloud server 3, the name bbccaa of API interface 2, corresponding to cloud server 2 and cloud server 3, and the name ccaabb of API interface 3, corresponding to cloud servers 1 and 2, it can be determined that cloud server 1 corresponds to API interface 1 and API interface 3, cloud server 2 corresponds to API interface 2 and API interface 3, and cloud server 3 corresponds to API interface 1 and API interface 2. Furthermore, the resource relationship model of the corresponding relationship between each cloud server and each API interface can be displayed in the computer interface to facilitate the later operations of technical teams such as the operation and maintenance team, the application team, and the database performance analysis team.

[0065] In some embodiments, Figure 5 The following is a schematic diagram showing a process flow of a resource integration method provided by an embodiment of the present application. Figure 5 As shown, the resource integration method may at least include the following steps:

[0066] S501, obtaining multiple application program interface information.

[0067] Specifically, S501 is consistent with S301 and will not be described in detail here.

[0068] S502: Determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface.

[0069] Specifically, S502 is consistent with S302 and will not be described in detail here.

[0070] S503: Establish a resource relationship model based on the corresponding relationships between the application program interfaces of different hosts.

[0071] Specifically, S503 is consistent with S303 and will not be described in detail here.

[0072] S504, based on the resource relationship model, perform one or more of the following operations on the application program interfaces in different hosts: add an application program interface, update an application program interface, and delete an application program interface.

[0073] In a specific example, the host model may include cloud server 1, cloud server 2, and cloud server 3, and the application model may include API interface 1, API interface 2, and API interface 3. According to the name aabbcc of API interface 1, corresponding to cloud server 1 and cloud server 3, the name bbccaa of API interface 2, corresponding to cloud server 2 and cloud server 3, and the name ccaabb of API interface 3, corresponding to cloud servers 1 and 2, it can be determined that cloud server 1 corresponds to API interface 1 and API interface 3, cloud server 2 corresponds to API interface 2 and API interface 3, and cloud server 3 corresponds to API interface 1 and API interface 2. Furthermore, technical teams such as the operation and maintenance team, the application team, and the database performance analysis team can add new API interfaces 4 to cloud servers 1 and 2, update the predefined functions in API interface 1 in cloud servers 1 and 3, or delete API interface 2 in cloud servers 2 and 3 according to the resource relationship model.

[0074] In some embodiments, Figure 6 The following is a schematic diagram showing a process flow of a resource integration method provided by an embodiment of the present application. Figure 6 As shown, the resource integration method may at least include the following steps:

[0075] S601, obtaining multiple application program interface information.

[0076] Specifically, S601 is consistent with S301 and will not be described in detail here.

[0077] S602, determining corresponding relationships between application program interfaces of different hosts based on preset metadata and attribute fields of each application program interface.

[0078] Specifically, S602 is consistent with S302 and will not be described in detail here.

[0079] S603: Establish a resource relationship model based on the corresponding relationship between the application program interfaces of different hosts.

[0080] Specifically, S603 is consistent with S303 and will not be described in detail here.

[0081] S604: Based on a preset business scenario, determine at least one application program interface required for the business scenario.

[0082] The business scenario is used to represent a module of a business application, such as a teaching scenario and an order scenario. The at least one application program interface required by the business scenario is used to represent an API interface that implements the business scenario function, such as an API interface for generating an order number in an order scenario.

[0083] S605: Based on the resource relationship model, call at least one application program interface required by the business scenario to implement the functions preset in the business scenario.

[0084] In a specific example, a new business scenario is added: logistics scenario. The functions that can be realized by this logistics scenario include: obtaining order price, order time, logistics tracking, user name and other information. Therefore, the API interfaces that need to be called may at least include: API interface 1 for obtaining order price, API interface 2 for obtaining order time, API interface 3 for obtaining logistics tracking, and API interface 4 for obtaining user name. According to the resource relationship model, it can be determined that API interface 1 for obtaining order price exists in cloud server 1 and cloud server 3, API interface 2 for obtaining order time exists in cloud server 2 and cloud server 3, API interface 3 for obtaining logistics tracking exists in cloud server 1 and cloud server 2, and API interface 4 for obtaining user name exists in cloud server 1. In this way, when realizing the above functions, the newly added logistics scenario can directly call the API interfaces in each cloud server, which not only does not require the addition of a new cloud server, but also can dynamically obtain and maintain various user information.

[0085] Figure 7 1 is a schematic diagram of the structure of a resource integration device provided by an exemplary embodiment of the present application. The resource integration device can be set in a device such as a server to execute the resource integration method of any of the above embodiments of the present application. Figure 7 As shown, the resource integration device may include:

[0086] The acquisition module 71 is used to acquire multiple application program interface information; wherein the application program interface information includes: attribute fields and hosts corresponding to the interfaces;

[0087] A determination module 72, configured to determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface;

[0088] The establishing module 73 is used to establish a resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts.

[0089] In the embodiment of the present application, by obtaining multiple application program interface information; based on the preset metadata and the attribute fields of each application program interface, the corresponding relationship between the application program interfaces of different hosts is determined; based on the corresponding relationship between the application program interfaces of different hosts, a resource relationship model is established. Therefore, the embodiment of the present application can establish a resource relationship model based on the corresponding relationship between the application program interface and the host, and perform unified operations such as calling, updating, and deleting each application program interface, so that not only the relationship between the existing host and the application program interface can be quickly sorted out, but also the resource relationship model can be dynamically maintained.

[0090] In some implementations, before the acquisition module 71, the device further includes:

[0091] A field acquisition module, used to acquire the attribute fields of the current host and the attribute fields of multiple application program interfaces in the application model; wherein the attribute fields of the current host include: an application program interface name and an intranet Internet protocol address, and the attribute fields of the application program interface include: an application program interface name;

[0092] a host model establishment module, configured to establish a host model of a corresponding relationship between the current host and the at least one application program interface based on an intranet Internet Protocol address of the current host, when an application program interface name of the current host matches an application program interface name of at least one application program interface in the application model;

[0093] The interface information determination module is used to determine the plurality of application program interface information based on the host model.

[0094] In some implementations, the determining module 72 includes:

[0095] A first determining unit, configured to determine attribute fields to be identified in each of the application program interfaces based on the preset metadata;

[0096] The second determining unit is used to determine the corresponding relationship between the application program interfaces of different hosts when the attribute fields to be identified in the application program interfaces match each other.

[0097] In some implementations, after the establishment module 73, the apparatus further includes: a display module, configured to display the resource relationship model in an electronic device.

[0098] In some implementations, after the establishment module 73, the apparatus further includes:

[0099] The operation module is used to perform one or more of the following operations on the application program interfaces in the different hosts based on the resource relationship model: adding an application program interface, updating an application program interface, and deleting an application program interface.

[0100] In some implementations, after the establishment module 73, the apparatus further includes:

[0101] An interface determination module, used to determine at least one application program interface required for a business scenario based on a preset business scenario;

[0102] A calling module is used to call at least one application program interface required by the business scenario based on the resource relationship model to implement the functions preset in the business scenario.

[0103] In some implementations, after the establishment module 73, the device further includes: a storage module, configured to store the host model and the resource relationship model in a database.

[0104] It should be noted that the resource integration device provided in the above embodiment only uses the division of the above functional modules as an example when executing the resource integration method. In actual applications, the above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the resource integration device provided in the above embodiment and the resource integration method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0105] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0106] See also Figure 8 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 80 may include: at least one processor 81 , at least one network interface 84 , a user interface 83 , a memory 85 , and at least one communication bus 82 .

[0107] The communication bus 82 is used to realize the connection and communication between these components.

[0108] The user interface 83 may include a display screen (Display) and a camera (Camera), and the optional user interface 83 may also include a standard wired interface and a wireless interface.

[0109] The network interface 84 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0110] Among them, the processor 81 may include one or more processing cores. The processor 81 uses various interfaces and lines to connect various parts of the entire electronic device 80, and executes various functions and processes data of the electronic device 80 by running or executing instructions, programs, code sets or instruction sets stored in the memory 85, and calling data stored in the memory 85. Optionally, the processor 81 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 81 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 81, and can be implemented separately through a chip.

[0111] Among them, the memory 85 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 85 includes a non-transitory computer-readable storage medium. The memory 85 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 85 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 85 may also be optionally at least one storage device located away from the aforementioned processor 81. As Figure 8 As shown, the memory 85 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a resource integration application.

[0112] exist Figure 8In the electronic device 80 shown, the user interface 83 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 81 can be used to call the resource integration application stored in the memory 85 and specifically perform the following operations:

[0113] Acquire multiple application program interface information; wherein the application program interface information includes: attribute fields and hosts corresponding to the interfaces;

[0114] Determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface;

[0115] A resource relationship model is established based on the corresponding relationships between the application program interfaces of the different hosts.

[0116] In some implementations, before executing the acquisition of multiple application program interface information, the processor 81 further executes:

[0117] Acquire the attribute fields of the current host and the attribute fields of multiple application program interfaces in the application model; wherein the attribute fields of the current host include: an application program interface name and an intranet Internet protocol address, and the attribute fields of the application program interface include: an application program interface name;

[0118] In the case where the application program interface name of the current host matches the application program interface name of at least one application program interface in the application model, a host model of a corresponding relationship between the current host and the at least one application program interface is established based on an intranet Internet Protocol address of the current host;

[0119] Based on the host model, the plurality of application program interface information is determined.

[0120] In some implementations, when the processor 81 determines the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface, the processor 81 specifically performs:

[0121] Determining attribute fields to be identified in each of the application program interfaces based on the preset metadata;

[0122] In the case that the attribute fields to be identified in the application program interfaces match each other, the corresponding relationship between the application program interfaces of different hosts is determined.

[0123] In some implementations, after establishing the resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts, the processor 81 further performs: displaying the resource relationship model in the electronic device.

[0124] In some implementations, after establishing a resource relationship model based on the corresponding relationship between the application program interfaces of different hosts, the processor 81 further executes:

[0125] Based on the resource relationship model, one or more of the following operations are performed on the application program interfaces in the different hosts: adding an application program interface, updating an application program interface, and deleting an application program interface.

[0126] In some implementations, after establishing a resource relationship model based on the corresponding relationship between the application program interfaces of different hosts, the processor 81 further executes:

[0127] Based on a pre-defined business scenario, determining at least one application program interface required for the business scenario;

[0128] Based on the resource relationship model, at least one application program interface required by the business scenario is called to implement the functions preset in the business scenario.

[0129] In some implementations, after establishing a resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts, the processor 81 further executes: storing the host model and the resource relationship model in a database.

[0130] The embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer or a processor, the computer or the processor executes the above-mentioned Figure 3-Figure 6 One or more steps in the illustrated embodiment. If the various components of the resource integration device described above are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0131] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted by the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: various media that can store program codes, such as system memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.

[0133] The embodiments described above are merely preferred embodiments of the present application and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the protection scope determined by the claims of the present application.

Claims

1. A resource integration method, characterized in that: The method comprises: Acquire the attribute fields of the current host and the attribute fields of multiple application program interfaces in the application model; wherein the attribute fields of the current host include: an application program interface name and an intranet Internet protocol address, and the attribute fields of the application program interface include: an application program interface name; In the case where the application program interface name of the current host matches the application program interface name of at least one application program interface in the application model, a host model of a corresponding relationship between the current host and the at least one application program interface is established based on an intranet Internet Protocol address of the current host; determining a plurality of application program interface information based on the host model; Acquire multiple application program interface information; wherein the application program interface information includes: attribute fields and hosts corresponding to the interfaces; Determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface; Establishing a resource relationship model based on the corresponding relationships between the application program interfaces of the different hosts; Based on a pre-defined business scenario, determining at least one application program interface required for the business scenario; Based on the resource relationship model, calling at least one application program interface required by the business scenario to implement the function preset in the business scenario; The determining, based on the pre-set business scenario, at least one application program interface required for the business scenario includes: when the business scenario is a logistics scenario, the functions implemented by the logistics scenario include: obtaining order price, order time, logistics tracking, and user name, and the called API interface includes at least: an API interface for obtaining order price, an API interface for obtaining order time, an API interface for obtaining logistics tracking, and an API interface for obtaining user name; Based on the resource relationship model, at least one application programming interface required for the business scenario is called to implement the functions preset in the business scenario, including: if it is determined according to the resource relationship model that the API interface for obtaining the order price exists in the first cloud server and the third cloud server, the API interface for obtaining the order time exists in the second cloud server and the third cloud server, the API interface for obtaining the logistics tracking exists in the first cloud server and the second cloud server, and the API interface for obtaining the user name exists in the first cloud server, when implementing the above functions in the logistics scenario, the API interfaces in each cloud server are directly called.

2. The method according to claim 1, characterized in that The determining the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface includes: Determining attribute fields to be identified in each of the application program interfaces based on the preset metadata; In the case that the attribute fields to be identified in the application program interfaces match each other, the corresponding relationship between the application program interfaces of different hosts is determined.

3. The method according to claim 1, characterized in that After establishing the resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts, the method further includes: displaying the resource relationship model in the electronic device.

4. The method according to any one of claims 2-3, characterized in that: After establishing the resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts, the method further includes: Based on the resource relationship model, one or more of the following operations are performed on the application program interfaces in the different hosts: adding an application program interface, updating an application program interface, and deleting an application program interface.

5. The method according to claim 1, characterized in that After establishing the resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts, the method further includes: storing the host model and the resource relationship model in a database.

6. A resource integration device, characterized in that: The device comprises: The first acquisition module is used to acquire the attribute fields of the current host and the attribute fields of multiple application program interfaces in the application model; wherein the attribute fields of the current host include: an application program interface name and an intranet Internet protocol address, and the attribute fields of the application program interface include: an application program interface name; A first establishing module is used to establish a host model of a corresponding relationship between the current host and the at least one application program interface based on an intranet Internet Protocol address of the current host when the application program interface name of the current host matches the application program interface name of at least one application program interface in the application model; A first determining module, configured to determine a plurality of application program interface information based on the host model; The second acquisition module is used to acquire multiple application program interface information; wherein the application program interface information includes: attribute fields and hosts corresponding to the interfaces; A second determination module, used to determine the corresponding relationship between the application program interfaces of different hosts based on the preset metadata and the attribute fields of each application program interface; A second establishing module, used for establishing a resource relationship model based on the corresponding relationship between the application program interfaces of the different hosts; A third determination module, configured to determine, based on a preset business scenario, at least one application program interface required for the business scenario; A calling module, used to call at least one application program interface required by the business scenario based on the resource relationship model to implement the function preset in the business scenario; The third determination module is specifically used for, when the business scenario is a logistics scenario, the functions implemented by the logistics scenario include: obtaining order price, order time, logistics tracking, and user name, and the called API interface includes at least: an API interface for obtaining order price, an API interface for obtaining order time, an API interface for obtaining logistics tracking, and an API interface for obtaining user name; The calling module is specifically used to directly call the API interfaces in each cloud server when implementing the above functions in the logistics scenario if it is determined according to the resource relationship model that the API interface for obtaining the order price exists in the first cloud server and the third cloud server, the API interface for obtaining the order time exists in the second cloud server and the third cloud server, the API interface for obtaining the logistics tracking exists in the first cloud server and the second cloud server, and the API interface for obtaining the user name exists in the first cloud server.

7. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1-5.

8. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Application deployment method and apparatus

    CN107423085A