Service proxy method and apparatus, computer device, and storage medium
By selecting the target network with a healthy state in the distributed network for service proxying, the problem of high service processing failure rate in the distributed network is solved, and a higher success rate and stability is achieved.
Patent Information
- Application Number
- PCT/CN2024/116882
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-09
- Filing Date
- 2024-09-04
- Publication Date
- 2025-07-17
AI Technical Summary
In a distributed network, there is a high probability of processing failure during the pending service processing of the consumer terminal, especially when the producer cannot be found locally, the prior art fails to effectively select a suitable target network for service agent.
By determining the network status of the candidate network, select the target network of healthy status to make service requests, including network status updates and retry mechanisms until a matching producer is found.
It increases the probability of success of the service agent, ensures the normal processing of pending services, and reduces frequent errors during the processing process.
Smart Images

Figure CN2024116882_17072025_PF_FP_ABST
Abstract
Description
Service agent method, device, computer equipment and storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 202410031043X, filed on January 9, 2024, entitled “Service Proxy Method, Apparatus, Computer Equipment and Storage Medium,” the entire text of which is hereby incorporated by reference. Technical Field
[0003] The present application relates to the field of wireless communication technology, and in particular to a service proxy method, apparatus, computer equipment, and storage medium. Background Art
[0004] With the continuous development of network technology, the deployment of distributed networks has become more and more widespread. Therefore, a variety of distributed networks can be used to meet the different service needs of consumers. When different networks are called to process pending services on consumer terminals, there is a high probability of processing failure.
[0005] Summary of the Invention
[0006] The present application provides a service proxy method, apparatus, computer equipment, and storage medium.
[0007] In a first aspect, the present application provides a service proxy method. The method comprises:
[0008] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0009] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the pending service to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the pending service;
[0010] Obtain a first service response fed back by the first target network in response to the first service request;
[0011] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed exists in the first target network, the service to be processed is sent to the first producer so that the first producer performs service processing for the service to be processed.
[0012] In one embodiment, determining at least one candidate network that meets the service agent requirement to be processed includes:
[0013] Performing a local producer search for the service to be processed;
[0014] When the result of the local producer search indicates that there is no local producer that meets the service to be processed, at least one candidate network that meets the agent requirements of the service to be processed is determined.
[0015] In one embodiment, the method further comprises:
[0016] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed does not exist in the first target network, updating the network status of each candidate network;
[0017] Determine a second target network corresponding to the service to be processed from the updated candidate networks, and send a second service request for the service to be processed to the second target network; wherein the second service request is used to instruct the second target network to perform a second producer search for the service to be processed;
[0018] Obtain a second service response from the second target network in response to the second service request; when the search result contained in the second service response is that there is a second producer in the second target network that meets the requirements for the service to be processed, send the service to be processed to the second producer.
[0019] In one embodiment, when the search result included in the second service response is that the second producer that meets the requirements for the service to be processed does not exist in the second target network, the steps of updating the network status of each candidate network to obtain the second service response fed back by the second target network in response to the second service request are repeated until the search result included in the second service response is that the second producer that meets the requirements for the service to be processed exists in the second target network.
[0020] In one embodiment, updating the network status of each candidate network includes:
[0021] Obtain the number of call errors that occur in each candidate network within a preset time period;
[0022] The network status of the candidate network whose error times are greater than the number threshold is updated to an abnormal state.
[0023] In one embodiment, updating the network status of each candidate network includes:
[0024] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0025] The network status of the abnormal network is updated according to the abnormal start time of the abnormal network.
[0026] In one embodiment, updating the network status of the abnormal network according to the abnormal start time of the abnormal network includes:
[0027] The time difference between the current time and the abnormal start time of the abnormal network is used as the abnormal duration of the abnormal network;
[0028] When the abnormal duration is greater than the difference threshold, the network state of the abnormal network is updated to a healthy state.
[0029] In one embodiment, updating the network status of each candidate network includes:
[0030] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0031] Performing a ratio operation on the number of anomalies in the abnormal network and the total number of candidate networks to obtain the anomaly ratio in each candidate network;
[0032] When the abnormality ratio is greater than a ratio threshold, the network status of the abnormal network is updated to a healthy state.
[0033] In one embodiment, selecting a first target network from each candidate network according to a network status of each candidate network includes:
[0034] A first target network is determined from candidate networks whose network status is a healthy state.
[0035] In one embodiment, selecting a first target network from each candidate network according to a network status of each candidate network includes:
[0036] Get the error time of the last call error on each candidate network;
[0037] According to the error time of the last call error of each candidate network, determine the time interval between each candidate network and the last call error;
[0038] The candidate network with the largest time interval and a healthy network status is selected as the first target network.
[0039] In one embodiment, determining at least one candidate network that meets the service agent requirement to be processed includes:
[0040] Sending a network service discovery request corresponding to the pending service to a network registration center; wherein the network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the proxy requirements of the pending service;
[0041] Receive at least one candidate network that meets the service agent requirement to be processed and is fed back by the network registration center.
[0042] In a second aspect, the present application further provides a service proxy device. The device includes:
[0043] A first determining module is configured to determine at least one candidate network that meets the service proxy requirement to be processed sent by the consumer terminal;
[0044] A second determining module is configured to select a first target network from each candidate network based on the network status of each candidate network, and send a first service request for the pending service to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the pending service;
[0045] An acquisition module is used to obtain a first service response fed back by the first target network in response to the first service request; when the search result contained in the first service response is that the first producer that meets the requirements for the service to be processed exists in the first target network, the service to be processed is sent to the first producer, so that the first producer performs service processing for the service to be processed.
[0046] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:
[0047] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0048] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the pending service to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the pending service;
[0049] Obtain a first service response fed back by the first target network in response to the first service request;
[0050] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed exists in the first target network, the service to be processed is sent to the first producer so that the first producer performs service processing for the service to be processed.
[0051] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0052] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0053] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the pending service to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the pending service;
[0054] Obtain a first service response fed back by the first target network in response to the first service request, and forward the first service response to the consumer terminal.
[0055] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0056] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0057] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the pending service to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the pending service;
[0058] Obtain a first service response fed back by the first target network in response to the first service request;
[0059] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed exists in the first target network, the service to be processed is sent to the first producer so that the first producer performs service processing for the service to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0061] FIG1 is a flow chart of a service proxy method provided in an embodiment of the present application;
[0062] FIG2 is a signaling diagram for performing a local producer search according to an embodiment of the present application;
[0063] FIG3 is a schematic diagram of a process of forwarding a first service response to a consumer terminal according to an embodiment of the present application;
[0064] FIG4 is a schematic diagram of a process for determining at least one candidate network according to an embodiment of the present application;
[0065] FIG5 is a flow chart of another service proxy method provided in an embodiment of the present application;
[0066] FIG6 is a structural block diagram of a first service proxy device provided in an embodiment of the present application;
[0067] FIG7 is a structural block diagram of a second service proxy device provided in an embodiment of the present application;
[0068] FIG8 is a structural block diagram of a third service proxy device provided in an embodiment of the present application;
[0069] FIG9 is a structural block diagram of a fourth service proxy device provided in an embodiment of the present application;
[0070] FIG10 is a structural block diagram of a fifth service proxy device provided in an embodiment of the present application;
[0071] FIG11 is a structural block diagram of a sixth service proxy device provided in an embodiment of the present application;
[0072] FIG12 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0074] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0075] It should be understood that the specific embodiments described herein are merely used to explain the present application and are not intended to limit the present application. In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they contradict each other.
[0076] In one embodiment, as shown in FIG1 , a service proxy method is provided. This embodiment uses the method applied to the local service proxy network element described later as an example. It can be understood that the local service proxy network element can be a terminal, a server, or a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:
[0077] S101: Determine at least one candidate network that meets a service proxy requirement to be processed sent by a consumer terminal.
[0078] It should be noted that before determining at least one candidate network that meets the proxy requirements of the service to be processed, it is necessary to search for local producers of the service to be processed. Then, if there is no local producer that meets the service to be processed sent by the consumer terminal, at least one candidate network that meets the proxy requirements of the service to be processed is determined.
[0079] Among them, candidate networks can be divided into functional networks, distributed networks, a sub-service network of a functional network, and a sub-service network of a distributed network. The sub-service networks of functional networks and distributed networks can include: connection communication networks, holographic communication networks, perception service networks, and intelligent service networks. Furthermore, distributed networks mainly meet the low-latency access needs of enterprises and basic private network services for consumers, such as local access services within the campus. Functional networks are networks that meet users' value-added service needs. Functional networks can be deployed in a distributed manner as needed, and multiple distributed networks can share a single functional network.
[0080] In one embodiment of the present application, when it is necessary to perform a local producer search for a service to be processed in a local network, the following contents may be specifically included: as shown in Figure 2, the local network may be a 6G distributed network, and the local network includes a local service proxy network element and a local NF (Network Function) service management network element. The service to be processed sent by the consumer terminal is obtained, and the local service proxy network element reads the NF service discovery parameters of the service to be processed, and sends a service discovery message carrying the NF service discovery parameters to the local NF service management network element. The local NF service management network element performs a local producer search for the service to be processed based on the NF service discovery parameters, and feeds back the search result to the local service proxy as a service discovery response. When the search result in the service discovery response is that there is no local producer that meets the service to be processed sent by the consumer terminal, it is necessary to determine at least one candidate network that meets the proxy requirements of the service to be processed.
[0081] The NF service discovery parameters of the pending service refer to relevant parameters required for processing the pending service, such as the service type of the pending service, the service requirements of the pending service, etc.
[0082] To further illustrate, when it is necessary to determine at least one candidate network that meets the proxy requirements of the service to be processed, the network service discovery parameters of the service to be processed can be sent to the network registration center, so that the network registration center can determine at least one candidate network that meets the proxy requirements of the service to be processed based on the network service discovery parameters of the service to be processed, and provide feedback on each candidate network.
[0083] Among them, the network registration center can conduct service inquiries based on whether the network functions of each distributed network match, whether the network performance meets the requirements, whether the coverage range meets the optimal requirements, etc., so as to determine at least one candidate network from each distributed network.
[0084] S102: Select a first target network from each candidate network according to the network status of each candidate network, and send a first service request for a to-be-processed service to the first target network.
[0085] The first service request is used to instruct the first target network to perform a first producer search for the service to be processed.
[0086] The first target network refers to a network that is first determined from candidate networks based on the network status of each candidate network to search for a producer of the service to be processed. The first producer refers to a producer in the first target network that can successfully respond to the request to be processed.
[0087] It should be noted that when determining the first producer, the network status of each candidate network can be determined first, and then the first target network can be determined from the candidate networks with healthy network status. The network status includes, for example, healthy status and abnormal status.
[0088] In one embodiment of the present application, the number of call errors occurring in each candidate network within a preset time period is obtained, and it is determined whether the number of errors in each candidate network is greater than a number threshold. The network status of the candidate network whose number of errors is greater than the number threshold is updated to an abnormal state; the network status of the candidate network whose number of errors is less than or equal to the number threshold is updated to a healthy state, and then the first target network is determined from the candidate networks whose network status is a healthy state.
[0089] To further illustrate, there are many methods for determining the first target network from candidate networks with a healthy network status. For example, a candidate network can be randomly selected as the first target network from candidate networks with a healthy network status, or the first target network can be selected from the candidate networks based on the error time of the last call error of each candidate network, or the first target network can be selected from the candidate networks based on the location where each candidate network is deployed, or based on the service range supported by each candidate network. In summary, there are many methods for determining the first target network from candidate networks with a healthy network status. We will not elaborate on each method here, nor will we limit the method for determining the first target network from candidate networks with a healthy network status.
[0090] In one embodiment of the present application, when it is necessary to determine the first target network from candidate networks whose network status is a healthy state, the error time of the last call error of each candidate network can be obtained, and based on the error time of the last call error of each candidate network, the time interval between each candidate network and the last call error is determined, and the candidate network whose network status is a healthy state and whose time interval is the largest is selected as the first target network.
[0091] In one embodiment of the present application, when the first target network searches for the first producer for the service to be processed, the first candidate producer that can process the service requirements of the service to be processed can be determined from the first target network first, and the first NF service request corresponding to the service to be processed can be fed back to the first candidate producer. When the first NF service response fed back by the first candidate producer is a successful response, the first candidate producer is used as the first producer; when the first NF service response fed back by the first candidate producer is a failed response, it is determined that there is no first producer that meets the requirements of the service to be processed in the first target network, which means that a call error of the first target network occurs. Exemplarily, the response failure includes the first candidate producer not feeding back a response within a predetermined time (response timeout), or feeding back an error message (response error). Correspondingly, the first producer that meets the requirements of the service to be processed refers to a producer that can successfully respond to the request to be processed.
[0092] S103: Obtain a first service response fed back by the first target network in response to the first service request.
[0093] In one embodiment of the present application, the first target network forwards the first NF service response fed back by the first candidate producer as the first service response fed back by the first target network in response to the first service request.
[0094] S104: When the search result included in the first service response indicates that there is a first producer in the first target network that meets the requirements of the service to be processed, the service to be processed is sent to the first producer so that the first producer performs service processing on the service to be processed.
[0095] It should be noted that when the first service response to the first service request is a successful response, the first producer to process the pending service is determined from the first target network, and the pending service is directly sent to the first producer, allowing the first producer to process the pending service. In other words, the first target network is successfully called to process the consumer's pending service.
[0096] To further illustrate, when the first service response fed back by the first service request is a response failure, that is, the search result contained in the first service response is that there is no first producer that meets the requirements for the service to be processed in the first target network, therefore, the network status of each candidate network is updated; and the second target network corresponding to the service to be processed is determined from each updated candidate network, and a second service request for the service to be processed is sent to the second target network; wherein, the second service request is used to instruct the second target network to perform a second producer search for the service to be processed; when the second service response is a response success, the second service response is forwarded to the consumer terminal; when the second service response is a response failure, the step of updating the network status of each candidate network is returned to be executed until the second service response is a response success.
[0097] The above-mentioned service proxy method, when there is no local producer that meets the requirements of the pending service sent by the consumer terminal, determines at least one candidate network and selects a first target network from each candidate network; sends a first service request for the pending service to the first target network, obtains a first service response, and when the first service response is a successful response, sends the pending service to the first producer, so that the first producer performs service processing on the pending service and forwards the first service response to the consumer terminal. According to the above content, the present application selects the first target network from each candidate network based on the network status of each candidate network. Therefore, compared with the process of directly determining the target network without judging the network status in the prior art, the present application can effectively remove candidate networks with abnormal network status according to the network status of each candidate network, and then select the first target network from candidate networks with healthy network status, thereby improving the success probability of the first target network performing service proxy for the pending service, ensuring the normal processing of the pending service, and preventing frequent errors when processing the pending service.
[0098] In one embodiment, although various distributed networks can be used to meet different service needs of consumers, there is a high probability of processing failure when calling different distributed networks to process the consumer's pending services. To solve the above technical problem, as shown in FIG3 , the method may further include the following:
[0099] S301: When the search result included in the first service response is that there is no first producer in the first target network that meets the requirements for the service to be processed, update the network status of each candidate network.
[0100] It should be noted that since the search result contained in the first service response is that there is no first producer that meets the requirements for the service to be processed in the first target network, it is necessary to re-determine the second target network from the candidate network and search the second target network for a second producer that can successfully respond to the request to be processed, that is, a second producer that meets the requirements for the service to be processed.
[0101] The second target network refers to a network for searching for a producer of the service to be processed, determined from the candidate networks after the network status is updated according to the network status of each candidate network, and the second producer refers to a producer in the second target network that can successfully respond to the request to be processed.
[0102] To further illustrate, when the network status of each candidate network needs to be updated, the following may be specifically included: obtaining the number of call errors of each candidate network within a preset time period; updating the network status of the candidate network whose error number is greater than the number threshold to an abnormal state.
[0103] The length of the preset time period can be set and adjusted according to the actual situation and the working experience of the staff, and the length of the preset time period is not limited here.
[0104] For example, if there are two candidate networks, namely candidate network a and candidate network b, and the start time of the preset time period can be set to the current time, and the end time of the preset time period can be set to one hour before the current time, the number of call errors of each candidate network in the preset time period is obtained, among which the number of errors of candidate network a is 2 times, and the number of errors of candidate network b is 5 times. If the preset number threshold is 4 times, the network status of candidate network b whose error number is greater than the number threshold is updated to an abnormal state.
[0105] To further illustrate, when the network status of each candidate network needs to be updated, the following may also be included: determining an abnormal network with an abnormal network status from each candidate network; and updating the network status of the abnormal network according to the abnormal start time of the abnormal network.
[0106] Specifically, when it is necessary to update the network status of the abnormal network based on the abnormal start time of the abnormal network, the time difference between the current moment and the abnormal start time of the abnormal network is used as the abnormal duration of the abnormal network; if the abnormal duration is greater than the difference threshold, the network status of the abnormal network is updated to a healthy state.
[0107] For example, if there are two candidate networks, namely abnormal network C and abnormal network D, the time difference between the current time and the abnormal start time of abnormal network C is ten minutes; the time difference between the current time and the abnormal start time of abnormal network D is twenty minutes; since the difference threshold is fifteen minutes, the network status of abnormal network d is updated to healthy status.
[0108] To further illustrate, when it is necessary to update the network status of each candidate network, the following may also be included: from each candidate network, determine the abnormal network whose network status is abnormal; perform a ratio operation on the number of abnormalities in the abnormal network and the total number of candidate networks to obtain the abnormal ratio in each candidate network; if the abnormal ratio is greater than the ratio threshold, update the network status of the abnormal network to a healthy state.
[0109] For example, if there are ten candidate networks, seven of which are abnormal, then the ratio of the number of abnormal networks to the total number of candidate networks is calculated, resulting in a 70% abnormal ratio for each candidate network. In one case, if the ratio threshold is 50%, since the abnormal ratio is greater than the ratio threshold, the network status of the abnormal network is updated to a healthy state. In another case, if the ratio threshold is 80%, the abnormal ratio is less than the ratio threshold, so the network status of the abnormal network is not updated.
[0110] S302: Determine a second target network corresponding to the service to be processed from the updated candidate networks, and send a second service request for the service to be processed to the second target network.
[0111] The second service request is used to instruct the second target network to perform a second producer search for the service to be processed.
[0112] In one embodiment of the present application, when the second target network searches for a second producer for a service to be processed, a second candidate producer that can process the service requirements of the service to be processed can be first determined from the second target network, and the second NF service request corresponding to the service to be processed can be fed back to the second candidate producer. When the second NF service response fed back by the second candidate producer is a successful response, the second candidate producer is used as the second producer; when the second NF service response fed back by the second candidate producer is a failed response, it is determined that there is no second producer in the second target network that meets the requirements of the service to be processed, which means that a call error of the second target network occurs. Exemplarily, the response failure includes the first candidate producer not feeding back a response within a predetermined time (response timeout), or feeding back an error message (response error). Correspondingly, the second producer that meets the requirements of the service to be processed refers to a producer that can successfully respond to the request to be processed.
[0113] S303: Obtain a second service response fed back by the second target network in response to the second service request.
[0114] In one embodiment of the present application, the second target network forwards the second NF service response fed back by the second candidate producer as the second service response fed back by the second target network in response to the second service request.
[0115] S304: When the search result included in the second service response indicates that there is a second producer in the second target network that meets the requirements of the service to be processed, the service to be processed is sent to the second producer.
[0116] It should be noted that when the second service response fed back by the second target network in response to the second service request is a successful response, it means that the second producer who performs service processing for the service to be processed is determined from the second target network. Therefore, the service to be processed is directly sent to the second producer so that the second producer performs service processing for the service to be processed. That is, the second target network is successfully called to perform service processing on the consumer's service to be processed. When the second service response fed back by the second target network in response to the second service request is a failed response, that is, the search result contained in the second service response is that there is no second producer that meets the requirements of the service to be processed in the second target network, return to the step of updating the network status of each candidate network until the second service response is a successful response, that is, repeat steps S301 to S303 until the second service response is a successful response.
[0117] The above-mentioned service proxy method, by updating the network status of each candidate network when the search result shows that there is no first producer that meets the requirements of the service to be processed in the first target network, ensures that the second target network corresponding to the service to be processed from each candidate network can have a higher proxy success probability, ensures the normal processing of the service to be processed, and prevents frequent errors when processing the service to be processed.
[0118] In one embodiment, as shown in FIG4 , when it is necessary to determine at least one candidate network that meets the service agent requirements to be processed, the following may be specifically included:
[0119] S401: Send a network service discovery request corresponding to the service to be processed to a network registration center.
[0120] The network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the service agent requirements to be processed.
[0121] To further illustrate, the network registration center can perform service inquiries on each distributed network based on whether the network functions match, whether the network performance meets the requirements, and whether the coverage meets the optimal requirements, thereby determining at least one candidate network from each distributed network.
[0122] It should be noted that the process of obtaining the network service discovery request includes the following: when the local NF service management network element is searching for a local producer, if it determines that there is no local producer that meets the requirements of the service to be processed sent by the consumer terminal, it generates a network service discovery parameter and sends the local NF service discovery response carrying the network service discovery parameter to the local service agent network element; so that the local service agent network element can generate a corresponding network service discovery request based on the network service discovery parameter.
[0123] S402: Receive at least one candidate network that meets the service agent requirement to be processed and is fed back by a network registration center.
[0124] Among them, the network registration center can be a logically centralized network registration center, or a distributed network registration center composed of multiple distributed nodes, or a network registration center composed of multiple distributed blockchain nodes implemented by blockchain technology. Each functional network and distributed network connects different distributed blockchain nodes in the blockchain system.
[0125] The Network Registration Center has the following functions: (1) Responsible for managing network-level service information and network identity information, and storing / updating network-level service information and network identity information reported by NF service management; (2) Responsible for storing the relationship between user ID information and the address information of the NF service management function; (3) Responsible for storing and managing user identity information. Among them, network identity information may include but is not limited to: network identifier (for example: MCC+MNC+number, network slice identifier, or a new numbering system), network public key, etc.; user identity information may include but is not limited to: user identifier (for example: IMSI, MSISDN or a new numbering system), user temporary identifier and user public key, etc.
[0126] The above service proxy method ensures that at least one candidate network that meets the proxy requirements of the service to be processed can be successfully obtained by determining to send a network service discovery request corresponding to the service to be processed to the network registration center.
[0127] In one embodiment, as shown in FIG5 , when a local network needs to perform service processing on a pending service, the local network may be a 6G distributed network, the local network includes a local service proxy network element and a local NF (Network Function) service management network element, a first target network includes a first service proxy network element, a first NF service management network element, and a first producer; and a second target network includes a second service proxy network element, a second NF service management network element, and a second producer. Specifically, the following contents may be included:
[0128] S501: A local service proxy network element receives a service to be processed sent by a consumer terminal.
[0129] S502: The local service proxy network element sends a local NF service discovery request corresponding to the service to be processed to the local NF service management network element.
[0130] S503: The local NF service management network element searches for a local producer in the local network.
[0131] S504: When there is no local producer in the local network that meets the requirements of the service to be processed sent by the consumer terminal, the local NF service management network element sends a local NF service discovery response corresponding to the local NF service discovery request to the local service proxy network element.
[0132] S505: The local service proxy network element sends a network service discovery request corresponding to the service to be processed to the network registration center.
[0133] S506: The network registration center determines at least one candidate network that meets the service agent requirement to be processed.
[0134] S507: The local service proxy network element receives at least one candidate network that meets the service proxy requirement to be processed and is fed back by the network registration center.
[0135] S508: The local service proxy network element stores each candidate network in a local balancing pool, and selects a first target network from each candidate network according to the network status of each candidate network.
[0136] S509: The local service proxy network element sends a first service request for the service to be processed to the first service proxy network element.
[0137] S510: The first service proxy network element sends a first NF service discovery request to the first NF service management network element according to the service to be processed.
[0138] S511, the first NF service management network element searches for a first producer in the first target network; and feeds back a first producer identifier that meets the service agent requirements of the service to be processed to the first service agent network element.
[0139] S512: The first service agent network element sends a first NF service request to the first producer according to the first producer identifier.
[0140] S513: The first producer feeds back a first NF service response in response to the first NF service request to the first service proxy network element.
[0141] S514: The first service proxy network element forwards the first NF service response to the local service proxy network element.
[0142] S515: When the first NF service response is a response failure, the local service proxy network element updates the network status of each candidate network and determines a second target network corresponding to the service to be processed from the updated candidate networks.
[0143] S516: The local service proxy network element sends a second service request for the service to be processed to the second service proxy network element.
[0144] S517: The second service proxy network element sends a second NF service discovery request to the second NF service management network element according to the service to be processed.
[0145] S518, the second NF service management network element searches for a second producer in the second target network; and feeds back a second producer identifier that meets the service agent requirements of the service to be processed to the second service agent network element.
[0146] S519: The second service proxy network element sends a second NF service request to the second producer according to the second producer identifier.
[0147] S520: The second producer feeds back a second NF service response in response to the second NF service proxy request to the second service proxy network element.
[0148] S521: The second service proxy network element forwards the second NF service response to the local service proxy network element.
[0149] S522: When the second NF service agent response is a successful response, the local service agent network element forwards the second NF service response to the consumer terminal.
[0150] In one embodiment of the present application, a retry strategy can be pre-set so that when the first target network fails to call the first target network for the first time, a proxy retry can be performed on the first target network. Specifically, after the first target network fails to call the first target network for the first time, the local service proxy network element again sends the first service request for the pending service to the first service proxy network element; the first service proxy network element sends the first NF service discovery request to the first NF service management network element based on the pending service; the first NF service management network element searches for the first producer in the first target network; and feeds back the first candidate producer identifier that meets the service proxy requirements of the pending service to the first service proxy network element; the first service proxy network element sends the first NF service request to the first candidate producer based on the first candidate producer identifier; the first candidate producer feeds back the first NF service response in response to the first NF service request to the first service proxy network element; and the first service proxy network element again forwards the first NF service response to the local service proxy network element. Subsequently, subsequent operations are performed based on the success or failure of the first NF service response.
[0151] The above-mentioned service proxy method, when there is no local producer that meets the requirements of the pending service sent by the consumer terminal, determines at least one candidate network and selects a first target network from each candidate network; sends a first service request for the pending service to the first target network, obtains a first service response, and forwards the first service response to the consumer terminal. According to the above content, the present application selects the first target network from each candidate network based on the network status of each candidate network. Therefore, compared with the process of directly determining the target network without judging the network status in the prior art, the present application can effectively remove candidate networks with abnormal network status based on the network status of each candidate network, and then select the first target network from candidate networks with healthy network status, thereby improving the success probability of the first target network acting as a service proxy for the pending service, ensuring the normal processing of the pending service, and preventing frequent errors when processing the pending service.
[0152] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0153] Based on the same inventive concept, embodiments of the present application also provide a service proxy device for implementing the aforementioned service proxy method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more service proxy device embodiments provided below can be found in the aforementioned limitations of the service proxy method and will not be further elaborated here.
[0154] In one embodiment, as shown in FIG6 , a service agent device is provided, comprising: a first determination module 10 , a second determination module 20 , and an acquisition module 30 , wherein:
[0155] The first determining module 10 is configured to determine at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal.
[0156] The second determination module 20 is used to select a first target network from each candidate network according to the network status of each candidate network, and send a first service request for the service to be processed to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the service to be processed.
[0157] The acquisition module 30 is used to obtain the first service response fed back by the first target network in response to the first service request, and forward the first service response to the consumer terminal; when the search result contained in the first service response is that there is a first producer in the first target network that meets the requirements of the service to be processed, the service to be processed is sent to the first producer, so that the first producer performs service processing for the service to be processed.
[0158] The above-mentioned service proxy device, when there is no local producer that meets the requirements of the pending service sent by the consumer terminal, determines at least one candidate network and selects a first target network from each candidate network; sends a first service request for the pending service to the first target network, obtains a first service response, and forwards the first service response to the consumer terminal. According to the above content, the present application selects the first target network from each candidate network based on the network status of each candidate network. Therefore, compared with the process of directly determining the target network without judging the network status in the prior art, the present application can effectively remove candidate networks with abnormal network status based on the network status of each candidate network, and then select the first target network from candidate networks with healthy network status, thereby improving the success probability of the first target network acting as a service proxy for the pending service, ensuring the normal processing of the pending service, and preventing frequent errors when processing the pending service.
[0159] In one embodiment, the first determining module 10 is further configured to search for a local producer for the service to be processed; if the result of the local producer search indicates that there is no local producer that meets the service to be processed, determine at least one candidate network that meets the proxy requirements of the service to be processed.
[0160] In one embodiment, as shown in FIG7 , a service agent device is provided. The acquisition module 30 in the service agent device includes: an updating unit 31 , a determining unit 32 , and an acquiring unit 33 , wherein:
[0161] The updating unit 31 is configured to update the network status of each candidate network when the search result included in the first service response is that there is no first producer in the first target network that meets the requirements for the service to be processed.
[0162] The determination unit 32 is used to determine the second target network corresponding to the service to be processed from the updated candidate networks, and send a second service request for the service to be processed to the second target network; wherein the second service request is used to instruct the second target network to perform a second producer search for the service to be processed.
[0163] The acquisition unit 33 is used to obtain the second service response fed back by the second target network in response to the second service request, and forward the second service response to the consumer terminal; when the search result contained in the second service response is that there is a second producer in the second target network that meets the requirements of the service to be processed, the service to be processed is sent to the second producer.
[0164] In one embodiment, the acquisition unit 33 is also used to repeatedly perform the steps of updating the network status of each candidate network to obtain the second service response of the second target network in response to the second service request feedback when the search result contained in the second service response is that the second producer that meets the requirements for the service to be processed does not exist in the second target network, until the search result contained in the second service response is that the second producer that meets the requirements for the service to be processed does exist in the second target network.
[0165] In one embodiment, as shown in FIG8 , a service proxy device is provided. The updating unit 31 in the service proxy device includes: a first obtaining subunit 311 and a first updating subunit 312 , wherein:
[0166] The first acquiring subunit 311 is configured to acquire the number of call errors occurring in each candidate network within a preset time period.
[0167] The first updating subunit 312 is configured to update the network status of a candidate network whose number of errors is greater than a threshold to an abnormal state.
[0168] In one embodiment, as shown in FIG9 , a service proxy device is provided, wherein the updating unit 31 in the service proxy device further includes: a first determining subunit 313 and a second updating subunit 314, wherein:
[0169] The first determining subunit 313 is configured to determine an abnormal network whose network status is abnormal from among the candidate networks.
[0170] The second updating subunit 314 is configured to update the network status of the abnormal network according to the abnormal start time of the abnormal network.
[0171] The second updating subunit is specifically used to use the time difference between the current moment and the abnormal start time of the abnormal network as the abnormal duration of the abnormal network; when the abnormal duration is greater than the difference threshold, the network state of the abnormal network is updated to a healthy state.
[0172] In one embodiment, as shown in FIG10 , a service proxy device is provided, wherein the updating unit 31 in the service proxy device further includes: a second determining subunit 315 , a third determining subunit 316 , and a third updating subunit 317 , wherein:
[0173] The second determining subunit 315 is configured to determine an abnormal network whose network status is abnormal from among the candidate networks.
[0174] The third determining subunit 316 is configured to perform a ratio operation on the number of abnormalities in the abnormal network and the total number of candidate networks to obtain an abnormality ratio in each candidate network.
[0175] The third updating subunit 317 is configured to update the network status of the abnormal network to a healthy state when the abnormality ratio is greater than a ratio threshold.
[0176] In one embodiment, the first determining module 10 is further configured to determine a first target network from candidate networks whose network status is a healthy state.
[0177] In one embodiment, the first determination module 10 is further used to obtain the error time of the last call error of each candidate network; determine the time interval between each candidate network and the last call error based on the error time of the last call error of each candidate network; and select the candidate network with the largest time interval and a healthy network status as the first target network.
[0178] In one embodiment, as shown in FIG11 , a service agent device is provided. The first determining module 10 in the service agent device includes a sending unit 11 and a receiving unit 12 , wherein:
[0179] The sending unit 11 is configured to send a network service discovery request corresponding to the service to be processed to the network registration center; wherein the network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the proxy requirements of the service to be processed.
[0180] The receiving unit 12 is configured to receive at least one candidate network that meets the service agent requirement to be processed and is fed back by the network registration center.
[0181] Each module in the service proxy device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0182] In one embodiment, a computer device is provided, which may be a terminal. Its internal structure diagram may be as shown in FIG12 . The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and an external device. The communication interface of the computer device is configured to communicate with an external terminal via wired or wireless communication, where the wireless communication may be achieved via Wi-Fi, a mobile cellular network, NFC (near field communication), or other technologies. When executed by the processor, the computer program implements a service proxy method. The display unit of the computer device is configured to produce a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0183] Those skilled in the art will understand that the structure shown in FIG12 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0184] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0185] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0186] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the service to be processed to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the service to be processed;
[0187] Obtain a first service response fed back by the first target network in response to the first service request;
[0188] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed exists in the first target network, the service to be processed is sent to the first producer so that the first producer performs service processing for the service to be processed.
[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0190] Look up local producers for the services to be processed;
[0191] When the result of the local producer search indicates that there is no local producer that meets the service to be processed, at least one candidate network that meets the agent requirements of the service to be processed is determined.
[0192] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0193] When the search result included in the first service response is that there is no first producer that meets the requirements of the service to be processed in the first target network, updating the network status of each candidate network;
[0194] Determine a second target network corresponding to the service to be processed from the updated candidate networks, and send a second service request for the service to be processed to the second target network; wherein the second service request is used to instruct the second target network to perform a second producer search for the service to be processed;
[0195] Obtain a second service response fed back by the second target network in response to the second service request;
[0196] When the search result included in the second service response indicates that the second producer that meets the requirements for the service to be processed exists in the second target network, the service to be processed is sent to the second producer.
[0197] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0198] When the search result contained in the second service response is that there is no second producer that meets the requirements for the service to be processed in the second target network, the steps of updating the network status of each candidate network to obtain the second service response fed back by the second target network in response to the second service request are repeated until the search result contained in the second service response is that there is a second producer that meets the requirements for the service to be processed in the second target network.
[0199] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0200] Obtain the number of call errors that occur in each candidate network within a preset time period;
[0201] The network status of the candidate network whose error times are greater than the number threshold is updated to an abnormal state.
[0202] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0203] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0204] The network status of the abnormal network is updated according to the abnormal start time of the abnormal network.
[0205] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0206] The time difference between the current time and the abnormal start time of the abnormal network is used as the abnormal duration of the abnormal network;
[0207] When the abnormal duration is greater than the difference threshold, the network status of the abnormal network is updated to a healthy state.
[0208] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0209] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0210] The number of anomalies in the abnormal network is calculated by the ratio of the total number of candidate networks to obtain the abnormal ratio in each candidate network;
[0211] When the abnormality ratio is greater than the ratio threshold, the network status of the abnormal network is updated to a healthy state.
[0212] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0213] A first target network is determined from candidate networks whose network status is a healthy state.
[0214] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0215] Get the error time of the last call error on each candidate network;
[0216] According to the error time of the last call error of each candidate network, determine the time interval between each candidate network and the last call error;
[0217] The candidate network with the largest time interval and a healthy network status is selected as the first target network.
[0218] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0219] Sending a network service discovery request corresponding to the pending service to the network registration center; wherein the network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the proxy requirements of the pending service;
[0220] Receive at least one candidate network that meets the service agent requirement to be processed and is fed back by the network registration center.
[0221] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0222] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0223] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the service to be processed to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the service to be processed;
[0224] Obtain a first service response fed back by the first target network in response to the first service request;
[0225] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed exists in the first target network, the service to be processed is sent to the first producer so that the first producer performs service processing for the service to be processed.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0227] Look up local producers for the services to be processed;
[0228] When the result of the local producer search indicates that there is no local producer that meets the service to be processed, at least one candidate network that meets the agent requirements of the service to be processed is determined.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0230] When the search result included in the first service response is that there is no first producer that meets the requirements of the service to be processed in the first target network, updating the network status of each candidate network;
[0231] Determine a second target network corresponding to the service to be processed from the updated candidate networks, and send a second service request for the service to be processed to the second target network; wherein the second service request is used to instruct the second target network to perform a second producer search for the service to be processed;
[0232] Obtain a second service response fed back by the second target network in response to the second service request;
[0233] When the search result included in the second service response indicates that the second producer that meets the requirements for the service to be processed exists in the second target network, the service to be processed is sent to the second producer.
[0234] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0235] When the search result contained in the second service response is that there is no second producer that meets the requirements for the service to be processed in the second target network, the steps of updating the network status of each candidate network to obtain the second service response fed back by the second target network in response to the second service request are repeated until the search result contained in the second service response is that there is a second producer that meets the requirements for the service to be processed in the second target network.
[0236] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0237] Obtain the number of call errors that occur in each candidate network within a preset time period;
[0238] The network status of the candidate network whose error number is greater than the number threshold is updated to an abnormal state.
[0239] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0240] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0241] The network status of the abnormal network is updated according to the abnormal start time of the abnormal network.
[0242] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0243] The time difference between the current time and the abnormal start time of the abnormal network is used as the abnormal duration of the abnormal network;
[0244] When the abnormal duration is greater than the difference threshold, the network status of the abnormal network is updated to a healthy state.
[0245] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0246] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0247] The number of anomalies in the abnormal network is calculated by the ratio of the total number of candidate networks to obtain the abnormal ratio in each candidate network;
[0248] When the abnormality ratio is greater than the ratio threshold, the network status of the abnormal network is updated to a healthy state.
[0249] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0250] A first target network is determined from candidate networks whose network status is a healthy state.
[0251] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0252] Get the error time of the last call error on each candidate network;
[0253] According to the error time of the last call error of each candidate network, determine the time interval between each candidate network and the last call error;
[0254] The candidate network with the largest time interval and a healthy network status is selected as the first target network.
[0255] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0256] Sending a network service discovery request corresponding to the pending service to the network registration center; wherein the network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the proxy requirements of the pending service;
[0257] Receive at least one candidate network that meets the service agent requirement to be processed and is fed back by the network registration center.
[0258] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0259] determining at least one candidate network that meets the service agent requirement to be processed sent by the consumer terminal;
[0260] Selecting a first target network from each candidate network according to the network status of each candidate network, and sending a first service request for the service to be processed to the first target network; wherein the first service request is used to instruct the first target network to perform a first producer search for the service to be processed;
[0261] Obtain a first service response fed back by the first target network in response to the first service request;
[0262] When the search result included in the first service response is that the first producer that meets the requirements of the service to be processed exists in the first target network, the service to be processed is sent to the first producer so that the first producer performs service processing for the service to be processed.
[0263] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0264] Look up local producers for the services to be processed;
[0265] When the result of the local producer search indicates that there is no local producer that meets the service to be processed, at least one candidate network that meets the agent requirements of the service to be processed is determined.
[0266] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0267] When the search result included in the first service response is that there is no first producer that meets the requirements of the service to be processed in the first target network, updating the network status of each candidate network;
[0268] Determine a second target network corresponding to the service to be processed from the updated candidate networks, and send a second service request for the service to be processed to the second target network; wherein the second service request is used to instruct the second target network to perform a second producer search for the service to be processed;
[0269] Obtain a second service response fed back by the second target network in response to the second service request;
[0270] When the search result included in the second service response indicates that the second producer that meets the requirements for the service to be processed exists in the second target network, the service to be processed is sent to the second producer.
[0271] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0272] When the search result contained in the second service response is that there is no second producer that meets the requirements for the service to be processed in the second target network, the steps of updating the network status of each candidate network to obtain the second service response fed back by the second target network in response to the second service request are repeated until the search result contained in the second service response is that there is a second producer that meets the requirements for the service to be processed in the second target network.
[0273] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0274] Obtain the number of call errors that occur in each candidate network within a preset time period;
[0275] The network status of the candidate network whose error times are greater than the number threshold is updated to an abnormal state.
[0276] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0277] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0278] The network status of the abnormal network is updated according to the abnormal start time of the abnormal network.
[0279] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0280] The time difference between the current time and the abnormal start time of the abnormal network is used as the abnormal duration of the abnormal network;
[0281] When the abnormal duration is greater than the difference threshold, the network status of the abnormal network is updated to a healthy state.
[0282] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0283] Determine, from among the candidate networks, an abnormal network whose network status is an abnormal state;
[0284] The number of anomalies in the abnormal network is calculated by the ratio of the total number of candidate networks to obtain the abnormal ratio in each candidate network;
[0285] When the abnormality ratio is greater than the ratio threshold, the network status of the abnormal network is updated to a healthy state.
[0286] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0287] A first target network is determined from candidate networks whose network status is a healthy state.
[0288] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0289] Get the error time of the last call error on each candidate network;
[0290] According to the error time of the last call error of each candidate network, determine the time interval between each candidate network and the last call error;
[0291] The candidate network with the largest time interval and a healthy network status is selected as the first target network.
[0292] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0293] Sending a network service discovery request corresponding to the pending service to the network registration center; wherein the network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the proxy requirements of the pending service;
[0294] Receive at least one candidate network that meets the service agent requirement to be processed and is fed back by the network registration center.
[0295] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0296] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0297] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0298] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A service proxy method, comprising: Determining at least one candidate network that meets the service proxy requirements to be processed sent by the consumer terminal; Selecting a first target network from the candidate networks according to the network status of each candidate network, and sending a first service request for the service to be processed to the first target network; wherein, the first service request is used to instruct the first target network to perform a first producer search for the service to be processed; Obtaining a first service response feedback by the first target network in response to the first service request; When the search result included in the first service response indicates that there is a first producer in the first target network that meets the service to be processed, sending the service to be processed to the first producer so that the first producer performs service processing on the service to be processed.
2. The method according to claim 1, wherein, Determining at least one candidate network that meets the service proxy requirements to be processed includes: Performing a local producer search for the service to be processed; In the case where the result of the local producer search indicates that there is no local producer that meets the service to be processed, determining at least one candidate network that meets the service proxy requirements to be processed.
3. The method according to claim 1, further comprising: When the search result included in the first service response indicates that there is no first producer in the first target network that meets the service to be processed, updating the network status of each candidate network; Determining a second target network corresponding to the service to be processed from the updated candidate networks, and sending a second service request for the service to be processed to the second target network; wherein, the second service request is used to instruct the second target network to perform a second producer search for the service to be processed; Obtaining a second service response feedback by the second target network in response to the second service request; When the search result included in the second service response indicates that there is a second producer in the second target network that meets the service to be processed, sending the service to be processed to the second producer.
4. The method according to claim 3, wherein When the search result included in the second service response indicates that there is no second producer in the second target network that meets the service to be processed, repeating the steps of updating the network status of each candidate network until obtaining the second service response feedback by the second target network in response to the second service request, until the search result included in the second service response indicates that there is a second producer in the second target network that meets the service to be processed.
5. The method according to claim 3, wherein, The updating the network status of each candidate network includes: Obtaining the number of error occurrences of call errors that occur in each candidate network within a preset time period; Updating the network status of the candidate network with the number of error occurrences greater than the number threshold to an abnormal state.
6. The method according to claim 3, wherein, The updating the network status of each candidate network includes: Determining an abnormal network with an abnormal network status from each candidate network; Updating the network status of the abnormal network according to the abnormal start time of the abnormal network.
7. The method according to claim 6, wherein The updating the network status of the abnormal network according to the abnormal start time of the abnormal network includes: Take the time difference between the current moment and the abnormal start time of the abnormal network as the abnormal duration of the abnormal network; When the abnormal duration is greater than the difference threshold, update the network status of the abnormal network to the healthy status.
8. The method according to claim 3, wherein, The updating of the network status of each candidate network includes: Determine, from each candidate network, an abnormal network whose network status is the abnormal status; Perform a ratio operation on the number of abnormalities of the abnormal network and the total number of each candidate network to obtain the abnormality ratio in each candidate network; When the abnormality ratio is greater than the ratio threshold, update the network status of the abnormal network to the healthy status.
9. The method according to claim 1, wherein Selecting a first target network from each candidate network according to the network status of each candidate network includes: Determine the first target network from the candidate networks with a healthy network status.
10. The method according to claim 9, wherein, Selecting a first target network from each candidate network according to the network status of each candidate network includes: Obtain the error time of the last call error of each candidate network; Determine the time interval between each candidate network and the last call error according to the error time of the last call error of each candidate network; Use the candidate network with the largest time interval and a healthy network status as the first target network.
11. The method according to claim 1, wherein, The determining of at least one candidate network that meets the requirements of the to-be-processed service proxy includes: Send a network service discovery request corresponding to the to-be-processed service to the network registration center; wherein, the network service discovery request is used to instruct the network registration center to determine at least one candidate network that meets the requirements of the to-be-processed service proxy; Receive at least one candidate network that meets the requirements of the to-be-processed service proxy feedback by the network registration center.
12. A service proxy device, comprising: A first determination module that determines at least one candidate network that meets the requirements of the to-be-processed service proxy sent by the consumer terminal; A second determination module, configured to select a first target network from each candidate network according to the network status of each candidate network, and send a first service request of the to-be-processed service to the first target network; wherein, the first service request is used to instruct the first target network to perform a first producer search for the to-be-processed service; An acquisition module, configured to acquire a first service response fed back by the first target network in response to the first service request; when the search result included in the first service response is that there is a first producer that meets the to-be-processed service in the first target network, send the to-be-processed service to the first producer, so that the first producer performs service processing for the to-be-processed service.
13. A computer device includes a memory and a processor, and the memory stores a computer program, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, wherein, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Communication method and device, entity and storage medium
CN110234140A
Communication method, service agent and communication system
CN117527893A
Service agent method and device, computer equipment and storage medium
CN117978866A
Methods, systems, and computer readable media for error information propagation from service communication proxy (SCP) to consumer network function (NF) to support circuit breaker design pattern at consumer nf
US20230308908A1
Static discovery fallback for query-based network function interaction discovery
US20230421648A1
Cited By
Dynamic retrieval and management of network function information
US20250392981A1