WO2020147565A1 - 调用应用程序接口的方法和装置 - Google Patents

调用应用程序接口的方法和装置 Download PDF

Info

Publication number
WO2020147565A1
WO2020147565A1 PCT/CN2019/129786 CN2019129786W WO2020147565A1 WO 2020147565 A1 WO2020147565 A1 WO 2020147565A1 CN 2019129786 W CN2019129786 W CN 2019129786W WO 2020147565 A1 WO2020147565 A1 WO 2020147565A1
Authority
WO
WIPO (PCT)
Prior art keywords
network element
api
function network
information
open function
Prior art date
Application number
PCT/CN2019/129786
Other languages
English (en)
French (fr)
Inventor
葛翠丽
杨艳梅
吴义壮
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to AU2019422391A priority Critical patent/AU2019422391B2/en
Priority to CA3126566A priority patent/CA3126566C/en
Priority to EP19910775.6A priority patent/EP3905612A4/en
Publication of WO2020147565A1 publication Critical patent/WO2020147565A1/zh
Priority to US17/374,732 priority patent/US11516310B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Definitions

  • This application relates to the field of communications, and in particular to methods and devices for invoking application program interfaces (application programmers interface API, API) in the field of communications.
  • application program interfaces application programmers interface API, API
  • API calling entity In the common API framework (common API framework, CAPIF), it generally includes API calling entity (API invoker), CAPIF core function (CAPIF core function, CCF) network element, API exposure function (API exposure function, AEF) network element, API API publishing function (APF) network elements and API management function (API management function, APIMF) network elements.
  • API calling entity is generally a third-party application that has signed a service agreement with the operator, and has the ability to call the API.
  • AEF provides APIs and also serves as the entry point for API calling entities to call APIs.
  • APF provides the function of publishing API and publishes API in CCF. The CCF saves the API issued by the APF so that the API calling entity can find the API and call the API.
  • APIMF provides the function of managing API.
  • CCF can determine to use a topology hiding strategy for the API, that is, to select a topology hiding entry point AEF (generally referred to as boundary AEF) for the API. Then, when the API calling entity calls the API, the boundary AEF can determine the AEF that actually provides the API, and send an API call request to the AEF. For a scenario where an API is provided by only one AEF, the boundary AEF can determine the AEF that actually provides the API according to the identifier of the API, and directly send an API call request to the AEF that actually provides the API.
  • CCF applies a topology hiding strategy to it, and the boundary AEF cannot determine which of the multiple AEFs that provide the API should be provided.
  • AEF sends an API call request, causing the API call to fail.
  • This application provides a method and device for invoking an application program interface, which can determine the target open function network element used to call the API in a scenario where an API is provided by multiple open function network elements, thereby successfully calling the API.
  • a method for invoking an application program interface including: a first network element obtains routing information of an API, where the routing information is used to indicate a route for calling the API, and the API is controlled by the first open function network. And the second open function network element; the first network element obtains the calling parameter information of the API, and the calling parameter information is used to operate the API; the first network element is based on the routing information and the The calling parameter information determines a target open function network element from the first open function network element and the second open function network element.
  • the method for calling the application program interface of the embodiment of the present application in a scenario where an API is provided by multiple open function network elements, by combining the routing information of the API and the calling parameter information of the API, it is possible to determine the API used to call the API.
  • the target open function network element so that the border open function network element forwards the API call request to the target open function network element, so that the API call is successful.
  • the first network element may be a core function network element, a publishing function network element, or an open function network element (that is, a boundary open function network element that can receive an API call request from an API call entity).
  • the invocation parameter information includes identification information of the terminal device and/or location information of the terminal device; and/or, the routing information includes the first The information of an open function network element and the information of the second open function network element, and the information of the first service area and the information of the second service area corresponding to the API, wherein the first open function network element provides The API corresponds to the first service area, and the API provided by the second open function network element corresponds to the second service area.
  • the first network element is a core function network element, and the first network element obtains call parameter information of the API, including: the first network The element receives the calling parameter information of the API from the open border function network element; the method further includes: the first network element sends the information of the target open function network element to the open border function network element.
  • the above-mentioned first network element is a core function network element
  • the core function network element may receive call parameter information of the API from the border opening function network element. Further, after the target open function network element is determined according to the routing information and call parameter information of the API, the core function network element may send the information of the target open function network element to the border open function network element, so that the target open function network The element sends the API call request from the API call entity to the target open function network element.
  • the first network element is a core function network element, and the first network element obtains routing information of the API, including: The functional network element receives the routing information of the API.
  • the first network element is a core function network element, and the first network element obtains routing information of the API, which may be determined by the first network element from locally pre-configured AEF information Routing information.
  • the foregoing first network element is a publishing function network element, and the publishing function network element may obtain the API information locally.
  • the first network element is a core function network element
  • the method further includes: the first network element receives the first network element from a publishing function network element.
  • the API corresponds to the first service area
  • the API provided by the second open function network element corresponds to the second service area
  • the first network element obtains routing information of the API, including: the first network The element generates routing information of the API according to the information of the first open function network element and the information of the second open function network element, as well as the information of the first service area and the information of the second service area .
  • the above-mentioned first network element is a core function network element
  • the first network element may be based on the received information of the first open function network element, the information of the second open function network element, the information of the first service area, and The information of the second service area generates the routing information of the aforementioned API.
  • the routing information may indicate the correspondence between the first service area and the first open function network element, and the correspondence between the second service area and the second open function network element.
  • the first network element is a boundary open function network element
  • the first network element acquiring routing information of the API includes: The core function network element or the publishing function network element receives the routing information of the API.
  • the border opening function network element may receive the routing information of the API from the core function network element or the publishing function network element.
  • the publishing function network element may directly send the routing information of the API to the border opening function network element through the interface.
  • the publishing function network element can send the routing information of the API to the core function network element, and the core function network element sends the API information to Boundary open function network element.
  • the method further includes: the first network element sending a request message, the request message being used to request routing information of the API, the request message Including the identification information of the API.
  • the aforementioned first network element is a border opening function network element
  • the border opening function network element may also send a request message to a core function network element or a publishing function network element for requesting routing information of the aforementioned API. Since the routing information is for a specific API, the request message may also include identification information of the requested API.
  • the border open function network element after receiving an API call request from an API calling entity, the border open function network element sends the above request message to the core function network element or the publishing function network element.
  • the routing information requested by the request message corresponds to the API that is The API requested for this API call request.
  • the border opening function network element only when the border opening function network element receives the API call request, the border opening function network element requests routing information from the core function network element, instead of the core function network element actively opening the function network element to the border. Sending the routing information prevents the border opening function network element from acquiring the routing information, but not using it, resulting in waste of push signaling and related information.
  • another method for invoking an application program interface including: a second network element obtains routing information of an API, where the routing information is used to indicate a route for invoking the API, and the API is opened by the first open function Provided by the network element and the second open function network element; the second network element sends the routing information to the border open function network element, and the routing information is used for the border open function network element to determine the target open function network element , The target open function network element is determined from the first open function network element and the second open function network element.
  • the routing information includes information about the first open function network element that provides the API, information about the second open function network element, and information corresponding to the API The information of the first service area and the information of the second service area, wherein the API provided by the first open function network element corresponds to the first service area, and the API provided by the second open function network element Corresponding to the second service area.
  • the second network element is a core function network element
  • the method further includes: the second network element receives the first network element from a publishing function network element.
  • the API provided corresponds to the first service area
  • the API provided by the second open function network element corresponds to the second service area
  • the second network element acquiring routing information of the API includes: The second network element generates the API according to the information of the first open function network element and the information of the second open function network element, and the information of the first service area and the information of the second service area Routing information.
  • the method before the second network element sends the routing information to the open border function network element, the method further includes: the second network element A request message is received from the border opening function network element, the request message is used to request the routing information, the request message includes the identification information of the API; the second network element sends the border opening function network element Sending the routing information includes: the second network element sends the routing information to the border opening function network element according to the request message.
  • a method for invoking an application program interface including: a first network element obtains API information, where the API information includes information of a first open function network element that provides the API and a second open function network element And the information of the first service area and the information of the second service area corresponding to the API, wherein the API provided by the first open function network element corresponds to the first service area, and the second service area The API provided by the open function network element corresponds to the second service area; the first network element obtains call parameter information of the API, and the call parameter information includes the identification information of the terminal device and/or the terminal device The location information; the first network element determines a target open function network element from the first open function network element and the second open function network element according to the API information and the call parameter information.
  • an API in a scenario where an API is provided by multiple open function network elements, it combines the information of the service area corresponding to the API, the multiple open function network elements that provide the API, and the API
  • the call parameter information can determine the target open function network element used to call the API, so that the border open function network element forwards the API call request to the target open function network element, and the API call is successful.
  • the first network element may be a core function network element, a publishing function network element, or an open function network element (that is, a boundary open function network element that can receive an API call request from an API call entity).
  • the first network element is a core function network element, and the first network element obtains call parameter information of the API, including: the first network The element receives the calling parameter information of the API from the open border function network element; the method further includes: the first network element sends the information of the target open function network element to the open border function network element.
  • the above-mentioned first network element is a core function network element
  • the core function network element may receive call parameter information of the API from the border opening function network element. Further, after the target open function network element is determined according to the API information and the call parameter information, the core function network element may send the information of the target open function network element to the border open function network element, so that the target open function network element will The API call request from the API call entity is sent to the target open function network element.
  • the first network element is a core function network element
  • the first network element acquiring API information includes: the first network element obtains API information from a publishing function network The meta receives the API information.
  • the foregoing first network element is a publishing function network element
  • the publishing function network element may obtain the API information locally. This embodiment of the present application does not limit this.
  • the first network element is a border open function network element
  • the first network element acquiring API information includes: the first network element obtains the core function The network element or the publishing function network element receives the API information.
  • the border opening function network element may receive the aforementioned API information from a core function network element or a publishing function network element.
  • the publishing function network element can directly send API information to the border opening function network element through the interface.
  • the publishing function network element may send API information to the core function network element, and the core function network element sends the API information to the boundary opening Functional network element.
  • the method further includes: the first network element generates a call routing rule of the API according to the API information, and the call routing rule is used to indicate The route for calling the API; the first network element determines a target open function network element from the at least two open function network elements according to the API information and the call parameter information, including: the first network The element determines a target open function network element from the first open function network element and the second open function network element according to the call routing rule and the called parameter information.
  • the calling routing rule here may be included in the routing information in the first aspect and the second aspect described above, but this application does not limit this.
  • the above-mentioned first network element core function network element, or border opening function network element, or publishing function network element, etc.
  • the first network element may generate the calling routing rule of the API according to the API information.
  • the first network element may determine the target open function network element according to the generated call routing rule and call parameter information.
  • the call routing rule may indicate the correspondence between the first service area and the first open function network element, and the correspondence between the second service area and the second open function network element.
  • the first network element is a border open function network element
  • the method further includes: the first network element sends a request message, the request message uses For requesting the calling routing rule of the API, the request message includes identification information of the API.
  • the aforementioned first network element is a border opening function network element
  • the border opening function network element may also send a request message to a core function network element or a publishing function network element for requesting the aforementioned API call routing rule. Since the call routing rule is for a specific API, the request message may also include the identification information of the requested API.
  • the border open function network element after receiving an API call request from an API calling entity, the border open function network element sends the above request message to the core function network element or the publishing function network element.
  • the request message requested calls the API corresponding to the routing rule. That is, the API requested by the API call request.
  • the border opening function network element only when the border opening function network element receives the API call request, the border opening function network element requests routing call rules from the core function network element, instead of the core function network element actively opening the function network to the border.
  • the meta sends the call routing rule, which prevents the border opening function network element from acquiring the call routing rule, but not using it, resulting in waste of push signaling and related information.
  • another method for invoking an application program interface including: a second network element obtains API information, and the API information includes information of a first open function network element that provides the API and a second open function network. Element information, information of the first service area and information of the second service area corresponding to the API, wherein the API provided by the first open function network element corresponds to the first service area, and the first service area 2.
  • the API provided by the open function network element corresponds to the second service area; the second network element sends the API information to the open border function network element, and the API information is used for the open border function network element pair
  • the target open function network element is determined, the target open function network element is determined from the first open function network element and the second open function network element.
  • the method further includes: the second network element generates a call routing rule of the API according to the API information, and the call routing rule is used to indicate Call the route of the API; the second network element sends the call routing rule to the open border function network element.
  • the method before the second network element sends the invoking routing rule to the open border function network element, the method further includes: the second network The element receives a request message from the border opening function network element, the request message is used to request the call routing rule, the request message includes the identification information of the API; the second network element opens the border function to the The network element sending the call routing rule includes: the second network element sends the call routing rule to the border opening function network element according to the request message.
  • a device configured to execute the foregoing aspects or the method in any possible implementation manner of each aspect.
  • the device includes a unit for executing each of the foregoing aspects or a method in any possible implementation manner of each aspect.
  • an apparatus which includes a transceiver, a memory, and a processor.
  • the transceiver, the memory, and the processor communicate with each other through an internal connection path
  • the memory is used to store instructions
  • the processor is used to execute the instructions stored in the memory to control the receiver to receive signals and control the transmitter to send signals
  • the execution causes the processor to execute the foregoing aspects or the methods in any possible implementation manners of the aspects.
  • a computer program product comprising: computer program code, which when the computer program code is run by a computing device, causes the computing device to execute the above aspects or any of the aspects.
  • a computer-readable medium for storing a computer program, and the computer program includes instructions for executing each of the above aspects or a method in any one of the possible implementation manners of each aspect.
  • a chip including: a processor, configured to call and run a computer program from a memory, so that a device installed with the chip executes the above aspects or any of the possible implementations of the aspects Methods.
  • Figure 1 shows a schematic diagram of the system architecture of an embodiment of the present application.
  • Fig. 2 shows a schematic diagram of another system architecture of an embodiment of the present application.
  • FIG. 3 shows a schematic flowchart of a method for invoking an application program interface according to an embodiment of the present application.
  • Fig. 4 shows a schematic flowchart of another method for invoking an application program interface according to an embodiment of the present application.
  • Fig. 5 shows a schematic flowchart of another method for invoking an application program interface according to an embodiment of the present application.
  • FIG. 6 shows a schematic flowchart of another method for invoking an application program interface according to an embodiment of the present application.
  • FIG. 7 shows a schematic flowchart of another method for invoking an application program interface according to an embodiment of the present application.
  • Fig. 8 shows a schematic block diagram of a device for invoking an application program interface according to an embodiment of the present application.
  • Fig. 9 shows a schematic block diagram of another apparatus for invoking an application program interface according to an embodiment of the present application.
  • Fig. 10 shows a schematic block diagram of another apparatus for invoking an application program interface according to an embodiment of the present application.
  • GSM global mobile communication
  • CDMA code division multiple access
  • WCDMA broadband code division multiple access
  • general packet radio service general packet radio service, GPRS
  • LTE long term evolution
  • LTE frequency division duplex FDD
  • TDD time division duplex
  • UMTS universal mobile communication system
  • WiMAX worldwide interoperability for microwave access
  • the terminal equipment in the embodiments of this application may refer to user equipment, access terminals, user units, user stations, mobile stations, mobile stations, remote stations, remote terminals, mobile equipment, user terminals, terminals, wireless communication equipment, user agents, or User device.
  • Terminal devices can also be cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (personal digital assistants, PDAs), and wireless communication Functional handheld devices, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in future 5G networks or public land mobile communication networks (PLMN) in the future evolution
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDAs personal digital assistants
  • wireless communication Functional handheld devices computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in future 5G networks or public land mobile communication networks (PLMN) in the future evolution
  • PLMN public land mobile communication networks
  • the network device in the embodiment of the application may be a device used to communicate with a terminal device.
  • the network device may be a global system for mobile communications (GSM) system or code division multiple access (CDMA)
  • GSM global system for mobile communications
  • CDMA code division multiple access
  • the base transceiver station (BTS) in the LTE system can also be the base station (NodeB, NB) in the wideband code division multiple access (WCDMA) system, or the evolved base station (evolved) in the LTE system.
  • NodeB, NB base station
  • WCDMA wideband code division multiple access
  • evolved evolved base station
  • NodeB eNB or eNodeB
  • it can also be a wireless controller in a cloud radio access network (CRAN) scenario
  • the network device can be a relay station, access point, vehicle-mounted device, wearable device, and future
  • the network equipment in the 5G network or the network equipment in the future evolved PLMN network, etc., are not limited in the embodiment of the present application.
  • the terminal device or the network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer includes central processing unit (CPU), memory management unit (memory management unit, MMU), and memory (also called main memory) and other hardware.
  • the operating system may be any one or more computer operating systems that implement business processing through processes, for example, Linux operating systems, Unix operating systems, Android operating systems, iOS operating systems, or windows operating systems.
  • the application layer includes browser, address book, word processing software, instant messaging software and other applications.
  • the embodiment of the present application does not specifically limit the specific structure of the execution body of the method provided in the embodiment of the present application, as long as it can run the program that records the code of the method provided by the embodiment of the present application to provide according to the embodiment of the present application
  • the method may be used for communication.
  • the execution body of the method provided in the embodiments of the present application may be a terminal device or a network device, or a functional module in the terminal device or network device that can call a program and execute the program.
  • the term "article of manufacture” as used in this application encompasses a computer program accessible from any computer-readable device, carrier, or medium.
  • the computer-readable medium may include, but is not limited to: magnetic storage devices (for example, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (for example, compact discs (CDs), digital universal discs (digital discs, digital discs, DVDs)) Etc.), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.).
  • various storage media described herein may represent one or more devices and/or other machine-readable media for storing information.
  • machine-readable medium may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
  • the service API or API refers to the API provided by the AEF entity, which can be discovered and called by the API calling entity.
  • APIs mainly include some specific service type APIs, which can be used for API calling entities to use resources and services provided by operators, such as quality of service (QoS) control APIs, broadcast APIs, and Internet of Things (Internet of Things). of things, IoT) type of API, etc.
  • QoS quality of service
  • broadcast APIs broadcast APIs
  • Internet of Things Internet of Things
  • IoT Internet of Things
  • Fig. 1 shows a schematic diagram of a system architecture 100 to which an embodiment of the present application is applied.
  • the system architecture 100 includes an API calling entity 110 and an open function network element 120.
  • the API calling entity 110 has the ability to call the API
  • the open function network element 120 provides the API, and at the same time serves as an entrance for the API calling entity to call the API.
  • the aforementioned system architecture 100 may further include at least one of a core function network element 130, a management function network element 140, and a publishing function network element 150.
  • the publishing function network element 150 provides a function of publishing an API, and publishes the API in the core function network element 130.
  • the core function network element 130 saves the API issued by the publishing function network element 150, so that the API calling entity 110 can find the API and call the API.
  • the management function network element 140 provides a management API function.
  • each network element in the foregoing system architecture 100 may be implemented by one device, or jointly implemented by multiple devices, or may be a functional module in one device, which is not specifically limited in the embodiment of the present application.
  • the above function may be a network element in a hardware device, or a software function running on dedicated hardware, or a virtualized function instantiated on a platform (for example, a cloud platform).
  • FIG. 2 is another system architecture 200 according to an embodiment of the present application. As shown in FIG. 2, the system architecture 200 may specifically include the following network elements:
  • API calling entity API Invoker
  • the API calling entity which can also be called the API caller, is generally a third-party application that has signed a service agreement with the operator, such as machine to machine (M2M) applications, Internet of things (IoT) applications , Internet of Vehicles (vehicle to everything, V2X) applications, etc., can also be operators’ own applications. These applications can be run in terminal devices or network devices.
  • M2M machine to machine
  • IoT Internet of things
  • V2X vehicle to everything
  • the API calling entity can also be a device in the PLMN network, for example, the mobile management entity (MME), radio access network (RAN), policy and charging rule functions in the LTE communication system (policy and charging rules function, PCRF), application network element (Application Function, AF), home subscriber server (home subscriber server, HSS), etc.
  • MME mobile management entity
  • RAN radio access network
  • policy and charging rule functions in the LTE communication system policy and charging rules function
  • PCRF policy and charging rules function
  • application network element Application Function
  • AF application Function
  • HSS home subscriber server
  • HSS home subscriber server
  • APIF authentication management function
  • SMF session management function
  • UPF user plane function
  • UDM user data management in 5G communication systems
  • Policy Control Function Policy Control Function
  • PCF policy control function
  • NRF network repository function
  • NEF network capability opening function
  • Application Function Application Function
  • the API calling entity may be in the same trust domain as the PLMN operator, or may not be in the same trust domain as the PLMN operator, which is not limited in the embodiment of this application.
  • CAPIF core function (CAPIF core function, CCF) network element
  • CCF mainly includes the following functions: (1) Authenticate the API calling entity based on the identity of the API calling entity and other information; (2) Support mutual authentication between the CCF and the API calling entity; (3) Before the API calling entity calls the API API call entities provide authorization; (4) Support API publishing, API storage and API discovery; (5) Responsible for API access control based on the PLMN operator’s strategy; (6) Store API call logs and provide them to authorized entities; (7) Billing based on API logs; (8) Monitoring API calls; (9) Registration of API call entities; (10) Storage configuration policies; (11) Support for auditing calls and logs.
  • the CCF can be deployed independently in a physical device, or can be deployed together with other entities, such as deployed in the service capability exposure function (SCEF).
  • SCEF service capability exposure function
  • CCF can be deployed independently in a physical device, or can be deployed together with other entities in an effort to deploy in NEF.
  • AEF provides API and is also the entry point for API calling entities to call API.
  • AEF mainly includes the following functions: (1) Authenticate the API calling entity based on the identity of the API calling entity and other information provided by the CCF; (2) Confirm the authorization provided by the CCF; (3) Synchronize the API log to the CCF.
  • AEF can be deployed in NEF, or AEF can also be APIMF, SMF, UDM, PCF, NRF, NEF, etc., AEF can also be deployed in SCEF, or AEF can also be MME, PCRF, etc., used for PLMN internal network capabilities open.
  • API publishing function network element API publishing function, APF
  • APF provides API publishing functions so that API calling entities can discover the API.
  • API management function network element API management function, APIMF.
  • APIMF provides API management, mainly including the following functions: (1) Perform audit of API call logs provided by CCF; (2) Monitor events reported by CCF; (3) Configure API provider policies to API; (4) Monitor The status of the API; (5) Register the API call entity.
  • the API calling entity 110 may specifically correspond to the API calling entity in FIG. 2
  • the open function network element 120 may specifically correspond to the AEF in FIG. 2
  • the core function network element 130 may specifically correspond to the API in FIG.
  • the management function network element 140 may specifically correspond to the APIMF in FIG. 2
  • the publishing function network element 150 may specifically correspond to the APF in FIG. 2.
  • the name of the interface between the various network elements in FIG. 2 is only an example, and the name of the interface in a specific implementation may be another name, which is not specifically limited in the embodiment of the present application.
  • the API calling entity is connected to the CCF network element through a CAPIF-1 or CAPIF-1e interface.
  • the API calling entity is connected to the AEF network element through the CAPIF-2 or CAPIF-2e interface.
  • the CCF network element and the AEF network element are connected through a CAPIF-3 interface.
  • the CCF network element and the APF network element are connected through a CAPIF-4 interface.
  • the CCF network element and the APIMF network element are connected through a CAPIF-5 interface.
  • AEF network elements can be connected through CAPIF-2 or CAPIF-2i interfaces (here "i" represents the meaning of internal), which is not shown in Figure 2.
  • the names of various network elements are only an example, and do not limit the functions of the network elements themselves.
  • the aforementioned network elements may also have other names, which are not specifically limited in the embodiment of the present application.
  • some or all of the above-mentioned various network elements may use the terminology in 5G, or may use other names, etc., which will be explained here in a unified manner and will not be repeated here.
  • the name of the message (or signaling) transmitted between the various network elements described above is only an example, and does not constitute any limitation on the function of the message itself.
  • Step 1 The APF sends an API release request message to the CCF.
  • the API release request message includes API information, which may specifically include the API name and the AEF information that provides the API (such as the AEF ID, version number, protocol and data used by the API) Format, interface description (IP address, port number, security method), API description information, features supported by API, etc.
  • Step 2 The CCF receives the API publishing request message from the APF, and checks whether the APF is authorized to publish the API. If the inspection passes, CCF saves the information of the above API received from APF.
  • Step 3 The CCF returns an API release response message to the APF.
  • the API release response message is used to indicate the API release is successful or the API release fails.
  • the CCF may also send notification messages to the subscribed API calling entity to notify the API calling entity that there is a new API or an API that the API calling entity is interested in.
  • Step 1 The API calling entity sends an API discovery request message to the CCF.
  • the API discovery request message includes the identity of the API calling entity and the discovery filter condition.
  • Step 2 The CCF receives the API discovery request message from the API calling entity, and authenticates the identity of the API calling entity according to the identity of the API calling entity. If the API calling entity passes the authentication, the CCF retrieves the information of the published API based on the above-mentioned discovery filter conditions and the policy information of the API calling entity.
  • Step 3 The CCF sends an API discovery response message to the API calling entity.
  • the API response message includes information about the API that the API calling entity is allowed to use. It should be understood that the information of the API may be information of one API or information of multiple APIs.
  • Step 1 The API calling entity sends an API calling request message to the AEF.
  • the API calling request message includes the identity of the API calling entity and the information of the API (for example, the identity of the API).
  • Step 2 The AEF receives the API call request message from the API call entity, and authenticates the identity of the API call entity according to the identity of the API call entity. If the API calling entity is authenticated, AEF executes the corresponding API logic.
  • Step 3 AEF sends an API call response message to the API call entity.
  • the logic of the above AEF for the above API call is: the AEF is the API call The entity provides the API. If the AEF is not the AEF that actually provides the API, then the logic of the AEF for the API call is: the AEF sends an API call request message to the AEF that actually provides the API. This is because when the CAPIF is deployed, the CCF can determine to use a topology hiding strategy for the API, that is, select an entry point AEF (generally referred to as boundary AEF) for the API to hide the topology. Then, when the API calling entity calls the API, the boundary AEF can determine the AEF that actually provides the API, and send an API call request to the AEF.
  • a topology hiding strategy for the API that is, select an entry point AEF (generally referred to as boundary AEF) for the API to hide the topology.
  • boundary AEF can determine the AEF that actually provides the API, and send an API call request to the AEF.
  • the APF sends an API publishing request message to the CCF, and the CCF stores the information of the API included in the API publishing request message, and decides to apply the topology hiding strategy to the API requested to be published by the APF.
  • CCF can choose an AEF as the boundary AEF of the API.
  • the CCF sends an API topology hiding notification message to the boundary AEF, and the API topology hiding notification message is used to forward the API call request that may exist later.
  • the API topology hiding notification message includes the information of the API and the information of the AEF that provides the API.
  • the border AEF receives the above-mentioned topology hiding notification message from the CCF and saves the information therein.
  • CCF sends API release response message to APF.
  • the topology hiding strategy may apply topology hiding to all API calling entities, or apply topology hiding to some API calling entities.
  • CCF will change the information of the AEF that actually provides the API to the information of the boundary AEF, and will correspondingly modify its interface information, and provide it to the API calling entity in the API discovery process.
  • the API call entity can only send API call requests to the boundary AEF.
  • the boundary AEF can determine the AEF that actually provides the API according to the identifier of the API, and directly send an API call request to the AEF that actually provides the API.
  • the boundary AEF can obtain information about multiple AEFs that provide the API after the API publishing process. It should be understood that an API or the same API involved in this application refers to an API with the same API name and /API function. If the CCF does not apply the topology hiding strategy to the above-mentioned API, then the API calling entity can obtain information about multiple AEFs that provide the API, and the API calling entity can decide which AEF to use and its interface information.
  • CCF applies the topology hiding strategy to the above API, then the API calling entity can only send API call requests to the boundary AEF, but the boundary AEF cannot determine which AEF of the multiple AEFs that provide the API should send the API call to The request caused the API call to fail.
  • the embodiment of the present application proposes a new method for calling API.
  • the routing information of the API and the calling parameter information of the API can determine the target AEF for calling the API, so that the boundary AEF forwards the API call request to the target AEF to implement the API call.
  • FIG. 3 shows a schematic flowchart of a method 300 for invoking an application program interface according to an embodiment of the present application.
  • the method 300 may be applied to the communication system 100 shown in FIG. 1 and may also be applied to the communication system 200 shown in FIG. 2, but the embodiment of the present application is not limited thereto.
  • the first network element obtains routing information of an API, where the routing information is used to indicate a route for calling the API, and the API is provided by the first open function network element and the second open function network element.
  • the API is provided by multiple open function network elements.
  • the multiple open function network elements include a first open function network element and a second open function network element.
  • the routing information of the API includes the information of the first open function network element and the information of the second open function network element that provide the API, and the information of the first service area and the second service corresponding to the API Area information, wherein the API provided by the first open function network element corresponds to the first service area, and the API provided by the second open function network element corresponds to the second service area.
  • the first network element obtains call parameter information (application user or application client) of the API, where the call parameter information is used to operate the API.
  • call parameter information application user or application client
  • the above-mentioned handle API can be understood as performing an operation (operation) on a resource (resource) corresponding to the API according to the detailed information of the API call request.
  • the following uses a protocol data unit (PDU) session service API as an example for description.
  • the operations allowed by the API include create, update, release, etc.
  • the API contains a resource, which is identified by a uniform resource locator, such as ⁇ cmcc.smfapi. com ⁇ / ⁇ PDU Session ⁇ / ⁇ v1 ⁇ .
  • the call parameter information can include the object corresponding to the resource, and can be used as the required input parameter of the API, such as the identification of the terminal equipment, which means that the terminal equipment identified above provides PDU session service.
  • An example of operating the API such as creating a PDU session for user 1, it can be understood that the AEF providing the API creates a new session for user 1 in the resource directory of the API, and the resource directory after the operation is updated, which can be ⁇ cmcc. smfapi.com ⁇ / ⁇ PDU Session ⁇ / ⁇ v1 ⁇ / ⁇ User1 ⁇ .
  • the invocation parameter information includes identification information of the terminal device and/or location information of the terminal device.
  • the first network element determines a target open function network element from the first open function network element and the second open function network element according to the routing information and the invocation parameter information.
  • the multiple open function network elements can be A target open function network element for invoking the API is determined in, so that the boundary open function network element forwards the API call request to the target open function network element, so that the API call is successful.
  • the first network element may be a core function network element, a publishing function network element, or an open function network element (that is, a boundary open function network element that can receive an API call request from an API call entity).
  • an open function network element that is, a boundary open function network element that can receive an API call request from an API call entity. The embodiment does not limit this.
  • the foregoing determination of the target open function network element from the first open function network element and the second open function network element means that the determined target open function network element is one of the first open function network element and the second open function network element .
  • the target open function network element is the first open function network element or the second open function network element.
  • one API is provided by multiple open function network elements, among the multiple open function network elements, APIs provided by different open function network elements may correspond to different service areas.
  • multiple open function network elements that provide APIs include a first open function network element and a second open function network element
  • multiple service areas corresponding to the API include a first service area and a second open function network element.
  • the API provided by the first open function network element corresponds to the first service area
  • the API provided by the second open function network element corresponds to the second service area.
  • the service area indicates the service scope of the API provided on the open function network.
  • the service area is represented by a domain name, such as cmcc.beijing.com, it means that the API can provide services for users (terminal devices or application clients) in the area.
  • the service area is represented by an IP address segment, such as 10.11.1.0 to 10.11.1.255, it means that the API can provide services for users (terminal devices or application clients) whose IP addresses are within the address range.
  • the service area is represented by an IP address prefix, it means that the API can provide services for users (terminal devices or application clients) with the IP address prefix.
  • the service area is represented by location area (area) information, it means that the API can provide services for users (terminal devices or application clients) whose current location is in the area.
  • the API provided by an open function network element can be understood as the open function network element handles the API.
  • the open function network element can specifically create, modify, delete, and delete resources corresponding to the API. Query and other operations.
  • the information of the open function network element that provides the API may be interface information of the API, and the interface information of the API has a uniform resource identifier that may include the IP address and/or port number information of the open function network element, and API resources Symbol (unified resource identifier, URI), etc.
  • the first network element can obtain the information of the open function network element that provides the API and the information of the service area of the corresponding API, and then combine the API call parameter information (for example, terminal equipment (subscribed user, application user, Application client) identification information and/or location information), from the first open function network element and the second open function network element, it can be determined that the target opening of the API can be truly provided in the area corresponding to the terminal device Functional network element.
  • the API call parameter information for example, terminal equipment (subscribed user, application user, Application client) identification information and/or location information
  • a terminal device is taken as an example for description.
  • the identification information of the terminal device may be the ID of the terminal device, such as a 3GPP subscriber ID or device ID, or the IP address of the terminal device; the location information of the terminal device may be The IP address of the terminal device, or the area information where the terminal device is located, or the current location information of the terminal device.
  • the aforementioned terminal device is the terminal device corresponding to the API, that is, the API calling entity calls the API to serve the terminal device, or in other words, the API is called by the API calling entity for the terminal device, or in other words, the terminal device It is the object of the operation called by the API. For example, the API calling entity calls the API to obtain information about the terminal device.
  • the first network element is a core function network element
  • acquiring the API call parameter information by the first network element includes: the first network element receives from the border opening function network element The calling parameter information of the API; the method further includes: the first network element sends the information of the target open function network element to the border open function network element.
  • the above-mentioned first network element is a core function network element
  • the core function network element may receive call parameter information of the API from the border opening function network element. Further, after the target open function network element is determined according to the routing information and call parameter information of the API, the core function network element may send the information of the target open function network element to the border open function network element, so that the target open function network The element sends the API call request from the API call entity to the target open function network element.
  • the above-mentioned border opening function network element may invoke a routing request message (service API invocation routing request), or obtain a topology hiding policy request message (obtain topology hiding policy request), or other messages sent by the border AEF to the CCF,
  • the above invocation parameter information is sent to the core function network element, and the embodiment of the application does not limit the specific message name.
  • the above-mentioned core function network element may call a routing response message (service API invocation routing response), or obtain a topology hiding policy response message (obtain topology hiding policy response), or an API topology hiding notification message (API topology hiding notify). ), or other messages sent by the CCF to the border AEF, which feed back the information of the target open function network element to the border open function network element.
  • the specific message name is not limited in the embodiment of this application.
  • the first network element is a core function network element
  • obtaining the routing information of the API by the first network element includes: the first network element receives the API information from the publishing function network element Routing information. That is, the core function network element can receive the routing information of the above API from the publishing function network element.
  • the first network element is a core function network element, and the first network element obtains routing information of the API, which may be determined by the first network element from locally pre-configured AEF information Routing information.
  • the foregoing first network element is a publishing function network element
  • the publishing function network element may locally obtain routing information of the API from the publishing function network element. This embodiment of the present application does not limit this.
  • the first network element is a core function network element
  • the method further includes: the first network element receives information and all information of the first open function network element from a publishing function network element.
  • the first network element acquiring routing information of the API includes: the first network element according to the first network element The information of an open function network element and the information of the second open function network element, as well as the information of the first service area and the information of the second service area, generate routing information of the API.
  • the above-mentioned first network element is a core function network element, and the first network element may be based on the received information of the first open function network element, the information of the second open function network element, the information of the first service area, and The information of the second service area (herein collectively referred to as API information) generates the routing information of the above API.
  • API information The information of the second service area
  • the routing information may indicate the correspondence between the first service area and the first open function network element, and the correspondence between the second service area and the second open function network element.
  • the routing information of the above API may also be referred to as the "API call routing rule" in the embodiment of this application, and this application does not limit its name. It should be understood that the call routing rule may be specifically embodied in the form of a table or formula, and this application does not limit its specific expression form.
  • the first network element is a border open function network element, and the first network element obtains routing information of the API, including: the first network element obtains the routing information from the core function network element or the release function network The meta receives routing information of the API.
  • the border opening function network element may receive the routing information of the API from the core function network element or the publishing function network element.
  • the publishing function network element may directly send the routing information of the API to the border opening function network element through the interface.
  • the publishing function network element can send the routing information of the API to the core function network element, and the core function network element will send the routing information of the API Sent to the border open function network element.
  • the first network element is a border open function network element
  • the method further includes: the first network element sending a request message, the request message being used to request routing information of the API ,
  • the request message includes identification information of the API.
  • the aforementioned first network element is a border opening function network element
  • the border opening function network element may also send a request message to a core function network element or a publishing function network element for requesting routing information of the aforementioned API. Since the routing information is for a specific API, the request message may also include identification information of the requested API. For example, after receiving an API call request from an API calling entity, a border opening function network element sends the above request message to a core function network element or a publishing function network element. The API corresponding to the routing information requested by the request message is the API call request API called.
  • the request message can be an API invocation routing request message (service API invocation routing request), or a topology hiding policy request message (obtain topology hiding policy request), or other messages sent by the border AEF to the CCF.
  • This embodiment does not Make a limit.
  • the open border function network element receives the API call request and requests routing information from the core function network element, which avoids that the core function network element actively sends to the border when the border open function network element does not need to use the routing information.
  • the open function network element sends the routing information, thereby saving signaling.
  • FIG. 4 shows a schematic flowchart of a method 400 for invoking an application program interface according to an embodiment of the present application.
  • the method 400 may be applied to the system architecture 100 shown in FIG. 1 and may also be applied to the application scenario 200 shown in FIG. 2, and the embodiment of the present application is not limited thereto.
  • the second network element obtains routing information of an API, where the routing information is used to indicate a route for calling the API, and the API is provided by the first open function network element and the second open function network element.
  • the API is provided by multiple open function network elements.
  • the multiple open function network elements include a first open function network element and a second open function network element.
  • the routing information includes information about the first open function network element and information about the second open function network element, and information about the first service area and information about the second service area corresponding to the API , wherein the API provided by the first open function network element corresponds to the first service area, and the API provided by the second open function network element corresponds to the second service area.
  • the second network element sends the routing information to the open border function network element, where the routing information is used by the open border function network element to determine a target open function network element, and the target open function network element Determined in the first open function network element and the second open function network element.
  • the border open function network element receives the routing information of the above API from the second network element, and according to the routing information and the calling parameter information, the target open function network element is determined from the first open function network element and the second open function network element .
  • the border opening function network element obtains call parameter information of the API, where the call parameter information is used to operate the API.
  • the above-mentioned handle API can be understood as performing an operation (operation) on a resource (resource) corresponding to the API according to the detailed information of the API call request.
  • the following uses a protocol data unit (PDU) session service API as an example for description.
  • the operations allowed by the API include create, update, release, etc.
  • the API contains a resource, which is identified by a uniform resource locator, such as ⁇ cmcc.smfapi. com ⁇ / ⁇ PDU Session ⁇ / ⁇ v1 ⁇ .
  • the call parameter information can include the object corresponding to the resource, and can be used as the required input parameter of the API, such as the identification of the terminal equipment, which means that the terminal equipment identified above provides PDU session service.
  • An example of operating the API such as creating a PDU session for user 1, it can be understood that the AEF providing the API creates a new session for user 1 in the resource directory of the API, and the resource directory after the operation is updated, which can be ⁇ cmcc. smfapi.com ⁇ / ⁇ PDU Session ⁇ / ⁇ v1 ⁇ / ⁇ User1 ⁇ .
  • the invocation parameter information includes identification information of a terminal device (or a subscriber, or an application user, or an application client) and/or the terminal device (or a subscriber, or an application user, or an application client) Location information.
  • the border open function network element determines a target open function network element from the first open function network element and the second open function network element according to the routing information and the invocation parameter information.
  • the route information of the API is sent to the open border function network element, so that the open border function network element can combine the API
  • the target AEF used to call the API is determined from the above-mentioned multiple open function network elements, so that the boundary AEF forwards the API call request to the target AEF to implement the API call.
  • the second network element may be a core function network element or a publishing function network element.
  • the foregoing determination of the target open function network element from the first open function network element and the second open function network element means that the determined target open function network element is one of the first open function network element and the second open function network element .
  • the target open function network element is the first open function network element or the second open function network element.
  • one API is provided by multiple open function network elements, and among the multiple open function network elements, APIs provided by different open function network elements correspond to different service areas.
  • multiple open function network elements that provide APIs include a first open function network element and a second open function network element
  • multiple service areas corresponding to the API include a first service area and a second open function network element.
  • the API provided by the first open function network element corresponds to the first service area
  • the API provided by the second open function network element corresponds to the second service area.
  • the service area indicates the service scope of the API provided on the open function network.
  • the service area is represented by a domain name, such as cmcc.beijing.com, it means that the API can provide services for users (terminal devices or application clients) in the area.
  • the service area is represented by an IP address segment, such as 10.11.1.0 to 10.11.1.255, it means that the API can provide services for users (terminal devices or application clients) whose IP addresses are within the address range.
  • the service area is represented by an IP address prefix, it means that the API can provide services for users (terminal devices or application clients) with the IP address prefix.
  • the service area is represented by location area (area) information, it means that the API can provide services for users (terminal devices or application clients) whose current location is in the area.
  • the API provided by an open function network element can be understood as the open function network element handles the API.
  • the open function network element can specifically create, modify, delete, and delete resources corresponding to the API. Query and other operations.
  • the information of the open function network element that provides the API may be interface information of the API, and the interface information of the API has a uniform resource identifier that may include the IP address and/or port number information of the open function network element, and API resources Symbol (unified resource identifier, URI), etc.
  • the second network element may obtain routing information of the API.
  • the routing information may include information of an open function network element that provides the API and information of the service area of the corresponding API.
  • the second network element sends the routing information of the API to the border opening function network element, and the border opening function network element combines the routing information of the API with the calling parameter information of the API (for example, terminal equipment (subscribed user, application)
  • the identification information and/or location information of the user and application client are determined from the first open border function network element and the second open border function network element to determine the target that can truly provide the API in the area corresponding to the terminal device Open function network element.
  • a specific method for determining the target open function network element by the boundary open function network element refer to method 300, which will not be repeated here.
  • a terminal device is taken as an example for description.
  • the identification information of the terminal device may be the ID of the terminal device or the IP address of the terminal device; the location information of the terminal device may be the IP address of the terminal device, or the The area information where the terminal device is located, or the current location information of the terminal device.
  • the aforementioned terminal device is the terminal device corresponding to the API, that is, the API calling entity calls the API for the terminal device service, or in other words, the API is called by the API calling entity for this terminal device, for example, the API calling entity calls The API obtains the information of the terminal device.
  • the second network element is a core function network element
  • the method further includes: the second network element receives information and all information of the first open function network element from a publishing function network element.
  • the second network element acquiring routing information of the API includes: the second network element according to the first open function The information of the network element and the information of the second open function network element, as well as the information of the first service area and the information of the second service area, generate routing information of the API.
  • the routing information may specifically indicate the correspondence between the first service area and the first open function network element, and between the second service area and the second open function network element The corresponding relationship.
  • the aforementioned second network element may be based on the received information of the first open function network element, the information of the second open function network element, the information of the first service area, and the information of the second service area.
  • Information (herein collectively referred to as API information) to generate routing information for the API.
  • the second network element may send the routing information of the API to the border opening function network element, so that the border opening function network element can determine the target opening function network element according to the routing information and calling parameter information of the API.
  • the method before the second network element sends the routing information to the open-boundary function network element, the method further includes: the second network element obtains information from the open-boundary function network element Receiving a request message, the request message being used to request the routing information, the request message including identification information of the API; the second network element sending the routing information to the border opening function network element includes: The second network element sends the routing information to the border opening function network element according to the request message.
  • the aforementioned open border function network element may also send a request message to a second network element (ie, a core function network element or a publishing function network element) for requesting routing information of the aforementioned API. Since the routing information is for a specific API, the request message may also include identification information of the requested API.
  • the border open function network element after receiving an API call request from an API calling entity, the border open function network element sends the above request message to the core function network element or the publishing function network element.
  • the routing information requested by the request message corresponds to the API that is The API requested for this API call request.
  • the request message can be an API invocation routing request message (service API invocation routing request), or a topology hiding policy request message (obtain topology hiding policy request), or other messages sent by the border AEF to the CCF.
  • This embodiment does not Make a limit.
  • the following takes the core function network element as the CCF, the publishing function network element as the APF, and the open function network element as the AEF as examples, and the embodiments of the present application are described in detail with reference to FIGS. 5 to 10.
  • FIG. 5 shows a schematic flowchart of a method 500 for invoking an application program interface according to an embodiment of the present application.
  • the method 500 may be applied to the system architecture 100 shown in FIG. 1 and may also be applied to the application scenario 200 shown in FIG. 2, and the embodiment of the present application is not limited thereto.
  • the API information is equivalent to the routing information of the aforementioned API.
  • APF and CCF execute the API release process.
  • APF sends an API release request to CCF, and the API release request includes API information.
  • the API information includes the API name and the AEF information that provides the API.
  • the AEF information includes the API interface information, such as IP address, port number, or uniform resource identifier (URI), etc.
  • the AEF information also It includes the service area (API serving area) information corresponding to the API.
  • the service area information can be information such as IP address segment, IP address prefix, geographic or administrative area, or domain name.
  • the CCF receives the API release request sent by the APF, and according to the received API information, determines the API application topology hiding strategy corresponding to the API information. It should be understood that the topology hiding strategy may be to apply topology hiding to all API calling entities, or to apply topology hiding to some API calling entities. CCF determines the boundary AEF.
  • the CCF determines the call routing rule of the API, which is the API to which the above topology hiding strategy is applied.
  • the CCF may generate call routing rules for the boundary AEF to determine the target AEF according to the API information. For example, the CCF may determine the call routing rule of the API according to the corresponding service area information (such as IP address segment, geographic or administrative area, or domain name) in the API information. Further, the call routing rule may indicate the mapping relationship between multiple service areas and multiple AEFs, or may directly indicate the mapping relationship between multiple IP address segments or domain names and multiple AEFs.
  • the CCF may generate call routing rules for the boundary AEF to determine the target AEF according to the API information. For example, the CCF may determine the call routing rule of the API according to the corresponding service area information (such as IP address segment, geographic or administrative area, or domain name) in the API information. Further, the call routing rule may indicate the mapping relationship between multiple service areas and multiple AEFs, or may directly indicate the mapping relationship between multiple IP address segments or domain names and multiple AEFs.
  • the CCF sends the API call routing rule to the border AEF; correspondingly, the border AEF receives the API call routing rule from the CCF.
  • the API calling entity sends an API calling request to the boundary AEF.
  • the API calling request may include information about the API (such as the address (URI) of the resource (URI) corresponding to the API, or identification information of the API)) and calling parameters. information.
  • the calling parameter information may specifically be terminal device IP, area information, location information, etc.
  • the terminal device IP represents the IP address of the terminal device, which can be IPv4 or IPv6;
  • the area information represents the area information of the API application, and the area information can be network area description information, such as cell identification and tracing area (TA) Identification, interest area identification, etc., can also be physical area description information.
  • the location information may indicate the location information of the API application, and specifically may be the location information of the terminal device.
  • the boundary AEF determines the target AEF according to the API call routing rules and call parameter information received from the CCF.
  • the multiple AEFs that provide the aforementioned API include a first AEF and a second AEF
  • the service area corresponding to the aforementioned API includes a first service area and a second service area.
  • the aforementioned invoking routing rule may indicate the correspondence between the first service area and the first AEF, and the correspondence between the second service area and the second AEF.
  • the above-mentioned calling parameter information may include identification information and/or location information of the terminal device (subscriber, application user, application client), thereby indicating the service area where the terminal device is located. For example, the calling parameter information indicates that the terminal device is located in the second service. area.
  • the boundary AEF can use the second service area indicated by the call parameter information in combination with the corresponding relationship indicated by the above call routing rules, from the first AEF and the second AEF corresponding to the second service area.
  • AEF is determined as the target AEF.
  • the boundary AEF sends an API call request to the target AEF, and the API call request includes information about the API (such as the address (URI) of the resource corresponding to the API or the identification information of the API).
  • the API call request includes information about the API (such as the address (URI) of the resource corresponding to the API or the identification information of the API).
  • the target AEF sends an API call response to the boundary AEF.
  • the boundary AEF sends the API call response to the API call entity.
  • the CCF after receiving the API release request from the APF, the CCF obtains the API information and applies the topology hiding strategy to the API, and then sends the API call routing rule to the border AEF, so that The boundary AEF determines the target AEF according to the call routing rules of the API, realizes the forwarding of the API call request, and realizes the completion of the API call.
  • the CCF pushes the call routing rule to the boundary AEF before the call, which can reduce the call delay caused by the boundary AEF acquiring the call routing rule in the API call process, which is beneficial to improve the calling efficiency of the API.
  • the CCF may determine the above invoking routing rules according to the locally pre-configured AEF information.
  • the service scope of the API provided by the AEF is the service area of the AEF.
  • FIG. 6 shows a schematic flowchart of another method 600 for invoking an application program interface according to an embodiment of the present application.
  • the method 600 may be applied to the system architecture 100 shown in FIG. 1 and may also be applied to the application scenario 200 shown in FIG. 2, and the embodiment of the present application is not limited thereto.
  • the API information is equivalent to the routing information of the aforementioned API.
  • APF and CCF execute the API release process.
  • APF sends an API release request to CCF, and the API release request includes API information.
  • the API information includes the API name and the AEF information that provides the API.
  • the AEF information includes the API interface information, such as IP address, port number, or uniform resource identifier (URI), etc.
  • the AEF information also It includes the service area (API serving area) information corresponding to the API.
  • the service area information can be information such as IP address segment, IP address prefix, geographic or administrative area, or domain name.
  • the CCF receives the API release request sent by the APF, and according to the received API information, determines the API application topology hiding strategy corresponding to the API information. It should be understood that the topology hiding strategy may be to apply topology hiding to all API calling entities, or to apply topology hiding to some API calling entities. CCF determines the boundary AEF.
  • the API calling entity sends an API calling request to the boundary AEF.
  • the API calling request includes information about the API (such as the address (URI) of the resource (URI) corresponding to the API, or identification information of the API)) and calling parameter information.
  • the calling parameter information may specifically be terminal device IP, area information, location information, etc.
  • the terminal device IP represents the IP address of the terminal device, which can be IPv4 or IPv6;
  • the area information represents the area information of the API application, and the area information can be network area description information, such as cell identification and tracing area (TA) Identification, interest area identification, etc., can also be physical area description information.
  • the location information may indicate the location information of the API application, and specifically may be the location information of the terminal device.
  • the boundary AEF receives the API call request from the API call entity, and sends the API call routing request to the CCF.
  • the CCF receives the API call routing request sent by the border AEF, and determines the call routing rule of the API.
  • the API is the API to which the above topology hiding strategy is applied.
  • the CCF may generate call routing rules for the boundary AEF to determine the target AEF according to the API information. For example, the CCF may determine the call routing rule of the API according to the corresponding IP address segment, service area, or domain name in the API information. Further, the call routing rule may indicate the mapping relationship between multiple service areas and multiple AEFs, or may directly indicate the mapping relationship between multiple IP address segments or domain names and multiple AEFs.
  • CCF may first generate and save the API call routing rules, and after receiving the API call routing request from the border AEF, Then send the API call routing rule to the boundary AEF, which is not limited in the embodiment of the application.
  • the CCF sends an API call routing response to the border AEF, and the API call routing response includes the aforementioned API call routing rules.
  • the boundary AEF determines the target AEF according to the call routing rule of the API received from the CCF and the call parameter information included in the API call request.
  • step S506 for determining the target AEF by the boundary AEF, reference may be made to the description of step S506 in FIG. 5, which will not be repeated here.
  • the boundary AEF sends an API call request to the target AEF, and the API call request includes information about the API (such as the address (URI) of the resource corresponding to the API, or the identification information of the API).
  • the API call request includes information about the API (such as the address (URI) of the resource corresponding to the API, or the identification information of the API).
  • the target AEF sends an API call response to the boundary AEF.
  • the boundary AEF sends the API call response to the API call entity.
  • the boundary AEF requests the API invocation routing rules from the CCF, thereby determining the target AEF according to the received API invocation routing rules and invocation parameter information, Realize the forwarding of the API call request, so that the API call is completed.
  • the border AEF receives the API call request and requests routing call rules from the CCF, which prevents the CCF from actively sending the call route to the border AEF when the border open function network element does not need to use the routing information. Rules, thereby saving signaling.
  • FIG. 7 shows a schematic flowchart of another method 700 for invoking an application program interface according to an embodiment of the present application.
  • the method 700 may be applied to the system architecture 100 shown in FIG. 1 and may also be applied to the application scenario 200 shown in FIG. 2, and the embodiment of the present application is not limited thereto.
  • the API information is equivalent to the routing information of the aforementioned API.
  • S701-S703 are the same as S601-S603, and will not be repeated in this embodiment.
  • the boundary AEF receives the API call request of the API call entity, and sends the API call routing request to the CCF.
  • the API call routing request includes the call parameter information obtained by the boundary AEF from the API call entity.
  • the calling parameter information may specifically be terminal device IP, area information, location information, etc.
  • the terminal device IP represents the IP address of the terminal device, which can be IPv4 or IPv6;
  • the area information represents the area information of the API application, and the area information can be network area description information, such as cell identification and tracing area (TA) Identification, interest area identification, etc., can also be physical area description information.
  • the location information may indicate the location information of the API application, and specifically may be the location information of the terminal device.
  • the CCF receives the API call routing request sent by the border AEF, and determines the target AEF according to the API information and the call parameter information.
  • the multiple AEFs that provide the aforementioned API include a first AEF and a second AEF
  • the service area corresponding to the aforementioned API includes a first service area and a second service area.
  • the aforementioned invoking routing rule may indicate the correspondence between the first service area and the first AEF, and the correspondence between the second service area and the second AEF.
  • the above-mentioned calling parameter information may include identification information and/or location information of the terminal device (subscriber, application user, application client), thereby indicating the service area where the terminal device is located. For example, the calling parameter information indicates that the terminal device is located in the second service. area.
  • the CCF can combine the corresponding relationship indicated by the above-mentioned invocation routing rule to extract the second AEF corresponding to the second service area from the first AEF and the second AEF. Determined as the target AEF.
  • the CCF sends an API call routing response to the border AEF.
  • the API call routing response includes the information of the target AEF, for example, the identifier of the target AEF.
  • S707-S709 are the same as S608-S610, and will not be repeated in this embodiment.
  • the boundary AEF requests the CCF for the target AEF, so as to realize the forwarding of the API invocation request and thus realize the completion of the API invocation. Further, in this embodiment of the present application, the CCF determines the target AEF, and the border AEF only forwards messages according to the instructions of the CCF, which can reduce the burden of the border AEF.
  • Fig. 8 shows an apparatus 800 for invoking an application program interface provided by an embodiment of the present application.
  • the device 800 includes: an acquiring unit 810 and a processing unit 820.
  • the apparatus 800 is configured to execute various processes and steps corresponding to the first network element in the above method 200.
  • the obtaining unit 810 is configured to obtain routing information of an API, where the routing information is used to indicate a route for invoking the API, and the API is provided by a first open function network element and a second open function network element; and Call parameter information of the API, where the call parameter information is used to operate the API;
  • the processing unit 820 is configured to determine a target open function network element from the first open function network element and the second open function network element according to the routing information and the calling parameter information.
  • the invocation parameter information includes identification information of the terminal device and/or location information of the terminal device; and/or, the routing information includes information of the first open function network element and the second The information of the open function network element and the information of the first service area and the information of the second service area corresponding to the API, wherein the API provided by the first open function network element corresponds to the first service area, The API provided by the second open function network element corresponds to the second service area.
  • the device is a core function network element, and the device further includes: a first receiving unit, configured to receive call parameter information of the API from a boundary opening function network element; The border opening function network element sends the information of the target opening function network element.
  • the device is a core function network element, and the device further includes: a second receiving unit configured to receive routing information of the API from the publishing function network element.
  • the device is a core function network element, and the device further includes: a third receiving unit configured to receive information of the first open function network element and the second open function network element from the publishing function network element Element information, and information of the first service area and information of the second service area corresponding to the API, wherein the API provided by the first open function network element corresponds to the first service area, and The API provided by the second open function network element corresponds to the second service area; the processing unit is further configured to: according to the information of the first open function network element and the information of the second open function network element And the information of the first service area and the information of the second service area to generate routing information of the API.
  • a third receiving unit configured to receive information of the first open function network element and the second open function network element from the publishing function network element Element information, and information of the first service area and information of the second service area corresponding to the API, wherein the API provided by the first open function network element corresponds to the first service area, and The API provided by the second open function network element corresponds to the second service area
  • the device is a border opening function network element, and the device further includes: a fourth receiving unit, configured to receive the routing information of the API from a core function network element or a publishing function network element by the first network element .
  • the device further includes: a second sending unit, configured to send a request message, the request message being used to request routing information of the API, and the request message including identification information of the API.
  • a second sending unit configured to send a request message, the request message being used to request routing information of the API, and the request message including identification information of the API.
  • the device 800 here is embodied in the form of a functional unit.
  • the term "unit” here may refer to an application-specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group) for executing one or more software or firmware programs Processor, etc.) and memory, merge logic, and/or other suitable components that support the described functions.
  • ASIC application specific integrated circuit
  • the apparatus 800 may be specifically the first network element in the above-mentioned embodiment, and the apparatus 800 may be used to execute the processes and procedures corresponding to the first network element in the above-mentioned method embodiment. / Or steps, in order to avoid repetition, I will not repeat them here.
  • FIG. 9 shows another apparatus 900 for invoking an application program interface provided by an embodiment of the present application.
  • the device 900 includes: an acquiring unit 910 and a sending unit 920.
  • the apparatus 900 is configured to execute various processes and steps corresponding to the second network element in the above method 300.
  • the obtaining unit 910 is configured to obtain routing information of an API, where the routing information is used to indicate a route for calling the API, and the API is provided by a first open function network element and a second open function network element;
  • the sending unit 920 is configured to send the routing information to the open border function network element, where the routing information is used for the open border function network element to determine the target open function network element, and the target open function network element is from Determined from the first open function network element and the second open function network element.
  • the routing information includes information about the first open function network element and information about the second open function network element, and information about the first service area and information about the second service area corresponding to the API , wherein the API provided by the first open function network element corresponds to the first service area, and the API provided by the second open function network element corresponds to the second service area.
  • the device is a core function network element, and the device further includes: a first receiving unit configured to receive information of the first open function network element and the second open function network element from the publishing function network element Element information, and information of the first service area and information of the second service area corresponding to the API, wherein the API provided by the first open function network element corresponds to the first service area, and The API provided by the second open function network element corresponds to the second service area; the device further includes: a processing unit, configured to calculate information about the first open function network element and the second open function network Meta information, as well as information of the first service area and information of the second service area, generate routing information of the API.
  • the device further includes: a second receiving unit, configured to receive a request message from the border opening function network element before sending the routing information to the border opening function network element, the request message being used When requesting the routing information, the request message includes the identification information of the API; the sending unit 920 is specifically configured to send the routing information to the border opening function network element according to the request message.
  • a second receiving unit configured to receive a request message from the border opening function network element before sending the routing information to the border opening function network element, the request message being used When requesting the routing information, the request message includes the identification information of the API
  • the sending unit 920 is specifically configured to send the routing information to the border opening function network element according to the request message.
  • the device 900 here is embodied in the form of a functional unit.
  • the term "unit” here may refer to an application-specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group) for executing one or more software or firmware programs Processor, etc.) and memory, merge logic, and/or other suitable components that support the described functions.
  • ASIC application specific integrated circuit
  • processor such as a shared processor, a proprietary processor or a group
  • memory merge logic, and/or other suitable components that support the described functions.
  • the apparatus 900 may be specifically the second network element in the above-mentioned embodiment, and the apparatus 900 may be used to execute the processes and procedures corresponding to the second network element in the above-mentioned method embodiment. / Or steps, in order to avoid repetition, I will not repeat them here.
  • the device 800 and the device 900 of each of the above solutions have the function of implementing the corresponding steps performed by the first network element or the second network element in the above method; the functions can be implemented by hardware or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions; for example, the sending unit may be replaced by a transmitter, the receiving unit may be replaced by a receiver, and other units, such as a determination unit, etc., may be replaced by processors, respectively executed The sending and receiving operations and related processing operations in each method embodiment.
  • the devices in FIG. 8 and FIG. 9 may also be a chip or a chip system, for example, a system on chip (system on chip, SoC).
  • the receiving unit and the sending unit may be the transceiver circuit of the chip, which is not limited herein.
  • FIG. 10 shows another apparatus 1000 for invoking an application program interface provided by an embodiment of the present application.
  • the device 1000 includes a processor 1010, a transceiver 1020, and a memory 1030.
  • the processor 1010, the transceiver 1020, and the memory 1030 communicate with each other through an internal connection path.
  • the memory 1030 is used to store instructions, and the processor 1010 is used to execute instructions stored in the memory 1030 to control the transceiver 1020 to send signals and / Or receive signal.
  • the apparatus 1000 is configured to execute various processes and steps corresponding to the first network element in the above method 200.
  • the processor 1010 is configured to: obtain routing information of an API, where the routing information is used to indicate a route for calling the API, and the API is provided by a first open function network element and a second open function network element; and obtain The calling parameter information of the API, the calling parameter information is used to operate the API; according to the routing information and the calling parameter information, from the first open function network element and the second open function network element To determine the target open function network element.
  • the apparatus 1000 is configured to execute each process and step corresponding to the second network element in the above method 300.
  • the processor 1010 is configured to: obtain routing information of an API, the routing information is used to indicate a route for invoking the API, and the API is provided by a first open function network element and a second open function network element;
  • the transceiver 1020 sends the routing information to the open border function network element, and the routing information is used by the open border function network element to determine the target open function network element, and the target open function network element is from the first The open function network element and the second open function network element are determined.
  • the apparatus 1000 may be specifically the first network element or the second network element in the foregoing embodiment, and may be used to execute the steps and/or steps corresponding to the first network element or the second network element in the foregoing method embodiment.
  • the memory 1030 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory.
  • the memory can also store device type information.
  • the processor 1010 may be used to execute instructions stored in the memory, and when the processor 1010 executes the instructions stored in the memory, the processor 1010 is used to execute the above-mentioned method corresponding to the first network element or the second network element Each step and/or process of the embodiment.
  • the processor of the above-mentioned device may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), or application specific integrated circuits. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • each step of the above method may be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software units in the processor.
  • the software unit may be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor executes the instructions in the memory and completes the steps of the above method in combination with its hardware. In order to avoid repetition, they are not described in detail here.
  • At least one refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the relationship of the related objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, B exists alone, where A B can be singular or plural.
  • the character “/” generally indicates that the related object is a “or” relationship.
  • “At least one of the following” or similar expressions refers to any combination of these items, including any combination of single items or plural items.
  • At least one (a) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c may be single or multiple.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual couplings or direct couplings or communication connections may be indirect couplings or communication connections through some interfaces, devices, or units, and may also be electrical, mechanical, or other forms of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology, or all or part of the technical solution can be embodied in the form of a software product
  • the computer software product is stored in a storage medium
  • several instructions are included to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请提供了一种调用应用程序接口API的方法和装置,能够确定出用于调用该API的目标开放功能网元。该方法包括:第一网元获取API的路由信息,该路由信息用于指示调用该API的路由,该API由第一开放功能网元和第二开放功能网元提供;第一网元获取该API的调用参数信息,该调用参数信息用于操作该API;该第一网元根据该路由信息和该调用参数信息,从第一开放功能网元和第二开放功能网元中确定目标开放功能网元。

