Data processing method and device, computer device and storage medium

By using a pre-defined routing table in a distributed network to determine the target network element and forward service requests, the problem of load imbalance in a centralized architecture is solved, achieving efficient and flexible data processing and fault tolerance, making it suitable for large-scale networking.

CN116781706BActive Publication Date: 2026-08-04CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
Filing Date
2023-07-20
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional centralized network elements are prone to load imbalance when faced with a large number of service requests, resulting in low data processing efficiency.

Method used

By applying a pre-defined routing table in a distributed network, the target network element that matches the requester's identifier is determined. If the network element is different from the target network element, the service request is sent to the target processing end for processing, thereby achieving dynamic load balancing and fault tolerance.

Benefits of technology

It improves the efficiency and accuracy of data processing, enhances network robustness, supports dynamic addition or reduction of network elements, is suitable for large-scale networking, and reduces the failure rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781706B_ABST
    Figure CN116781706B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of communication, and provides a data processing method and device, computer equipment, a storage medium and a computer program product. The application can improve the data processing efficiency. The method comprises the following steps: receiving a service request of a request end; the service request comprises a request end identifier of the request end; according to a preset routing table, a target network element matched with the request end identifier of the request end is determined from a distributed network; in the case that the network element is different from the target network element, the service request is sent to the target network element, so that the target network element sends the service request to a corresponding target processing end; and the target processing end is used for processing the service request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of communication technology, the network capabilities of mobile communication networks are made available to external applications through network elements.

[0003] In traditional technologies, network elements typically adopt a centralized architecture, providing a unified interface to the outside world. However, the deployment of a centralized architecture can easily lead to uneven load distribution among network elements. When faced with a large number of service requests, it can easily exceed the processing limits of the network elements, resulting in low data processing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve data processing efficiency in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a data processing method. Applied to any network element in a distributed network, the method includes:

[0006] Receive a service request from the requesting client; the service request contains the requesting client's identifier;

[0007] According to the preset routing table, the target network element that matches the requester identifier of the requesting end is determined from the distributed network;

[0008] If the network element and the target network element are not the same, the service request is sent to the target network element, which then sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0009] In one embodiment, the preset routing table includes a first preset routing table corresponding to the network element stored locally on the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network; the first preset routing table includes a requesting end identifier that matches the network element identifier of the network element, and the second preset routing table includes a requesting end identifier that matches the network element identifier of the neighboring network element.

[0010] The step of determining the target network element matching the requester identifier of the requesting client from the distributed network according to the preset routing table includes:

[0011] Based on the first preset routing table, determine whether the network element identifier of the network element matches the requester identifier of the requesting end;

[0012] If the network element identifier of the network element does not match the requester identifier of the requesting end, a candidate network element identifier that matches the requester identifier of the requesting end is determined from the network element identifiers of the adjacent network elements according to the second preset routing table; the candidate network element identifier is the network element identifier with the highest matching degree between the network element identifiers of the adjacent network elements and the requester identifier of the requesting end.

[0013] Send the requester identifier of the requesting end to the candidate network element corresponding to the candidate network element identifier;

[0014] The candidate network element is taken as a new network element, and the process jumps to the step of determining whether the network element identifier of the network element matches the requester identifier of the requesting end according to the first preset routing table, until the network element identifier of the new network element is identified to match the requester identifier of the requesting end, and then the new network element is taken as the target network element.

[0015] In one embodiment, the preset routing table includes requester identifiers that match the network element identifiers of each network element in the distributed network.

[0016] The step of determining the target network element matching the requester identifier of the requesting client from the distributed network according to the preset routing table further includes:

[0017] From the preset routing table, determine the target network element identifier that matches the requester identifier of the requesting end;

[0018] From the distributed network, the target network element corresponding to the target network element identifier is determined.

[0019] In one embodiment, the preset routing table includes hash values ​​of requester identifiers that match the hash values ​​of the network element identifiers of each network element.

[0020] The step of determining the target network element identifier that matches the requester identifier of the requesting end from the preset routing table includes:

[0021] The requester identifier of the requesting end is hashed to obtain the hash value of the requester identifier;

[0022] From the preset routing table, determine the hash value of the target network element identifier that matches the hash value of the requester identifier of the requesting end;

[0023] Determining the target network element corresponding to the target network element identifier from the distributed network includes:

[0024] From the distributed network, the target network element corresponding to the hash value of the target network element identifier is determined.

[0025] In one embodiment, when the network element and the target network element are not the same, after sending the service request to the target network element and causing the target network element to send the service request to the corresponding target processing terminal, the method further includes:

[0026] The processing result of receiving the service request sent by the target network element; the processing result is obtained by the target processing terminal processing the service request, and is sent by the target processing terminal to the target network element;

[0027] The processing result is sent to the requesting end.

[0028] In one embodiment, after determining the target network element matching the requester identifier of the requesting client from the distributed network according to a preset routing table, the method further includes:

[0029] If the network element is the same as the target network element, determine the target processing terminal corresponding to the service request;

[0030] The service request is sent to the target processing terminal.

[0031] In one embodiment, determining the target processing terminal corresponding to the service request includes:

[0032] The service request is identified to determine the request type of the service request;

