CN114936097A - Processing node determination method, processing node determination device, computer equipment and storage medium - Google Patents

Processing node determination method, processing node determination device, computer equipment and storage medium Download PDF

Info

Publication number
CN114936097A
CN114936097A CN202210739670.XA CN202210739670A CN114936097A CN 114936097 A CN114936097 A CN 114936097A CN 202210739670 A CN202210739670 A CN 202210739670A CN 114936097 A CN114936097 A CN 114936097A
Authority
CN
China
Prior art keywords
processing
node
array
target
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210739670.XA
Other languages
Chinese (zh)
Inventor
胡达
郑胜利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210739670.XA priority Critical patent/CN114936097A/en
Publication of CN114936097A publication Critical patent/CN114936097A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application relates to a processing node determination method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, wherein the next processing link comprises a plurality of nodes to be selected and processed; determining a target array number corresponding to a target parameter of data to be transmitted from the array numbers; and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted. By adopting the method, the problem of uneven load among different cores in the same processing link can be avoided, so that the throughput rate of the whole machine is improved, and the bandwidth utilization rate is improved.

Description

Processing node determination method, processing node determination device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for determining a processing node, a computer device, and a storage medium.
Background
With the development of internet technology, in a Network Function Virtualization (NFV) scenario, in a process of transmitting data based on a packet processing model of a multi-stage pipeline processing structure (pipeline) architecture, when the data completes a current processing link and is to be delivered to a next processing link, a quintuple hash value of the data is used to directly modulo the number of Central Processing Unit (CPU) cores of the next processing link, it should be understood that one CPU core corresponds to one instance, that is, the number of CPU cores is the number of instances, and based on this, an obtained modulo result is an index of a CPU core specifically responsible for processing the data in the next link. However, if the data rates are different between different streams, this may result in uneven load between different cores of the same processing element. Therefore, how to avoid the load imbalance among the cores is an urgent problem to be solved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a processing node determining method, an apparatus, a computer device, and a storage medium capable of avoiding load imbalance among cores.
In a first aspect, the present application provides a processing node determining method. The method comprises the following steps:
acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, wherein the next processing link comprises a plurality of nodes to be selected and processed;
determining a target array number corresponding to a target parameter of data to be transmitted from the array numbers;
and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
In one embodiment, the method further comprises:
acquiring the maximum processing load of each processing node to be selected, and calculating the maximum load proportion among the maximum processing loads of the processing nodes to be selected;
determining the quantity proportion of the node index quantity of each processing node to be selected based on the maximum load proportion;
based on the quantity proportion, generating the corresponding relation between each node index and each array number
In one embodiment, the method further comprises:
acquiring the message processing rate of each processing node to be selected, and calculating the load proportion among the processing loads of each processing node to be selected based on each message processing rate, wherein the load proportion is used for describing the difference among the processing loads of each processing node to be selected;
and determining the corresponding relation between each array number and each node index based on the load proportion.
In one embodiment, determining the corresponding relationship between each array number and each node index based on the load ratio includes:
if the load proportion is larger than or equal to the maximum proportion threshold, determining a first processing node to be selected and a second processing node to be selected based on the load proportion, wherein the first processing node to be selected is the processing node to be selected with the largest processing load in the processing nodes to be selected, and the second processing node to be selected is the processing node to be selected with the smallest processing load in the processing nodes to be selected;
reducing the number of node indexes of the first node to be selected and processed, and adjusting the corresponding relation between the node index of the first node to be selected and each array number based on the reduced number of the node indexes of the first node to be selected and processed;
and increasing the number of node indexes of the second processing node to be selected, and adjusting the corresponding relation between the node indexes of the second processing node to be selected and the array numbers based on the increased number of the node indexes of the second processing node to be selected.
In one embodiment, the data to be transmitted is service data belonging to a target service, and the transmission sequence of the data to be transmitted in each service data of the target service is a preset transmission sequence;
the data to be transmitted further comprises message sequence number information, the message sequence number information comprises a first modulus value and a message sequence identifier, the first modulus value is obtained by modulo the number of each array unit corresponding to the first processing link of the target service based on the target parameter, and the message sequence identifier is obtained by performing packet-by-packet increasing processing based on the first modulus value.
In one embodiment, after adjusting the correspondence between each node index and each array number, the method further includes:
if the target array unit indicated by the target array number is the array unit with the adjusted corresponding relation, marking the data to be transmitted;
after the data to be transmitted is processed in the last processing link of the target service, distributing the marked data to be transmitted to a first ordering domain corresponding to the first modulus value, wherein the first ordering domain comprises each first service data carrying the first modulus value;
and in the first sequencing domain, performing reordering processing based on the message sequence identifier of each first service data, wherein the sequence of the data to be transmitted after the reordering processing in each first service data after the reordering processing is a preset transmission sequence.
In one embodiment, the target parameter is a quintuple hash value;
determining a target array number corresponding to a target parameter of data to be transmitted from each array number, including:
performing modulus processing on the quintuple hash value to obtain a modulus quintuple hash value;
and determining the number of the target array from the numbers of the arrays through the modulo five-tuple hash value.
In a second aspect, the present application further provides a processing node determining apparatus. The device comprises:
the system comprises an acquisition module, a selection module and a selection module, wherein the acquisition module is used for acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, and the next processing link comprises a plurality of nodes to be selected and processed;
the determining module is used for determining a target array number corresponding to a target parameter of the data to be transmitted from each array number; and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, wherein the next processing link comprises a plurality of nodes to be selected and processed;
determining a target array number corresponding to a target parameter of the data to be transmitted from each array number;
and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, wherein the next processing link comprises a plurality of nodes to be selected and processed;
determining a target array number corresponding to a target parameter of data to be transmitted from the array numbers;
and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, wherein the next processing link comprises a plurality of nodes to be selected and processed;
determining a target array number corresponding to a target parameter of data to be transmitted from the array numbers;
and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
The processing node determining method, the processing node determining device, the computer equipment, the storage medium and the computer program product are characterized in that firstly, array numbers of array units corresponding to a next processing link of data to be transmitted are obtained, the next processing link comprises a plurality of processing nodes to be selected, then, a target array number corresponding to a target parameter of the data to be transmitted is determined from the array numbers, a target node index corresponding to the target array number is determined based on a corresponding relation between a node index of each processing node to be selected and each array number, the corresponding relation is determined according to loads of the processing nodes to be selected, and the target node index is used for uniquely indicating a target processing node used for processing the data to be transmitted. The corresponding relation is determined according to the load of each processing node to be selected, namely, the relation between each array number and a plurality of node indexes can be distributed based on the load of each processing node to be selected, so that the corresponding search of the index is carried out on the target array number corresponding to the target parameter through the corresponding relation, data are transmitted to the corresponding service node to be processed based on the load in the same processing link, the load unevenness among different cores in the same processing link is avoided, the throughput rate of the whole machine is improved, and the bandwidth utilization rate is improved.
Drawings
Fig. 1 is a schematic diagram of data transmission based on pipeline architecture in an NFV scenario in an embodiment;
FIG. 2 is a diagram of an application environment for a processing node determination method in one embodiment;
FIG. 3 is a flow diagram illustrating a method for processing node determination in one embodiment;
FIG. 4 is a diagram illustrating a mapping relationship between array units and array numbers in one embodiment;
FIG. 5 is a diagram illustrating the correspondence between node indices and array numbers, according to one embodiment;
FIG. 6 is a flow diagram illustrating the determination of correspondence between node indices and array numbers in one embodiment;
FIG. 7 is a flowchart illustrating a process of determining correspondence between node indices and array numbers according to another embodiment;
FIG. 8 is a flow diagram illustrating the adjustment of the correspondence between node indices and array numbers in one embodiment;
FIG. 9 is a diagram illustrating an exemplary adjustment mapping;
FIG. 10 is a schematic flow chart of data transmission according to one embodiment;
FIG. 11 is a flow diagram illustrating the determination of a target array number in one embodiment;
FIG. 12 is a schematic diagram illustrating a complete flow of a method for processing node determination in one embodiment;
FIG. 13 is a block diagram of an apparatus for processing node determination in one embodiment;
FIG. 14 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied in the cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
The scheme provided by the embodiment of the application relates to cloud computing (cloud computing) in cloud technology, wherein the cloud computing refers to a delivery and use mode of an IT infrastructure and refers to the fact that required resources are obtained in an on-demand and easily-extensible mode through a network; the generalized cloud computing refers to a delivery and use mode of a service, and refers to obtaining a required service in an on-demand and easily-extensible manner through a network. Such services may be IT and software, internet related, or other services. The cloud Computing is a product of development and fusion of traditional computers and Network Technologies, such as Grid Computing (Grid Computing), distributed Computing (distributed Computing), Parallel Computing (Parallel Computing), Utility Computing (Utility Computing), Network Storage (Network Storage Technologies), Virtualization (Virtualization), Load balancing (Load Balance), and the like. With the development of diversification of internet, real-time data stream and connecting equipment and the promotion of demands of search service, social network, mobile commerce, open collaboration and the like, cloud computing is rapidly developed. Different from the prior parallel distributed computing, the generation of cloud computing can promote the revolutionary change of the whole internet mode and the enterprise management mode in concept.
At present, as shown in fig. 1, in an NFV scenario, in a process of transmitting data based on a packet processing model of a pipeline architecture, after a dispatch link is processed, the data needs to be sent to a next link (i.e., a forward link) of the dispatch link, and at this time, a quintuple hash value of the data needs to be used to modulo the number of CPU cores included in the forward link, so that a modulo result of the modulo result is an index of a corresponding CPU core that specifically processes the data in the forward link. However, based on the method shown in fig. 1, if the data rates are different between different streams, the load is not uniform between different CPU cores of the same processing element.
Based on this, in order to solve the problem of load non-uniformity among the cores. The embodiment of the application provides a processing node determining method. The processing node determination method provided by the embodiment of the present application may be applied to an application environment as shown in fig. 2. Wherein server 202 communicates with server 204 over a network. The data storage system may store data that server 202 and server 204 need to process. The data storage system may be integrated on server 202 as well as server 204, or may be placed on the cloud or other server. The server 202 and the server 204 may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms.
Specifically, in this embodiment of the present application, data transmission of a packet processing model of a pipeline architecture is performed on the server 202, so that the server 202 includes a plurality of processing links, and processing nodes included in each processing link are specifically CPU cores in the server 202, it can be understood that the number of CPU cores included in each processing link may be different. Secondly, the processing node determination method provided by the embodiment of the application can be applied to a cloud computing scene in a cloud technology, and particularly applied to a process of transmitting data based on a packet processing model of a pipeline architecture under an NFV scene architecture of the cloud computing scene.
Based on this, in one embodiment, as shown in fig. 3, a processing node determination method is provided, which is described by taking the method as an example applied to the server 202 in fig. 2, and includes the following steps:
step 302, obtaining an array number of each array unit corresponding to a next processing link of the data to be transmitted, where the next processing link includes a plurality of nodes to be selected.
In the process of transmitting data based on the packet processing model of the pipeline architecture, that is, the process of processing the service data of the target service includes a plurality of processing links, as shown in fig. 1, both the dispatch processing link and the forward processing link are processing links in processing the target service.
Based on this, each processing link in the pipeline architecture has a corresponding linear MAP table, and the linear MAP table is a one-dimensional array unit with the length of N, that is, each processing link has a plurality of corresponding array units, and each array unit also has a unique corresponding array number. For ease of understanding, as shown in FIG. 4, array location 402 corresponds to array number 1, array location 404 corresponds to array number 7, and array location 406 corresponds to array number 16.
It should be understood that, in practical applications, the linear MAP tables in each processing link in the pipeline architecture have the same length, that is, the number of corresponding array units in each processing link is the same, for example, the number of corresponding array units in each processing link in the pipeline architecture is 1024. Therefore, the specific numerical value and the number of the array numbers can be flexibly determined based on actual conditions.
Specifically, after the server 202 completes the processing of the data to be transmitted in the current processing link, the server 202 first determines that the data to be transmitted should be transmitted to the next processing link, and at this time, the linear MAP table corresponding to the next processing link is obtained in real time, that is, each array unit corresponding to the next processing link is obtained, and because each array unit has a unique corresponding array number, the server 202 can further obtain the array number of each array unit corresponding to the next processing link. Secondly, an example in the embodiment of the present application corresponds to a CPU core, and the CPU core is specifically a processing node belonging to a certain link. Based on this, the next processing link will include a plurality of processing nodes to be selected, for example, the next processing link includes processing node a1 to be selected, processing node a2 to be selected, processing node A3 to be selected, and the like.
For convenience of understanding, taking fig. 1 as an example again, if the data to be transmitted needs to be sent to the next link (i.e., forward link) of the dispatch link after the data processing is completed in the dispatch link, at this time, it needs to be determined to which processing node to be selected of the forward link the data to be transmitted needs to be transmitted, so that the server 202 first obtains array units corresponding to the forward link and array numbers of the array units corresponding to the forward link.
And step 304, determining a target array number corresponding to the target parameter of the data to be transmitted from the array numbers.
The target parameter may be a quintuple hash value or other numerical value.
Specifically, after completing the processing of the data to be transmitted in the current processing link, the server 202 may further determine a target parameter of the data to be transmitted, and then determine a corresponding target array number from each array number based on the target parameter. The server 202 may perform a modulo process on the target parameter, and then determine an array number having a corresponding relationship with the modulo-processed target parameter as the target array number. Next, the server 202 may also directly determine the array number having a correspondence relationship with the target parameter as the target array number. The corresponding relationship may be equal in value, or the difference between values is a preset value, and the like, and is not limited herein.
Step 306, determining a target node index corresponding to the target array number based on the corresponding relationship between the node index of each processing node to be selected and each array number, wherein the corresponding relationship is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
Each processing link is provided with a corresponding linear MAP (MAP) table, the linear MAP table is a one-dimensional array unit with the length of N, and each array unit is also provided with a unique corresponding array number, so that the array number corresponding to each array unit and the node index of each processing node to be selected have a corresponding relation, and the node index can index a specific processing node, namely the node index is used for uniquely indicating the corresponding processing node. Then, the corresponding relationship is determined according to the load of each processing node to be selected, for example, the corresponding relationship is determined based on the maximum processing load of each processing node to be selected, or the corresponding relationship is determined based on the real-time processing load of each processing node to be selected, which is not limited herein.
For the sake of understanding, as shown in fig. 5, the array unit 5021 corresponds to the array number 1, the array number 1 has a corresponding relationship with the node index 0, and the node index 0 is used for uniquely indicating the processing node 5022 to be selected. Similarly, the array unit 5041 corresponds to the array number 3, the array number 3 has a corresponding relationship with the node index 2, and the node index 2 is used to uniquely indicate the processing node 5042 to be selected. And array unit 5061 corresponds to array number 4, while array number 16 has a correspondence with node index 4, and node index 4 is used to uniquely indicate to-be-selected processing node 5062.
Specifically, the server 202 determines a target node index corresponding to the target array number based on the correspondence between the node index of each processing node to be selected and each array number, and then the server 202 transmits the data to be transmitted to the target processing node uniquely indicated by the target node index, so that the target processing node performs corresponding data processing on the data to be transmitted. For example, the corresponding relationship includes array number 1 and node index C1, array number 2 and node index C2, and array number 3 and node index C1. If the determined target array number is 3, the node index C1 corresponding to the array number 3 can be determined as the target node index based on the correspondence, and thus, the server 202 transmits the data to be transmitted to the target processing node uniquely indicated by the node index C1 to perform corresponding data processing.
In the processing node determining method, the corresponding relationship is determined according to the load of each processing node to be selected, that is, the relationship between each array number and a plurality of node indexes can be distributed based on the load of each processing node to be selected, so that the corresponding search of the index is performed on the target array number corresponding to the target parameter through the corresponding relationship, data is transmitted to the corresponding service node for processing based on the load in the same processing link, the problem of uneven load among different cores in the same processing link is avoided, the throughput rate of the whole machine is improved, and the bandwidth utilization rate is improved.
The following will respectively describe how to determine the corresponding relationship according to the load of each processing node to be selected, and first a method for determining the corresponding relationship based on the maximum processing load of each processing node to be selected is described:
in one embodiment, as shown in fig. 6, the method further comprises:
step 602, obtaining the maximum processing load of each processing node to be selected, and calculating the maximum load ratio among the maximum processing loads of each processing node to be selected.
The maximum processing load is a maximum load that can be borne by the processing node to be selected, and may specifically be a preset maximum load of the processing node to be selected, or a maximum load determined based on attribute information of the processing node to be selected, which is not limited herein.
Specifically, the server 202 first obtains the maximum processing load of each processing node to be selected, and then calculates the ratio of the maximum processing load of each processing node to be selected before the maximum processing load, so as to obtain the maximum load ratio. For example, the next processing link includes processing node a1 to be selected, processing node a2 to be selected, and processing node A3 to be selected, and the maximum processing load of processing node a1 to be selected is 100, the maximum processing load of processing node a2 to be selected is 80, and the maximum processing load of processing node A3 to be selected is 60, so that the maximum load ratio is 5: 4: 3(100:80:60).
Step 604, determining the quantity ratio of the node index quantity of each processing node to be selected based on the maximum load ratio.
The quantity ratio is specifically the quantity ratio of the quantity of the node indexes in the corresponding relation of the processing nodes to be selected.
Specifically, the server 202 determines the number ratio of the node index numbers of the processing nodes to be selected based on the maximum load ratio. The quantity ratio may be determined based on the maximum load ratio. Alternatively, the maximum load ratio is determined as a quantity ratio, for example, the maximum load ratio among the processing node to be selected a1, the processing node to be selected a2, and the processing node to be selected A3 is 5: 4: 3, the quantity ratio of the node index quantity of the nodes to be selected is 5: 4: 3.
step 606, based on the quantity ratio, generating the corresponding relation between each node index and each array number.
In the corresponding relationship between each node index and each array number, the number ratio between each node index is a number ratio. For example, the determined quantity ratio is 5: 4: based on this, the number of node indexes of processing node a1 to be selected may be 20, the number of node indexes of processing node a2 to be selected may be 16, and the number of node indexes of processing node A3 to be selected may be 12.
Specifically, each processing link in the pipeline architecture has a corresponding linear MAP table, which is a one-dimensional array unit with a length of N, that is, the next processing link has a corresponding N number of array units, and each array unit also has a uniquely corresponding array number, so that the next processing link has a corresponding N number of array numbers.
Based on this, the server 202 determines the number of the node indexes of the processing nodes to be selected first based on the number ratio of the node index numbers of the processing nodes to be selected calculated in step 604 and the specific number of each array number, and then performs mapping relationship binding between each node index and each array number based on the number of the node indexes of each node index, thereby generating the corresponding relationship between each node index and each array number.
For example, the number ratio of the node indexes of the processing node a1 to be selected, the processing node a2 to be selected, and the processing node A3 to be selected is 2: 1: 1, the processing node to be selected a1 corresponds to the node index C1, the processing node to be selected a2 corresponds to the node index C2, and the processing node to be selected A3 corresponds to the node index C3. And the next processing link corresponds to 8 array units, that is, the next processing link corresponds to 8 array numbers, and if the array number is specifically 1 to 8, the next processing link corresponds to array number 1, array number 2, array number 3 to array number 8.
Based on this, the number ratio of the node index numbers is 2: 1: 1, and the next processing link corresponds to 8 array units, it can be determined that the number of node indexes C1 is 4, the number of node indexes C2 is 2, and the number of node indexes C2 is 2. Therefore, the generated correspondence relationship includes a correspondence relationship between the 4 node indexes C1 and the respective array numbers, a correspondence relationship between the 2 node indexes C2 and the respective array numbers, and a correspondence relationship between the 2 node indexes C3 and the respective array numbers. For example: the correspondence relationship between the array number 1 and the node index C1, the correspondence relationship between the array number 2 and the node index C1, the correspondence relationship between the array number 3 and the node index C2, the correspondence relationship between the array number 4 and the node index C3, the correspondence relationship between the array number 5 and the node index C2, the correspondence relationship between the array number 6 and the node index C1, the correspondence relationship between the array number 7 and the node index C3, and the correspondence relationship between the array number 8 and the node index C1. It should be understood that the foregoing examples are for the understanding of the present application only and are not to be construed as limiting the present application.
In this embodiment, by considering the maximum processing load of each processing node to be selected, mapping relationship binding is specifically performed based on the maximum processing load when generating the corresponding relationship, so that on the basis of avoiding uneven load among different cores of the same processing link, each processing node to be selected is further ensured to meet data processing requirements, and the reliability of the scheme and the bandwidth utilization rate are improved.
Secondly, a method for determining the corresponding relation based on the real-time processing load of each processing node to be selected is introduced:
in one embodiment, as shown in fig. 7, the method further comprises:
step 702, obtaining the message processing rate of each processing node to be selected, and calculating the load proportion among the processing loads of each processing node to be selected based on each message processing rate, wherein the load proportion is used for describing the difference among the processing loads of each processing node to be selected.
The message processing rate is used for describing the real-time processing rate of the processing node to be selected.
Specifically, the server 202 first obtains the amount of the current accumulated processing data of each processing node to be selected in real time, so as to calculate the packet processing rate based on the amount of the current accumulated processing data of the processing node to be selected. Further, a load ratio between processing loads of the processing nodes to be selected is calculated based on the processing rates of the messages, and the load ratio is used for describing a difference between the processing loads of the processing nodes to be selected, namely the load ratio reflects the load balance degree of the processing nodes to be selected.
For example, the next processing link includes processing node a1 to be selected, processing node a2 to be selected, and processing node A3 to be selected, and the real-time processing rate of processing node a1 to be selected is 60, the real-time processing rate of processing node a2 to be selected is 30, and the real-time processing rate of processing node A3 to be selected is 30, so that a load ratio of 2: 1: 1(60:30:30). And thus, processing node a1 to be selected is loaded higher than processing node a2 and processing node A3 to be selected.
Step 704, determining the corresponding relationship between each array number and each node index based on the load ratio.
In the corresponding relationship between each node index and each array number, the ratio of the number of each node index is a load ratio. For example, the determined load proportion is 2: 1: based on this, the number of node indexes of processing node a1 to be selected may be 20, the number of node indexes of processing node a2 to be selected may be 10, and the number of node indexes of processing node A3 to be selected may be 10.
Specifically, the server 202 determines the number of node indexes of each processing node to be selected first based on the load ratio calculated in step 702 and the specific number of each array number, and then performs mapping relationship binding between each node index and each array number based on the number of node indexes of each node index, thereby determining the corresponding relationship between each array number and each node index. The detailed implementation is similar to step 606 and is not described here again.
In this embodiment, by considering the real-time processing load of each processing node to be selected, mapping relationship binding is specifically performed based on the real-time processing load when determining the corresponding relationship, so as to realize dynamic determination of the corresponding relationship, and on the basis of avoiding uneven load among different cores in the same processing link, the flexibility and the real-time performance of the scheme are further improved.
In the case that the real-time processing load of each processing node to be selected is considered to determine the corresponding relationship, the corresponding relationship needs to be adjusted based on the real-time processing load condition of each processing node to be selected, and the method for adjusting the corresponding relationship is specifically described below:
in one embodiment, as shown in fig. 8, step 704, determining the corresponding relationship between each array number and each node index based on the load ratio, includes:
step 802, if the load ratio is greater than or equal to the maximum ratio threshold, determining a first processing node to be selected and a second processing node to be selected based on the load ratio, where the first processing node to be selected is the processing node to be selected with the largest processing load among the processing nodes to be selected, and the second processing node to be selected is the processing node to be selected with the smallest processing load among the processing nodes to be selected.
The maximum ratio threshold may be determined based on the data type of the data to be transmitted, or may be determined based on the requirement of the actual service, which is not limited herein.
Specifically, when the load ratio is greater than or equal to the maximum ratio threshold, it is described that load imbalance occurs between the processing nodes to be selected, and at this time, adjustment of the correspondence between the node index and each array number is triggered. That is, the server 202 determines, based on the load proportion, a processing node to be selected with the largest processing load among the processing nodes to be selected as a first processing node to be selected, and determines, based on the load proportion, a processing node to be selected with the smallest processing load among the processing nodes to be selected as a second processing node to be selected.
For example, the maximum ratio threshold is 3: 1: 1, and the load ratio among the processing node to be selected a1, the processing node to be selected a2, and the processing node to be selected A3 is 5: 1.5: 1, when the load ratio (5: 1.5: 1) is greater than the maximum ratio threshold (3: 1: 1), indicating that a load imbalance occurs among the processing node to be selected a1, the processing node to be selected a2, and the processing node to be selected A3, it may be determined based on the load ratio (5: 1.5: 1) that the processing load of the processing node to be selected a1 is the maximum, and the processing load of the processing node to be selected A3 is the minimum, so that the processing node to be selected a1 is determined to be the first processing node to be selected, and the processing node to be selected A3 is determined to be the second processing node to be selected.
And 804, reducing the number of the node indexes of the first node to be selected and processed, and adjusting the corresponding relation between the node index of the first node to be selected and the array numbers based on the reduced number of the node indexes of the first node to be selected and processed.
Because the load imbalance occurs between the processing nodes to be selected, the processing load of the first processing node to be selected should be adjusted, that is, the data is prevented from being transmitted to the first processing node to be selected for processing, so that the number of the node indexes corresponding to the first processing node to be selected in the corresponding relationship between the node indexes and the array numbers needs to be reduced. Specifically, the server 202 reduces the number of node indexes of the first node to be processed to be selected, and adjusts the correspondence between the node index of the first node to be processed to be selected and each array number based on the reduced number of node indexes of the first node to be processed to be selected.
Step 806, increasing the number of node indexes of the second processing node to be selected, and adjusting the corresponding relationship between the node indexes of the second processing node to be selected and the array numbers based on the increased number of node indexes of the second processing node to be selected.
When the processing load of the first processing node to be selected is adjusted, the processing load of the second processing node to be selected should also be adjusted, and data is transmitted to the second processing node to be selected as much as possible for processing with the purpose of load balancing, so that the number of node indexes corresponding to the second processing node to be selected in the correspondence relationship between the node indexes and the array numbers needs to be increased. Specifically, the server 202 increases the number of node indexes of the second processing node to be selected, and adjusts the correspondence between the node indexes of the second processing node to be selected and the array numbers based on the increased number of node indexes of the second processing node to be selected.
To facilitate understanding of step 804 and step 806, as shown in fig. 9, the processing node to be selected 901 corresponds to the node index 0, the processing node to be selected 902 corresponds to the node index 1, and the processing node to be selected 903 corresponds to the node index 2, and the correspondence between the node index and each array number includes the correspondence between 4 node indexes 0 and each array number, the correspondence between 2 node indexes 1 and each array number, and the correspondence between 2 node indexes 2 and each array number. And the specific correspondence is shown in fig. 9 (a): the correspondence relationship between the array number 1 and the node index 0, the correspondence relationship between the array number 2 and the node index 0, the correspondence relationship between the array number 3 and the node index 1, the correspondence relationship between the array number 4 and the node index 2, the correspondence relationship between the array number 5 and the node index 1, the correspondence relationship between the array number 6 and the node index 0, the correspondence relationship between the array number 7 and the node index 2, and the correspondence relationship between the array number 8 and the node index 0.
Based on this, if the processing node to be selected 901 is determined as the first processing node to be selected, and the processing node to be selected 903 is determined as the second processing node to be selected, it is necessary to reduce the number of node indexes 0 corresponding to the first processing node to be selected (the processing node to be selected 901) and increase the number of node indexes 2 corresponding to the second processing node to be selected (the processing node to be selected 903).
Therefore, the server 202 can adjust the correspondence between the 4 node indexes 0 and the array numbers in the correspondence to the correspondence between the 3 node indexes 0 and the array numbers. And adjusting the corresponding relation between the 2 node indexes 2 in the corresponding relation and each array number into the corresponding relation between the 3 node indexes 2 and each array number. For node index 0: the correspondence between the array number 1 and the node index 0, the correspondence between the array number 2 and the node index 0, the correspondence between the array number 6 and the node index 0, and the correspondence between the array number 8 and the node index 0 may be unbound. And for node index 2: the corresponding relationship between the array number 4 and the node index 2 and the corresponding relationship between the array number 7 and the node index 2 can be established at this time because the corresponding relationship between the array number 8 and the node index 0 is unbound.
Therefore, the correspondence between the adjusted node index and each array number is as shown in fig. 9 (B), and specifically includes: the correspondence relationship between the array number 1 and the node index 0, the correspondence relationship between the array number 2 and the node index 0, the correspondence relationship between the array number 3 and the node index 1, the correspondence relationship between the array number 4 and the node index 2, the correspondence relationship between the array number 5 and the node index 1, the correspondence relationship between the array number 6 and the node index 0, the correspondence relationship between the array number 7 and the node index 2, and the correspondence relationship between the array number 8 and the node index 2.
In this embodiment, when the corresponding relationship is determined in consideration of the real-time processing load of each processing node to be selected, the corresponding relationship is further adjusted based on the real-time processing load condition of each processing node to be selected, so as to implement dynamic adjustment of the corresponding relationship, and ensure real-time performance and reliability of the corresponding relationship.
In one embodiment, the data to be transmitted is service data belonging to a target service, and the transmission sequence of the data to be transmitted in each service data of the target service is a preset transmission sequence;
the data to be transmitted further comprises message sequence number information, the message sequence number information comprises a first modulus value and a message sequence identifier, the first modulus value is obtained by performing modulus operation on the number of each array unit corresponding to the first processing link of the target service based on the target parameter, and the message sequence identifier is obtained by performing packet-by-packet increasing processing based on the first modulus value.
Specifically, the data to be transmitted is service data belonging to a target service, and the data to be transmitted has a corresponding transmission sequence in each service data of the target service, and the transmission sequence is a preset transmission sequence. For example, the target service includes service data D1, service data D2, service data D3, and service data D4, and the service data D1 to the service data D4 are sequentially transmitted, and if the data to be transmitted is specifically the service data D2 of the target service, the preset transmission sequence of the data to be transmitted in each service data is the second.
Further, multiple processing links are required for processing the target service, and after the server 202 processes the data to be transmitted based on the first processing link of the target service, the data to be transmitted needs to be numbered, that is, the data to be transmitted is given message sequence number information (m, index), where the message sequence number information specifically consists of two parts, and specifically includes a first modulus value (m) and a message sequence identifier (index).
The first modulo value (m) is a value obtained by modulo the number of each array unit corresponding to the first processing link based on a target parameter of the data to be transmitted, and specifically is a value obtained by modulo the number of each array unit corresponding to the first processing link based on a quintuple hash value of the data to be transmitted. Secondly, the message sequence identifier (index) is a value which is added packet by packet on the premise that a first modulus value (m) is obtained after modulus calculation.
The message sequence number information (m, index) is formed in a manner that the first modulo value (m) occupies the high-order bits and the message sequence identifier (index) occupies the low-order bits, and the message sequence number information can serve as the message sequence number of the data to be transmitted.
In this embodiment, the message sequence number information may be used as the data to be transmitted, so that when multiple service data of the target service are transmitted, the order of transmission of each service data may be ensured based on the message sequence number information, thereby improving the reliability of the scheme.
The foregoing embodiment describes a process of adjusting the corresponding relationship between each node index and each array number, which may cause a change in the transmission sequence between multiple service data of a target service during transmission, thereby affecting the orderliness of service data transmission, and therefore, how to ensure the orderliness of service data transmission will be described below:
in one embodiment, as shown in fig. 10, after adjusting the corresponding relationship between each node index and each array number, the method further includes:
in step 1002, if the target array unit indicated by the target array number is an array unit whose correspondence relationship has been adjusted, the data to be transmitted is marked.
Specifically, if the target array unit indicated by the target array number is the array unit with the adjusted corresponding relationship, the server 202 performs the marking processing on the data to be transmitted. The marking process may be a coloring process performed on the data to be transmitted. It should be understood that, in practical application, the array number corresponding to the calculated service data in the target service indicates the array unit with the adjusted corresponding relationship, and the service data satisfying the condition needs to be marked.
And 1004, after the data to be transmitted is processed in the last processing link of the target service, distributing the marked data to be transmitted to a first ordering domain corresponding to the first modulus value, wherein the first ordering domain comprises each first service data carrying the first modulus value.
And the business data of different sequencing domains can not be put together for sequencing.
Specifically, after the data to be transmitted is processed in the last processing link of the target service, if the data to be transmitted is not marked, the server 202 normally completes the processing of the entire pipeline. If the data to be transmitted is marked, the marked data to be transmitted needs to be configured in a sub-configuration mode, the first sequencing domain corresponding to the first modulus value in the message sequence number information comprises first service data carrying the first modulus value, and the first service data are the service data subjected to the marking processing.
Step 1006, in the first sorting domain, performing a re-sorting process based on the message sequence identifier of each first service data, where the sequence of the data to be transmitted after the re-sorting process in each first service data after the re-sorting process is a preset transmission sequence.
Specifically, since the first ordering domain includes each first service data carrying a first modulo value, the server 202 performs reordering processing in the first ordering domain based on the message sequence identifier of each first service data, so as to obtain data to be transmitted after the ordering processing, and a sequence in each first service data after the reordering processing is a preset transmission sequence.
For example, the first ordering domain includes the first service data D1 and the second service data D2, and the message sequence of the first service data D1 is identified as (2, 4), and the message sequence of the second service data D2 is identified as (2, 5). The reordering is performed based on the message sequence identifier (4) of the first service data D1 and the message sequence identifier (5) of the second service data D2, i.e. the first service data D1 will be processed before the second service data D2.
In this embodiment, in consideration of the situation that the adjustment of the corresponding relationship may cause a change in the transmission sequence between a plurality of service data of the target service in the data transmission process, the service data is sequenced in the last processing link of the target service, so as to ensure the orderliness of the transmission of the service data, and further improve the reliability of the scheme.
In one embodiment, as shown in FIG. 11, the target parameter is a five tuple hash value;
step 304, determining a target array number corresponding to the target parameter of the data to be transmitted from the array numbers, including:
step 1102, performing modulo processing on the quintuple hash value of the data to be transmitted to obtain a modulo quintuple hash value.
Specifically, since the target parameter of the data to be transmitted is the quintuple hash value, the server 202 performs modulo processing on the number of each array unit corresponding to the next processing link based on the quintuple hash value of the data to be transmitted, so as to obtain the modulo quintuple hash value.
And 1104, determining a target array number from the array numbers according to the modulo five-tuple hash value.
Specifically, the server 202 determines the modulo five-tuple hash value as a target array number in the array numbers.
In this embodiment, the method for specifically determining the target array number in practical application is obtained through the quintuple hash value of the data to be transmitted, and the practicability of determining the target array number in the scheme is ensured.
Referring to the overall implementation of processing node determination, as shown in fig. 12, a method for processing node determination is provided, which is described by taking the method as an example applied to the server 202 in fig. 2, and includes the following steps:
step 1201, obtaining the array number of each array unit corresponding to the next processing link of the data to be transmitted.
The method comprises the steps of receiving a packet processing model based on a pipeline architecture, wherein the packet processing model based on the pipeline architecture comprises a plurality of processing links in a data transmission process, namely a processing process of business data of a target business. Based on this, each processing link in the pipeline architecture has a corresponding linear MAP table, and the linear MAP table is a one-dimensional array unit with the length of N, that is, each processing link has a plurality of corresponding array units, and each array unit also has a unique corresponding array number.
Specifically, after the server 202 completes the processing of the data to be transmitted in the current processing link, the server 202 first determines that the data to be transmitted should be transmitted to the next processing link, and at this time, the linear MAP table corresponding to the next processing link is obtained in real time, that is, each array unit corresponding to the next processing link is obtained, and because each array unit has a unique corresponding array number, the server 202 can further obtain the array number of each array unit corresponding to the next processing link.
Step 1202, performing modulo processing on the quintuple hash value of the data to be transmitted to obtain a modulo quintuple hash value.
Step 1203, determining a target array number from the array numbers through the modulo five-tuple hash value.
Step 1204, obtain the maximum processing load of each processing node to be selected, and calculate the maximum load proportion among the maximum processing loads of each processing node to be selected.
The maximum processing load is a maximum load that can be borne by the processing node to be selected, and may specifically be a preset maximum load of the processing node to be selected, or a maximum load determined based on attribute information of the processing node to be selected, which is not limited herein.
Specifically, the server 202 first obtains the maximum processing load of each processing node to be selected, and then calculates the ratio of the maximum processing load of each processing node to be selected before the maximum processing load, so as to obtain the maximum load ratio.
Step 1205, based on the maximum load ratio, the quantity ratio of the node index quantity of each processing node to be selected is determined.
The quantity ratio is specifically the quantity ratio of the quantity of the node indexes in the corresponding relation of the processing nodes to be selected.
Specifically, the server 202 determines the number ratio of the node index numbers of the processing nodes to be selected based on the maximum load ratio. The quantity ratio may be determined based on the maximum load ratio.
Step 1206, generating a correspondence between each node index and each array number based on the quantity ratio.
In the corresponding relationship between each node index and each array number, the number ratio between each node index is a number ratio.
Specifically, each processing link in the pipeline architecture has a corresponding linear MAP table, which is a one-dimensional array unit with a length of N, that is, the next processing link has a corresponding N number of array units, and each array unit also has a uniquely corresponding array number, so that the next processing link has a corresponding N number of array numbers.
Based on this, the server 202 determines the number of the node indexes of the processing nodes to be selected first based on the number ratio of the node index numbers of the processing nodes to be selected calculated in step 604 and the specific number of each array number, and then performs mapping relationship binding between each node index and each array number based on the number of the node indexes of each node index, thereby generating the corresponding relationship between each node index and each array number.
Step 1207, obtaining the message processing rate of each processing node to be selected, and calculating the load proportion among the processing loads of each processing node to be selected based on each message processing rate.
The message processing rate is used for describing the real-time processing rate of the processing node to be selected.
Specifically, the server 202 first obtains the amount of the current accumulated processing data of each processing node to be selected in real time, so as to calculate the packet processing rate based on the amount of the current accumulated processing data of the processing node to be selected. Further, a load ratio between processing loads of the processing nodes to be selected is calculated based on the processing rates of the messages, and the load ratio is used for describing a difference between the processing loads of the processing nodes to be selected, namely the load ratio reflects the load balance degree of the processing nodes to be selected.
In step 1208, if the load ratio is greater than or equal to the maximum ratio threshold, determining a first processing node to be selected and a second processing node to be selected based on the load ratio.
The maximum ratio threshold may be determined based on the data type of the data to be transmitted, or may be determined based on the requirement of the actual service, which is not limited herein.
Specifically, when the load ratio is greater than or equal to the maximum ratio threshold, it is described that load imbalance occurs between the processing nodes to be selected, and at this time, adjustment of the correspondence between the node index and each array number is triggered. That is, the server 202 determines, based on the load proportion, the processing node to be selected with the largest processing load among the processing nodes to be selected as the first processing node to be selected, and determines, based on the load proportion, the processing node to be selected with the smallest processing load among the processing nodes to be selected as the second processing node to be selected.
Step 1209, the number of node indexes of the first node to be processed to be selected is reduced, and the corresponding relationship between the node index of the first node to be processed to be selected and each array number is adjusted based on the reduced number of node indexes of the first node to be processed to be selected.
Because the load imbalance occurs between the processing nodes to be selected, the processing load of the first processing node to be selected should be adjusted, that is, the data is prevented from being transmitted to the first processing node to be selected for processing, so that the number of the node indexes corresponding to the first processing node to be selected in the corresponding relationship between the node indexes and the array numbers needs to be reduced. Specifically, the server 202 reduces the number of node indexes of the first node to be processed to be selected, and adjusts the correspondence between the node index of the first node to be processed to be selected and each array number based on the reduced number of node indexes of the first node to be processed to be selected.
Step 1210, increasing the number of node indexes of the second processing node to be selected, and adjusting the corresponding relationship between the node indexes of the second processing node to be selected and the array numbers based on the increased number of node indexes of the second processing node to be selected.
When the processing load of the first processing node to be selected is adjusted, the processing load of the second processing node to be selected should also be adjusted, and data is transmitted to the second processing node to be selected as much as possible for processing with the purpose of load balancing, so that the number of node indexes corresponding to the second processing node to be selected in the correspondence relationship between the node indexes and the array numbers needs to be increased. Specifically, the server 202 increases the number of node indexes of the second processing node to be selected, and adjusts the correspondence between the node indexes of the second processing node to be selected and the array numbers based on the increased number of node indexes of the second processing node to be selected.
Step 1211, determining a target node index corresponding to the target array number based on the correspondence between the node index of each to-be-selected processing node and each array number.
Each processing link is provided with a corresponding linear MAP (MAP) table, the linear MAP table is a one-dimensional array unit with the length of N, and each array unit is also provided with a unique corresponding array number, so that the array number corresponding to each array unit and the node index of each processing node to be selected have a corresponding relation, and the node index can index a specific processing node, namely the node index is used for uniquely indicating the corresponding processing node. Then, the corresponding relationship is determined according to the load of each processing node to be selected, for example, the corresponding relationship is determined based on the maximum processing load of each processing node to be selected, or the corresponding relationship is determined based on the real-time processing load of each processing node to be selected, which is not limited herein.
Specifically, the server 202 determines a target node index corresponding to the target array number first based on the correspondence between the node index of each processing node to be selected and each array number, and then the server 202 transmits the data to be transmitted to the target processing node uniquely indicated by the target node index, so that the target processing node performs corresponding data processing on the data to be transmitted.
In step 1212, if the target array unit indicated by the target array number is the array unit with the adjusted corresponding relationship, the data to be transmitted is marked.
Specifically, if the target array unit indicated by the target array number is the array unit with the adjusted corresponding relationship, the server 202 performs the marking processing on the data to be transmitted. The marking process may be a coloring process performed on the data to be transmitted. It should be understood that, in practical application, the array number corresponding to the calculated service data in the target service indicates the array unit with the adjusted corresponding relationship, and the service data satisfying the condition needs to be marked.
And 1213, after the data to be transmitted is processed in the last processing link of the target service, distributing the marked data to be transmitted to the first ordering domain corresponding to the first modulus value.
And the business data of different sequencing domains can not be put together for sequencing.
Specifically, after the data to be transmitted is processed in the last processing link of the target service, if the data to be transmitted is not marked, the server 202 normally completes the processing of the entire pipeline. If the data to be transmitted is marked, the marked data to be transmitted needs to be configured in a sub-configuration mode, the first sequencing domain corresponding to the first modulus value in the message sequence number information comprises first service data carrying the first modulus value, and the first service data are the service data subjected to the marking processing
Step 1214, in the first sorting domain, performing a re-sorting process based on the message sequence identifier of each first service data.
Specifically, since the first ordering domain includes each first service data carrying a first modulo value, the server 202 performs reordering processing in the first ordering domain based on the message sequence identifier of each first service data, so as to obtain data to be transmitted after the ordering processing, and a sequence in each first service data after the reordering processing is a preset transmission sequence.
It should be understood that the specific implementation of steps 1201 to 1214 is similar to the embodiment described in fig. 3 to 11, and is not repeated herein.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a processing node determining apparatus for implementing the processing node determining method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the processing node determining apparatus provided below may refer to the limitations of the processing node determining method in the foregoing, and details are not described here.
In one embodiment, as shown in fig. 13, there is provided a processing node determination apparatus including: an obtaining module 1302 and a determining module 1304, wherein:
an obtaining module 1302, configured to obtain an array number of each array unit corresponding to a next processing link of data to be transmitted, where the next processing link includes multiple processing nodes to be selected;
a determining module 1304, configured to determine, from the array numbers, a target array number corresponding to a target parameter of the data to be transmitted; and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each processing node to be selected and each array number, wherein the corresponding relation is determined according to the load of each processing node to be selected, and the target node index is used for uniquely indicating the target processing node for processing the data to be transmitted.
In an embodiment, the obtaining module 1302 is further configured to obtain the maximum processing load of each processing node to be selected, and calculate a maximum load ratio between the maximum processing loads of the processing nodes to be selected;
the determining module 1304 is further configured to determine, based on the maximum load ratio, a quantity ratio of the number of node indexes of each processing node to be selected; and generating the corresponding relation between each node index and each array number based on the quantity proportion.
In an embodiment, the obtaining module 1302 is further configured to obtain a packet processing rate of each to-be-selected processing node, and calculate a load ratio between processing loads of each to-be-selected processing node based on each packet processing rate, where the load ratio is used to describe a difference between the processing loads of each to-be-selected processing node;
the determining module 1304 is further configured to determine a corresponding relationship between each array number and each node index based on the load ratio.
In an embodiment, the determining module 1304 is specifically configured to determine, based on the load ratio, a first processing node to be selected and a second processing node to be selected, if the load ratio is greater than or equal to the maximum ratio threshold, where the first processing node to be selected is a processing node to be selected with the largest processing load among the processing nodes to be selected, and the second processing node to be selected is a processing node to be selected with the smallest processing load among the processing nodes to be selected; reducing the number of node indexes of the first node to be selected and adjusting the corresponding relation between the node index of the first node to be selected and each array number based on the reduced number of the node indexes of the first node to be selected; and increasing the number of node indexes of the second processing node to be selected, and adjusting the corresponding relation between the node indexes of the second processing node to be selected and the array numbers based on the increased number of the node indexes of the second processing node to be selected.
In one embodiment, the data to be transmitted is service data belonging to a target service, and the transmission sequence of the data to be transmitted in each service data of the target service is a preset transmission sequence; the data to be transmitted further comprises message sequence number information, the message sequence number information comprises a first modulus value and a message sequence identifier, the first modulus value is obtained by performing modulus operation on the number of each array unit corresponding to the first processing link of the target service based on the target parameter, and the message sequence identifier is obtained by performing packet-by-packet increasing processing based on the first modulus value.
In one embodiment, the processing node determining means further comprises: a tag processing module 1306, an assignment module 1308, and an ordering module 1310;
a processing module 1306, configured to, after the determining module 1304 adjusts the correspondence between each node index and each array number, perform mark processing on the data to be transmitted if the target array unit indicated by the target array number is an array unit whose correspondence has been adjusted;
the allocating module 1308 is configured to, after processing of data to be transmitted in a last processing link of a target service is finished, allocate the marked data to be transmitted to a first ordering domain corresponding to a first modulus value, where the first ordering domain includes each first service data carrying the first modulus value;
the sorting module 1310 is configured to perform, in the first sorting domain, a reordering process based on the message sequence identifier of each first service data, where the data to be transmitted after the reordering process is a preset transmission sequence in each first service data after the reordering process.
In one embodiment, the target parameter is a quintuple hash value;
a determining module 1304, specifically configured to perform modulo processing on the quintuple hash value to obtain a modulo quintuple hash value; and determining the target array number from each array number through the five-tuple hash value after the modulus extraction.
The respective modules in the processing node determination apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 14. The computer device includes a processor, a memory, an Input/Output interface (I/O for short), and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein 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 an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the corresponding relation between the own node index of the array number of each array unit and each array number, and the like. The input/output interface of the computer device is used for exchanging information between the processor and an external device. The communication interface of the computer device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a processing node determination method.
Those skilled in the art will appreciate that the architecture shown in fig. 14 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is further provided a computer device including a memory and a processor, the memory having a computer program stored therein, the processor implementing the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. 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), among others. The databases involved in the embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (11)

