(19)
(11)EP 3 648 432 A1

(12)EUROPEAN PATENT APPLICATION
published in accordance with Art. 153(4) EPC

(43)Date of publication:
06.05.2020 Bulletin 2020/19

(21)Application number: 18844908.6

(22)Date of filing:  17.07.2018
(51)Int. Cl.: 
H04L 29/06  (2006.01)
(86)International application number:
PCT/CN2018/095974
(87)International publication number:
WO 2019/029327 (14.02.2019 Gazette  2019/07)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME
Designated Validation States:
KH MA MD TN

(30)Priority: 08.08.2017 CN 201710671849

(71)Applicant: Huawei Technologies Co., Ltd.
Longgang District Shenzhen, Guangdong 518129 (CN)

(72)Inventor:
  • HAN, Tingjun
    Shenzhen Guangdong 518129 (CN)

(74)Representative: Pfenning, Meinig & Partner mbB 
Patent- und Rechtsanwälte Theresienhöhe 11a
80339 München
80339 München (DE)

  


(54)DISCOVERY METHOD AND DEVICE FOR NETWORK FUNCTION SERVICE


(57) This application provides a network function service discovery method and a device. The method includes: after establishing a communication connection to the NF, obtaining, by an NRF, a digital certificate of the NF in a TLS or DTLS two-way authentication process, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF; receiving, by the NRF, a query request for querying an address of a target service that is sent by the NF, where the query request carries a complete domain name of the target service; and performing, by the NRF, verification based on the service name of the target service and the digital certificate of the NF, and sending the address of the target service to the NF when the verification succeeds. Therefore, the NF services are discovered, the NF decouples from a network slice, and the NF decouples from a service security mechanism.




Description


[0001] This application claims priority to Chinese Patent Application No. 201710671849.5, filed with the Chinese Patent Office on August 8, 2017 and entitled "NETWORK FUNCTION SERVICE DISCOVERY METHOD AND DEVICE", which is incorporated herein by reference in its entirety.

TECHNICAL FIELD



[0002] This application relates to the field of communications technologies, and in particular, to a network function service discovery method and a device.

BACKGROUND



[0003] With the development of a 5th-generation (5th-generation, 5G for short) mobile communications technology, in an evolution process of a core network architecture of a 5G network, a service-based network architecture centered on a network function (Network Function, NF) and based on a cloud and virtualization technology is proposed. In the architecture, a network function repository function (NF Repository Function, NRF) is a network function that provides service registration and discovery functions for the NF. The NF may register one or more service addresses on the NRF. The registered service addresses are in a plurality of forms, and may be an IP address or a URL address. A service name is defined as <service name>.<NF name>.<PLMN>, for example, session-manager.SMF.<PLMN>. All NFs are located in a fully interconnected network topology, so as to implement physical deployment location decoupling between specific services. Therefore, the service-based network architecture helps quickly deploy new NFs to implement network service innovation.

[0004] A 5G network slice technology supports a plurality of services meeting different service level agreement (Service-Level Agreement, SLA) levels in a physical network, such as internet of vehicles and virtual reality. FIG. 1 is a schematic diagram of distribution of network slices of a public land mobile network (Public Land Mobile Network, PLMN) and NFs of the different network slices. As shown in FIG. 1, user equipment accesses the PLMN by using a radio access network node. The PLMN is divided into three network slices, and each network slice includes a group of NFs with a specific function. One NF includes at least one service. NFs 1 (for example, an NF 1 in a network slice A and an NF 1 in a network slice B) located in different network slices are of a same type, and NFs 2 located in different network slices are of a same type. To meet a requirement that SLAs of services of NFs have different resource requirements and performance indicators, the NFs located in different network slices are isolated from each other even if the NFs are of the same type. Due to an implementation constraint, an NF (for example, an NF 3 in FIG. 1) shared between a plurality of network slices is also required. In addition, the network slices are dynamically deployed based on a subscription requirement of a client. To be specific, a life cycle of an NF in a network slice is unknown. Therefore, NFs in different network slices are also isolated in terms of services. As shown in FIG. 1, the NF 1 in the network slice A can perform service interaction only with the NF 2 in the network slice A, and cannot access an NF 2 of the same type outside the network slice A.

[0005] Therefore, in the foregoing service-based network architecture, the NFs located in different network slices need to be isolated from each other, and the NFs located in different network slices need to be isolated from each other in terms of services. Therefore, the NFs that are dynamically deployed need to be discovered, that is, NF services need to be discovered, and service consumers need to query addresses of service providers. How to discover the NF services is an urgent problem to be resolved.

SUMMARY



[0006] This application provides a network function service discovery method and a device, so as to discover NF services.

[0007] According to a first aspect, this application provides an NF service discovery method, including: after establishing a communication connection to an NF, obtaining, by a network function repository function NRF, a digital certificate of the NF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF; receiving, by the NRF, a query request that is for querying an address of a target service and that is sent by the NF, where the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF in which the target service target service is located, and the management domain name of the NF includes a network slice identifier and an identifier of a network to which a network slice belongs; and performing, by the NRF, verification based on the service name of the target service and the digital certificate of the NF, and sending the address of the target service to the NF when the verification succeeds.

[0008] According to the first aspect, the NF service discovery method is provided, to discover the NF services. In addition, in a process of discovering the NF services, the service name of the target service is known by the NF. If service discovery is performed within a network slice, the NF queries the complete domain name of the target service formed by the service name of the target service and the management domain name of the NF when sending a query request. If the service discovery is performed between different network slices, the NF queries the complete domain name of the target service formed by the service name of the target service and the management domain name of the NF in which the target service queried by the NF is located when sending the query request. The management domain name of the NF includes the network slice identifier and the identifier of the network to which the network slice belongs, and the network slice identifier is managed by a management network element. Therefore, the NF can decouple from the network slice. In addition, a rely relationship between different services is placed in the extension field of the digital certificate of a service. The extension field of the digital certificate only relates to the service name of the NF, and does not relate to the management domain name of the NF, thereby ensuring that the digital certificate of all services does not need to be updated due to a dynamically deployed slice, so as to decouple the NF from a service security mechanism. The network slice and the service security mechanism may be compatible with an existing TLS/DNS standard mechanism, and an existing NF can access the system without modification. Regardless of how the NF is dynamically deployed, the existing NF is not affected.

[0009] In a possible design, the performing, by the NRF, verification based on the service name of the target service and the digital certificate of the NF includes: verifying, by the NRF, whether the service name of the target service is in the service name list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF that is included in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored.

[0010] In a possible design, before the receiving, by the NRF, a query request that is for querying an address of a target service and that is sent by the NF, the method further includes: receiving, by the NRF, a first service registration request sent by the NF, where the first service registration request includes a complete domain name of a first service and a first service address, and the complete domain name of the first service is a domain name formed by the service name of the NF and the management domain name of the NF.

[0011] The methods provided in this implementation implement the registration of the NF service.