[0033] From the preset processing terminals, determine the target processing terminal corresponding to the request type.

[0034] Secondly, this application provides a data processing method. Applied to a target processing terminal, the method includes:

[0035] The system receives a service request from a target network element. The service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element that matches the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element. The service request includes the requester's identifier.

[0036] The service request is processed.

[0037] Thirdly, this application also provides a data processing apparatus. Applied to any network element in a distributed network, the apparatus includes:

[0038] The first receiving module is used to receive service requests from the requesting end; the service request includes the requesting end identifier of the requesting end;

[0039] The network element determination module is used to determine, according to a preset routing table, the target network element that matches the requester identifier of the requesting end from the distributed network;

[0040] The request sending module is used to send the service request to the target network element when the network element and the target network element are not the same, so that the target network element sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0041] Fourthly, this application also provides a data processing apparatus. Applied to a target processing terminal, the apparatus includes:

[0042] The second receiving module is used to receive a service request from a requesting end sent by a target network element; the service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element that matches the requesting end identifier of the requesting end in the distributed network, and sends the request to the target network element if the network element is different from the target network element; the service request contains the requesting end identifier of the requesting end;

[0043] The request processing module is used to process the service request.

[0044] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0045] Receive a service request from the requesting client; the service request contains the requesting client's identifier;

[0046] According to the preset routing table, the target network element that matches the requester identifier of the requesting end is determined from the distributed network;

[0047] If the network element and the target network element are not the same, the service request is sent to the target network element, which then sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0048] Sixthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0049] The system receives a service request from a target network element. The service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element that matches the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element. The service request includes the requester's identifier.

[0050] The service request is processed.

[0051] Seventhly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0052] Receive a service request from the requesting client; the service request contains the requesting client's identifier;

[0053] According to the preset routing table, the target network element that matches the requester identifier of the requesting end is determined from the distributed network;

[0054] If the network element and the target network element are not the same, the service request is sent to the target network element, which then sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0055] Eighthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0056] The system receives a service request from a target network element. The service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element that matches the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element. The service request includes the requester's identifier.

[0057] The service request is processed.

[0058] Ninthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0059] Receive a service request from the requesting client; the service request contains the requesting client's identifier;

[0060] According to the preset routing table, the target network element that matches the requester identifier of the requesting end is determined from the distributed network;

[0061] If the network element and the target network element are not the same, the service request is sent to the target network element, which then sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0062] Tenthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0063] The system receives a service request from a target network element. The service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element that matches the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element. The service request includes the requester's identifier.

[0064] The service request is processed.

[0065] The aforementioned data processing method, apparatus, computer equipment, storage medium, and computer program product receive a service request from a requesting end; the service request includes a requesting end identifier of the requesting end; according to a preset routing table, a target network element matching the requesting end identifier of the requesting end is determined from the distributed network; if the network element is different from the target network element, the service request is sent to the target network element, causing the target network element to send the service request to the corresponding target processing end; the target processing end is used to process the service request. This scheme receives service requests from any network element in the distributed network, thus obtaining the service requests to be processed. Based on a pre-defined routing table, it identifies the target network element matching the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element, which then forwards the request to the corresponding target processing terminal. The target processing terminal receives the service request from the target network element and processes it. This approach enhances network robustness through the distributed network, facilitates dynamic load balancing through collaboration among multiple network elements, and ensures service availability by quickly adjusting the service scope of other network elements in case of single-element failure, reducing data processing failure rates. It also allows for dynamic network topology changes, supporting the dynamic addition or removal of network elements, providing high flexibility and rapid implementation for network expansion, making it suitable for large-scale networking. Finally, it improves data processing efficiency and accuracy. Attached Figure Description

[0066] Figure 1 This is a diagram illustrating the application environment of a data processing method in one embodiment.

[0067] Figure 2 This is a flowchart illustrating a data processing method in one embodiment;

[0068] Figure 3 This is a schematic diagram of the architecture of a data processing method in one embodiment;

[0069] Figure 4 This is a flowchart illustrating the data processing method in another embodiment;

[0070] Figure 5 This is a flowchart illustrating the data processing method in yet another embodiment;

[0071] Figure 6 This is a timing diagram of a data processing method in one embodiment;

[0072] Figure 7 This is a structural block diagram of a data processing device in one embodiment;

[0073] Figure 8 This is a structural block diagram of the data processing apparatus in another embodiment;

[0074] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0076] 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, data stored, data displayed, 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 the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0077] The data processing method provided in this application can be applied to, for example... Figure 1 The application environment is illustrated. This application scenario can include: a requesting end, any network element in the distributed network (hereinafter referred to as a network element), and a target processing end. The requesting end and the network element can communicate with each other, and the network element and the target processing end can also communicate with each other. Specifically, the network element receives the service request from the requesting end, determines the target network element matching the requesting end's identifier from the distributed network according to a preset routing table, and if the network element and the target network element are different, sends the service request to the target network element, which then forwards the service request to the corresponding target processing end. The target processing end receives the service request from the requesting end sent by the target network element and processes the service request. The requesting end can be, but is not limited to, various personal computers, laptops, smartphones, and tablets; the network element can consist of one or more chassis or racks, capable of independently performing certain transmission functions; the network element can also be implemented using a standalone server or a server cluster composed of multiple servers, for example, a distributed capability open network element; the target processing end can be implemented using a standalone server or a server cluster composed of multiple servers.