1. A method for processing node determination, the method comprising:
acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, wherein the next processing link comprises a plurality of nodes to be selected and processed;
determining a target array number corresponding to a target parameter of the data to be transmitted from each array number;
and determining a target node index corresponding to the target array number based on the corresponding relation between the node index of each to-be-selected processing node and each array number, wherein the corresponding relation is determined according to the load of each to-be-selected processing node, and the target node index is used for uniquely indicating the target processing node for processing the to-be-transmitted data.
2. The method of claim 1, further comprising:
acquiring the maximum processing load of each to-be-selected processing node, and calculating the maximum load proportion among the maximum processing loads of each to-be-selected processing node;
determining the quantity proportion of the node index quantity of each to-be-selected processing node based on the maximum load proportion;
and generating a corresponding relation between each node index and each array number based on the number proportion.
3. The method of claim 1, further comprising:
acquiring the message processing rate of each node to be selected, and calculating the load proportion among the processing loads of each node to be selected based on each message processing rate, wherein the load proportion is used for describing the difference among the processing loads of each node to be selected;
and determining the corresponding relation between each array number and each node index based on the load proportion.
4. The method according to claim 3, wherein the determining the corresponding relationship between each of the array numbers and each of the node indexes based on the load ratios comprises:
if the load proportion is greater than or equal to a maximum proportion threshold value, determining a first processing node to be selected and a second processing node to be selected based on the load proportion, wherein the first processing node to be selected is the processing node to be selected with the largest processing load in the processing nodes to be selected, and the second processing node to be selected is the processing node to be selected with the smallest processing load in the processing nodes to be selected;
reducing the number of node indexes of the first node to be processed to be selected, and adjusting the corresponding relation between the node index of the first node to be processed to be selected and each array number based on the reduced number of the node indexes of the first node to be processed to be selected;
and increasing the number of node indexes of the second processing node to be selected, and adjusting the corresponding relation between the node indexes of the second processing node to be selected and each array number based on the increased number of the node indexes of the second processing node to be selected.
5. The method according to claim 4, wherein the data to be transmitted is service data belonging to a target service, and a transmission sequence of the data to be transmitted in each service data of the target service is a preset transmission sequence;
the data to be transmitted further comprises message sequence number information, the message sequence number information comprises a first modulus value and a message sequence identifier, the first modulus value is obtained by performing modulus operation on the number of each array unit corresponding to a first processing link of the target service based on the target parameter, and the message sequence identifier is obtained by performing packet-by-packet increasing processing based on the first modulus value.
6. The method according to claim 5, wherein after adjusting the correspondence between each node index and each array number, the method further comprises:
if the target array unit indicated by the target array number is the array unit with the adjusted corresponding relation, marking the data to be transmitted;
after the last processing link of the target service finishes processing the data to be transmitted, distributing the marked data to be transmitted to a first ordering domain corresponding to the first modulus value, wherein the first ordering domain comprises each first service data carrying the first modulus value;
and in the first sequencing domain, performing reordering processing based on the message sequence identifier of each first service data, wherein the data to be transmitted after the reordering processing is the preset transmission sequence.
7. The method of claim 1, wherein the target parameter is a quintuple hash value;
the determining, from each of the array numbers, a target array number corresponding to a target parameter of the data to be transmitted includes:
performing modulus processing on the quintuple hash value to obtain a modulus quintuple hash value;
and determining the target array number from each array number according to the modulo five-tuple hash value.
8. A processing node determination apparatus, the apparatus comprising:
the system comprises an acquisition module, a selection module and a selection module, wherein the acquisition module is used for acquiring array numbers of array units corresponding to a next processing link of data to be transmitted, and the next processing link comprises a plurality of nodes to be selected and processed;
the determining module is used for determining a target array number corresponding to a target parameter of the data to be transmitted from each array number; and determining a target node index corresponding to the target array number based on a corresponding relationship between the node index of each to-be-selected processing node and each array number, wherein the corresponding relationship is determined according to the load of each to-be-selected processing node, and the target node index is used for uniquely indicating a target processing node for processing the to-be-transmitted data.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 7 when executed by a processor.
CN202210739670.XA 2022-06-28 2022-06-28 Processing node determination method, processing node determination device, computer equipment and storage medium Pending CN114936097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210739670.XA CN114936097A (en) 2022-06-28 2022-06-28 Processing node determination method, processing node determination device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210739670.XA CN114936097A (en) 2022-06-28 2022-06-28 Processing node determination method, processing node determination device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114936097A true CN114936097A (en) 2022-08-23