[0012] In a possible design, the performing, by the NRF, service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF includes: verifying, by the NRF, whether the service name of the NF in the complete domain name of the first service is the same as the service name of the NF carried in the extension field of the digital certificate, and if yes, succeeding in the registration and storing a correspondence between the complete domain name of the first service, the first service address, the service name list on which the NF relies that is carried in the extension field of the digital certificate, and the service name list that relies on the NF.

[0013] In a possible design, the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in a network slice, and the digital certificate of the NF is injected in the image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.

[0014] In a possible design, the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.

[0015] According to a second aspect, this application provides an NF service discovery method, including: obtaining, by the NF, a management domain name of an NF and a digital certificate of the NF, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF, and the management domain name of the NF includes a network slice identifier and a network identifier to which a network slice belongs; establishing, by the NF, a communication connection to an NRF, and sending the digital certificate of the NF to the NRF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process; sending, by the NF to the NRF, a query request for querying an address of a target service, where the query request carries a complete domain name of the target service, and the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, so that the NRF performs verification based on the service name of the target service and the digital certificate of the NF.

[0016] According to the second aspect, the NF service discovery method is provided, to discover the NF services. In addition, in a process of discovering the NF service, a service name of a target service is known by an NF. If service discovery is performed within a network slice, the NF queries a complete domain name of the target service formed by the service name of the target service and a management domain name of the NF when sending a query request. If the service discovery is performed between different network slices, the NF queries the complete domain name of the target service formed by the service name of the target service and the management domain name of the NF in which the target service queried by the NF is located when sending the query request. The management domain name of the NF includes the network slice identifier and the identifier of the network to which the network slice belongs, and the network slice identifier is managed by a management network element. Therefore, the NF decouples from the network slice. In addition, a rely relationship between different services is placed in an extension field of the digital certificate of a service. The extension field of the digital certificate only relates to the service name of the NF, and does not relate to the management domain name of the NF, thereby ensuring that the digital certificate of all services does not need to be updated due to a dynamically deployed slice, so as to decouple the NF from a service security mechanism. The network slice and the service security mechanism can be compatible with an existing TLS/DNS standard mechanism, and the existing NF can access a system without modification. Regardless of how the NF is dynamically deployed, the existing NF is not affected.

[0017] In a possible design, before the sending, by an NF to an NRF, a query request for querying an address of a target service, the method further includes: forming, by the NF, the complete domain name of the target service based on the service name of the target service and the management domain name of the NF.

[0018] In a possible design, before the sending, by the NF to the NRF, a query request for querying an address of a target service, the method further includes: sending, by the NF to a management network element, a query request for querying the management domain name of the NF in which the target service is located, where the query request carries the service name of the target service; and after receiving the management domain name of the NF in which the target service is located that is sent by the management network element, forming, by the NF, the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.

[0019] In a possible design, the method further includes: receiving, by the NF, the address of the target service sent by the NRF when the verification succeeds.

[0020] In a possible design, before the sending, by the NF to the NRF, a query request for querying an address of a target service, the method further includes: forming, by the NF, a complete domain name of a first service based on the service name of the NF and the management domain name of the NF, and sending a first service registration request to the NRF, where the first service registration request includes the complete domain name of the first service and a first service address, so that the NRF performs service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0021] The methods provided in this implementation implement the registration of the NF service.

[0022] In a possible design, the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in a network slice, and the digital certificate of the NF is injected in an image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.

[0023] In a possible design, the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.

[0024] According to a third aspect, this application provides an NRF, including: an obtaining module, configured to obtain a digital certificate of an NF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process after establishing a communication connection to the NF, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF; a receiving module, configured to receive a query request that is for querying an address of a target service and that is sent by the NF, where the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, and the management domain name of the NF includes a network slice identifier and an identifier of a network to which a network slice belongs; and a verification module, configured to perform verification based on the service name of the target service and the digital certificate of the NF, and send the address of the target service to the NF when the verification succeeds.

[0025] In a possible design, the verification module is configured to: verify whether the service name of the target service is in the service name list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF is included in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored.

[0026] In a possible design, the receiving module is further configured to: before receiving the query request that is for querying an address of a target service and that is sent by the NF, receive a first service registration request sent by the NF, where the first service registration request includes a complete domain name of a first service and a first service address, and the complete domain name of the first service is a domain name formed by the service name of the NF and the management domain name of the NF; and the NRF further includes: a registration module, configured to perform service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0027] In a possible design, the registration module is configured to: verify whether the service name of the NF in the complete domain name of the first service is the same as the service name of the NF carried in the extension field of the digital certificate, and if yes, succeed in the registration and store a correspondence between the complete domain name of the first service, the first service address, the service name list on which the NF relies that is carried in the extension field of the digital certificate, and the service name list that relies on the NF.

[0028] In a possible design, the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in the network slice, and the digital certificate of the NF is injected in the image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.

[0029] In a possible design, the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.

[0030] For beneficial effects of the NRF provided in the third aspect and the possible designs of the third aspect, refer to the beneficial effects brought by the foregoing first aspect and the possible designs of the first aspect, and details are not described herein again.

[0031] According to a fourth aspect, this application provides an NF, including: an obtaining module, configured to obtain a management domain name of an NF and a digital certificate of the NF, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF, and the management domain name of the NF includes a network slice identifier and an identifier of a network to which a network slice belongs; a first sending module, configured to establish a communication connection to an NRF, and send the digital certificate of the NF to the NRF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process; and a query module, configured to send a query request for querying an address of a target service to the NRF, where the query request carries a complete domain name of the target service, and the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, so that the NRF performs verification based on the service name of the target service and the digital certificate of the NF.

[0032] In a possible design, the query module is further configured to: before sending the query request for querying the address of the target service to the NRF, form the complete domain name of the target service based on the service name of the target service and the management domain name of the NF.

[0033] In a possible design, the query module is further configured to: before sending the query request for querying the address of the target service to the NRF, send a query request for querying the management domain name of the NF in which the target service is located to a management network element, where the query request carries the service name of the target service; and after receiving the management domain name of the NF in which the target service is located that is sent by the management network element, form the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.

[0034] In a possible design, the NF further includes: a receiving module, configured to receive the address of the target service sent by the NRF when the verification succeeds.

[0035] In a possible design, the query module is further configured to: before sending the query request for querying the address of the target service to the NRF, form a complete domain name of a first service based on the service name of the NF and the management domain name of the NF, and send a first service registration request to the NRF, where the first service registration request includes the complete domain name of the first service and a first service address, so that the NRF performs service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0036] In a possible design, the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in a network slice, and the digital certificate of the NF is injected in an image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.

[0037] In a possible design, the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.

[0038] For beneficial effects of the NRF provided in the fourth aspect and all possible designs of the fourth aspect, refer to beneficial effects brought by the foregoing second aspect and all possible designs of the second aspect. Details are not described herein again.

[0039] According to a fifth aspect, this application provides an NRF, including: a memory and a processor, where
the memory is configured to store a program instruction, and
the processor is configured to invoke a program instruction in a memory to perform the NF service discovery method in any one of the first aspect and the possible designs of the first aspect.

[0040] According to a sixth aspect, this application provides an NF, including: a memory and a processor, where
the memory is configured to store a program instruction, and
the processor is configured to invoke a program instruction in a memory to perform the NF service discovery method in any one of the second aspect and the possible designs of the second aspect.