[0078] In one embodiment, such as Figure 2 As shown, a data processing method is provided. This embodiment illustrates the application of this method to any network element in a distributed network. In this embodiment, the method includes the following steps:

[0079] Step S201: Receive the service request from the requesting end; the service request contains the requesting end's identifier.

[0080] In this step, the requesting end can be a terminal, such as a terminal with external applications installed; the service request can be a request to be processed; the requesting end's identifier can be a unique identifier for the requesting end, such as the requesting end's number; the distributed network can be a P2P network (peer-to-peer network), such as... Figure 3 As shown, a distributed network can be constructed from multiple network elements (such as network element 1, network element 2, network element 3... network element n, where n can be represented as a numerical value) to realize the openness of distributed capabilities.

[0081] Specifically, the network element (which can be referred to as the current network element) receives the service request sent by the requesting end.

[0082] Step S202: Based on the preset routing table, determine the target network element that matches the requester identifier of the requesting end from the distributed network.

[0083] In this step, the preset routing table can be a pre-set routing table, which may contain the correspondence or matching relationship between one or more network elements and different requesting terminals; the target network element can be the current network element, or it can be a network element in the distributed network other than the current network element.

[0084] Specifically, the network element queries the preset routing table to determine the matching relationship between the preset requester identifier and the preset network element. Based on the matching relationship between the preset requester identifier and the preset network element, it determines the preset network element that matches the requester identifier from the distributed network and uses it as the target network element.

[0085] Step S203: If the network element and the target network element are different, the service request is sent to the target network element, so that the target network element sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0086] In this step, the target processing end can be one of multiple processing ends.

[0087] Specifically, the network element determines whether it is the same as the target network element. If the network element is different from the target network element, it sends the service request to the target network element so that the target network element sends the service request to the corresponding target processing terminal. The target processing terminal receives the service request sent by the target network element and processes the service request.

[0088] In the above data processing method, a service request is received from the requesting end; the service request contains the requesting end identifier of the requesting end; according to a preset routing table, a target network element matching the requesting end identifier of the requesting end is determined from the distributed network; if the network element and the target network element are different, the service request is sent to the target network element, so that the target network element sends the service request to the corresponding target processing end; the target processing end is used to process the service request. This scheme receives service requests from any network element in the distributed network, thus obtaining the service requests to be processed. Based on a pre-defined routing table, it identifies the target network element matching the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element, which then forwards the request to the corresponding target processing terminal. The target processing terminal receives the service request from the target network element and processes it. This approach enhances network robustness through the distributed network, facilitates dynamic load balancing through collaboration among multiple network elements, and ensures service availability by quickly adjusting the service scope of other network elements in case of single-element failure, reducing data processing failure rates. It also allows for dynamic network topology changes, supporting the dynamic addition or removal of network elements, providing high flexibility and rapid implementation for network expansion, making it suitable for large-scale networking. Finally, it improves data processing efficiency and accuracy.

[0089] In one embodiment, in step S202, according to a preset routing table, a target network element matching the requester's identifier is determined from the distributed network. This specifically includes the following: according to a first preset routing table, determining whether the network element identifier of the network element matches the requester's identifier; if the network element identifier of the network element does not match the requester's identifier, according to a second preset routing table, determining a candidate network element identifier matching the requester's identifier from the network element identifiers of adjacent network elements; the candidate network element identifier is the network element identifier with the highest matching degree between the network element identifiers of adjacent network elements and the requester's identifier; sending the requester's identifier to the candidate network element corresponding to the candidate network element identifier; using the candidate network element as a new network element, and jumping to the step of determining whether the network element identifier of the network element matches the requester's identifier according to the first preset routing table, until a new network element identifier matching the requester's identifier is identified, then the new network element is used as the target network element.

[0090] In this embodiment, the preset routing table includes a first preset routing table corresponding to the network element stored locally, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network. The first preset routing table includes a requesting end identifier that matches the network element identifier of the network element, and the second preset routing table includes a requesting end identifier that matches the network element identifier of the neighboring network element.

[0091] The first preset routing table can be used to record multiple request terminal identifiers that match the network element identifier of the network element. For example, the first preset routing table is used to indicate which request terminals' service requests are handled by the network element (current network element). The adjacent network element can be a network element adjacent to the network element (current network element), such as a network element connected to the network element (current network element). The second preset routing table can be used to record multiple request terminal identifiers that match the network element identifiers of the adjacent network elements respectively. For example, the second preset routing table is used to indicate which request terminals' service requests are handled by each adjacent network element. The network element identifier can be a unique identifier of the corresponding network element, such as the IP address (Internet Protocol address) and port number of the corresponding network element. The matching degree can refer to the matching value, such as the probability of matching. The candidate network element can be one of the adjacent network elements. The new network element can be a new round of network elements (a new round of current network elements), used to execute the corresponding steps of the network element.