Family

ID=82868592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210739670.XA Pending CN114936097A (en) 2022-06-28 2022-06-28 Processing node determination method, processing node determination device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114936097A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115170095A (en) * 2022-09-07 2022-10-11 浪潮通信信息系统有限公司 Order processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115170095A (en) * 2022-09-07 2022-10-11 浪潮通信信息系统有限公司 Order processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11637889B2 (en) Configuration recommendation for a microservice architecture
US11580441B2 (en) Model training method and apparatus
CN105450618A (en) Operation method and operation system of big data process through API (Application Programming Interface) server
CA3030250A1 (en) File storage method and apparatus for blockchain network
CN102779183B (en) Data inquiry method, equipment and system
CN114936097A (en) Processing node determination method, processing node determination device, computer equipment and storage medium
CN112579319A (en) Service calling method and device based on LRU Cache optimization
CN111008873B (en) User determination method, device, electronic equipment and storage medium
CN109309858B (en) Display method, device, equipment and medium of mutually exclusive icon
CN115361332B (en) Fault-tolerant route processing method and device, processor and electronic equipment
CN116737370A (en) Multi-resource scheduling method, system, storage medium and terminal
US10268727B2 (en) Batching tuples
CN114416438A (en) Data export method and device, computer equipment and scheduling service system
CN110019456A (en) Data lead-in method, device and system
CN114610765A (en) Stream calculation method, apparatus, device and storage medium
CN109787899B (en) Data partition routing method, device and system
CN107360210B (en) Virtual machine allocation method for cloud computing data center considering energy consumption and access delay
JP5594460B2 (en) Transmission information control apparatus, method and program
US20210185119A1 (en) A Decentralized Load-Balancing Method for Resource/Traffic Distribution
Furuya et al. Load balancing method for data management using high availability distributed clusters
CN113590348B (en) Parameter transmission method, device, equipment and medium based on tree structure
CN116737088B (en) Object migration method and device, electronic equipment and storage medium
US11579915B2 (en) Computing node identifier-based request allocation
US9747131B1 (en) System and method for variable aggregation in order for workers in a data processing to share information
WO2016082868A1 (en) Orchestrator and method for virtual network embedding using offline feedback

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40073420

Country of ref document: HK