[0041] According to a seventh aspect, this application provides a readable storage medium, where the readable storage medium stores a computer program, and when at least one processor of a discovery device of an NF service executes the computer program, the discovery device of the NF service performs the NF service discovery method in any one of the first aspect or the possible designs of the first aspect or in any one of the second aspect or the possible designs of the second aspect.

[0042] According to an eighth aspect, this application provides a program product, where the program product includes a computer program, and the computer program is stored in a readable storage medium. At least one processor of a discovery device of an NF service may read the computer program from the readable storage medium, the at least one processor executes the computer program, so that the discovery device of the NF service performs the NF service discovery method in any one of the first aspect or the possible designs of the first aspect or the second aspect or the possible designs of the second aspect.

BRIEF DESCRIPTION OF DRAWINGS



[0043] 

FIG. 1 is a schematic diagram of distribution of NFs of network slices and different network slices of a PLMN;

FIG. 2 is a schematic diagram of a possible network architecture according to this application;

FIG. 3 is a flowchart of an embodiment of an NF service discovery method according to this application;

FIG. 4 is a schematic flowchart of subscribing to a slice by a client, generating a digital certificate, deploying an NF in the network slice, and registering and discovering a service;

FIG. 5 is an interactive flowchart corresponding to FIG. 4;

FIG. 6 is a flowchart of an embodiment of an NF service registration method according to this application;

FIG. 7 is a flowchart of an embodiment of an NF service discovery method according to this application;

FIG. 8A and FIG. 8B are a flowchart of an embodiment of an NF service discovery method according to this application;

FIG. 9 is a schematic structural diagram of an embodiment of an NRF according to this application;

FIG. 10 is a schematic structural diagram of an embodiment of an NRF according to this application;

FIG. 11 is a schematic structural diagram of an embodiment of an NF according to this application;

FIG. 12 is a schematic structural diagram of an embodiment of an NF according to this application;

FIG. 13 is a schematic diagram of an NRF according to this application; and

FIG. 14 is a schematic diagram of an NF according to this application.


DESCRIPTION OF EMBODIMENTS



[0044] Network architectures and service scenarios described in this application are intended to describe technical solutions in this application more clearly, but are not intended to limit the technical solutions provided in this application. A person of ordinary skill in the art may know that as the network architectures evolve and a new service scenario emerges, the technical solutions provided in this application are also applicable to a similar technical problem.

[0045] Network slicing is a set of logical network function instances that support a specific communication service requirement, and mainly uses a software-defined networking (Software Defined Network, SDN) technology and a network functions virtualization (Network Function Virtualization, NFV) technology. The NFV technology can map underlying physical resources to virtual resources, construct virtual machines, and load an NF. The SDN technology can implement a logical connection between the virtual machines and construct a path carrying signaling and a data flow. The network slicing finally implements a dynamic connection between the NF instances in an access network (Residential Access Network, RAN) and a core network, and configures an end-to-end service chain, and implements flexible networking, so as to implement a customizable network service. An operator may determine a network slice based on requirements of specific communications service for key performance indicators such as a capacity, coverage, a rate, a latency, and reliability. The network slice includes an NF instance set and network resources required for running these NF instances, so that a required telecommunications service and a network capability service are provided for users, thereby meeting specific market scenarios and requirements.

[0046] It should be noted that, each network slice includes a group of NFs with a specific function. One NF includes at least one service. Each NF is a service provider, and provides an application programming interface (Application Programming Interface, API) for other NFs to invoke. Each NF is also a service consumer and invokes the API of other NFs. Each service provider needs to register information (including a service address) on the NRF. When the NF invokes an NRF registration interface, the NF is a service registrant. When the NF invokes an NRF service discovery interface, the NF is a service discoverer. The discovery between the NFs is that the service consumer is able to query the registration information (such as the service address) of the service provider.

[0047] The technical solutions provided in this application may be applied to a mobile communications system such as a 5G communications system or an LTE system, and are mainly applied to a scenario in which the NFs located in different network slices or a same network slice can be discovered from each other in an NF-centric service-based network architecture centered on the NF.

[0048] FIG. 2 is a schematic diagram of a possible network architecture according to this application. FIG. 2 shows a network architecture of a core network. A network exposure function (Network Exposure Function, NEF), a policy control function (Policy Control Function, PCF), unified data management (Unified Data Management, UDM), an application function (Application Function, AF), an authentication server function (Authentication Server Function, AUSF), an access and mobility management function (Access and Mobility Management Function, AMF), a session management function (Session Management Function, SMF), and a user plan function (User Plan Function, UPF) are all different NFs in FIG. 2. An NRF provides service registration and a service discovery function for all NFs, and the NF can register one or more service addresses on the NRF. All NFs are located in a fully interconnected network topology, so as to decouple physical deployment locations between specific services. N1, N2, N3, N4, and N6 are interfaces between network elements. APIs of the NFs are as follows: a service-based interface exhibited by the AMF (Service-based interface exhibited by AMF, Namf), a service-based interface exhibited by the SMF (Service-based interface exhibited by SMF, Nsmf), a service-based interface exhibited by the NEF (Service-based interface exhibited by NEF, Nnef), a service-based interface exhibited by the NRF (Service-based interface exhibited by NRF, Nnrf), a service-based interface exhibited by the PCF (Service-based interface exhibited by PCF, Npcf), a service-based interface exhibited by the UDM (Service-based interface exhibited by UDM, Nudm), a service-based interface exhibited by the AUSF (Service-based interface exhibited by AUSF, Nausf), and a service-based interface exhibited by the AF (Service-based interface exhibited by AF, Naf).

[0049] This application provides an NF service discovery method and a device, so as to discover NF services located in different network slices or a same network slice. A service consumer can query registration information about a service provider, such as a service address. In one aspect of this application, a network slice identifier is embedded into a complete domain name of a service, where the complete domain name of the service is formed by a service name of the NF and a management domain name of the NF, the management domain name of the NF includes the network slice identifier and an identifier of a network to which the network slice belongs, and a management network element manages the management domain name of the NF, in other words, the management network element manages the network slice identifier, so that the NF can decouple from the network slice. Decoupling means that the NF is not changed because a new network slice needs to be deployed. In addition, in a service-based network architecture, services are in a flat and fully interconnected simplified physical topology. A service communications security between the services needs to be guaranteed. A service security mechanism is mandatory. Usually, a security channel of a secure transport layer (Transport Layer Security, TLS) protocol or a data secure transport layer protocol (Data Transport Layer Security, DTLS) is used at a bottom layer. After the NF establishes a communication connection to the NRF, authentication is performed between the NF and the NRF in the TLS or DTLS two-way authentication process to meet a security requirement. In the TLS two-way authentication process, the NF sends a digital certificate of the NF to the NRF. In this application, a security rule of an NF service discovery is placed in an extension field of a digital certificate of the service, where the security rule is a rely relationship between different services. The extension field of the digital certificate only relates to a service name of the NF (for example, <NF service>.<NF name>), and does not relate to the management domain name of the NF (such as <Slice id>.<PLMN>), thereby ensuring that the digital certificate of all services does not need to be updated due to a dynamically deployed slice, so as to decouple the NF form the service security mechanism. The network slice and the service security mechanism may be compatible with an existing TLS/ domain name system (DomainNameSystem, DNS) standard mechanism, and an existing NF can access the system without modification. The following describes the technical solutions of this application in detail with reference to the accompanying drawings.