[0092] Specifically, the network element determines whether its network element identifier matches the requester's identifier according to the first preset routing table. If the network element identifier does not match the requester's identifier, the network element is confirmed not to be the target network element. According to the second preset routing table, the network element identifier with the highest matching degree between the network element identifiers of adjacent network elements and the requester's identifier is determined. This network element identifier with the highest matching degree is used as a candidate network element identifier that matches the requester's identifier. The requester's identifier is then sent to the candidate network element corresponding to the candidate network element identifier. The candidate network element is then used as a new network element (the new...). The execution entity then jumps to the step of determining whether the network element identifier of the network element matches the requester identifier of the requesting end according to the first preset routing table. This continues until a new network element is identified as having a network element identifier that matches the requester identifier of the requesting end. If the new network element (the network element in this round) is identified as the target network element, the target network element that matches the requester identifier of the requesting end is determined. The original network element (the initial network element / the initial current network element) then performs the subsequent step of "sending the service request to the target network element when the network element and the target network element are different, so that the target network element sends the service request to the corresponding target processing end" from the original network element (the initial network element / the initial current network element).

[0093] The technical solution provided in this embodiment searches for or finds the target network element within the range of the network element and its adjacent network elements using the initial network element, and then searches for or finds the target network element in the next round using candidate network elements until the target network element is found. This helps to accurately determine the target network element and at the same time reduces the memory consumption of each network element, thereby improving the performance of each network element and thus improving data processing efficiency and accuracy.

[0094] In one embodiment, in step S202, according to a preset routing table, the target network element that matches the requester identifier of the requesting end is determined from the distributed network. Specifically, this includes: determining the target network element identifier that matches the requester identifier of the requesting end from the preset routing table; and determining the target network element corresponding to the target network element identifier from the distributed network.

[0095] In this embodiment, the preset routing table includes request client identifiers that match the network element identifiers of each network element in the distributed network.

[0096] In this context, each network element in the distributed network can be any network element in the distributed network; the preset routing table can also be used to record multiple request terminal identifiers that match the network element identifier of each network element. For example, the preset routing table can be used to indicate which request terminals each network element is responsible for handling service requests from.

[0097] Specifically, the network element queries the preset routing table for the network element identifier that matches the requester identifier of the requesting end, and uses the network element identifier that matches the requester identifier as the target network element identifier; from the distributed network, it queries the network element corresponding to the target network element identifier, and uses the network element corresponding to the target network element identifier as the target network element.

[0098] The technical solution provided in this embodiment finds the target network element identifier that matches the requester identifier from the preset routing table, and uses the network element corresponding to the target network element identifier as the target network element. This helps to determine the target network element more quickly and accurately, thereby improving the efficiency and accuracy of subsequent data processing.

[0099] In one embodiment, the step of determining the target network element identifier that matches the requester identifier of the requesting end from the preset routing table specifically includes the following: performing hash processing on the requester identifier of the requesting end to obtain the hash value of the requester identifier of the requesting end; determining the hash value of the target network element identifier that matches the hash value of the requester identifier of the requesting end from the preset routing table; the step of determining the target network element corresponding to the target network element identifier from the distributed network specifically includes the following: determining the target network element corresponding to the hash value of the target network element identifier from the distributed network.

[0100] In this embodiment, the preset routing table includes the hash value of the requester identifier that matches the hash value of the network element identifier of each network element.

[0101] Hash processing can be either hash operation or hash calculation.

[0102] Specifically, the network element hashes the requester's identifier to obtain a hash value; it then queries the preset routing table for the hash value of the network element identifier that matches the hash value of the requester's identifier, and uses this hash value as the hash value of the target network element identifier; finally, it queries the distributed network for the network element corresponding to the hash value of the target network element identifier, and uses this network element as the target network element.

[0103] The technical solution provided in this embodiment determines the corresponding target network element by matching the hash value of the requester identifier with the hash value of the network element identifier. This helps to determine the target network element more quickly and accurately, thereby improving the efficiency and accuracy of subsequent data processing.

[0104] In one embodiment, step S203 above, when the network element and the target network element are different, after sending the service request to the target network element and causing the target network element to send the service request to the corresponding target processing end, further includes the step of sending the processing result to the requesting end. Specifically, it includes the following: receiving the processing result of the service request sent by the target network element; the processing result is obtained by the target processing end processing the service request and is sent by the target processing end to the target network element; and sending the processing result to the requesting end.

[0105] In this embodiment, the processing result can be the processing result obtained by the target processing end after processing the service request.

[0106] Specifically, the target processing end processes the service request, obtains the processing result of the service request, and sends the processing result of the service request to the target network element; the target network element receives the processing result of the service request sent by the target processing end and sends the processing result of the service request to the network element; the network element receives the processing result of the service request sent by the target network element and sends the processing result of the service request to the requesting end; the requesting end can display the processing result of the service request.

[0107] The technical solution provided in this embodiment, by sending the processing result of the service request to the requesting end, helps to improve the timeliness of data processing feedback and facilitates the rapid confirmation of the data processing progress.

[0108] In one embodiment, after determining the target network element that matches the requester identifier of the requesting end from the distributed network according to the preset routing table in step S202, the step further includes the step of sending the service request to the target processing end, specifically including the following: when the network element is the same as the target network element, determine the target processing end corresponding to the service request; and send the service request to the target processing end.

