Service discovery method and device, communication equipment and readable storage medium
By using blockchain technology to share information in a distributed autonomous network, the problem of low service discovery efficiency among core network units is solved, and an efficient service discovery process is achieved.
Patent Information
- Application Number
- CN202410545973.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2025-11-11
AI Technical Summary
In distributed autonomous networks, the number of service discovery signaling messages between core network units grows exponentially, leading to inefficiency. How to achieve efficient service discovery has become a challenge.
By using blockchain technology to share information among core network units, network functions that meet certain conditions can be obtained by querying the blockchain, reducing signaling interactions and achieving efficient service discovery.
Without sending signaling, the network functions within the core network unit that can provide the required capabilities can be accurately determined, reducing the number of signaling messages and improving service discovery efficiency.
Smart Images

Figure CN120935546A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of wireless technology, specifically relating to a service discovery method, apparatus, communication device, and readable storage medium. Background Technology
[0002] In related technologies, the Distributed Autonomous Network (DAN) architecture has been proposed for network design. The DAN architecture mainly consists of distributed core network units and their related protocols. Each core network unit can be simply understood as a minimal set of core networks, containing various network functions (NFs). When a core network unit lacks certain NFs (such as User Plane Functions (UPFs)) or the processing capacity of certain NFs is insufficient, the core network unit can request and invoke the capabilities of NFs in other core network units to assist in completing the relevant functions. However, as the number of core network units increases, the number of signaling messages related to service discovery between core network units also grows exponentially. In this situation, how to efficiently achieve service discovery between core network units is a pressing problem that needs to be solved. Summary of the Invention
[0003] The purpose of this application is to provide a service discovery method, apparatus, communication device, and readable storage medium to solve the problem of how to efficiently realize service discovery between core network units.
[0004] To solve the above-mentioned technical problems, this application is implemented as follows:
[0005] Firstly, a service discovery method is provided, including:
[0006] The first network function receives a service discovery request sent by the second network function; wherein the service discovery request includes a first condition, and the first network function and the second network function are deployed in the first core network unit;
[0007] The first network function is based on blockchain and queries for third network functions in other core network units besides the first core network unit that meet the first condition.
[0008] Secondly, a service discovery device is provided, comprising:
[0009] A first receiving module is configured to receive a service discovery request sent by a second network function; wherein the service discovery request includes a first condition, the device is applied to a first network function, and the first network function and the second network function are deployed in a first core network unit;
[0010] The first query module is used to query, based on blockchain, third network functions within other core network units besides the first core network unit that meet the first condition.
[0011] Thirdly, a communication device is provided, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0012] Fourthly, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0013] Fifthly, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0014] The solution in this application embodiment allows for the use of blockchain technology to share information among core network units during service discovery. This enables the use of blockchain to query network functions within other core network units that meet the required conditions. In other words, it allows for the determination of which network function within a core network unit can provide the required capabilities without sending signaling, thereby efficiently realizing service discovery among core network units. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the communication network architecture in an embodiment of this application;
[0016] Figure 2 This is a schematic diagram of the SCU cluster deployment configuration in an embodiment of this application;
[0017] Figure 3 This is a schematic diagram of the SCU in the embodiments of this application;
[0018] Figure 4 This is a flowchart of a service discovery method provided in an embodiment of this application;
[0019] Figure 5 This is a flowchart of the SCU-based network element structure in Embodiment 1 of this application;
[0020] Figure 6 This is a flowchart of the center jump process in Embodiment 2 of this application;
[0021] Figure 7 This is a flowchart of the service registration and discovery process in Embodiment 3 of this application;
[0022] Figure 8 This is a schematic diagram of the structure of a service discovery device provided in an embodiment of this application;
[0023] Figure 9 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. Furthermore, "and / or" in the specification and claims indicates at least one of the connected objects.
[0026] To facilitate understanding of the embodiments of this application, the following will be described first.
[0027] For communication network architectures (such as 6G networks), such as Figure 1 As shown, the related technologies propose an overall logical architecture of "three bodies, four layers, and five faces". The three bodies include the network ontology, the management and orchestration body, and the digital twin. The four layers include the resource and computing power layer, the routing and connection layer, the service-oriented function layer, and the open enablement layer. The five faces include the control plane, the user plane, the data plane, the intelligence / computing plane, and the security plane.
[0028] In network design, a Distributed Autonomous Network (DAN) architecture is proposed for 6G network design, which includes three core characteristics: distributed nature, network autonomy, and self-contained units. The DAN architecture mainly consists of distributed core network units (or Small Cloud Units (SCUs)) and their related protocols. The SCU (core network unit) is the most critical module (basic unit) constituting the DAN architecture, and its characteristics include, but are not limited to:
[0029] (1) A consistent organizational framework, which includes the above-mentioned "four layers and five aspects" capabilities. The service-oriented functional layer is organized and communicates according to the service-oriented HSBA architecture, and has the ability to complete data and signaling processing locally to achieve efficient network response.
[0030] (2) On-demand customization: its infrastructure specifications, connection protocols, service capabilities, and open capabilities can all be customized according to the needs of the scenario; it can be established on demand in the network, and SCUs can be quickly and easily networked together.
[0031] (3) It has autonomous capabilities, enabling unmanned management, autonomous operation, automatic perception of environmental changes, and real-time network adjustment, thereby meeting diverse business needs;
[0032] (4) SCU includes two potential deployment forms: one is to include only core network capabilities, and the other is to integrate access network and core network.
[0033] (5) The SCU includes three networking modes: ring networking mode, star networking mode and hybrid networking mode.
[0034] In a star network topology, an SCU cluster deployment containing only core network capabilities can be configured as follows: Figure 2 As shown, each distributed SCU node is deployed around the central SCU node.
[0035] Each SCU can be simply understood as a minimal set of the core network, for example... Figure 3 As shown, these may include, but are not limited to, Unified Data Management (UDM), Unified Data Repository (UDR), Policy Control Function (PCF), Network Exposure Function (NEF), Access and Mobility Management Function (AMF), Session Management Function (SMF), User Plane Function (UPF), Network Repository Function (NRF), and Authentication Server Function (AUSF).
[0036] Optionally, the core network unit in the embodiments of this application may be called a micro-cloud unit (SCU) or other names, as long as it has similar functions, features, structures, etc., and this application does not impose any restrictions on this.
[0037] The service discovery method, apparatus, communication device, and readable storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0038] Please see Figure 4 , Figure 4 This is a flowchart of a service discovery method provided in an embodiment of this application. The method is applied to a first network function, such as... Figure 4 As shown, the method includes the following steps:
[0039] Step 41: The first network function receives a service discovery request sent by the second network function; the service discovery request includes a first condition, and the first network function and the second network function are deployed in the first core network unit;
[0040] Step 42: The first network function, based on the blockchain, queries the third network functions in other core network units besides the first core network unit that meet the first condition.
[0041] In this embodiment of the application, the features of the first core network unit and other core network units can be found in the above description of the SCU, and will not be repeated here.
[0042] Optionally, the first core network unit can be a distributed node or a central node.
[0043] The first network function can be selected as the network storage function (NRF) within the first core network unit or other network functions that can achieve similar functions.
[0044] The second network function can be understood as a network function with service requirements within the first core network unit, such as AMF, SMF, or AUSF.
[0045] The first condition refers to the conditions that the required network function must meet, and can be determined based on the actual situation. The third network function may be, for example, UPF, AMF, SMF, or AUSF.
[0046] The blockchain can take the form of an existing blockchain. This application does not limit the specific form of the blockchain, as long as it meets the requirements for storage, querying, etc.
[0047] The solution in this application embodiment allows for the use of blockchain technology to share information among core network units during service discovery. This enables the use of blockchain to query network functions within other core network units that meet the required conditions. In other words, it allows for the determination of which network function within a core network unit can provide the required capabilities without sending signaling, thereby efficiently realizing service discovery among core network units.
[0048] In this embodiment of the application, in order to support service discovery and invocation between core network units, it is necessary to ensure the reachability of the core network unit where the service provider is located, and to formulate certain strategies so that when selecting services, a suitable or optimal NF can be selected to provide services according to the scenario.
[0049] Optionally, if multiple third-party network functions satisfying the first condition are found, a predetermined strategy can be used to select the optimal network function. The service discovery method may further include:
[0050] The first network function takes the third network function deployed in the second core network unit as the target network function among the plurality of third network functions; or, when the plurality of third network functions does not include a third network function deployed in the second core network unit, the third network function that satisfies a preset strategy among the plurality of third network functions is taken as the target network function; wherein, the first core network unit is a distributed node and the second core network unit is a central node.
[0051] Since the central node generally has more comprehensive and powerful network functions, using the third network function deployed in the second core network unit (i.e., the central node) as the target network function can help select the appropriate or optimal network function to provide services.
[0052] Optionally, the preset strategy may include, but is not limited to, the proximity principle, the measurement-based principle, etc., and the NF selection strategy can be customized / configured according to actual needs. This can help select the appropriate or optimal network function to provide services.
[0053] Optionally, prior to step 42 above, the service discovery method in this embodiment may further include:
[0054] The first network function, based on information stored in its internal database, queries whether there are any network functions within the first core network unit that meet the first condition. If no network function within the first core network unit meets the first condition, it queries the blockchain to find third network functions within other core network units that meet the first condition. If a network function within the first core network unit meets the first condition, it can directly request that network function to provide services, thereby improving response speed.
[0055] In one alternative embodiment, the strategy for selecting network functions that meet the corresponding conditions may be: the local NF is the highest priority service provider, the NF in the central node is the second priority service provider, and the NF in other distributed nodes is the lowest priority service provider.
[0056] Optionally, the process of querying third network functions that meet the first condition within other core network units besides the first core network unit, based on blockchain, can be as follows:
[0057] The first network function sends a first request to the blockchain, the first request being used to request a query for a third network function within the other core network units that meets the first condition;
[0058] The first network function receives key information from the third network function sent by the blockchain. This key information can be represented as NF Simple Profile information.
[0059] In this way, by using the key information of network functions stored on the blockchain, the third network function that meets the first condition can be identified without having to go through a lot of signaling interactions, thereby greatly reducing the number of signaling messages for service discovery between core network units.
[0060] Optionally, the key information of the third network function includes, but is not limited to, at least one of the following:
[0061] The identifier of the core network unit where the third network function is located is used to uniquely identify the corresponding core network unit and can be configured by the central node.
[0062] The identifier of the third network function is used to uniquely identify this third network function;
[0063] The type of the third network function is, for example, AMF, SMF, etc.;
[0064] The address of the third network function is the address that provides services to the outside world.
[0065] Optionally, after receiving the key information of the third network function, the service discovery method in this embodiment may further include:
[0066] Based on the key information of the third network function, the first network function sends a second request to the fourth network function in the third core network unit. The second request is used to request the overview information of the third network function. The third core network unit is the core network unit where the third network function is located.
[0067] The first network function receives the overview information of the third network function sent by the fourth network function, and sends the overview information to the second network function. The overview information is used by the second network function to request services from the third network function.
[0068] It should be noted that the overview information (such as profile information) of the third network function can be understood as the complete information of the third network function. The fourth network function can be selected as NRF or other network functions that can achieve similar functions. In this way, with the help of the overview information of the third network function, the corresponding third network function can be accurately located to provide services.
[0069] Optionally, the service discovery method in this embodiment may further include:
[0070] The first network function receives the registration request sent by the second network function;
[0071] The first network function writes the key information of the second network function into the blockchain.
[0072] In this way, key information of network functions within the core network unit can be written into the blockchain through the registration mechanism; furthermore, writing key information of network functions, rather than all information, into the blockchain can simplify the information uploaded to the chain, reduce the amount of blockchain computation, and increase information synchronization efficiency.
[0073] Optionally, the key information for the second network function includes, but is not limited to, at least one of the following:
[0074] The identifier of the core network unit where the second network function is located is used to uniquely identify the corresponding core network unit and can be configured by the central node;
[0075] The identifier of the second network function is used to uniquely identify this second network function;
[0076] The second network function type is, for example, AMF, SMF, etc.;
[0077] The address of the second network function, which is the address that provides services to the outside world;
[0078] The address of the first network function, for example, is the access address of the first network function.
[0079] In this embodiment, a heartbeat mechanism can be used to ensure that each core network unit can provide services and maintain reachability. Optionally, if the first core network unit is a distributed node, the service discovery method may further include:
[0080] The first network function sends a first heartbeat request to the fifth network function within the second core network unit, where the second core network unit is the central node; the fifth network function is, for example, NRF or other network functions that can perform similar functions; the first heartbeat request is, for example, the first heartbeat request.
[0081] The first network function receives a first heartbeat response sent by the fifth network function. The first heartbeat response includes an identifier assigned to the first core network unit, which is used to uniquely identify the first core network unit, so as to maintain a heartbeat with the second core network unit based on the identifier.
[0082] For example, after receiving the first heartbeat request, the fifth network function can assign an identifier to the first core network unit and write the overview information of the first core network unit into the blockchain to maintain the service status of the first core network unit. The overview information of the first core network unit can be understood as the full information of the first core network unit, which may include, but is not limited to, at least one of the following: the identifier of the first core network unit, the role of the first core network unit, the address of the first core network unit, etc.
[0083] Optionally, after receiving the first heartbeat response, the service discovery method in this embodiment may further include:
[0084] The first network function periodically sends a second heartbeat request to the fifth network function. The second heartbeat request includes the identifier of the first core network unit and is used to request the maintenance of a heartbeat with the second core network unit. For example, after receiving the second heartbeat request, the fifth network function can reset a corresponding timer based on the identifier of the first core network unit. This timer is used to detect whether the heartbeat request of the first network function has timed out, and when it has timed out, deletes the overview information of the first core network unit from the blockchain.
[0085] By leveraging the aforementioned blockchain-based heartbeat mechanism, distributed nodes (such as the first core network unit) only need to maintain heartbeats with the central node (such as the second core network unit), without needing to maintain heartbeats with other distributed nodes, thereby reducing signaling overhead. Distributed nodes can perceive the service status of other distributed nodes through the overview information of the core network unit on the blockchain.
[0086] Optionally, if the first core network unit is a central node, the service discovery method in this embodiment may further include:
[0087] The first network function receives a third heartbeat request sent by the sixth network function in the fourth core network unit, where the fourth core network unit is a distributed node; the sixth network function is, for example, NRF or other network functions that can achieve similar functions; the third heartbeat request is, for example, the first heartbeat request.
[0088] The first network function assigns an identifier to the fourth core network unit and writes the overview information of the fourth core network unit into the blockchain;
[0089] The first network function sends a second heartbeat response to the sixth network function. The second heartbeat response includes the identifier of the fourth core network unit, which is used to uniquely identify the first core network unit, so as to maintain a heartbeat with the second core network unit based on the identifier.
[0090] Optionally, after sending the first heartbeat response as described above, the service discovery method in this embodiment may further include:
[0091] The first network function receives the fourth heartbeat request sent by the sixth network function, the fourth heartbeat request including the identifier of the fourth core network unit;
[0092] The first network function resets the timer based on the identifier of the fourth core network unit; wherein the timer is used to detect whether the heartbeat request of the sixth network function has timed out, and when it has timed out, deletes the overview information of the fourth core network unit from the blockchain.
[0093] Optionally, the overview information of the fourth core network unit may include at least one of the following:
[0094] The identifier of the fourth core network unit, which uniquely identifies the corresponding fourth core network unit;
[0095] The role of the fourth core network unit is used to indicate whether the corresponding fourth core network unit is a distributed node or a central node.
[0096] The address of the fourth core network unit, for example, is the access address of the fourth core network unit.
[0097] By leveraging the aforementioned blockchain-based heartbeat mechanism, distributed nodes (such as the fourth core network unit) can maintain heartbeats only with the central node (such as the first core network unit), without needing to maintain heartbeats with other distributed nodes, thereby reducing signaling overhead. Distributed nodes can perceive the service status of other distributed nodes through the overview information of the core network unit on the blockchain.
[0098] The present application will now be described in conjunction with specific embodiments.
[0099] Example 1
[0100] This embodiment proposes a network element structure based on SCU (i.e., core network unit), and enhances the NRF within each SCU to provide functions such as heartbeat keep-alive, service discovery, and service invocation between SCUs. Figure 5 As shown.
[0101] Specifically, NRF is responsible for some interactions between SCUs. Its main tasks include: heartbeat between distributed SCU nodes and central SCU nodes, obtaining profile information of NFs in other SCU nodes, maintaining simple profile information of NFs in its own SCU node, and maintaining profile information of its own SCU node.
[0102] like Figure 5 As shown, this application can use blockchain technology to share SCU Profile information and NFSimple Profile information among SCU nodes, thereby reducing the number of service discovery signaling requests between SCUs in the entire topology and ensuring the security of SCU and NF information.
[0103] In one optional implementation, the format of the SCU Profile information can be as shown in Table 1 below:
[0104] Table 1
[0105]
[0106]
[0107] In another alternative implementation, the format of the NF Simple Profile information can be as shown in Table 2 below:
[0108] Table 2
[0109]
[0110] Example 2
[0111] This second embodiment describes the process of distributed SCU nodes sending heartbeats to the central SCU node, such as... Figure 6 As shown, it may include the following steps:
[0112] Step 1: Initialize the central SCU node. During the initialization process, the NRF assigns an SCU ID. For example, the default SCU ID of the central SCU node is 1.
[0113] Step 2: The NRF of the central SCU node writes the SCU Profile information to the blockchain. This SCU Profile information may include at least one of the following: SCU ID, SCU role, NRF access address, etc. Other distributed SCU nodes can perceive the SCU Profile information through the blockchain;
[0114] Step 3: Initialize the distributed SCU node. Query the central SCU node information from the blockchain to obtain the NRF address of the central SCU node.
[0115] Step 4: The NRF of the distributed SCU node sends a heartbeat request to the NRF of the central SCU node, which carries the URL information of its own NRF.
[0116] Step 5: The central SCU node receives the first heartbeat packet sent by the distributed SCU node and assigns an SCU ID to the distributed SCU node;
[0117] Step 6: The NRF of the central SCU node is responsible for writing the SCU Profile information of the distributed SCU nodes to the blockchain. The information written may include SCU ID, SCU role and the NRF access address of the SCU, etc.
[0118] Step 7: The central SCU node sends a heartbeat response to the corresponding distributed SCU node, which carries the assigned SCU ID;
[0119] Step 8: The central SCU node initializes and starts a timer based on its assigned SCU ID to detect whether the heartbeat of the corresponding distributed SCU node has timed out;
[0120] Step 9: Distributed SCU nodes periodically send heartbeat requests to the central SCU node to maintain the heartbeat. The heartbeat request carries the SCU ID.
[0121] Step 10: After receiving a heartbeat request, the central SCU node resets the corresponding timer according to the SCU ID and continues to wait for the next heartbeat packet;
[0122] Step 11: When the central SCU node does not receive a heartbeat request from the distributed SCU node for a period of time, the timer is judged to have timed out;
[0123] Step 12: The timer of the central SCU node times out, triggering the NRF to send a request to delete the SCU Profile information to the blockchain, updating the information on the blockchain.
[0124] In summary, the difference between a central SCU node and a distributed SCU node can be distinguished by whether or not they can write SCU information. For data security, SCU information should, in principle, only be written to the blockchain from the central SCU node; distributed SCU nodes retrieve data from the central SCU node / blockchain as needed. Once the SCU node information is initialized and the SCUProfile information is written to the blockchain through the central SCU, service registration and discovery processes can begin among the SCUs.
[0125] Example 3
[0126] This third embodiment describes the service registration and discovery process, such as Figure 7 As shown, the service registration process may include the following steps:
[0127] Step 1-1: The NF of the central SCU is initialized, updated, deleted, etc., and a registration request is sent to the NRF of this node, which carries the NF Profile information;
[0128] Steps 1-2: The NRF of the central SCU persists the NF Profile information (if it is full information) to the database of this node according to the received registration request;
[0129] Steps 1-3: The NRF of the central SCU writes the NF Simple Profile information (if it is critical information) to the blockchain to complete the registration update;
[0130] Step 2-1: The distributed SCU performs NF initialization, updates, deletions, etc., and sends a registration request to the local node's NRF, which carries NF Profile information;
[0131] Step 2-2: The NRF of the distributed SCU persists the NF Profile information (if it is full information) to the local node database according to the received registration request;
[0132] Steps 2-3: The NRF of the distributed SCU writes the NF Simple Profile information (if it is critical information) to the blockchain to complete the registration update.
[0133] Through steps 1-1 to 1-3 and steps 2-1 to 2-3 above, the NRF of other SCUs can perceive the NF information possessed by each SCU node through the blockchain.
[0134] After registering for the above services, such as Figure 7 As shown, the service discovery process may include the following steps:
[0135] Step 3: The NF of the distributed SCU sends a service discovery request to the NRF of the local node;
[0136] Step 4: The distributed SCU's NRF queries the local node's database to see if there is any NF information that meets the conditions; if so, it returns the corresponding NF information to determine the NF that meets the conditions; if not, it proceeds to step 5.
[0137] Step 5: The NRF of the distributed SCU sends a query request to the blockchain to check if there is NFSimple Profile information that meets the conditions on the chain; if there is, it returns the corresponding NF information to determine the NF that meets the conditions; if not, it returns empty information.
[0138] Step 6: The NRF of the distributed SCU summarizes the NFs that meet the conditions and selects the optimal NF according to a certain strategy. For example, in this embodiment, the local NF is used as the highest priority service provider, the central node NF is used as the second priority service provider, and other distributed node NFs are used as the lowest priority service providers for selection. In addition, there are many other strategies to determine the selection of the optimal NF, such as the proximity principle, the measurement-based principle, etc.
[0139] Step 7: The NRF of the distributed SCU sends a request to the NRF of the SCU (e.g., the central SCU) where the optimal NF is located, based on the NF Simple Profile information of the optimal NF, in order to request the NF Profile information of the optimal NF.
[0140] Step 8: The NRF of the distributed SCU returns the acquired NF Profile information to the corresponding NF;
[0141] Step 9: The NF of the distributed SCU sends a request to the optimal NF based on the NF Profile information received from the optimal NF, requesting the optimal NF to provide services.
[0142] Step 10: The NF of the distributed SCU receives the service response returned by the optimal NF.
[0143] It should be noted that the service discovery method provided in this application embodiment can be executed by a service discovery device or a control module within that service discovery device for executing the service discovery method. This application embodiment uses the execution of the service discovery method by a service discovery device as an example to illustrate the service discovery device provided in this application embodiment.
[0144] Please see Figure 8 , Figure 8 This is a schematic diagram of a service discovery device provided in an embodiment of this application. The device is applied to a first network function, such as... Figure 8 As shown, the service discovery device 80 includes:
[0145] The first receiving module 81 is configured to receive a service discovery request sent by the second network function; wherein the service discovery request includes a first condition, and the first network function and the second network function are deployed in the first core network unit;
[0146] The first query module 82 is used to query, based on blockchain, third network functions in other core network units besides the first core network unit that meet the first condition.
[0147] In this embodiment, the first network function can be selected as the NRF within the first core network unit or other network functions capable of performing similar functions. The second network function can be understood as a network function within the first core network unit that has service requirements, such as AMF, SMF, or AUSF.
[0148] The solution in this application embodiment allows for the use of blockchain technology to share information among core network units during service discovery. This enables the use of blockchain to query network functions within other core network units that meet the required conditions. In other words, it allows for the determination of which network function within a core network unit can provide the required capabilities without sending signaling, thereby efficiently realizing service discovery among core network units.
[0149] Optionally, the service discovery device 80 also includes:
[0150] The determining module is configured to, when querying multiple third network functions that satisfy the first condition, select the third network function deployed in the second core network unit as the target network function; or, when the multiple third network functions do not include a third network function deployed in the second core network unit, select the third network function that satisfies a preset strategy as the target network function; wherein the first core network unit is a distributed node and the second core network unit is a central node.
[0151] Optionally, the service discovery device 80 also includes:
[0152] The second query module is used to query whether there is a network function that meets the first condition in the first core network unit based on the information stored in the database in the first core network unit before querying the third network function that meets the first condition in other core network units other than the first core network unit based on the blockchain; wherein, when there is no network function that meets the first condition in the first core network unit, the third network function that meets the first condition in other core network units other than the first core network unit is queried based on the blockchain.
[0153] Optionally, the first query module 82 is specifically used for:
[0154] Send a first request to the blockchain, the first request being used to request a query for a third network function within the other core network units that meets the first condition; receive key information of the third network function sent by the blockchain.
[0155] Optionally, the service discovery device 80 also includes:
[0156] The first sending module is used to send a second request to the fourth network function in the third core network unit according to the key information of the third network function. The second request is used to request the overview information of the third network function. The third core network unit is the core network unit where the third network function is located.
[0157] The second receiving module is used to receive the overview information of the third network function sent by the fourth network function;
[0158] The second sending module is used to send the overview information to the second network function, and the overview information is used by the second network function to request services from the third network function.
[0159] Optionally, the key information of the third network function includes at least one of the following:
[0160] The identifier of the core network unit where the third network function is located;
[0161] The identifier of the third network function;
[0162] The type of the third network function;
[0163] The address of the third network function.
[0164] Optionally, the service discovery device 80 also includes:
[0165] The third receiving module is used to receive the registration request sent by the second network function;
[0166] The first writing module is used to write key information of the second network function into the blockchain.
[0167] Optionally, if the first core network unit is a distributed node, the service discovery device 80 further includes:
[0168] The third sending module is used to send a first heartbeat request to the fifth network function in the second core network unit, where the second core network unit is the central node.
[0169] The fourth receiving module is used to receive the first heartbeat response sent by the fifth network function, wherein the first heartbeat response includes an identifier assigned to the first core network unit.
[0170] Optionally, the service discovery device 80 also includes:
[0171] The fourth sending module is used to periodically send a second heartbeat request to the fifth network function; wherein the second heartbeat request includes the identifier of the first core network unit, and the second heartbeat request is used to request the maintenance of the heartbeat of the second core network unit.
[0172] Optionally, if the first core network unit is the central node, the service discovery device 80 further includes:
[0173] The fifth receiving module is used to receive the third heartbeat request sent by the sixth network function in the fourth core network unit, wherein the fourth core network unit is a distributed node;
[0174] The allocation module is used to allocate identifiers to the fourth core network unit;
[0175] The second writing module is used to write the overview information of the fourth core network unit into the blockchain;
[0176] The fifth sending module is used to send a second heartbeat response to the sixth network function, the second heartbeat response including the identifier of the fourth core network unit.
[0177] Optionally, the service discovery device 80 also includes:
[0178] The sixth receiving module is used to receive the fourth heartbeat request sent by the sixth network function, wherein the fourth heartbeat request includes the identifier of the fourth core network unit;
[0179] The reset module is used to reset a timer based on the identifier of the fourth core network unit; wherein the timer is used to detect whether the heartbeat request of the sixth network function has timed out, and when it has timed out, to delete the overview information of the fourth core network unit from the blockchain.
[0180] Optionally, the overview information of the fourth core network unit includes at least one of the following:
[0181] The identifier of the fourth core network unit;
[0182] The role of the fourth core network unit;
[0183] The address of the fourth core network unit.
[0184] The service discovery device 80 of this application embodiment can achieve the above-described... Figure 4 The various processes of the method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0185] Optional, such as Figure 9 As shown, this application embodiment also provides a communication device 90, including a processor 91, a memory 92, and a program or instructions stored in the memory 92 and executable on the processor 91. When the program or instructions are executed by the processor 91, they implement the various processes of the above-described service discovery method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0186] This application also provides a computer program product, including computer instructions, which, when executed by a processor, can perform the above-described functions. Figure 4 The various processes of the service discovery method embodiments shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0187] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they can implement the various processes of the above-described service discovery method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0188] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0189] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0190] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0191] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a service classification device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0192] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A service discovery method, characterized in that, include: The first network function receives a service discovery request sent by the second network function; wherein the service discovery request includes a first condition, and the first network function and the second network function are deployed in the first core network unit; The first network function is based on blockchain and queries for third network functions in other core network units besides the first core network unit that meet the first condition.
2. The method according to claim 1, characterized in that, If multiple third network functions satisfying the first condition are obtained through the query, the method further includes: The first network function takes the third network function deployed in the second core network unit among the plurality of third network functions as the target network function; or, when the plurality of third network functions does not include a third network function deployed in the second core network unit, the third network function that satisfies the preset strategy among the plurality of third network functions is taken as the target network function. The first core network unit is a distributed node, and the second core network unit is a central node.
3. The method according to claim 1 or 2, characterized in that, Before querying third network functions that meet the first condition within other core network units besides the first core network unit, the method further includes: (The first network function is based on blockchain.) The first network function queries whether there is a network function that meets the first condition within the first core network unit based on the information stored in the database within the first core network unit. Specifically, when there is no network function in the first core network unit that meets the first condition, the third network function in other core network units besides the first core network unit that meets the first condition is queried based on the blockchain.
4. The method according to claim 1, characterized in that, The first network function, based on blockchain, queries third network functions within other core network units besides the first core network unit that satisfy the first condition, including: The first network function sends a first request to the blockchain, the first request being used to request a query for a third network function within the other core network units that meets the first condition; The first network function receives key information from the third network function sent by the blockchain.
5. The method according to claim 4, characterized in that, The method further includes: The first network function sends a second request to the fourth network function in the third core network unit based on the key information of the third network function. The second request is used to request the overview information of the third network function. The third core network unit is the core network unit where the third network function is located. The first network function receives the overview information of the third network function sent by the fourth network function; The first network function sends the overview information to the second network function, and the overview information is used by the second network function to request services from the third network function.
6. The method according to claim 4 or 5, characterized in that, The key information of the third network function includes at least one of the following: The identifier of the core network unit where the third network function is located; The identifier of the third network function; The type of the third network function; The address of the third network function.
7. The method according to claim 1, characterized in that, The method further includes: The first network function receives the registration request sent by the second network function; The first network function writes key information of the second network function into the blockchain.
8. The method according to claim 1, characterized in that, If the first core network unit is a distributed node, the method further includes: The first network function sends a first heartbeat request to the fifth network function within the second core network unit, where the second core network unit is the central node. The first network function receives a first heartbeat response sent by the fifth network function, the first heartbeat response including an identifier assigned to the first core network unit.
9. The method according to claim 8, characterized in that, The method further includes: The first network function periodically sends a second heartbeat request to the fifth network function; wherein the second heartbeat request includes the identifier of the first core network unit, and the second heartbeat request is used to request the maintenance of the heartbeat of the second core network unit.
10. The method according to claim 1, characterized in that, If the first core network unit is a central node, the method further includes: The first network function receives a third heartbeat request sent by the sixth network function in the fourth core network unit, wherein the fourth core network unit is a distributed node; The first network function assigns an identifier to the fourth core network unit and writes the overview information of the fourth core network unit into the blockchain; The first network function sends a second heartbeat response to the sixth network function, the second heartbeat response including the identifier of the fourth core network unit.
11. The method according to claim 10, characterized in that, The method further includes: The first network function receives a fourth heartbeat request sent by the sixth network function, the fourth heartbeat request including the identifier of the fourth core network unit; The first network function resets the timer according to the identifier of the fourth core network unit; wherein the timer is used to detect whether the heartbeat request of the sixth network function has timed out, and when it has timed out, deletes the overview information of the fourth core network unit from the blockchain.
12. The method according to claim 10 or 11, characterized in that, The overview information of the fourth core network unit includes at least one of the following: The identifier of the fourth core network unit; The role of the fourth core network unit; The address of the fourth core network unit.
13. A service discovery device, characterized in that, include: A first receiving module is configured to receive a service discovery request sent by a second network function; wherein the service discovery request includes a first condition, the device is applied to a first network function, and the first network function and the second network function are deployed in a first core network unit; The first query module is used to query, based on blockchain, third network functions within other core network units besides the first core network unit that meet the first condition.
14. A communication device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method as described in any one of claims 1 to 12.
15. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 12.
16. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 12.