[0050] FIG. 3 is a flowchart of an embodiment of an NF service discovery method according to this application. As shown in FIG. 3, the method in this embodiment may include the following steps.

[0051] S101. An NF obtains a management domain name of the NF and a digital certificate of the NF, where an extension field of the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and the service name list that relies on the NF, and the management domain name of the NF includes a network slice identifier and an identifier of a network to which a network slice belongs.

[0052] The management domain name of the NF is, for example, <Slice id>.<PLMN>, the Slice id is the network slice identifier, and the PLMN is the identifier of the network to which the network slice belongs. Specifically, the NF obtains the management domain name of the NF, the digital certificate of the NF, and an address of an NRF that provides service registration and a service discovery function for the NF. Usually, one NRF manages the NFs in a same network slice, or one NRF manages the NFs in a plurality of different network slices. Optionally, three pieces of information, namely, the management domain name of the NF, the digital certificate of the NF, and the address of the NRF may be injected in an image of the NF and stored in a disk file in a process of deploying the NF in the network slice. Specifically, the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by a PaaS in the image of the NF in a process in which the management network element requests the platform as a service PaaS (Platform-as-a-Service, PaaS) to deploy the NF in the network slice. The digital certificate of the NF and the address of the NRF are injected in the image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice. In this case, the NF may obtain the three pieces of information by reading a system name server (name server) configuration file (the disk file), and the management network element may be a network slice management function (Network slice management function, NSMF) or an operations support system (Operation Support Systems, OSS). Optionally, the three pieces of information may further be configured after the NF is started, and the NF obtains the three pieces of information by reading the configuration file.

[0053] The digital certificate of the NF is in a one-to-one correspondence with a type of NF. NFs of of a same type have same digital certificates, and a plurality of instances of a same type of NF use a same digital certificate. The service name list on which the NF relies may include one or more service names, and the service name list that relies on the NF may include one or more service names.

[0054] The service name list on which the NF relies refers to a target service name list in which the NF, as a service consumer, needs to query a service address by using the NRF. The service name list that relies on the NF refers to a service name list of all service consumers that can be obtained by the service consumers from the service address of the NRF registered by the NF as a service provider.

[0055] S102. The NF establishes a communication connection to the NRF, and sends the digital certificate of the NF to the NRF in the TLS or DTLS two-way authentication process.

[0056] The NF establishes a communication connection to the NRF based on the address of the NRF. The TLS or DTLS two-way authentication process may be initiated by the NF or the NRF. For example, the NF initiates the TLS two-way authentication process. The NF sends a TLS handshake message to the NRF. After receiving the TLS handshake message, the NRF sends the TLS handshake message to the NF, so as to indicate that client authentication is performed. Then the NF sends the digital certificate of the NF to the NRF. The TLS or DTLS two-way authentication process is an existing security authentication process, and a detailed process is not described herein again.

[0057] S103. The NF sends a query request for querying an address of a target service to the NRF, where the query request carries a complete domain name of the target service, and the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located.

[0058] Optionally, before S103, the method may further include: forming, by the NF, the complete domain name of the target service based on the service name of the target service and the management domain name of the NF.

[0059] The service name of the target service is, for example, < NF service name>.<NF name> (the NF in which the target service is located has a plurality of services), and the complete domain name of the target service is < NF service name>.<NF name>.<Slice id>.<PLMN>. Alternatively, the service name of the target service is, for example, <NF name> (the NF in which the target service is located has only one target service), and the complete domain name of the target service is <NF name>.<Slice id>.<PLMN>.

[0060] The complete domain name of the target service is a domain name formed by the service name of the target service and the management domain name of the NF. In this case, the NF and the NF in which the target service is located belong to the same network slice. The complete domain name of the target service is a domain name formed by the service name of the target service and the management domain name of the NF in which the target service queried by the NF is located. In this case, the NF and the NF in which the target service is located belong to different network slices.

[0061] When the NF and the NF in which the target service is located belong to different network slices, to be specific, when service discovery is performed between different network slices, before S103, the method may further include:
sending, by the NF to a management network element, a query request for querying the management domain name of the NF in which the target service is located, where the query request carries the service name of the target service.

[0062] The query request may carry the service name of the target service, for example, < NF service name>.<NF 1 name>. The management network element may query, based on the service name of the target service, that the NF in which the target service is located is an NF 1, and may query a target network slice in which the NF 1 is located, so as to query the management domain name of the NF in which the target service is located. For example, the management network element is an NSMF.

[0063] After receiving the management domain name of the NF in which the target service is located that is sent by the management network element, the NF forms the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.

[0064] S 104. The NRF performs verification based on the service name of the target service and the digital certificate of the NF, and sends the address of the target service to the NF when the verification succeeds.

[0065] Further, when the verification fails, the NRF sends a query failure message to the NF.

[0066] Optionally, the performing, by the NRF in S104, the verification based on the service name of the target service and the digital certificate of the NF may specifically include:
verifying, by the NRF, whether the service name of the target service is in the service name list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF is included in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored. If yes, the verification succeeds. If not, the verification fails.

[0067] For example, an extension field of a digital certificate of the NF 1 carries the following content: The service name of the NF is *.NF1, a service name on which the NF 1 relies is *.NF2, and the service name that the NF 1 relies is *.NF3. An extension field of a digital certificate of the NF 2 carries the following content: The service name of the NF is *.NF2, a service name on which the NF 2 relies is *.NF4, and the service name that the NF 2 relies is *.NF1. An extension field of a digital certificate of the NF 3 carries the following content: The service name of the NF is *.NF3, a service name on which the NF 3 relies is *.NF2, and the service name that the NF 3 relies is *.NF4.

[0068] The NF 1 can query a service address registered by the NF 2. The NF 1 is rejected by the NRF when querying a service address of the NF 3 because the service name on which the digital certificate of the NF 1 relies does not include the NF 3. The NF 3 is rejected by the NRF when querying a service address of the NF 2 because the service name that the digital certificate of the NF 2 relies does not include the NF 3.

[0069] The foregoing process is a discovery process of an NF service. It may be understood that, before the discovery between the NF services, registration is required, and the NF may register one or more service addresses on the NRF. Based on the embodiment shown in FIG. 3, before S103, the method may further include:
forming, by the NF, a complete domain name of a first service based on the service name of the NF and the management domain name of the NF, and sending a first service registration request to the NRF, where the first service registration request includes the complete domain name of the first service and a first service address. The first service address may be an IP address or a URL address.