[0109] Specifically, after determining the target network element that matches the requester's identifier from the distributed network according to the preset routing table, the network element determines whether the network element and the target network element are the same. If the network element and the target network element are the same, the network element is confirmed as the target network element. The target processing end corresponding to the service request is determined from multiple processing ends, and the service request is sent to the target processing end.

[0110] The technical solution provided in this embodiment improves data processing efficiency and accuracy by having the network element directly send service requests to the target processing terminal when the network element is the target network element.

[0111] In one embodiment, the step of determining the target processing end corresponding to the service request in the above steps specifically includes the following: identifying the service request to obtain the request type of the service request; and determining the target processing end corresponding to the request type from the preset processing ends.

[0112] In this embodiment, the service request type can be one of a variety of request types, such as an information query type. The preset processing terminal can be a plurality of pre-set processing terminals, each of which can correspond to one or more request types, and each processing terminal can be used to process a service request of one request type or a service request of multiple request types.

[0113] Specifically, the network element identifies the type of the service request and obtains the request type; from multiple pre-set processing terminals, it selects the processing terminal corresponding to the request type as the target processing terminal.

[0114] The technical solution provided in this embodiment determines the target processing end based on the request type of the service request, which helps to determine the target processing end more quickly and accurately, thereby improving data processing efficiency and accuracy.

[0115] In one embodiment, such as Figure 4 As shown, a data processing method is provided. This embodiment illustrates the application of this method to a target processing terminal. In this embodiment, the method includes the following steps:

[0116] Step S401: Receive the service request sent by the target network element. The service request is received by any network element in the distributed network, and the network element determines the target network element that matches the requester's identifier from the distributed network according to the preset routing table. If the network element and the target network element are different, the request is sent to the target network element. The service request contains the requester's identifier.

[0117] Step S402: Process the service request.

[0118] Specifically, the target processing end processes the service request, obtains the processing result of the service request, and sends the processing result of the service request to the target network element.

[0119] In the above data processing method, a service request from a requesting end sent by a target network element is received; the service request is received by any network element in the distributed network, and the network element determines the target network element that matches the requesting end identifier from the distributed network according to a preset routing table. If the network element and the target network element are different, the request is sent to the target network element; the service request contains the requesting end identifier of the requesting end; and the service request is processed. This scheme receives service requests from any network element in the distributed network, thus obtaining the service requests to be processed. Based on a pre-defined routing table, it identifies the target network element matching the requester's identifier from the distributed network. If the target network element is different from the target network element, the service request is sent to the target network element, which then forwards the request to the corresponding target processing terminal. The target processing terminal receives the service request from the target network element and processes it. This approach enhances network robustness through the distributed network, facilitates dynamic load balancing through collaboration among multiple network elements, and ensures service availability by quickly adjusting the service scope of other network elements in case of single-element failure, reducing data processing failure rates. It also allows for dynamic network topology changes, supporting the dynamic addition or removal of network elements, providing high flexibility and rapid implementation for network expansion, making it suitable for large-scale networking. Finally, it improves data processing efficiency and accuracy.

[0120] The following example illustrates the data processing method provided in this application. This example demonstrates the application of this method to any network element and target processing terminal in a distributed network. The main steps include:

[0121] The first step is for the network element to receive the service request from the requesting client; the service request contains the requesting client's identifier.

[0122] The second step, in one scenario, involves the network element determining whether its network element identifier matches the requester's identifier based on a first preset routing table. If the network element identifier does not match the requester's identifier, a candidate network element identifier matching the requester's identifier is determined from the network element identifiers of adjacent network elements based on a second preset routing table. The candidate network element identifier is the network element identifier with the highest matching degree between the network element identifiers of adjacent network elements and the requester's identifier. The requester's identifier is then sent to the candidate network element corresponding to the candidate network element identifier. The candidate network element is then used as a new network element, and the process jumps to the step of determining whether the network element identifier matches the requester's identifier based on the first preset routing table, until a new network element identifier is found to match the requester's identifier. In this case, the new network element is used as the target network element.

[0123] The preset routing table includes a first preset routing table stored locally by the network element corresponding to the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network. The first preset routing table includes a requesting end identifier that matches the network element identifier of the network element, and the second preset routing table includes a requesting end identifier that matches the network element identifier of the neighboring network element.

[0124] The third step, corresponding to the second step, could be that the network element performs hash processing on the requester's identifier to obtain the hash value of the requester's identifier; from the preset routing table, it determines the hash value of the target network element identifier that matches the hash value of the requester's identifier; and from the distributed network, it determines the target network element corresponding to the hash value of the target network element identifier.

[0125] The preset routing table includes the hash value of the requester identifier that matches the hash value of the network element identifier of each network element.

[0126] Fourth, if the network element and the target network element are the same, the network element identifies the service request and obtains the request type; it then determines the target processing terminal corresponding to the request type from the preset processing terminals and sends the service request to the target processing terminal. Alternatively, if the network element and the target network element are different, the network element sends the service request to the target network element, which then sends the service request to the corresponding target processing terminal.

[0127] The fifth step is for the target processing terminal to receive the service request sent by the target network element; process the service request and send it to the target network element.