Description

调用应用程序接口的方法和装置
本申请要求于2019年1月14日提交中国专利局、申请号为201910033239.1、申请名称为“调用应用程序接口的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别涉及通信领域中的调用应用程序接口(application programmers interface API,API)的方法和装置。
背景技术
在通用API框架(common API framework,CAPIF)中,一般包括API调用实体(API invoker)、CAPIF核心功能(CAPIF core function,CCF)网元、API开放功能(API exposing function,AEF)网元、API发布功能(API publishing function,APF)网元以及API管理功能(API management function,APIMF)网元。其中,API调用实体一般为与运营商签订了服务协议的第三方应用,具有调用API的能力。AEF提供API,同时也作为API调用实体调用API的入口。APF提供发布API的功能,将API发布在CCF中。CCF保存APF所发布的API,以便API调用实体可以发现API,从而调用API。APIMF提供管理API的功能。
在部署CAPIF时,CCF可以确定对API使用拓扑隐藏策略,即为该API选择一个拓扑隐藏的入口点AEF(一般称为边界AEF)。那么,在API调用实体调用该API时,该边界AEF可以确定真正提供该API的AEF,向该AEF发送API调用请求。对于一个API仅由一个AEF提供的场景,边界AEF可以根据API的标识确定真正提供该API的AEF,直接向真正提供该API的AEF发送API调用请求。而对于一个API可以由多个AEF提供的场景,当该API提供给API调用实体时CCF对其应用了拓扑隐藏策略,边界AEF无法确定出应该向提供该API的多个AEF中的具体哪一个AEF发送API调用请求,导致API调用失败。
发明内容
本申请提供一种调用应用程序接口的方法和装置,能够在一个API由多个开放功能网元提供的场景中,确定出用于调用该API的目标开放功能网元,从而成功调用API。
第一方面,提供了一种调用应用程序接口的方法,包括:第一网元获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;所述第一网元获取所述API的调用参数信息,所述调用参数信息用于操作所述API;所述第一网元根据所述路由信息和所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
本申请实施例的调用应用程序接口的方法,在一个API由多个开放功能网元提供的场景中,通过结合API的路由信息以及该API的调用参数信息,能够确定出用于调用该API的目标开放功能网元,从而由边界开放功能网元向该目标开放功能网元转发API调用请求,实现API调用成功。
在本实施例中,第一网元可以是核心功能网元、发布功能网元、或者开放功能网元(即为能够接收到API调用实体的API调用请求的边界开放功能网元)。
结合第一方面,在第一方面的某些实现方式中,所述调用参数信息包括终端设备的标识信息和/或所述终端设备的位置信息;和/或,所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
结合第一方面,在第一方面的某些实现方式中,所述第一网元为核心功能网元,所述第一网元获取所述API的调用参数信息,包括:所述第一网元从边界开放功能网元接收所述API的调用参数信息;所述方法还包括:所述第一网元向所述边界开放功能网元发送所述目标开放功能网元的信息。
具体地,上述第一网元为核心功能网元,该核心功能网元可以从边界开放功能网元接收该API的调用参数信息。进一步地,在根据API的路由信息和调用参数信息确定出目标开放功能网元之后,该核心功能网元可以向边界开放功能网元发送该目标开放功能网元的信息,以便该目标开放功能网元将来自API调用实体的API调用请求发送给该目标开放功能网元。
结合第一方面,在第一方面的某些实现方式中,所述第一网元为核心功能网元,所述第一网元获取API的路由信息,包括:所述第一网元从发布功能网元接收所述API的路由信息。
作为一个可选的实施例,所述第一网元为核心功能网元,所述第一网元获取API的路由信息,可以是该第一网元从本地预配置的AEF信息中确定上述API的路由信息。
结合第一方面,在第一方面的某些实现方式中,上述第一网元为发布功能网元,该发布功能网元可以从本地获取该API信息。
结合第一方面,在第一方面的某些实现方式中,所述第一网元为核心功能网元,所述方法还包括:所述第一网元从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述第一网元获取API的路由信息,包括:所述第一网元根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
具体地,上述第一网元为核心功能网元,该第一网元可以根据接收到的第一开放功能网元的信息、第二开放功能网元的信息、第一服务区域的信息、以及第二服务区域的信息,生成上述API的路由信息。可选地,该路由信息可以表示第一服务区域与第一开放功能网元之间的对应关系,以及第二服务区域与第二开放功能网元之间的对应关系。
结合第一方面,在第一方面的某些实现方式中,所述第一网元为边界开放功能网元, 所述第一网元获取API的路由信息,包括:所述第一网元从核心功能网元或发布功能网元接收所述API的路由信息。
具体地,上述第一网元为边界开放功能网元,那么该边界开放功能网元可以从核心功能网元或者发布功能网元接收上述API的路由信息。示例性地,若边界开放功能网元与发布功能网元之间有接口,那么该发布功能网元可以直接将API的路由信息通过该接口发送给边界开放功能网元。示例性地,若边界开放功能网元与发布功能网元之间没有接口,那么该发布功能网元可以将API的路由信息发送给核心功能网元,再由核心功能网元将API信息发送给边界开放功能网元。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:所述第一网元发送请求消息,所述请求消息用于请求所述API的路由信息,所述请求消息包括所述API的标识信息。
具体地,上述第一网元为边界开放功能网元,该边界开放功能网元还可以向核心功能网元或发布功能网元发送请求消息,用于请求上述API的路由信息。由于路由信息是针对特定API的,因此该请求消息中还可以包括所请求的API的标识信息。一般情况下,边界开放功能网元是在接收到来自API调用实体的API调用请求之后,向核心功能网元或发布功能网元发送上述请求消息,该请求消息所请求的路由信息对应的API即为该API调用请求所请求调用的API。
在本申请实施例中,只有在边界开放功能网元接收到API调用请求时,该边界开放功能网元才向核心功能网元请求路由信息,而不是核心功能网元主动向边界开放功能网元发送该路由信息,避免了边界开放功能网元获取了路由信息,但是并没有使用,导致推送信令和相关信息的浪费。
第二方面,提供了另一种调用应用程序接口的方法,包括:第二网元获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;所述第二网元向边界开放功能网元发送所述路由信息,所述路由信息用于所述边界开放功能网元对目标开放功能网元的确定,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
结合第二方面,在第二方面的某些实现方式中,所述路由信息包括提供所述API的第一开放功能网元的信息和第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
结合第二方面,在第二方面的某些实现方式中,所述第二网元为核心功能网元,所述方法还包括:所述第二网元从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述第二网元获取API的路由信息,包括:所述第二网元根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
结合第二方面,在第二方面的某些实现方式中,在所述第二网元向所述边界开放功能网元发送所述路由信息之前,所述方法还包括:所述第二网元从所述边界开放功能网元接 收请求消息,所述请求消息用于请求所述路由信息,所述请求消息包括所述API的标识信息;所述第二网元向所述边界开放功能网元发送所述路由信息,包括:所述第二网元根据所述请求消息,向所述边界开放功能网元发送所述路由信息。
第三方面,提供了一种调用应用程序接口的方法,包括:第一网元获取API信息,所述API信息包括提供所述API的第一开放功能网元的信息和第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述第一网元获取所述API的调用参数信息,所述调用参数信息包括终端设备的标识信息和/或所述终端设备的位置信息;所述第一网元根据所述API信息以及所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
本申请实施例的调用应用程序接口的方法,在一个API由多个开放功能网元提供的场景中,通过结合API对应的服务区域的信息、提供该API的多个开放功能网元以及该API的调用参数信息,能够确定出用于调用该API的目标开放功能网元,从而由边界开放功能网元向该目标开放功能网元转发API调用请求,实现API调用成功。
在本实施例中,第一网元可以是核心功能网元、发布功能网元、或者开放功能网元(即为能够接收到API调用实体的API调用请求的边界开放功能网元)。
结合第三方面,在第三方面的某些实现方式中,所述第一网元为核心功能网元,所述第一网元获取所述API的调用参数信息,包括:所述第一网元从边界开放功能网元接收所述API的调用参数信息;所述方法还包括:所述第一网元向所述边界开放功能网元发送所述目标开放功能网元的信息。
具体地,上述第一网元为核心功能网元,该核心功能网元可以从边界开放功能网元接收该API的调用参数信息。进一步地,在根据API信息和调用参数信息确定出目标开放功能网元之后,该核心功能网元可以向边界开放功能网元发送该目标开放功能网元的信息,以便该目标开放功能网元将来自API调用实体的API调用请求发送给该目标开放功能网元。
结合第三方面,在第三方面的某些实现方式中,所述第一网元为核心功能网元,所述第一网元获取API信息,包括:所述第一网元从发布功能网元接收所述API信息。
结合第三方面,在第三方面的某些实现方式中,上述第一网元为发布功能网元,该发布功能网元可以从本地获取该API信息。本申请实施例对此不作限定。
结合第三方面,在第三方面的某些实现方式中,所述第一网元为边界开放功能网元,所述第一网元获取API信息,包括:所述第一网元从核心功能网元或发布功能网元接收所述API信息。
具体地,上述第一网元为边界开放功能网元,那么该边界开放功能网元可以从核心功能网元或者发布功能网元接收上述API信息。示例性地,若边界开放功能网元与发布功能网元之间有接口,那么该发布功能网元可以直接将API信息通过该接口发送给边界开放功能网元。示例性地,若边界开放功能网元与发布功能网元之间没有接口,那么该发布功能网元可以将API信息发送给核心功能网元,再由核心功能网元将API信息发送给边界开放功能网元。
结合第三方面,在第三方面的某些实现方式中,所述方法还包括:所述第一网元根据所述API信息生成所述API的调用路由规则,所述调用路由规则用于指示调用所述API的路由;所述第一网元根据所述API信息以及所述调用参数信息,从所述至少两个开放功能网元中确定目标开放功能网元,包括:所述第一网元根据所述调用路由规则以及所调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
应理解,这里的调用路由规则可以包括在上述第一方面和第二方面中的路由信息中,但本申请对此不作限定。具体地,上述第一网元(核心功能网元、或者边界开放功能网元、或者发布功能网元等)可以根据API信息,生成该API的调用路由规则,在这种情况下,该第一网元可以根据生成的调用路由规则和调用参数信息,确定目标开放功能网元。可选地,该调用路由规则可以表示第一服务区域与第一开放功能网元之间的对应关系,以及第二服务区域与第二开放功能网元之间的对应关系。
结合第三方面,在第三方面的某些实现方式中,所述第一网元为边界开放功能网元,所述方法还包括:所述第一网元发送请求消息,所述请求消息用于请求所述API的调用路由规则,所述请求消息包括所述API的标识信息。
具体地,上述第一网元为边界开放功能网元,该边界开放功能网元还可以向核心功能网元或发布功能网元发送请求消息,用于请求上述API的调用路由规则。由于调用路由规则是针对特定API的,因此该请求消息中还可以包括所请求的API的标识信息。一般情况下,边界开放功能网元是在接收到来自API调用实体的API调用请求之后,向核心功能网元或发布功能网元发送上述请求消息,该请求消息所请求的调用路由规则对应的API即为该API调用请求所请求调用的API。
在本申请实施例中,只有在边界开放功能网元接收到API调用请求时,该边界开放功能网元才向核心功能网元请求路由调用规则,而不是核心功能网元主动向边界开放功能网元发送该调用路由规则,避免了边界开放功能网元获取了调用路由规则,但是并没有使用,导致推送信令和相关信息的浪费。
第四方面,提供了另一种调用应用程序接口的方法,包括:第二网元获取API信息,所述API信息包括提供所述API的第一开放功能网元的信息和第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述第二网元向边界开放功能网元发送所述API信息,所述API信息用于所述边界开放功能网元对目标开放功能网元的确定,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
结合第四方面,在第四方面的某些实现方式中,所述方法还包括:所述第二网元根据所述API信息生成所述API的调用路由规则,所述调用路由规则用于指示调用所述API的路由;所述第二网元向所述边界开放功能网元发送所述调用路由规则。
结合第四方面,在第四方面的某些实现方式中,在所述第二网元向所述边界开放功能网元发送所述调用路由规则之前,所述方法还包括:所述第二网元从所述边界开放功能网元接收请求消息,所述请求消息用于请求所述调用路由规则,所述请求消息包括所述API的标识信息;所述第二网元向所述边界开放功能网元发送所述调用路由规则,包括:所述第二网元根据所述请求消息,向所述边界开放功能网元发送所述调用路由规则。
第五方面,提供了一种装置,用于执行上述各个方面或各个方面任一种可能的实现方式中的方法。具体地,该装置包括用于执行上述各个方面或各个方面的任一种可能的实现方式中的方法的单元。
第六方面,提供了一种装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制接收器接收信号,并控制发送器发送信号,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行上述各个方面或各个方面的任一种可能的实现方式中的方法。
第七方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被计算设备运行时,使得所述计算设备执行上述各个方面或各个方面的任一种可能实现方式中的方法。
第八方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行上述各个方面或各个方面的任一种可能的实现方式中的方法的指令。
第九方面,提供了一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的装置执行上述各个方面或各个方面的任一种可能的实现方式中的方法。
附图说明
图1示出了本申请实施例的系统架构的示意图。
图2示出了本申请实施例的另一系统架构的示意图。
图3示出了本申请实施例的调用应用程序接口的方法的示意性流程图。
图4示出了本申请实施例的另一调用应用程序接口的方法的示意性流程图。
图5示出了本申请实施例的另一调用应用程序接口的方法的示意性流程图。
图6示出了本申请实施例的另一调用应用程序接口的方法的示意性流程图。
图7示出了本申请实施例的另一调用应用程序接口的方法的示意性流程图。
图8示出了本申请实施例的调用应用程序接口的装置的示意性框图。
图9示出了本申请实施例的另一调用应用程序接口的装置的示意性框图。
图10示出了本申请实施例的另一调用应用程序接口的装置的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请实施例的技术方案可以应用于各种通信系统,例如:全球移动通信(global system for mobile communications,GSM)系统、码分多址(code division multiple access,CDMA)系统、宽带码分多址(wideband code division multiple access,WCDMA)系统、通用分组无线业务(general packet radio service,GPRS)、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)、通用移动通信系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、未来的第五代(5th generation,5G)系统或新无线(new radio,NR)等。
本申请实施例中的终端设备可以指用户设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。终端设备还可以是蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,未来5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请实施例对此并不限定。
本申请实施例中的网络设备可以是用于与终端设备通信的设备,该网络设备可以是全球移动通信(global system for mobile communications,GSM)系统或码分多址(code division multiple access,CDMA)中的基站(base transceiver station,BTS),也可以是宽带码分多址(wideband code division multiple access,WCDMA)系统中的基站(NodeB,NB),还可以是LTE系统中的演进型基站(evolved NodeB,eNB或eNodeB),还可以是云无线接入网络(cloud radio access network,CRAN)场景下的无线控制器,或者该网络设备可以为中继站、接入点、车载设备、可穿戴设备以及未来5G网络中的网络设备或者未来演进的PLMN网络中的网络设备等,本申请实施例并不限定。
在本申请实施例中,终端设备或网络设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。并且,本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构特别限定,只要能够通过运行记录有本申请实施例的提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可,例如,本申请实施例提供的方法的执行主体可以是终端设备或网络设备,或者,是终端设备或网络设备中能够调用程序并执行程序的功能模块。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
在本申请实施例中,service API或API指的是由AEF实体提供的API,可以被API调用实体发现并调用。API主要包括一些特定服务类型的API,可以用于API调用实体使用运营商提供的资源及服务,例如,服务质量(quality of service,QoS)控制类的API、广播类型的API、物联网(internet of things,IoT)类型的API等。
图1示出了应用本申请实施例的系统架构100的示意图。如图1所示,该系统架构 100包括:API调用实体110、开放功能网元120。其中,API调用实体110具有调用API的能力,开放功能网元120提供API,同时也作为API调用实体调用API的入口。
可选地,上述系统架构100还可以包括核心功能网元130、管理功能网元140、发布功能网元150中的至少一个。示例性地,发布功能网元150提供发布API的功能,将API发布在核心功能网元130中。核心功能网元130保存发布功能网元150所发布的API,以便API调用实体110可以发现API,从而调用该API。管理功能网元140提供管理API的功能。
可选地,上述系统架构100中的各个网元可以由一个设备实现,也可以由多个设备共同实现,还可以是一个设备内的一个功能模块,本申请实施例对此不作具体限定。可以理解的是,上述功能既可以是硬件设备中的网络元件,也可以是在专用硬件上运行的软件功能,或者是平台(例如,云平台)上实例化的虚拟化功能。
图2是本申请实施例的另一系统架构200。如图2所示,该系统架构200具体可以包括下列网元:
1、API调用实体(API invoker)
API调用实体,也可以称为API调用者,一般为与运营商签订了服务协议的第三方应用,例如,机器对机器(machine to machine,M2M)应用、物联网(internet of things,IoT)应用、车联网(vehicle to everything,V2X)应用等,还可以以是运营商自己的应用。这些应用既可以运行在终端设备中,也可以运行在网络设备中。
此外,API调用实体也可以是PLMN网络中的设备,例如,LTE通信系统中的移动管理实体(mobile management entity,MME)、无线接入网(radio access network,RAN)、策略和计费规则功能(policy and charging rules function,PCRF)、应用网元(Application Function,AF)、归属签约用户服务器(home subscriber server,HSS)等。又例如,5G通信系统中的认证管理功能(authentication management function,APIMF)网元、会话管理功能(session management function,SMF)网元、用户平面功能(user plane function,UPF)网元、用户数据管理(unified data management,UDM)、策略控制功能(Policy Control Function,PCF)网元、网元仓库功能(network repository function,NRF)、网络能力开放功能(network exposure function,NEF)、应用网元(Application Function,AF)等。API调用实体可以和PLMN运营商处于同一个信任域,也可以和PLMN运营商不处于同一个信任域,本申请实施例对此不作限定。
2、CAPIF核心功能(CAPIF core function,CCF)网元
CCF主要包含以下功能:(1)基于API调用实体的标识和其他信息认证API调用实体;(2)支持CCF和API调用实体之间的相互鉴权;(3)在API调用实体调用API之前向API调用实体提供授权;(4)支持API发布、API存储和API的发现;(5)基于PLMN运营商的策略负责API的访问控制;(6)存储API调用的日志,并提供给授权实体;(7)基于API日志进行计费;(8)监测API的调用;(9)API调用实体的注册;(10)存储配置策略;(11)支持对调用和日志的审计。
在LTE通信系统中,CCF可以独立部署在一个物理设备中,也可以其他实体一起部署,例如部署在服务能力开放功能(service capability exposure function,SCEF)中。在5G通信系统中,CCF可以独立部署在一个物理设备中,也可以其他实体一起部署,力图部署 在NEF中。
3、API开放功能(API exposing function,AEF)网元
AEF提供API,同时也是API调用实体调用API的入口。AEF主要包含以下功能:(1)基于API调用实体的标识和CCF提供的其他信息认证API调用实体;(2)确认CCF提供的授权;(3)将API日志同步到CCF上。
AEF可以部署在NEF中,或者,AEF也可以是APIMF、SMF、UDM、PCF、NRF、NEF等,AEF还可以部署在SCEF中,或者AEF也可以是MME、PCRF等,用于PLMN内部网络能力开放。
4、API发布功能网元(API publishing function,APF)
APF提供API发布的功能,以便API调用实体可以发现API。
5、API管理功能网元(API management function,APIMF)。
APIMF提供对API的管理,主要包括以下功能:(1)执行CCF提供的API调用日志的审计;(2)监控CCF报告的事件;(3)向API配置API提供者的策略;(4)监测API的状态;(5)注册API调用实体。
应理解,在上述系统架构100中,API调用实体110具体可以对应图2中的API调用实体,开放功能网元120具体可以对应图2中的AEF,核心功能网元130具体可以对应图2中的CCF,管理功能网元140具体可以对应图2中的APIMF,发布功能网元150具体可以对应图2中的APF。
应理解,上述应用于本申请实施例的应用场景200仅是举例说明的从服务化架构的角度描述的网络架构,适用本申请实施例的网络架构并不局限于此,任何能够实现上述各个网元的功能的网络架构都适用于本申请实施例。
需要说明的是,图2中的各个网元之间的接口名称只是一个示例,具体实现中接口的名称可能为其他的名称,本申请实施例对此不作具体限定。例如,API调用实体与CCF网元之间通过CAPIF-1或CAPIF-1e接口相连。API调用实体与AEF网元之间通过CAPIF-2或CAPIF-2e接口相连。CCF网元与AEF网元之间通过CAPIF-3接口相连。CCF网元与APF网元之间通过CAPIF-4接口相连。CCF网元与APIMF网元之间通过CAPIF-5接口相连。其中,AEF网元之间可以通过CAPIF-2或CAPIF-2i接口相连(此处的“i”代表内部internal的含义),图2中未示出。
需要说明的是,图2中包括的各个网元(比如CCF、APF、AEF等)的名称也仅是一个示例,对网元本身的功能不构成限定。在5G网络以及未来其它的网络中,上述各个网元也可以是其他的名称,本申请实施例对此不作具体限定。例如,在6G网络中,上述各个网元中的部分或全部可以沿用5G中的术语,也可能采用其他名称,等等,在此进行统一说明,以下不再赘述。此外,应理解,上述各个网元之间的所传输的消息(或信令)的名称也仅仅是一个示例,对消息本身的功能不构成任何限定。
下面先结合上述系统架构200介绍一下与调用API相关的三个流程。
1、API发布流程
步骤一、APF向CCF发送API发布请求消息,该API发布请求消息中包括API的信息,具体可以包括API名称、提供该API的AEF信息(例如AEF标识、版本号、API所使用的协议、数据格式、接口描述(IP地址、端口号、安全方法)、API描述信息、API 所支持的特性等。
步骤二、CCF从APF接收API发布请求消息,检查APF是否被授权发布API。若检查通过,CCF保存从APF接收到的上述API的信息。
步骤三、CCF向APF返回API发布响应消息,该API发布响应消息用于指示API发布成功或者API发布失败。此外,CCF还可以向订阅的API调用实体发送通知消息,通知该API调用实体有新的API或者有该API调用实体感兴趣的API。
2、API发现流程
在API调用实体已经登录并有了API调用实体的标识,且CCF已经配置了该API调用实体的发现策略的情况下,可以执行下列步骤:
步骤一、API调用实体向CCF发送API发现请求消息,该API发现请求消息中包括了该API调用实体的标识以及发现过滤条件。
步骤二、CCF从API调用实体接收API发现请求消息,并根据该API调用实体的标识认证该API调用实体的身份。若该API调用实体通过认证,则CCF根据上述发现过滤条件以及该API调用实体的策略信息,检索已经发布的API的信息。
步骤三、CCF向API调用实体发送API发现响应消息,该API响应消息中包括允许该API调用实体使用的API的信息。应理解,该API的信息可以是一个API的信息,或者,多个API的信息。
3、API调用流程
步骤一、API调用实体向AEF发送API调用请求消息,该API调用请求消息中包括API调用实体的标识和API的信息(例如API的标识)。
步骤二、AEF从API调用实体接收API调用请求消息,并根据该API调用实体的标识认证该API调用实体的身份。若该API调用实体通过认证,则AEF执行相应的API逻辑。
步骤三、AEF向API调用实体发送API调用响应消息。
应理解,若上述AEF即为真正提供上述API的AEF(可以理解为操作(handle)上述API的目的(destination)AEF),那么上述AEF对于上述API调用的逻辑即为:该AEF为该API调用实体提供该API。若上述AEF不是真正提供上述API的AEF,那么上述AEF对于上述API调用的逻辑即为:该AEF将API调用请求消息发送给真正提供上述API的AEF。这是由于在部署CAPIF时,CCF可以确定对API使用拓扑隐藏策略,即为该API选择一个拓扑隐藏的入口点AEF(一般称为边界AEF)。那么,在API调用实体调用该API时,该边界AEF可以确定真正提供该API的AEF,向该AEF发送API调用请求。
具体地,在上述API发布流程中,APF向CCF发送API发布请求消息,CCF存储该API发布请求消息中包括的API的信息,并决定对该APF所请求发布的API应用拓扑隐藏策略。在这种情况下,CCF可以选择一个AEF作为该API的边界AEF。CCF向该边界AEF发送API拓扑隐藏通知消息,该API拓扑隐藏通知消息用于稍后可能存在的API调用请求的转发。API拓扑隐藏通知消息包括API的信息以及提供该API的AEF的信息。边界AEF从CCF接收上述拓扑隐藏通知消息,并保存其中的信息。CCF向APF发送API发布响应消息。应理解,该拓扑隐藏策略可以是对所有API调用实体均应用拓扑隐藏,也 可以对部分API调用实体应用拓扑隐藏。
由于应用了拓扑隐藏策略,CCF要将真正提供该API的AEF的信息改变为边界AEF的信息,并且,将对应修改其接口信息,在API发现流程中提供给API调用实体。此时,API调用实体得到的是边界AEF及其接口信息。该API调用实体只能向该边界AEF发送API调用请求。对于一个API仅由一个AEF提供的场景,边界AEF可以根据API的标识确定真正提供该API的AEF,直接向真正提供该API的AEF发送API调用请求。
而对于一个API可以由多个AEF提供(即多个AEF可以提供相同的API)的场景,边界AEF在API发布流程之后可以得到提供该API的多个AEF的信息。应理解,本申请所涉及的一个API或相同API是指API名称和/API功能相同的API。如果CCF对上述API不应用拓扑隐藏策略,那么API调用实体就可以获得提供该API的多个AEF的信息,那么该API调用实体自己可以决定要使用哪一个AEF及其接口信息。如果CCF对上述API应用了拓扑隐藏策略,那么API调用实体只能向该边界AEF发送API调用请求,但是边界AEF无法确定出应该向提供该API的多个AEF中的具体哪一个AEF发送API调用请求,导致API调用失败。
有鉴于此,本申请实施例提出了一种新的调用API的方法,在一个API由多个开放功能网元提供的场景中,通过结合API的路由信息以及该API的调用参数信息(例如,终端设备的标识和/或位置),能够确定出用于调用该API的目标AEF,从而由边界AEF向该目标AEF转发API调用请求,实现API调用。
图3示出了本申请实施例的调用应用程序接口的方法300的示意性流程图。该方法300可以应用于图1所示的通信系统100,也可以应用于图2所示的通信系统200,但本申请实施例不限于此。
S310,第一网元获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供。
例如,所述API由多个开放功能网元提供。其中,多个开放功能网元包括第一开放功能网元和第二开放功能网元。
可选地,所述API的路由信息包括提供所述API的第一开放功能网元的信息和第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
S320,所述第一网元获取所述API的调用参数信息(应用用户或应用客户端),所述调用参数信息用于操作所述API。
上述操作(handle)API可以理解为根据API调用请求的详细信息对API对应的资源(resource)执行操作(operation)。下面以协议数据单元(protocol data unit,PDU)会话服务API为例进行说明。该API允许执行的操作(operation)包括创建(create)、更新(update)、释放(release)等,该API包含一个资源(resource),由统一资源定位符标识,例如可以为{cmcc.smfapi.com}/{PDU Session}/{v1}。调用参数信息可以包含该资源对应的对象,可以作为该API的所需的输入参数,如终端装备的标识,表示为上述标识的终端设备提供PDU会话服务。操作所述API的示例,例如为用户1创建PDU会话,则可以理解提供该API的AEF在该API的资源目录下为用户1新建一个会话,操作之后的resource 目录被更新,可以为{cmcc.smfapi.com}/{PDU Session}/{v1}/{用户1}。
可选地,所述调用参数信息包括终端设备的标识信息和/或所述终端设备的位置信息。
S330,所述第一网元根据所述路由信息以及所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
本申请实施例的调用应用程序接口的方法,在一个API由多个开放功能网元提供的场景中,通过结合API的路由信息以及该API的调用参数信息,能够从该多个开放功能网元中确定出用于调用该API的一个目标开放功能网元,从而由边界开放功能网元向该目标开放功能网元转发API调用请求,实现API调用成功。
在本实施例中,第一网元可以是核心功能网元、发布功能网元、或者开放功能网元(即为能够接收到API调用实体的API调用请求的边界开放功能网元),本申请实施例对此不作限定。
上述从第一开放功能网元和第二开放功能网元中确定目标开放功能网元,是指所确定的目标开放功能网元为第一开放功能网元和第二开放功能网元中的一个。换句话说,该目标开放功能网元为第一开放功能网元或第二开放功能网元。
具体而言,一个API由多个开放功能网元提供,在该多个开放功能网元中,不同的开放功能网元提供的API可以对应不同的服务区域。换句话说,该API对应的多个服务区域与该多个开放功能网元之间存在对应关系。为便于理解和描述,本实施例以提供API的多个开放功能网元包括第一开放功能网元和第二开放功能网元,该API对应的多个服务区域包括第一服务区域和第二服务区域为例进行说明。可以理解的是,本申请所提及的API均指同一个API,后续不再赘述。其中,第一开放功能网元提供的API对应第一服务区域,第二开放功能网元提供的API对应第二服务区域。
其中,服务区域表示该开放功能网上提供的该API的服务范围。示例性地,若服务区域使用域名表示,如cmcc.beijing.com,则表示该API可以为该区域范围内的用户(终端设备或应用客户端)提供服务。示例性地,若服务区域使用IP地址段表示,如10.11.1.0~10.11.1.255,则表示API可以为IP地址在该地址范围内的用户(终端设备或应用客户端)提供服务。示例性地,若服务区域使用IP地址前缀表示,则表示API可以为具有该IP地址前缀的用户(终端设备或应用客户端)提供服务。示例性地,若服务区域使用位置区域(area)信息表示,则表示API可以为当前位置在该区域内的用户(终端设备或应用客户端)提供服务。
此外,开放功能网元提供该API可以理解为该开放功能网元操作(handle)该API,例如,该开放功能网元具体可以对对该API对应的资源(resource)进行创建、修改、删除、查询等操作。提供该API的开放功能网元的信息可以为该API的接口(interface)信息,该API的接口信息具有可以包含该开放功能网元的IP地址和/或端口号信息、API资源的统一资源标识符(unified resource identifier,URI)等。
那么,第一网元可以获取到提供该API的开放功能网元的信息及其对应的API的服务区域的信息,再结合该API的调用参数信息(例如,终端设备(签约用户、应用用户、应用客户端)的标识信息和/或位置信息),即可从第一开放功能网元和第二开放功能网元中,确定出在该终端设备对应的区域中能够真正提供该API的目标开放功能网元。
示例性地,以终端设备为例进行说明,该终端设备的标识信息可以是终端设备的ID, 如3GPP签约用户标识或设备标识,或者该终端设备的IP地址;该终端设备的位置信息可以是该终端设备的IP地址,或者该终端设备所在的区域(area)信息,或者该终端设备的当前位置信息。应理解,上述终端设备为该API对应的终端设备,即API调用实体调用该API就是为了该终端设备服务,或者说,该API是API调用实体为了这个终端设备调用的,或者说,该终端设备是该API调用的操作的对象,例如,API调用实体调用该API获取该终端设备的信息。
作为一个可选的实施例,所述第一网元为核心功能网元,所述第一网元获取所述API的调用参数信息,包括:所述第一网元从边界开放功能网元接收所述API的调用参数信息;所述方法还包括:所述第一网元向所述边界开放功能网元发送所述目标开放功能网元的信息。
具体地,上述第一网元为核心功能网元,该核心功能网元可以从边界开放功能网元接收该API的调用参数信息。进一步地,在根据API的路由信息和调用参数信息确定出目标开放功能网元之后,该核心功能网元可以向边界开放功能网元发送该目标开放功能网元的信息,以便该目标开放功能网元将来自API调用实体的API调用请求发送给该目标开放功能网元。
示例性地,上述边界开放功能网元可以通过API调用路由请求消息(service API invocation routing request),或获取拓扑隐藏策略请求消息(obtain topology hiding policy request),或其他边界AEF向CCF发送的消息,将上述调用参数信息发送给核心功能网元,本申请实施例对具体消息名称不做限定。示例性地,上述核心功能网元可以通过API调用路由响应消息(service API invocation routing response)、或获取拓扑隐藏策略响应消息(obtain topology hiding policy response)、或API拓扑隐藏通知消息(API topology hiding notify)、或其他CCF向边界AEF发送的消息,将上述目标开放功能网元的信息反馈给边界开放功能网元,本申请实施例对具体消息名称不做限定。
作为一个可选的实施例,所述第一网元为核心功能网元,所述第一网元获取API的路由信息,包括:所述第一网元从发布功能网元接收所述API的路由信息。即核心功能网元可以从发布功能网元接收上述API的路由信息。
作为一个可选的实施例,所述第一网元为核心功能网元,所述第一网元获取API的路由信息,可以是该第一网元从本地预配置的AEF信息中确定上述API的路由信息。
作为另一个可选的实施例,上述第一网元为发布功能网元,该发布功能网元可以从发布功能网元本地获取该API的路由信息。本申请实施例对此不作限定。
作为一个可选的实施例,所述第一网元为核心功能网元,所述方法还包括:所述第一网元从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述第一网元获取API的路由信息,包括:所述第一网元根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
具体地,上述第一网元为核心功能网元,该第一网元可以根据接收到的第一开放功能网元的信息、第二开放功能网元的信息、第一服务区域的信息、以及第二服务区域的信息 (本文统称为API信息),生成上述API的路由信息。
可选地,该路由信息可以表示第一服务区域与第一开放功能网元之间的对应关系,以及第二服务区域与第二开放功能网元之间的对应关系。
上述API的路由信息在本申请实施例中还可以被称为“API的调用路由规则”,本申请对其名称不作限定。应理解,该调用路由规则具体可以通过表格或公式等形式体现,本申请对其具体表现形式不作限定。
作为一个可选的实施例,所述第一网元为边界开放功能网元,所述第一网元获取API的路由信息,包括:所述第一网元从核心功能网元或发布功能网元接收所述API的路由信息。
具体地,上述第一网元为边界开放功能网元,那么该边界开放功能网元可以从核心功能网元或者发布功能网元接收上述API的路由信息。示例性地,若边界开放功能网元与发布功能网元之间有接口,那么该发布功能网元可以直接将API的路由信息通过该接口发送给边界开放功能网元。示例性地,若边界开放功能网元与发布功能网元之间没有接口,那么该发布功能网元可以将API的路由信息发送给核心功能网元,再由核心功能网元将API的路由信息发送给边界开放功能网元。
作为一个可选的实施例,所述第一网元为边界开放功能网元,所述方法还包括:所述第一网元发送请求消息,所述请求消息用于请求所述API的路由信息,所述请求消息包括所述API的标识信息。
具体地,上述第一网元为边界开放功能网元,该边界开放功能网元还可以向核心功能网元或发布功能网元发送请求消息,用于请求上述API的路由信息。由于路由信息是针对特定API的,因此该请求消息中还可以包括所请求的API的标识信息。例如,边界开放功能网元是在接收到来自API调用实体的API调用请求之后,向核心功能网元或发布功能网元发送上述请求消息,该请求消息所请求的路由信息对应的API即为该API调用请求所请求调用的API。其中,该请求消息可以是API调用路由请求消息(service API invocation routing request),或获取拓扑隐藏策略请求消息(obtain topology hiding policy request),或其他边界AEF向CCF发送的消息,本申请实施例不做限定。
在本申请实施例中,边界开放功能网元接收到API调用请求,并向核心功能网元请求路由信息,避免了在边界开放功能网元不需要使用该路由信息时核心功能网元主动向边界开放功能网元发送该路由信息,从而节省了信令。
图4示出了本申请实施例的调用应用程序接口的方法400的示意性流程图。该方法400可以应用于图1所示的系统架构100,也可以应用于图2所示的应用场景200,本申请实施例不限于此。
S410,第二网元获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供。
例如,所述API由多个开放功能网元提供。其中,多个开放功能网元包括第一开放功能网元和第二开放功能网元。
可选地,所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述 API对应所述第二服务区域。
S420,所述第二网元向边界开放功能网元发送所述路由信息,所述路由信息用于所述边界开放功能网元确定目标开放功能网元,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
对应地,边界开放功能网元从第二网元接收上述API的路由信息,根据该路由信息以及调用参数信息,从第一开放功能网元和第二开放功能网元中确定目标开放功能网元。
S430,边界开放功能网元获取所述API的调用参数信息,所述调用参数信息用于操作所述API。
上述操作(handle)API可以理解为根据API调用请求的详细信息对API对应的资源(resource)执行操作(operation)。下面以协议数据单元(protocol data unit,PDU)会话服务API为例进行说明。该API允许执行的操作(operation)包括创建(create)、更新(update)、释放(release)等,该API包含一个资源(resource),由统一资源定位符标识,例如可以为{cmcc.smfapi.com}/{PDU Session}/{v1}。调用参数信息可以包含该资源对应的对象,可以作为该API的所需的输入参数,如终端装备的标识,表示为上述标识的终端设备提供PDU会话服务。操作所述API的示例,例如为用户1创建PDU会话,则可以理解提供该API的AEF在该API的资源目录下为用户1新建一个会话,操作之后的resource目录被更新,可以为{cmcc.smfapi.com}/{PDU Session}/{v1}/{用户1}。
可选地,所述调用参数信息包括终端设备(或签约用户、或应用用户、或应用客户端)的标识信息和/或所述终端设备(或签约用户、或应用用户、或应用客户端)的位置信息。
S440,所述边界开放功能网元根据所述路由信息以及所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
本申请实施例的调用应用程序接口的方法,在一个API由多个开放功能网元提供的场景中,通过向边界开放功能网元发送API的路由信息,使得边界开放功能网元可以结合该API的调用参数信息,从上述多个开放功能网元中确定出用于调用该API的目标AEF,从而由边界AEF向该目标AEF转发API调用请求,实现API调用。
在本实施例中,第二网元可以是核心功能网元、或者发布功能网元。
上述从第一开放功能网元和第二开放功能网元中确定目标开放功能网元,是指所确定的目标开放功能网元为第一开放功能网元和第二开放功能网元中的一个。换句话说,该目标开放功能网元为第一开放功能网元或第二开放功能网元。
具体而言,一个API由多个开放功能网元提供,在该多个开放功能网元中,不同的开放功能网元提供的API对应不同的服务区域。换句话说,该API对应的多个服务区域与该多个开放功能网元之间存在对应关系。为便于理解和描述,本实施例以提供API的多个开放功能网元包括第一开放功能网元和第二开放功能网元,该API对应的多个服务区域包括第一服务区域和第二服务区域为例进行说明。可以理解的是,本申请所提及的API均指同一个API,后续不再赘述。其中,第一开放功能网元提供的API对应第一服务区域,第二开放功能网元提供的API对应第二服务区域。
其中,服务区域表示该开放功能网上提供的该API的服务范围。示例性地,若服务区域使用域名表示,如cmcc.beijing.com,则表示该API可以为该区域范围内的用户(终端设备或应用客户端)提供服务。示例性地,若服务区域使用IP地址段表示,如 10.11.1.0~10.11.1.255,则表示API可以为IP地址在该地址范围内的用户(终端设备或应用客户端)提供服务。示例性地,若服务区域使用IP地址前缀表示,则表示API可以为具有该IP地址前缀的用户(终端设备或应用客户端)提供服务。示例性地,若服务区域使用位置区域(area)信息表示,则表示API可以为当前位置在该区域内的用户(终端设备或应用客户端)提供服务。
此外,开放功能网元提供该API可以理解为该开放功能网元操作(handle)该API,例如,该开放功能网元具体可以对对该API对应的资源(resource)进行创建、修改、删除、查询等操作。提供该API的开放功能网元的信息可以为该API的接口(interface)信息,该API的接口信息具有可以包含该开放功能网元的IP地址和/或端口号信息、API资源的统一资源标识符(unified resource identifier,URI)等。
那么,第二网元可以获取API的路由信息,示例性地,该路由信息可以包括提供该API的开放功能网元的信息及其对应的API的服务区域的信息。第二网元将该API的路由信息发送给边界开放功能网元,由该边界开放功能网元根据该API的路由信息,再结合该API的调用参数信息(例如,终端设备(签约用户、应用用户、应用客户端)的标识信息和/或位置信息),从第一边界开放功能网元和第二边界开放功能网元中确定出在该终端设备对应的区域中能够真正提供该API的目标开放功能网元。边界开放功能网元对目标开放功能网元的具体确定方法可参见方法300,此处不再赘述。
示例性地,以终端设备为例进行说明,该终端设备的标识信息可以是终端设备的ID,或者该终端设备的IP地址;该终端设备的位置信息可以是该终端设备的IP地址,或者该终端设备所在的区域(area)信息,或者该终端设备的当前位置信息。应理解,上述终端设备为该API对应的终端设备,即API调用实体调用该API就是为了该终端设备服务,或者说,该API是API调用实体为了这个终端设备调用的,例如,API调用实体调用该API获取该终端设备的信息。
作为一个可选的实施例,所述第二网元为核心功能网元,所述方法还包括:所述第二网元从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述第二网元获取API的路由信息,包括:所述第二网元根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
可选地,所述路由信息具体可以表示所述第一服务区域与所述第一开放功能网元之间的对应关系,以及所述第二服务区域与所述第二开放功能网元之间的对应关系。
具体地,上述第二网元(核心功能网元)可以根据接收到的第一开放功能网元的信息、第二开放功能网元的信息、第一服务区域的信息、以及第二服务区域的信息(本文统称为API信息),生成该API的路由信息。在这种情况下,该第二网元可以向边界开放功能网元发送该API的路由信息,使得边界开放功能网元可以根据API的路由信息和调用参数信息,确定目标开放功能网元。
作为一个可选的实施例,在所述第二网元向所述边界开放功能网元发送所述路由信息之前,所述方法还包括:所述第二网元从所述边界开放功能网元接收请求消息,所述请求 消息用于请求所述路由信息,所述请求消息包括所述API的标识信息;所述第二网元向所述边界开放功能网元发送所述路由信息,包括:所述第二网元根据所述请求消息,向所述边界开放功能网元发送所述路由信息。
具体地,上述边界开放功能网元还可以向第二网元(即核心功能网元或者发布功能网元)发送请求消息,用于请求上述API的路由信息。由于路由信息是针对特定API的,因此该请求消息中还可以包括所请求的API的标识信息。一般情况下,边界开放功能网元是在接收到来自API调用实体的API调用请求之后,向核心功能网元或发布功能网元发送上述请求消息,该请求消息所请求的路由信息对应的API即为该API调用请求所请求调用的API。其中,该请求消息可以是API调用路由请求消息(service API invocation routing request),或获取拓扑隐藏策略请求消息(obtain topology hiding policy request),或其他边界AEF向CCF发送的消息,本申请实施例不做限定。
上述方法的具体实施例可参见图5至图10以及相应的文字描述,此处不再赘述。
为便于理解,下面以核心功能网元为CCF、发布功能网元为APF、开放功能网元为AEF为例,结合图5至图10对本申请实施例进行详细说明。
图5示出了本申请实施例的调用应用程序接口的方法500的示意性流程图。该方法500可以应用于图1所示的系统架构100,也可以应用于图2所示的应用场景200,本申请实施例不限于此。在本实施例中,API信息相当于上述API的路由信息。
在S501中,APF与CCF执行API发布流程。
具体地,APF向CCF发送API发布请求,该API发布请求中包括API信息。该API信息包括API名称和提供该API的AEF信息,AEF信息中包含该API的接口信息,例如,IP地址、端口号、或者统一资源标识符(uniform resource identifier,URI)等,该AEF信息还包括该API对应的服务区域(API serving area)信息,服务区域信息可以是IP地址段、IP地址前缀、地理或行政区域、或者域名等信息。CCF接收APF发送的API发布请求,根据接收到的API信息,确定对该API信息对应的API应用拓扑隐藏策略。应理解,该拓扑隐藏策略可以是对所有API调用实体均应用拓扑隐藏,也可以对部分API调用实体应用拓扑隐藏。CCF确定边界AEF。
在S502中,CCF确定API的调用路由规则,该API为应用了上述拓扑隐藏策略的API。
具体地,CCF可以根据API信息,生成用于边界AEF确定目标AEF的调用路由规则。例如,CCF可以根据API信息中的对应的服务区域信息(如IP地址段、地理或行政区域、或者域名),确定该API的调用路由规则。进一步地,该调用路由规则可以表示多个服务区域和多个AEF之间的映射关系,也可以直接表示多个IP地址段或域名与多个AEF之间的映射关系。
在S503中,CCF向边界AEF发送该API的调用路由规则;则对应地,该边界AEF从CCF接收API的调用路由规则。
在S504中,API调用实体与CCF执行API发现流程。
在S505中,API调用实体向边界AEF发送API调用请求,该API调用请求中可以包括API的信息(如该API对应的资源(resource)的地址(URI)、或API的标识信息)以及调用参数信息。该调用参数信息具体可以为终端设备IP、区域信息、位置信息等。其 中,终端设备IP表示终端设备的IP地址,可以是IPv4或IPv6;区域信息表示该API应用的区域信息,该区域信息可以是网络区域描述信息,例如小区标识、追踪区(tracing area,TA)标识、兴趣区域标识等,也可以是物理区域描述信息。位置信息可以表示该API应用的位置的信息,具体的可以是该终端设备的位置信息。
在S506中,边界AEF根据从CCF接收到的API的调用路由规则和调用参数信息,确定目标AEF。
示例性地,提供上述API的多个AEF包括第一AEF和第二AEF,上述API对应的服务区域包括第一服务区域和第二服务区域。上述调用路由规则可以表示该第一服务区域与第一AEF之间的对应关系,以及该第二服务区域与第二AEF之间的对应关系。上述调用参数信息可以包括终端设备(签约用户、应用用户、应用客户端)的标识信息和/或位置信息,进而指示终端设备所在的服务区域,例如,该调用参数信息指示终端设备位于第二服务区域。那么,边界AEF就可以根据该调用参数信息所指示的第二服务区域,再结合上述调用路由规则所表示的对应关系,将从第一AEF和第二AEF中与第二服务区域对应的第二AEF确定为目标AEF。
在S507中,边界AEF向目标AEF发送API调用请求,该API调用请求中包括API的信息(如该API对应的资源(resource)的地址(URI)、或API的标识信息)。
在S508中,目标AEF向边界AEF发送API调用响应。
在S509中,边界AEF向API调用实体发送该API调用响应。
本申请实施例的调用应用程序接口的方法,CCF在接收到来自APF的API发布请求后,获取API信息并对该API应用拓扑隐藏策略后,将该API的调用路由规则发送给边界AEF,使得边界AEF根据API的调用路由规则确定目标AEF,实现对API调用请求的转发,从而实现API的调用完成。在本实施例中,CCF在调用之前推送调用路由规则到边界AEF,可以减小在API调用流程中边界AEF获取该调用路由规则造成的调用时延,有利于提高API的调用效率。
在本申请的另一种可能的实现方式中,CCF可以根据本地预配置AEF信息,确定上述调用路由规则。在这种情况下,该AEF提供的API的服务范围是即为该AEF的服务区域。
图6示出了本申请实施例的另一调用应用程序接口的方法600的示意性流程图。该方法600可以应用于图1所示的系统架构100,也可以应用于图2所示的应用场景200,本申请实施例不限于此。在本实施例中,API信息相当于上述API的路由信息。
在S601中,APF与CCF执行API发布流程。
具体地,APF向CCF发送API发布请求,该API发布请求中包括API信息。该API信息包括API名称和提供该API的AEF信息,AEF信息中包含该API的接口信息,例如,IP地址、端口号、或者统一资源标识符(uniform resource identifier,URI)等,该AEF信息还包括该API对应的服务区域(API serving area)信息,服务区域信息可以是IP地址段、IP地址前缀、地理或行政区域、或者域名等信息。CCF接收APF发送的API发布请求,根据接收到的API信息,确定对该API信息对应的API应用拓扑隐藏策略。应理解,该拓扑隐藏策略可以是对所有API调用实体均应用拓扑隐藏,也可以对部分API调用实体应用拓扑隐藏。CCF确定边界AEF。
在S602中,API调用实体与CCF执行API发现流程。
在S603中,API调用实体向边界AEF发送API调用请求,该API调用请求中包括API的信息(如该API对应的资源(resource)的地址(URI)、或API的标识信息)以及调用参数信息。该调用参数信息具体可以为终端设备IP、区域信息、位置信息等。其中,终端设备IP表示终端设备的IP地址,可以是IPv4或IPv6;区域信息表示该API应用的区域信息,该区域信息可以是网络区域描述信息,例如小区标识、追踪区(tracing area,TA)标识、兴趣区域标识等,也可以是物理区域描述信息。位置信息可以表示该API应用的位置的信息,具体的可以是该终端设备的位置信息。
在S604中,边界AEF接收到API调用实体的API调用请求,向CCF发送API调用路由请求。
在S605中,CCF接收边界AEF发送的API调用路由请求,确定该API的调用路由规则,该API为应用了上述拓扑隐藏策略的API。
具体地,CCF可以根据API信息,生成用于边界AEF确定目标AEF的调用路由规则。例如,CCF可以根据API信息中的对应的IP地址段、服务区域、或者域名,确定该API的调用路由规则。进一步地,该调用路由规则可以表示多个服务区域和多个AEF之间的映射关系,也可以直接表示多个IP地址段或域名与多个AEF之间的映射关系。
应理解,上述CCF确定API的调用路由规则也可以在S602中执行,即在API发现流程中,CCF可以先生成API的调用路由规则并保存,在接收到来自边界AEF的API调用路由请求之后,再将该API的调用路由规则发送给该边界AEF,本申请实施例对此不作限定。
在S606中,CCF向边界AEF发送API调用路由响应,该API调用路由响应中包括上述API的调用路由规则。
在S607中,边界AEF根据从CCF接收到的API的调用路由规则和API调用请求中包括的调用参数信息,确定目标AEF。
例如,边界AEF确定目标AEF可参考图5中步骤S506的描述,此处不再赘述。
在S608中,边界AEF向目标AEF发送API调用请求,该API调用请求中包括API的信息(如该API对应的资源(resource)的地址(URI)、或API的标识信息)。
在S609中,目标AEF向边界AEF发送API调用响应。
在S610中,边界AEF向API调用实体发送该API调用响应。
本申请实施例的调用应用程序接口的方法,在接收到API调用请求之后,边界AEF向CCF请求API的调用路由规则,从而根据接收到的API的调用路由规则和调用参数信息,确定目标AEF,实现对API调用请求的转发,从而实现API的调用完成。进一步地,在本申请实施例中,边界AEF接收到API调用请求,并向CCF请求路由调用规则,避免了在边界开放功能网元不需要使用该路由信息时CCF主动向边界AEF发送该调用路由规则,从而节省了信令。
图7示出了本申请实施例的另一调用应用程序接口的方法700的示意性流程图。该方法700可以应用于图1所示的系统架构100,也可以应用于图2所示的应用场景200,本申请实施例不限于此。在本实施例中,API信息相当于上述API的路由信息。
S701-S703与S601-S603相同,本实施例不再赘述。
在S704中,边界AEF接收到API调用实体的API调用请求,向CCF发送API调用路由请求。与上述方法600不同,该API调用路由请求中包括边界AEF从API调用实体获取的调用参数信息。该调用参数信息具体可以为终端设备IP、区域信息、位置信息等。其中,终端设备IP表示终端设备的IP地址,可以是IPv4或IPv6;区域信息表示该API应用的区域信息,该区域信息可以是网络区域描述信息,例如小区标识、追踪区(tracing area,TA)标识、兴趣区域标识等,也可以是物理区域描述信息。位置信息可以表示该API应用的位置的信息,具体的可以是该终端设备的位置信息。
在S705中,CCF接收边界AEF发送的API调用路由请求,根据API信息和调用参数信息,确定目标AEF。
示例性地,提供上述API的多个AEF包括第一AEF和第二AEF,上述API对应的服务区域包括第一服务区域和第二服务区域。上述调用路由规则可以表示该第一服务区域与第一AEF之间的对应关系,以及该第二服务区域与第二AEF之间的对应关系。上述调用参数信息可以包括终端设备(签约用户、应用用户、应用客户端)的标识信息和/或位置信息,进而指示终端设备所在的服务区域,例如,该调用参数信息指示终端设备位于第二服务区域。那么,CCF就可以根据该调用参数信息所指示的第二服务区域,再结合上述调用路由规则所表示的对应关系,将从第一AEF和第二AEF中与第二服务区域对应的第二AEF确定为目标AEF。
在S706中,CCF向边界AEF发送API调用路由响应,该API调用路由响应中包括上述目标AEF的信息,例如,该目标AEF的标识。
S707-S709与S608-S610相同,本实施例不再赘述。
本申请实施例的调用应用程序接口的方法,在接收到API调用请求之后,边界AEF向CCF请求目标AEF,从而实现对API调用请求的转发,从而实现API的调用完成。进一步地,在本申请实施例中,由CCF确定目标AEF,边界AEF仅仅根据CCF的指示进行消息的转发,能够降低边界AEF的负担。
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上文中结合图1至图7,详细描述了根据本申请实施例的调用应用程序接口的方法,下面将结合图8至图10,详细描述根据本申请实施例的调用应用程序接口的装置。
图8示出了本申请实施例提供的调用应用程序接口的装置800。该装置800包括:获取单元810和处理单元820。具体地,装置800用于执行上述方法200中第一网元对应的各个流程和步骤。
该获取单元810用于:用于获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;以及获取所述API的调用参数信息,所述调用参数信息用于操作所述API;
该处理单元820用于:用于根据所述路由信息和所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
可选地,所述调用参数信息包括终端设备的标识信息和/或所述终端设备的位置信息;和/或,所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功 能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
可选地,所述装置为核心功能网元,所述装置还包括:第一接收单元,用于从边界开放功能网元接收所述API的调用参数信息;第一发送单元,用于向所述边界开放功能网元发送所述目标开放功能网元的信息。
可选地,所述装置为核心功能网元,所述装置还包括:第二接收单元,用于从发布功能网元接收所述API的路由信息。
可选地,所述装置为核心功能网元,所述装置还包括:第三接收单元,用于从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述处理单元还用于:根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
可选地,所述装置为边界开放功能网元,所述装置还包括:第四接收单元,用于所述第一网元从核心功能网元或发布功能网元接收所述API的路由信息。
可选地,所述装置还包括:第二发送单元,用于发送请求消息,所述请求消息用于请求所述API的路由信息,所述请求消息包括所述API的标识信息。
应理解,这里的装置800以功能单元的形式体现。这里的术语“单元”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置800可以具体为上述实施例中的第一网元,装置800可以用于执行上述方法实施例中与第一网元对应的各个流程和/或步骤,为避免重复,在此不再赘述。
图9示出了本申请实施例提供的另一调用应用程序接口的装置900。该装置900包括:获取单元910和发送单元920。具体地,装置900用于执行上述方法300中第二网元对应的各个流程和步骤。
该获取单元910用于:获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;
该发送单元920用于:向边界开放功能网元发送所述路由信息,所述路由信息用于所述边界开放功能网元对目标开放功能网元的确定,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
可选地,所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
可选地,所述装置为核心功能网元,所述装置还包括:第一接收单元,用于从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提 供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;所述装置还包括:处理单元,用于根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
可选地,所述装置还包括:第二接收单元,用于在向所述边界开放功能网元发送所述路由信息之前,从所述边界开放功能网元接收请求消息,所述请求消息用于请求所述路由信息,所述请求消息包括所述API的标识信息;所述发送单元920具体用于:根据所述请求消息,向所述边界开放功能网元发送所述路由信息。
应理解,这里的装置900以功能单元的形式体现。这里的术语“单元”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置900可以具体为上述实施例中的第二网元,装置900可以用于执行上述方法实施例中与第二网元对应的各个流程和/或步骤,为避免重复,在此不再赘述。
上述各个方案的装置800和装置900具有实现上述方法中第一网元或第二网元执行的相应步骤的功能;所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块;例如发送单元可以由发射机替代,接收单元可以由接收机替代,其它单元,如确定单元等可以由处理器替代,分别执行各个方法实施例中的收发操作以及相关的处理操作。
在本申请的实施例,图8和图9中的装置也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。对应的,接收单元和发送单元可以是该芯片的收发电路,在此不做限定。
图10示出了本申请实施例提供的另一调用应用程序接口的装置1000。该装置1000包括处理器1010、收发器1020和存储器1030。其中,处理器1010、收发器1020和存储器1030通过内部连接通路互相通信,该存储器1030用于存储指令,该处理器1010用于执行该存储器1030存储的指令,以控制该收发器1020发送信号和/或接收信号。
在一种可能的实现方式中,装置1000用于执行上述方法200中第一网元对应的各个流程和步骤。
其中,该处理器1010用于:获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;以及获取所述API的调用参数信息,所述调用参数信息用于操作所述API;根据所述路由信息和所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
在一种可能的实现方式中,装置1000用于执行上述方法300中第二网元对应的各个流程和步骤。
其中,该处理器1010用于:获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;通过该收发器1020向边界开放功能网元发送所述路由信息,所述路由信息用于所述边界开放功能网元对目标开放功能网元的确定,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
应理解,装置1000可以具体为上述实施例中的第一网元或第二网元,并且可以用于执行上述方法实施例中与第一网元或第二网元对应的各个步骤和/或流程。可选地,该存储器1030可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1010可以用于执行存储器中存储的指令,并且当该处理器1010执行存储器中存储的指令时,该处理器1010用于执行上述与该第一网元或第二网元对应的方法实施例的各个步骤和/或流程。
应理解,在本申请实施例中,上述装置的处理器可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件单元组合执行完成。软件单元可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
在本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c或a-b-c,其中a,b,c可以是单个,也可以是多个。
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (26)

  1. 一种调用应用程序接口API的方法,其特征在于,包括:
    第一网元获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;
    所述第一网元获取所述API的调用参数信息,所述调用参数信息用于操作所述API;
    所述第一网元根据所述路由信息和所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
  2. 根据权利要求1所述的方法,其特征在于,所述调用参数信息包括终端设备的标识信息和/或所述终端设备的位置信息;和/或
    所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一网元为核心功能网元,所述第一网元获取所述API的调用参数信息,包括:
    所述第一网元从边界开放功能网元接收所述API的调用参数信息;
    所述方法还包括:
    所述第一网元向所述边界开放功能网元发送所述目标开放功能网元的信息。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一网元为核心功能网元,所述第一网元获取API的路由信息,包括:
    所述第一网元从发布功能网元接收所述API的路由信息。
  5. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一网元为核心功能网元,所述方法还包括:
    所述第一网元从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;
    所述第一网元获取API的路由信息,包括:
    所述第一网元根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
  6. 根据权利要求1或2所述的方法,其特征在于,所述第一网元为边界开放功能网元,所述第一网元获取API的路由信息,包括:
    所述第一网元从核心功能网元或发布功能网元接收所述API的路由信息。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    所述第一网元发送请求消息,所述请求消息用于请求所述API的路由信息,所述请求消息包括所述API的标识信息。
  8. 一种调用应用程序接口API的方法,其特征在于,包括:
    第二网元获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;
    所述第二网元向边界开放功能网元发送所述路由信息,所述路由信息用于所述边界开放功能网元对目标开放功能网元的确定,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
  9. 根据权利要求8所述的方法,其特征在于,所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
  10. 根据权利要求8或9所述的方法,其特征在于,所述第二网元为核心功能网元,所述方法还包括:
    所述第二网元从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;
    所述第二网元获取API的路由信息,包括:
    所述第二网元根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
  11. 根据权利要求8至10中任一项所述的方法,其特征在于,在所述第二网元向所述边界开放功能网元发送所述路由信息之前,所述方法还包括:
    所述第二网元从所述边界开放功能网元接收请求消息,所述请求消息用于请求所述路由信息,所述请求消息包括所述API的标识信息;
    所述第二网元向所述边界开放功能网元发送所述路由信息,包括:
    所述第二网元根据所述请求消息,向所述边界开放功能网元发送所述路由信息。
  12. 一种调用应用程序接口API的装置,其特征在于,包括:
    获取单元,用于获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;以及获取所述API的调用参数信息,所述调用参数信息用于操作所述API;
    处理单元,用于根据所述路由信息和所述调用参数信息,从所述第一开放功能网元和所述第二开放功能网元中确定目标开放功能网元。
  13. 根据权利要求12所述的装置,其特征在于,所述调用参数信息包括终端设备的标识信息和/或所述终端设备的位置信息;和/或
    所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
  14. 根据权利要求12或13所述的装置,其特征在于,所述装置为核心功能网元,所述装置还包括:
    第一接收单元,用于从边界开放功能网元接收所述API的调用参数信息;
    第一发送单元,用于向所述边界开放功能网元发送所述目标开放功能网元的信息。
  15. 根据权利要求12至14中任一项所述的装置,其特征在于,所述装置为核心功能网元,所述装置还包括:
    第二接收单元,用于从发布功能网元接收所述API的路由信息。
  16. 根据权利要求12至14中任一项所述的装置,其特征在于,所述装置为核心功能网元,所述装置还包括:
    第三接收单元,用于从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;
    所述处理单元还用于:
    根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
  17. 根据权利要求12或13所述的装置,其特征在于,所述装置为边界开放功能网元,所述装置还包括:
    第四接收单元,用于所述第一网元从核心功能网元或发布功能网元接收所述API的路由信息。
  18. 根据权利要求17所述的装置,其特征在于,所述装置还包括:
    第二发送单元,用于发送请求消息,所述请求消息用于请求所述API的路由信息,所述请求消息包括所述API的标识信息。
  19. 一种调用应用程序接口API的装置,其特征在于,包括:
    获取单元,用于获取API的路由信息,所述路由信息用于指示调用所述API的路由,所述API由第一开放功能网元和第二开放功能网元提供;
    发送单元,用于向边界开放功能网元发送所述路由信息,所述路由信息用于所述边界开放功能网元对目标开放功能网元的确定,所述目标开放功能网元是从所述第一开放功能网元和所述第二开放功能网元中确定的。
  20. 根据权利要求19所述的装置,其特征在于,所述路由信息包括所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域。
  21. 根据权利要求19或20所述的装置,其特征在于,所述装置为核心功能网元,所述装置还包括:
    第一接收单元,用于从发布功能网元接收所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述API对应的第一服务区域的信息和所述第二服务区域的信息,其中,所述第一开放功能网元提供的所述API对应所述第一服务区域,所述第二开放功能网元提供的所述API对应所述第二服务区域;
    所述装置还包括:
    处理单元,用于根据所述第一开放功能网元的信息和所述第二开放功能网元的信息、以及所述第一服务区域的信息和所述第二服务区域的信息,生成所述API的路由信息。
  22. 根据权利要求19至21中任一项所述的装置,其特征在于,所述装置还包括:
    第二接收单元,用于在向所述边界开放功能网元发送所述路由信息之前,从所述边界开放功能网元接收请求消息,所述请求消息用于请求所述路由信息,所述请求消息包括所述API的标识信息;
    所述发送单元具体用于:
    根据所述请求消息,向所述边界开放功能网元发送所述路由信息。
  23. 一种装置,其特征在于,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序,当所述程序被所述处理器执行时,使得所述装置执行如权利要求1-1中任一项所述的装置。
  24. 一种计算机可读介质,用于存储计算机程序,其特征在于,所述计算机程序包括用于实现上述权利要求1-11中任一项所述的装置的指令。
  25. 一种计算机程序产品,所述计算机程序产品中包括计算机程序代码,其特征在于,当所述计算机程序代码在计算机上运行时,使得计算机实现上述权利要求1-11中任一项所述的装置。
  26. 一种芯片,其特征在于,包括:处理器,用于读取存储器中存储的指令,当所述处理器执行所述指令时,使得所述芯片实现上述权利要求1-11中任一项所述的装置。
PCT/CN2019/129786 2019-01-14 2019-12-30 调用应用程序接口的方法和装置 WO2020147565A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
AU2019422391A AU2019422391B2 (en) 2019-01-14 2019-12-30 Method and apparatus for invoking application programming interface
CA3126566A CA3126566C (en) 2019-01-14 2019-12-30 Method and apparatus for invoking application programming interface
EP19910775.6A EP3905612A4 (en) 2019-01-14 2019-12-30 METHOD AND DEVICE FOR CALLING APPLICATION PROGRAM INTERFACE
US17/374,732 US11516310B2 (en) 2019-01-14 2021-07-13 Method and apparatus for invoking application programming interface

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910033239.1A CN111435924B (zh) 2019-01-14 2019-01-14 调用应用程序接口的方法和装置
CN201910033239.1 2019-01-14

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/374,732 Continuation US11516310B2 (en) 2019-01-14 2021-07-13 Method and apparatus for invoking application programming interface

Publications (1)

Publication Number Publication Date
WO2020147565A1 true WO2020147565A1 (zh) 2020-07-23

Family

ID=71579901

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/129786 WO2020147565A1 (zh) 2019-01-14 2019-12-30 调用应用程序接口的方法和装置

Country Status (6)

Country Link
US (1) US11516310B2 (zh)
EP (1) EP3905612A4 (zh)
CN (2) CN113867980A (zh)
AU (1) AU2019422391B2 (zh)
CA (1) CA3126566C (zh)
WO (1) WO2020147565A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115714720A (zh) * 2021-08-20 2023-02-24 中移物联网有限公司 一种嵌入式网络框架及其支持多通信制式的方法

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220014545A1 (en) * 2020-07-09 2022-01-13 Jpmorgan Chase Bank, N.A. Systems and methods for automated cyber security and control monitoring
CN116097219A (zh) * 2020-08-06 2023-05-09 华为技术有限公司 应用程序接口调用方法及其装置、系统
US20220083876A1 (en) * 2020-09-17 2022-03-17 International Business Machines Corporation Shiftleft topology construction and information augmentation using machine learning
WO2022067736A1 (zh) * 2020-09-30 2022-04-07 华为技术有限公司 一种通信方法及装置
CN114844945A (zh) * 2021-02-01 2022-08-02 中国移动通信有限公司研究院 网络能力管理方法、能力开放平台及网络能力管理系统
US11785102B1 (en) * 2022-05-31 2023-10-10 Oracle International Corporation Methods, systems, and computer readable media for application programming interface (API) related groupings involving common application programming interface framework
CN117857548A (zh) * 2022-09-30 2024-04-09 华为技术有限公司 一种通信方法及装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699367A (zh) * 2012-09-27 2014-04-02 中国电信股份有限公司 Http应用程序接口调用方法与装置
CN104468832A (zh) * 2014-12-25 2015-03-25 广东电子工业研究院有限公司 一种基于http协议的轻便分布式架构

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8001553B2 (en) * 2007-06-25 2011-08-16 Microsoft Corporation Aggregate computer system via coupling of computing machines
US10169110B2 (en) * 2016-03-25 2019-01-01 Google Llc Navigation application programming interface
US11303676B2 (en) * 2017-11-16 2022-04-12 Samsung Electronics Co., Ltd. Method and system for authenticating application program interface (API) invokers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699367A (zh) * 2012-09-27 2014-04-02 中国电信股份有限公司 Http应用程序接口调用方法与装置
CN104468832A (zh) * 2014-12-25 2015-03-25 广东电子工业研究院有限公司 一种基于http协议的轻便分布式架构

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; Functional architecture and information flows to support Common API Framework for 3GPP Northbound APIs; Stage 2 (Release 15)", 3GPP STANDARD; TECHNICAL SPECIFICATION; 3GPP TS 23.222, no. V15.4.0, 21 December 2018 (2018-12-21), pages 1 - 88, XP051591360 *
HUAWEI, HISILICON: "API Invocation Request Routing with Topology Hiding", 3GPP DRAFT; S6-190086, 25 January 2019 (2019-01-25), Kochi, India, pages 1 - 5, XP051590888 *
SAMSUNG: "Pseudo-CR on TS 23.222 CAPIF Access Control Cascaded AEFs", 3GPP DRAFT; S6-171363, 13 October 2017 (2017-10-13), Dubrovnik, Croatia, pages 1 - 4, XP051362557 *
See also references of EP3905612A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115714720A (zh) * 2021-08-20 2023-02-24 中移物联网有限公司 一种嵌入式网络框架及其支持多通信制式的方法

Also Published As

Publication number Publication date
CN113867980A (zh) 2021-12-31
EP3905612A1 (en) 2021-11-03
CA3126566C (en) 2023-12-12
CA3126566A1 (en) 2020-07-23
CN111435924A (zh) 2020-07-21
AU2019422391A1 (en) 2021-08-12
US20210344774A1 (en) 2021-11-04
US11516310B2 (en) 2022-11-29
CN111435924B (zh) 2021-08-31
EP3905612A4 (en) 2022-03-09
AU2019422391B2 (en) 2022-12-08

Similar Documents

Publication Publication Date Title
WO2020147565A1 (zh) 调用应用程序接口的方法和装置
US20230093339A1 (en) Session Management Method, Apparatus, and System
WO2021017381A1 (en) Systems and methods for supporting traffic steering through a service function chain
CN116057924B (zh) 用于提供网络功能发现服务增强的方法、系统和计算机可读介质
US11483279B2 (en) Domain name system as an authoritative source for multipath mobility policy
WO2020048469A1 (zh) 一种通信的方法及装置
WO2018161802A1 (zh) 一种业务流的控制方法及装置
WO2021212939A1 (zh) 通信方法、装置及系统
KR101261358B1 (ko) 가입자 데이터베이스에 대한 방법 및 장치
US20240048986A1 (en) Communication method and apparatus
WO2021138822A1 (zh) 签约信息获取方法及装置
WO2020052463A1 (zh) 通信方法和网元
US20230035572A1 (en) Scope parameter for binding indication
JP2024519311A (ja) データ入手方法およびシステム、ならびにその装置
US20240179564A1 (en) Edge configuration server information processing method and device, and communication device
WO2023109865A1 (zh) 一种密钥生成方法、装置、设备及可读存储介质
WO2024032226A1 (zh) 通信方法和通信装置
WO2023040958A1 (zh) 一种联邦学习组处理方法、装置及功能实体
WO2022237857A1 (zh) 确定安全保护开启方式的方法、通信方法及通信装置
WO2023056784A1 (zh) 数据收集方法、通信装置及通信系统
US20230252023A1 (en) Systems and methods for off-chain action orchestration using blockchain events
EP4255001A1 (en) Mechanism for accessing subscription data
WO2024001734A1 (en) Feature discovery in non-direct subscription scenarios
US20240040375A1 (en) Providing an operator-encrypted partial user equipment route selection policy to user equipment
US20230156447A1 (en) Roaming device location determination for emergency communications

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19910775

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3126566

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019910775

Country of ref document: EP

Effective date: 20210727

ENP Entry into the national phase

Ref document number: 2019422391

Country of ref document: AU

Date of ref document: 20191230

Kind code of ref document: A