[0070] After receiving the first service registration request, the NRF performs service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0071] Specifically, the NRF verifies whether the service name of the NF in the complete domain name of the first service is the same as the service name of the NF carried in the extension field of the digital certificate, and if yes, succeeds in the registration and stores a correspondence between the complete domain name of the first service, the first service address, the service name list on which the NF relies that is carried in the extension field of the digital certificate, and the service name list that relies on the NF. If no, the registration fails. When the registration succeeds, for example, a stored correspondence is shown in the following Table 1:
Table 1
Complete domain name of the first serviceFirst service addressService name list on which the NF relies that is carried in the extension field of the digital certificateService name list that relies on the NF that is carried in the extension field of the digital certificate
< NF1service A name>.<NF1 name>.<Slice id>.<PLMN> IP address of the first service A < NF2service B name>.<NF2 name>, < NF3service E name>.<NF3 name>,
< NF2service C name>.<NF2 name>, < NF3service F name>.<NF3 name>,
< NF2service D name>.<NF2 name> < NF3service H name>.<NF3 name>


[0072] According to the NF service discovery method in this embodiment, the NF obtains the management domain name of the NF and the digital certificate of the NF, then establishes the communication connection to the NRF, and sends the digital certificate of the NF to the NRF in the TLS or DTLS two-way authentication process. The NF sends a query request for querying an address of a target service to the NRF, where the query request carries a complete domain name of the target service formed by a service name of the target service and the management domain name of the NF. Finally, the NRF performs verification based on the service name of the target service and the digital certificate of the NF, and sends the address of the target service to the NF when the verification succeeds. In this way, the discovery between the NF services is implemented. In addition, in a process of discovering the NF service, the service name of the target service is known by the NF. If the service discovery is performed within a network slice, the NF queries the complete domain name of the target service formed by the service name of the target service and the management domain name of the NF when sending a query request, and performs query. If the service discovery is performed between different network slices, the NF queries the complete domain name of the target service formed by the service name of the target service and the management domain name of the NF in which the target service queried by the NF is located when sending the query request. The management domain name of the NF includes the network slice identifier and the identifier of the network to which the network slice belongs, and the network slice identifier is managed by a management network element. Therefore, the NF can decouple from the network slice. In addition, a rely relationship between different services is placed in the extension field of the digital certificate of the service. The extension field of the digital certificate only relates to the service name of the NF, and does not relate to the management domain name of the NF, thereby ensuring that digital certificate of all services does not need to be updated due to a dynamically deployed slice, so as to decouple the NF from a service security mechanism. The network slice and the service security mechanism may be compatible with an existing TLS/DNS standard mechanism, and an existing NF can access the system without modification. Regardless of how the NF is dynamically deployed, the existing NF is not affected.

[0073] The following describes the technical solutions of the method embodiment shown in FIG. 3 in detail by using several specific embodiments.

[0074] The following uses an example in which three pieces of information, namely, the management domain name of the NF, the digital certificate of the NF, and the address of the NRF are injected in the image in a process of deploying the NF in the network slice, to describe a service deployment process, a service registration process, and a service discovery process in detail. FIG. 4 is a schematic flowchart of subscribing to a slice by a client, generating a digital certificate, deploying an NF in the network slice, and registering and discovering a service. As shown in FIG. 4, the process includes the following steps.

[0075] S201. The client sends a request for subscribing to a network slice to an NSMF.

[0076] S202. After receiving the request, the NSMF applies to a digital certificate authority (Certificate Authority, CA) for a digital certificate.

[0077] S203. The NSMF sends a deployment request to a PaaS.

[0078] S204. The PaaS performs an image injection process, and starts an image.

[0079] S205. The NF performs service registration and service discovery on an NRF.

[0080] FIG. 5 is an interactive flowchart corresponding to FIG. 4. As shown in FIG. 5, the method includes the following steps.

[0081] S301. The client sends the request for subscribing to the network slice to the NSMF.

[0082] S302. After receiving the request, the NSMF generates, based on a network slice identifier (ID), a dynamic management domain name <Slice id>.<PLMN>.

[0083] S303. The NSMF obtains, based on a network slice design, image addresses of all NFs within the network slice corresponding to the network slice ID.

[0084] S304. Apply to the CA for a digital certificate of each type of the NF.

[0085] The digital certificate of the NF is in a one-to-one correspondence with the type of the NF. The digital certificate of a same type of the NF is the same, and a plurality of instances of the same type of the NF use a same digital certificate.

[0086] S305. The NSMF defines the content that needs to be injected in an image description file of each NF, including: the dynamically generated management domain name, the digital certificate of the NF, and an IP address of the NRF.

[0087] S306. The NSMF sends the deployment request to the PaaS, where the deployment request carries the image address of the NF and the image description file of the NF.

[0088] S307. The PaaS obtains an image based on the image address of the NF, applies for a virtual resource based on the image description file of the NF, and injects the content based on the image description file of the NF.

[0089] S308. The PaaS starts the image.

[0090] S309. The NF performs service processing, and performs the service registration and the service discovery on the NRF.

[0091] An image injection technology is a basic function provided by all cloud platforms. To be specific, the PaaS may modify the file content of a specified directory in the image before the PaaS starts the image. Certainly, the PaaS may add a file to the specified directory.

[0092] The following is a service registration process. FIG. 6 is a flowchart of an embodiment of an NF service registration method according to this application. As shown in FIG. 6, the method in this embodiment includes the following steps.

[0093] S401. The NF obtains the management domain name of the NF, the digital certificate of the NF, and the address of the NRF, where the extension field of the digital certificate of the NF carries the service name of the NF, the service name list on which the NF relies, and the service name list that relies on the NF, and the management domain name of the NF includes the network slice identifier and the identifier of the network to which the network slice belongs.

[0094] Specifically, the NF obtains the three pieces of information, namely, the management domain name of the NF, the digital certificate of the NF, and the address of the NRF by reading a system name server (name server) configuration file (that is, the file injected by the NSMF in the image).

[0095] S402. The NF establishes the communication connection to the NRF based on the address of the NRF, and sends the digital certificate of the NF to the NRF in the TLS or DTLS two-way authentication process.

[0096] S403. The NF forms a complete domain name of the first service based on the service name of the NF and the management domain name of the NF.

[0097] S404. The NF sends a first service registration request to the NRF, where the first service registration request includes the complete domain name of the first service and a first service address.

[0098] S405. After receiving the first service registration request, the NRF performs the service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0099] For a specific registration process, refer to descriptions of a same part in this embodiment shown in FIG. 3, and details are not described herein again.

[0100] The following is a service discovery process. FIG. 7 is a flowchart of an embodiment of an NF service discovery method according to this application. In this embodiment, discovery between NF services located in a same network slice is used as an example. As shown in FIG. 7, the method in this embodiment includes the following steps.

[0101] A process of S501 and S502 is the same as a process of S401 and S402 shown in FIG. 6, and details are not described herein again.

[0102] S503. The NF sends a query request for querying an address of the target service to the NRF, where the query request carries the complete domain name of the target service, and the complete domain name of the target service is a domain name formed by the service name of the target service and the management domain name of the NF.

[0103] S504. The NRF performs verification based on the service name of the target service and the digital certificate of the NF.