[0128] Step 6: The network element receives the processing result of the service request sent by the target network element and sends the processing result to the requesting end.

[0129] The technical solution provided in this embodiment receives a service request from a requesting end through any network element in a distributed network, thereby obtaining a service request to be processed. Based on a preset routing table, a target network element matching the requesting end's identifier is determined from the distributed network, thus identifying the target network element matching the requesting end among all network elements in the distributed network. If the network element and the target network element are different, the service request is sent to the target network element, which then forwards the service request to the corresponding target processing end. The target network element then forwards the service request to the target processing end for processing. The target processing end receives the service request from the requesting end sent by the target network element and processes the service request. This approach enhances network robustness through a distributed network, making it easier to achieve dynamic load balancing through cooperation among multiple network elements. A single network element failure can be mitigated by quickly adjusting the service scope of other network elements to ensure service availability and reduce the data processing failure rate. It also facilitates dynamic network topology changes, supports the dynamic addition or reduction of network elements, and offers high flexibility and rapid implementation for network expansion, making it suitable for large-scale networking. Furthermore, it improves data processing efficiency and accuracy.

[0130] The following application example illustrates the data processing method provided in this application. This example demonstrates how the method is applied to any network element in a distributed network. Figure 3 , Figure 5 and Figure 6 As shown, the main steps include:

[0131] The first step involves the terminal constructing a peer-to-peer network for multiple network elements based on a distributed hash table. Each network element is uniquely identified by a network element identifier, which is obtained by hashing the IP address and port number. Each network element is responsible for providing services to a specific range of requesting endpoints (by hashing the requesting endpoint's identifier to establish a relationship between the hash space of the requesting endpoint's identifier and the hash space of the network element's identifier), and maintaining a routing table for several adjacent network elements.

[0132] The second step is for a network element in the peer-to-peer network (which can be referred to as the current network element / first network element) to obtain the service request from the requesting end. The service request contains the identifier of the requesting end.

[0133] The third step is for the first network element to perform a hash calculation on the identifier of the requesting end to determine whether the service request falls within the service scope of this network element.

[0134] Fourth step: If yes, the first network element executes the service request; if no, the first network element queries the routing table until the target network element is found, and forwards the service request to the target network element for processing or execution.

[0135] The fifth step involves the target network element sending the service request to the corresponding target processing terminal; the target processing terminal then processes the service request and obtains the processing result.

[0136] There can be multiple requesting ends, such as requesting end 1, requesting end 2, ..., requesting end n (where n can be represented as a number); there can be multiple processing ends, such as processing end 1, processing end 2, processing end 3, ..., processing end n (where n can be represented as a number).

[0137] For example, a P2P network can consist of multiple D-NEFs (Distributed Network Elements). An AF (External Application) can access any D-NEF node. D-NEF nodes establish connections through a DHT (Distributed Hash Table) routing table. A schematic diagram of the data processing architecture is shown below. Figure 3 As shown, each D-NEF node in the P2P network has a unique network element identifier, which can be a unique hash result obtained by performing a hash calculation on the IP address and port number of the physical network element. Each D-NEF node constructs its own DHT routing table based on the DHT algorithm. This DHT routing table is used to find the unique network element identifier corresponding to the index value of the hash space. The D-NEF receives API (Application Programming Interface) service requests externally. Internally, based on the Distributed Hash Table (DHT) algorithm, it calculates the hash space index, locates the target D-NEF node, and routes the request to the target D-NEF node, which then executes the request. External applications invoke D-NEF services by passing the UE's (requesting end) GPSI (Generic Public Subscription Identifier).

[0138] For example, such as Figure 6 As shown, the requesting end sends a service request to the network element. The network element calculates the hash value of the requesting end's identifier to determine whether it belongs to the service scope of the network element. If it does, the service request is executed. If not, the routing table is searched until the target network element is found, and the service request is forwarded to the target network element. The target network element sends the service request to the corresponding target processing end. The target processing end processes the service request, obtains the service response (processing result), and returns the service response to the target network element. The target network element returns the service response to the network element, and the network element returns the service response to the requesting end.

[0139] The technical solution provided in this application example achieves higher scalability through distributed network capability openness, supports distributed self-organizing network deployment, offers flexible networking and rapid expansion, avoids single points of failure and performance bottlenecks, and better supports distributed applications; it enhances network robustness through distributed networking, and multiple network elements can more easily achieve dynamic load balancing through cooperation. The failure of a single network element can be addressed by quickly adjusting the service scope of other network elements to ensure service availability and reduce the failure rate of data processing; it facilitates dynamic changes in network topology, supports the dynamic addition or removal of network elements, and offers high flexibility and rapid implementation for network expansion, making it suitable for large-scale networking; and it helps improve data processing efficiency and accuracy.

[0140] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0141] Based on the same inventive concept, this application also provides a data processing apparatus for implementing the data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data processing apparatus embodiments provided below can be found in the limitations of the data processing method described above, and will not be repeated here.

[0142] In one embodiment, such as Figure 7 As shown, a data processing device is provided, which can be applied to any network element in a distributed network. The device 700 may include:

[0143] The first receiving module 701 is used to receive service requests from the requesting end; the service request contains the requesting end's identifier.