[0104] S505. The NRF sends the address of the target service to the NF when the verification succeeds, and sends a query failure message to the NF when the verification fails.

[0105] Specifically, the NRF verifies whether the service name of the target service is in the service name list on which the NF relies that is carried in the extension field of the digital certificate of the NF, and whether the service name of the NF is included in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored. If yes, the verification succeeds. If not, the verification fails.

[0106] It should be noted that, because an NRF configuration is the name server (name server) address of the NF, the NRF configuration service supports implementing the service discovery by using the DNS protocol. To ensure security, a TLS-based DNS message interaction is required. For a non-TLS DNS message, a returned search fails unless a digital certificate of a registered server indicates that an address of the service provider can be obtained by any service consumer.

[0107] In this embodiment, the NF obtains the management domain name of the NF, the digital certificate of the NF, and the address of the NRF that provides service registration and a service discovery function for the NF, then establishes the communication connection to the NRF based on the address of the NRF, and sends the digital certificate of the NF to the NRF in the TLS or DTLS two-way authentication process. The NF sends the query request for querying the address of the target service to the NRF, where the query request carries the complete domain name of the target service formed by the service name of the target service and the management domain name of the NF. Finally, the NRF performs verification based on the service name of the target service and the digital certificate of the NF, and sends the address of the target service to the NF when the verification succeeds. In this way, the NF service located in the same network slice is discovered, and the NF decouples from the network slice, so that the NF decouples from a service security mechanism.

[0108] FIG. 8A and FIG. 8B are a flowchart of an embodiment of an NF service discovery method according to this application. In this embodiment, discovery between NF services located on different network slices is used as an example, and a management network element is an NSMF. As shown in FIG. 8A and FIG. 8B, the method in this embodiment includes:
A process of S601 and S602 is the same as a process of S401 and S402 shown in FIG. 6, and details are not described herein again.

[0109] If customers of NF services are shared by a plurality of network slices, and the services of the plurality of network slices need to be discovered, a management domain name of each network slice is obtained by using a management channel, for example, the NSMF. To be specific, the management domain name of the NF is described above, for example, <Slice id>.<PLMN>. Then a complete domain name is formed by the management domain name of the NF and a service name of the services that needs to be discovered to the NRF to obtain the service address. The following describes the steps performed by the S603 and S604.

[0110] S603. The NF sends the query request for querying the management domain name of the NF in which the target service is located to the NSMF, where the query request carries the service name of the target service.

[0111] S604. After receiving the management domain name of the NF in which the target service sent by the NSMF is located, the NF forms the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.

[0112] S605. The NF sends a query request for querying the address of the target service to the NRF, where the query request carries the complete domain name of the target service.

[0113] When an NRF manages the NF in a same network slice, to be specific, a service consumer and a service discoverer may be located in different management domains, the method further includes the following steps.

[0114] S606. The NRF queries the address of the NRF to which the target service belongs, and sends the address of the NRF to which the queried target service belongs to the NF.

[0115] It should be noted that, because the service consumer and the service discoverer may be located in different management domains, the two management domains may be one NRF or may be two different NRFs. If the two different NRFs are used, an iterative query process of the DNS is similar to a process of the two different NRFs. After a plurality of iterative queries, a secure channel is finally established between the two different NRFs and the NRF of the management domain of the target service to discover the service. The process of discovering the NFs and other management domains of the RNFs is the same as the service discovery process in the network slice.

[0116] S607. The NF establishes, based on the address of the NRF to which the target service belongs, the communication connection to the NRF to which the target service belongs, and sends the digital certificate of the NF to the NRF in the TLS or DTLS two-way authentication process.

[0117] S608. The NRF to which the target service belongs performs verification based on a service name of the target service and the digital certificate of the NF.

[0118] S609. The NRF to which the target service belongs sends the address of the target service to the NF when the verification succeeds, and sends a query failure message to the NF when the verification fails.

[0119] Specifically, the NRF verifies whether the service name of the target service is in the service list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF is included in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored. If yes, the verification succeeds. If not, the verification fails.

[0120] In this embodiment, the NF obtains the management domain name of the NF and the digital certificate of the NF, then establishes the communication connection to the NRF, and sends the digital certificate of the NF to the NRF in the TLS or DTLS two-way authentication process, and the NF. The NF sends the query request for querying the management domain name of the NF in which the target service is located to the NSMF. After receiving the management domain name of the NF in which the target service is located that is sent by the NSMF, the NF forms the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located. The NF sends the query request for querying the address of the target service to the NRF, where the query request carries the complete domain name of the target service. Finally, the NRF performs the verification based on the service name of the target service and the digital certificate of the NF, and sends the address of the target service to the NF when the verification succeeds. In this way, the NF service located in different network slices is discovered, and the NF decouples from the network slice, so that the NF decouples from a service security mechanism.

[0121] In this application, functional modules may be defined for a discovery device (NF or NRF) of the NF service based on the foregoing method example. For example, each functional module may be defined in a correspondence to each function. Alternatively, two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software function module. It should be noted that, in the embodiments of this application, division into modules is used as an example and is merely logical function division. In actual implementation, another division manner may be used.

[0122] FIG. 9 is a schematic structural diagram of an embodiment of an NRF according to this application. As shown in FIG. 9, an NRF in this embodiment may include: an obtaining module 11, a receiving module 12, and a verification module 13. The obtaining module 11 is configured to obtain a digital certificate of an NF in the TLS or DTLS two-way authentication process after establishing a communication connection to the NF, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF. The receiving module 12 is configured to receive a query request that is for querying an address of a target service and that is sent by the NF, where the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, and the management domain name of the NF includes a network slice identifier and an identifier of a network to which a network slice belongs. The verification module 13 is configured to perform verification based on the service name of the target service and the digital certificate of the NF, and send the address of the target service to the NF when the verification succeeds.

[0123] Optionally, the verification module 13 is configured to: verify whether the service name of the target service is in the service name list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF is included in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored.

[0124] The apparatus in this embodiment may be configured to execute the technical solutions in the method embodiment shown in FIG. 3, FIG. 7, or FIG. 8A and FIG. 8B, and implementation principles and technical effects of the apparatus are similar and are not described herein again.

[0125] FIG. 10 is a schematic structural diagram of an embodiment of an NRF according to this application. As shown in FIG. 10, on the basis of the NRF shown in FIG. 9, further, the NRF in this embodiment may further include a registration module 14, where the receiving module 12 is further configured to: before receiving the query request that is for querying the address of the target service and that is sent by the NF, receive a first service registration request sent by the NF, where the first service registration request includes a complete domain name of a first service and a first service address, and the complete domain name of the first service is a domain name formed by the service name of the NF and the management domain name of the NF. The registration module 14 is configured to perform service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0126] Optionally, the registration module 14 is configured to: verify whether the service name of the NF in the complete domain name of the first service is the same as the service name of the NF carried in the extension field of the digital certificate, and if yes, succeed in the registration and store a correspondence between the complete domain name of the first service, the first service address, the service name list on which the NF relies that is carried in the extension field of the digital certificate, and the service name list that relies on the NF.