[0144] The network element determination module 702 is used to determine the target network element that matches the requester identifier of the requesting end from the distributed network according to the preset routing table.

[0145] The request sending module 703 is used to send a service request to the target network element when the network element and the target network element are different, so that the target network element sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

[0146] In one embodiment, the preset routing table includes a first preset routing table stored locally by the network element corresponding to the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network. The first preset routing table includes a requesting end identifier that matches the network element identifier of the network element, and the second preset routing table includes a requesting end identifier that matches the network element identifier of the neighboring network element. The network element determination module 702 is further configured to determine whether the network element identifier of the network element matches the requesting end identifier of the requesting end based on the first preset routing table; if the network element identifier of the network element does not match the requesting end identifier of the requesting end, the second preset routing table is used as the determining factor. From the network element identifiers of adjacent network elements, a candidate network element identifier that matches the requester identifier of the requesting end is determined; the candidate network element identifier is the network element identifier with the highest matching degree between the network element identifiers of adjacent network elements and the requester identifier of the requesting end; the requester identifier of the requesting end is sent to the candidate network element corresponding to the candidate network element identifier; the candidate network element is used as a new network element, and the process jumps to the step of determining whether the network element identifier of the network element matches the requester identifier of the requesting end according to the first preset routing table, until a new network element identifier is identified that matches the requester identifier of the requesting end, then the new network element is used as the target network element.

[0147] In one embodiment, the preset routing table includes requester identifiers that match the network element identifiers of each network element in the distributed network; the network element determination module 702 is further configured to determine, from the preset routing table, the target network element identifier that matches the requester identifier of the requester; and determine, from the distributed network, the target network element corresponding to the target network element identifier.

[0148] In one embodiment, the preset routing table includes hash values ​​of requester identifiers that match the hash values ​​of network element identifiers of each network element; the network element determination module 702 is further configured to perform hash processing on the requester identifier of the requester to obtain the hash value of the requester identifier; determine the hash value of the target network element identifier that matches the hash value of the requester identifier from the preset routing table; and determine the target network element corresponding to the hash value of the target network element identifier from the distributed network.

[0149] In one embodiment, the device 700 further includes: a result sending module, configured to receive the processing result of a service request sent by a target network element; the processing result is obtained by the target processing end processing the service request and is sent by the target processing end to the target network element; and the processing result is sent to the requesting end.

[0150] In one embodiment, the device 700 further includes: a target determination module, configured to determine the target processing terminal corresponding to the service request when the network element and the target network element are the same; and send the service request to the target processing terminal.

[0151] In one embodiment, the target determination module is further configured to identify the service request to obtain the request type of the service request; and determine the target processing terminal corresponding to the request type from the preset processing terminals.

[0152] In one embodiment, such as Figure 8 As shown, a data processing apparatus is provided for use at a target processing end. The apparatus 800 may include:

[0153] The second receiving module 801 is used to receive a service request sent by a target network element. The service request is received by any network element in the distributed network, and the network element determines the target network element that matches the requester's identifier from the distributed network according to a preset routing table. If the network element and the target network element are different, the request is sent to the target network element. The service request contains the requester's identifier.

[0154] The request processing module 802 is used to process service requests.

[0155] Each module in the aforementioned data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0156] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data for data processing, such as preset routing tables. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method.

[0157] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0158] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0159] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0160] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0161] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can 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 can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0162] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0163] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data processing method, characterized by, The method, applicable to any network element in a distributed network, includes: Receive a service request from the requesting client; the service request contains the requesting client's identifier; According to a preset routing table, a target network element matching the requester identifier of the requesting end is determined from the distributed network, including: determining whether the network element identifier of the network element matches the requester identifier according to a first preset routing table; if not, determining a candidate network element identifier from the network element identifiers of adjacent network elements according to a second preset routing table; the candidate network element identifier is the network element identifier with the highest matching degree between the network element identifiers of the adjacent network elements and the requester identifier; sending the requester identifier to the candidate network element corresponding to the candidate network element identifier; and using the candidate network element as a new network element and returning the result to the previous step. The first preset routing table includes a step of determining whether the network element identifier of a network element matches the requesting terminal identifier, until a new network element identifier is identified that matches the requesting terminal identifier, and the new network element is designated as the target network element. The preset routing table includes a first preset routing table stored locally by the network element corresponding to the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network. The first preset routing table includes a requesting terminal identifier that matches the network element identifier of the network element, and the second preset routing table includes a requesting terminal identifier that matches the network element identifier of the neighboring network elements. If the network element and the target network element are not the same, the service request is sent to the target network element, which then sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

2. The method of claim 1, wherein, The preset routing table includes request client identifiers that match the network element identifiers of each network element in the distributed network. The step of determining the target network element matching the requester identifier of the requesting client from the distributed network according to the preset routing table further includes: From the preset routing table, determine the target network element identifier that matches the requester identifier of the requesting end; From the distributed network, the target network element corresponding to the target network element identifier is determined.