[0127] Optionally, the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in the network slice, and the digital certificate of the NF is injected in the image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.

[0128] Optionally, the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.

[0129] The apparatus in this embodiment may be configured to perform the technical solutions in the method embodiment shown in FIG. 6, and implementation principles and technical effects of the apparatus are similar and are not described herein again.

[0130] FIG. 11 is a schematic structural diagram of an embodiment of an NF according to this application. As shown in FIG. 11, an NF in this embodiment may include: an obtaining module 21, a first sending module 22, and a query module 23. The obtaining module 21 is configured to obtain a management domain name of the NF and a digital certificate of the NF, where the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF, and the management domain name of the NF includes a network slice identifier and an identifier of a network to which a network slice belongs. The first sending module 22 is configured to establish a communication connection to an NRF, and send the digital certificate of the NF to the NRF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process. The query module 23 is configured to send a query request for querying an address of a target service to the NRF, where the query request carries a complete domain name of the target service, and the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, so that the NRF performs verification based on the service name of the target service and the digital certificate of the NF.

[0131] Optionally, the query module 23 is further configured to: before sending the query request for querying the address of the target service to the NRF, from the complete domain name of the target service based on the service name of the target service and the management domain name of the NF.

[0132] Optionally, the query module 23 is further configured to: before sending the query request for querying the address of the target service to the NRF, send the query request for querying the management domain name of the NF in which the target service is located to a management network element, where the query request carries the service name of the target service; and after receiving the management domain name of the NF in which the target service is located that is sent by the management network element, form the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.

[0133] The apparatus in this embodiment may be configured to perform the technical solutions in the method embodiment shown in FIG. 3, FIG. 7, or FIG. 8A and FIG. 8B, and implementation principles and technical effects of the apparatus are similar and are not described herein again.

[0134] FIG. 12 is a schematic structural diagram of an embodiment of an NF according to this application. As shown in FIG. 12, on the basis of the NF shown in FIG. 11, further, the NF in this embodiment may further include a receiving module 24. The receiving module 24 is configured to receive the address of the target service that is sent by the NRF when the verification succeeds.

[0135] Optionally, the query module 23 is further configured to: before sending the query request for querying the address of the target service to the NRF, form a complete domain name of a first service based on the service name of the NF and the management domain name of the NF, and send a first service registration request to the NRF, where the first service registration request includes the complete domain name of the first service and a first service address, so that the NRF performs service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.

[0136] Optionally, the management domain name of the NF is dynamically generated by the management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in a network slice. The digital certificate of the NF is injected in an image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.

[0137] Optionally, the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.

[0138] The apparatus in this embodiment may be configured to perform the technical solutions in the method embodiment shown in FIG. 6, and implementation principles and technical effects of the apparatus are similar and are not described herein again.

[0139] FIG. 13 is a schematic diagram of an NRF according to this application. The NRF 1100 includes:

a memory 1103, configured to store a program instruction, and the memory may be a flash memory (flash memory); and

a processor 1102, configured to invoke and execute the program instruction in the memory, to implement the steps in the method shown in FIG. 3, FIG. 6, FIG. 7, or FIG. 8A and FIG. 8B. For details, refer to related description in the foregoing method embodiment.



[0140] Optionally, the memory 1103 may be independent, or may be integrated with the processor 1102.

[0141] When the memory 1103 is a device independent of the processor 1102, the apparatus 1100 may further include:
a bus 1104, configured to connect the memory 1103 and the processor 1102.

[0142] The apparatus may be configured to perform the steps and/or procedures that are corresponding to the NRF in the foregoing method embodiment.

[0143] FIG. 14 is a schematic diagram of an NF according to this application. The NF 1200 includes:

a memory 1203, configured to store a program instruction, and the memory may be a flash (flash memory);

a processor 1202, configured to invoke and execute the program instruction in the memory, to implement the steps in the method shown in FIG. 3, FIG. 6, FIG. 7, or FIG. 8A and FIG. 8B. For details, refer to related description in the foregoing method embodiment.



[0144] Optionally, the memory 1203 may be independent, or may be integrated with the processor 1202.

[0145] When the memory 1203 is a device independent of the processor 1202, the apparatus 1200 may further include:
a bus 1204, configured to connect the memory 1203 and the processor 1202.

[0146] The apparatus may be configured to perform the steps and/or procedures that are corresponding to the NF in the foregoing method embodiment.

[0147] This application further provides a readable storage medium. The readable storage medium stores a computer program. When at least one processor of a discovery device (an NRF or an NF) of an NF service executes the computer program, the discovery device of the NF service performs the NF service discovery method provided in the foregoing implementations.

[0148] This application further provides a program product. The program product includes a computer program, and the computer program is stored in a readable storage medium. At least one processor of a discovery device of an NF service may read the computer program from the readable storage medium, and the at least one processor executes the computer program, so that the discovery device of the NF service performs the NF service discovery method provided in the foregoing implementations.

[0149] A person of ordinary skill in the art may understand that all or some steps of the method embodiments may be implemented by program instructing related hardware. The foregoing program may be stored in a computer-readable storage medium. When the program is executed, the steps of the method embodiments are performed. The foregoing storage medium includes any medium that can store program code, such as a ROM, a RAM, a magnetic disk, or an optical disc.


Claims

1. A network function NF service discovery method, comprising:

after establishing a communication connection to an NF, obtaining, by a network function repository function NRF, a digital certificate of the NF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process, wherein the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF;

receiving, by the NRF, a query request that is for querying an address of a target service and that is sent by the NF, wherein the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, and the management domain name of the NF comprises a network slice identifier and an identifier of a network to which a network slice belongs; and

performing, by the NRF, verification based on the service name of the target service and the digital certificate of the NF, and sending the address of the target service to the NF when the verification succeeds.


 
2. The method according to claim 1, wherein the performing, by the NRF, verification based on the service name of the target service and the digital certificate of the NF comprises:
verifying, by the NRF, whether the service name of the target service is in the service name list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF is comprised in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored.
 
3. The method according to claim 1 or 2, wherein before the receiving, by the NRF, a query request that is for querying an address of a target service and that is sent by the NF, the method further comprises:

receiving, by the NRF, a first service registration request sent by the NF, wherein the first service registration request comprises a complete domain name of a first service and a first service address, and the complete domain name of the first service is a domain name formed by the service name of the NF and the management domain name of the NF; and

performing, by the NRF, service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.


 
4. The method according to claim 3, wherein the performing, by the NRF, service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF comprises:
verifying, by the NRF, whether the service name of the NF in the complete domain name of the first service is the same as the service name of the NF carried in the extension field of the digital certificate, and if yes, succeeding in the registration and storing a correspondence between the complete domain name of the first service, the first service address, the service name list on which the NF relies that is carried in the extension field of the digital certificate, and the service name list that relies on the NF.
 
5. The method according to any one of claims 1 to 4, wherein the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in the network slice, and the digital certificate of the NF is injected in the image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.
 
6. The method according to any one of claims 1 to 4, wherein the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.
 
7. A network function NF service discovery method, comprising:

obtaining, by the NF, a management domain name of an NF and a digital certificate of the NF, wherein the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF, and the management domain name of the NF comprises a network slice identifier and an identifier of a network to which a network slice belongs;

establishing, by the NF, a communication connection to an NRF, and sending the digital certificate of the NF to the NRF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process; and

sending, by the NF to the NRF, a query request for querying an address of a target service, wherein the query request carries a complete domain name of the target service, and the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, so that the NRF performs verification based on the service name of the target service and the digital certificate of the NF.


 
8. The method according to claim 7, wherein before the sending, by the NF to the NRF, a query request for querying an address of a target service, the method further comprises:
forming, by the NF, the complete domain name of the target service based on the service name of the target service and the management domain name of the NF.
 
9. The method according to claim 7, wherein before the sending, by the NF to the NRF, a query request for querying an address of a target service, the method further comprises:

sending, by the NF to a management network element, a query request for querying the management domain name of the NF in which the target service is located, wherein the query request carries the service name of the target service; and

after receiving the management domain name of the NF in which the target service is located that is sent by the management network element, forming, by the NF, the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.


 
10. The method according to any one of claims 7 to 9, further comprising:
receiving, by the NF, the address of the target service sent by the NRF when the verification succeeds.
 
11. The method according to any one of claims 7 to 9, wherein before the sending, by the NF to the NRF, a query request for querying an address of a target service, the method further comprises:
forming, by the NF, a complete domain name of a first service based on the service name of the NF and the management domain name of the NF, and sending a first service registration request to the NRF, wherein the first service registration request comprises the complete domain name of the first service and a first service address, so that the NRF performs service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.
 
12. The method according to claim 7, wherein the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in a network slice, and the digital certificate of the NF is injected in an image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.
 
13. The method according to claim 7, wherein the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.
 
14. A network function repository function NRF, comprising:

an obtaining module, configured to obtain a digital certificate of an NF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process after establishing a communication connection to the NF, wherein the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF;

a receiving module, configured to receive a query request that is for querying an address of a target service and that is sent by the NF, wherein the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, and the management domain name of the NF comprises a network slice identifier and an identifier of a network to which a network slice belongs; and

a verification module, configured to perform verification based on the service name of the target service and the digital certificate of the NF, and send the address of the target service to the NF when the verification succeeds.


 
15. The NRF according to claim 14, wherein the verification module is configured to:
verify whether the service name of the target service is in the service name list on which the NF relies that is carried in an extension field of the digital certificate of the NF, and whether the service name of the NF is comprised in the service name list that relies on the NF, that is carried in the extension field of the digital certificate, and that is corresponding to the complete domain name of the target service that has been registered and stored.
 
16. The NRF according to claim 14 or 15, wherein the receiving module is further configured to:

before receiving the query request that is for querying an address of a target service and that is sent by the NF, receive a first service registration request sent by the NF, wherein the first service registration request comprises a complete domain name of a first service and a first service address, and the complete domain name of the first service is a domain name formed by the service name of the NF and the management domain name of the NF; and

the NRF further comprises:
a registration module, configured to perform service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.


 
17. The NRF according to claim 16, wherein the registering module is configured to:
verify whether the service name of the NF in the complete domain name of the first service is the same as the service name of the NF carried in the extension field of the digital certificate, and if yes, succeed in the registration and store a correspondence between the complete domain name of the first service, the first service address, the service name list on which the NF relies that is carried in the extension field of the digital certificate, and the service name list that relies on the NF.
 
18. The NRF according to any one of claims 14 to 17, wherein the management domain name of the NF is dynamically generated by a management network element based on a network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in the network slice, and the digital certificate of the NF is injected in the image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.
 
19. The NRF according to any one of claims 14 to 17, wherein the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.
 
20. A network function NF, comprising:

an obtaining module, configured to obtain a management domain name of the NF and a digital certificate of the NF, wherein the digital certificate of the NF carries the service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF, and the management domain name of the NF comprises a network slice identifier and an identifier of a network to which a network slice belongs;

a first sending module, configured to establish a communication connection to an NRF, and send the digital certificate of the NF to the NRF in a transport layer security TLS protocol or datagram transport layer security DTLS protocol two-way authentication process; and

a query module, configured to send a query request for querying an address of a target service to the NRF, wherein the query request carries a complete domain name of the target service, and the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of an NF in which the target service queried by the NF is located, so that the NRF performs verification based on the service name of the target service and the digital certificate of the NF.


 
21. The NF according to claim 20, wherein the query module is further configured to:
before sending the query request for querying the address of the target service to the NRF, form the complete domain name of the target service based on the service name of the target service and the management domain name of the NF.
 
22. The NF according to claim 20, wherein the query module is further configured to:

before sending the query request for querying the address of the target service to the NRF, send a query request for querying the management domain name of the NF in which the target service is located to a management network element, wherein the query request carries the service name of the target service; and

after receiving the management domain name of the NF in which the target service is located that is sent by the management network element, form the complete domain name of the target service based on the service name of the target service and the management domain name of the NF in which the target service is located.


 
23. The NF according to any one of claims 20 to 22, further comprising:
a receiving module, configured to receive the address of the target service sent by the NRF when the verification succeeds.
 
24. The NF according to any one of claims 20 to 22, wherein the query module is further configured to:
before sending the query request for querying the address of the target service to the NRF, form a complete domain name of a first service based on the service name of the NF and the management domain name of the NF, and send a first service registration request to the NRF, wherein the first service registration request comprises the complete domain name of the first service and a first service address, and the NRF performs service registration based on the complete domain name of the first service and the service name of the NF that is carried in the extension field of the digital certificate of the NF.
 
25. The NF according to claim 20, wherein the management domain name of the NF is dynamically generated by a management network element based on the network slice identifier, and is injected by the PaaS in an image of the NF in a process in which the management network element requests a platform as a service PaaS to deploy the NF in a network slice, and the digital certificate of the NF is injected in an image of the NF in the process in which the management network element requests the PaaS to deploy the NF in the network slice.
 
26. The NF according to claim 20, wherein the management domain name of the NF and the digital certificate of the NF are configured after the NF is started.
 
27. A network function repository function, comprising: a processor and a memory, wherein the memory is configured to store a computer execution instruction, and when the network function repository function runs, the processor executes the computer execution instruction stored in the memory, so that the network function repository function performs the network function service discovery method according to any one of claims 1 to 6.
 
28. A network function, comprising a processor and a memory, wherein the memory is configured to store a computer executable instruction, and when the network function runs, the processor executes the computer executable instruction stored in the memory, so that the network function performs the network function service discovery method according to any one of claims 7 to 13.
 
29. A computer readable storage medium, wherein the computer readable storage medium stores an instruction, and when the instruction is run on a computer, the computer is enabled to perform the network function service discovery method according to any one of claims 1 to 6.
 
30. A computer readable storage medium, wherein the computer readable storage medium stores an instruction, and when the instruction is run on a computer, the computer is enabled to perform the network function service discovery method according to any one of claims 7 to 13.
 




Drawing














































REFERENCES CITED IN THE DESCRIPTION



This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

Patent documents cited in the description