3. The method of claim 2, wherein, The preset routing table includes hash values ​​of requester identifiers that match the hash values ​​of the network element identifiers of each network element. The step of determining the target network element identifier that matches the requester identifier of the requesting end from the preset routing table includes: The requester identifier of the requesting end is hashed to obtain the hash value of the requester identifier; From the preset routing table, determine the hash value of the target network element identifier that matches the hash value of the requester identifier of the requesting end; Determining the target network element corresponding to the target network element identifier from the distributed network includes: From the distributed network, the target network element corresponding to the hash value of the target network element identifier is determined.

4. The method of claim 1, wherein, If the network element and the target network element are not the same, after sending the service request to the target network element, and the target network element sending the service request to the corresponding target processing terminal, the method further includes: The processing result of receiving the service request sent by the target network element; the processing result is obtained by the target processing terminal processing the service request, and is sent by the target processing terminal to the target network element; The processing result is sent to the requesting end.

5. The method of claim 1, wherein, After determining the target network element matching the requester identifier from the distributed network according to the preset routing table, the method further includes: If the network element is the same as the target network element, determine the target processing terminal corresponding to the service request; The service request is sent to the target processing terminal.

6. The method of claim 5, wherein, The determination of the target processing terminal corresponding to the service request includes: The service request is identified to determine the request type of the service request; From the preset processing terminals, determine the target processing terminal corresponding to the request type.

7. A data processing method, characterized by, Applied to the target processing end, the method includes: The system receives a service request from a target network element. The service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element matching the requester's identifier from the distributed network. If the target network element is different from the target network element, the request is sent to the target network element. The service request includes the requester's identifier. The network element uses a first preset routing table to determine whether its network element identifier matches the requester's identifier. If not, it uses a second preset routing table to determine candidate network element identifiers from the network element identifiers of adjacent network elements. The candidate network element identifier is the one with the highest matching degree between the network element identifiers of the adjacent network elements and the requester's identifier. The network element identifier is used as the target network element. The requesting network element identifier is sent to the candidate network element corresponding to the candidate network element identifier. The candidate network element is then used as a new network element, and the process returns to the step of determining whether the network element identifier matches the requesting network element identifier according to the first preset routing table, until a new network element identifier is identified that matches the requesting network element identifier. The new network element is then used as the target network element. The preset routing table includes a first preset routing table stored locally by the network element corresponding to the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network. The first preset routing table includes requesting network element identifiers that match the network element identifier of the network element, and the second preset routing table includes requesting network element identifiers that match the network element identifiers of the neighboring network elements. The service request is processed.

8. A data processing apparatus, characterized by, The device is applied to any network element in a distributed network and includes: The first receiving module is used to receive service requests from the requesting end; the service request includes the requesting end identifier of the requesting end; The network element determination module is used to determine, according to a preset routing table, a target network element that matches the requester identifier of the requesting end from the distributed network. Specifically, it is used to determine, according to a first preset routing table, whether the network element identifier of the network element matches the requester identifier; if not, it determines a candidate network element identifier from the network element identifiers of adjacent network elements according to a second preset routing table; the candidate network element identifier is the network element identifier with the highest matching degree between the network element identifiers of the adjacent network elements and the requester identifier; it sends the requester identifier to the candidate network element corresponding to the candidate network element identifier; and it uses the candidate network element as a new network element and returns... Returning to the step of determining whether the network element identifier of a network element matches the requester identifier according to the first preset routing table, the process continues until a new network element is identified whose network element identifier matches the requester identifier, and the new network element is then designated as the target network element. The preset routing table includes a first preset routing table stored locally by the network element corresponding to the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network. The first preset routing table includes requester identifiers that match the network element identifier of the network element, and the second preset routing table includes requester identifiers that match the network element identifiers of the neighboring network elements. The request sending module is used to send the service request to the target network element when the network element and the target network element are not the same, so that the target network element sends the service request to the corresponding target processing terminal; the target processing terminal is used to process the service request.

9. A data processing apparatus, characterized by, The device, applied to a target processing end, includes: The second receiving module is used to receive a service request from a requesting terminal sent by a target network element. The service request is received by any network element in the distributed network, and the network element determines, according to a preset routing table, a target network element matching the requesting terminal's identifier from the distributed network. If the target network element is different from the target network element, the request is sent to the target network element. The service request includes the requesting terminal's identifier. The network element is used to determine, according to a first preset routing table, whether its network element identifier matches the requesting terminal identifier. If not, it determines a candidate network element identifier from the network element identifiers of adjacent network elements according to a second preset routing table. The candidate network element identifier represents the matching degree between the network element identifiers of the adjacent network elements and the requesting terminal identifier. The largest network element identifier; the requesting terminal identifier is sent to the candidate network element corresponding to the candidate network element identifier; the candidate network element is used as a new network element, and the step of determining whether the network element identifier of the network element matches the requesting terminal identifier according to the first preset routing table is returned until a new network element identifier is identified that matches the requesting terminal identifier, and the new network element is used as the target network element; the preset routing table includes a first preset routing table corresponding to the network element stored locally by the network element, and a second preset routing table corresponding to the neighboring network elements of the network element in the distributed network; the first preset routing table includes a requesting terminal identifier that matches the network element identifier of the network element, and the second preset routing table includes a requesting terminal identifier that matches the network element identifier of the neighboring network element; The request processing module is used to process the service request. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-9. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

11. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

12. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.