A privacy computing platform system and task distribution method

By employing a master-slave mode and a circuit breaker mechanism for the computing component management nodes, the status of algorithm component nodes is perceived, resolving the issue of unreasonable task distribution in the privacy computing platform and achieving stable platform execution and decoupled management.

CN115865934BActive Publication Date: 2026-02-24FORTUNE TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211516586.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-02-24
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

In privacy computing platforms, multiple versions of algorithm components are deployed on different virtual machines, making it impossible to know their running status. This can lead to tasks being distributed to nodes that are offline or overloaded, affecting the platform's performance.

Method used

The system employs a computing component management node, implementing a master-slave mode through a detection module and a master module. Utilizing virtual IP technology and a circuit breaker mechanism, it senses the operating status of the computing component nodes, selects the node with the lowest load that has not exceeded the threshold for task distribution, and provides a failover mechanism to avoid single points of failure.

Benefits of technology

It improves the stability and anti-interference capabilities of the platform, ensures that tasks are distributed to appropriate nodes, avoids platform instability and service unavailability, and achieves true decoupled operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865934B_ABST
    Figure CN115865934B_ABST
Patent Text Reader

Abstract

The application provides a privacy computing platform system and a task distribution method. The system comprises a platform node, a computing component management node and a plurality of computing component nodes. The computing component management node receives a network request sent by the platform or the computing component node, packages the network request as an event, selects a computing component node with the lowest load value and a load index not exceeding a threshold value for calling if the event is a request receiving type event, that is, the computing component management node can perceive the running state of the computing component node, thereby selecting a suitable computing component node for task distribution, avoiding that the platform work is distributed to an algorithm component node that has been offline or an algorithm component node with a high load in task execution, and ensuring stable execution of the platform work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of privacy computing technology, and more specifically, to a privacy computing platform system and a task distribution method. Background Technology

[0002] In the context of privacy computing, privacy computing platforms contain a large number of algorithm components, and different versions of these components have different functions. For example, there are privacy intersection components and vertical LR components. Only through the platform's work scheduling can multiple algorithm components work together to complete tasks such as federated learning or privacy computing.

[0003] The privacy computing platform deploys multiple versions of algorithm components on different virtual machines without any awareness of each other. Because it cannot perceive the running status of the algorithm components, the work issued by the platform may be distributed to algorithm component nodes that have been taken offline, or it may be distributed to algorithm component nodes that are currently executing tasks and have a high load. This will affect the execution of the platform's work. Summary of the Invention

[0004] The purpose of this application is to provide a privacy computing platform system and task distribution method to solve the problem that multiple versions of algorithm components of the privacy computing platform are deployed on different virtual machines without awareness of each other. Because they cannot perceive the running status of the algorithm components, the tasks issued by the platform may be distributed to algorithm component nodes that have been taken offline or to algorithm component nodes that are currently executing tasks and have a high load, which affects the execution of the platform's work.

[0005] This application provides a privacy computing platform system, including a platform node, a computing component management node, and multiple computing component nodes;

[0006] Platform nodes and computing component nodes are used to send network requests;

[0007] The computing component management node is used to provide services for processing network requests; the services include: receiving network requests, packaging the network request into an event, and determining the type of the event; if the event is a request receiving event, then selecting the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation;

[0008] The load metrics include at least one of CPU utilization, memory utilization, and service response failure rate, and the load value is calculated from the load metrics.

[0009] In the above technical solution, the privacy computing platform system includes a platform node, a computing component management node, and multiple computing component nodes. The computing component management node receives network requests sent by the platform or computing component nodes, packages the network request into an event, and if the event is a request reception event, selects the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation. In other words, the computing component management node can perceive the running status of computing component nodes, thereby selecting appropriate computing component nodes for task distribution, avoiding the distribution of tasks issued by the platform to offline algorithm component nodes or algorithm component nodes with tasks running and high load, ensuring the stable execution of the platform. Furthermore, the platform no longer needs to worry about the management and invocation of computing component nodes; it only needs to issue tasks to the computing component management node, achieving true decoupling.

[0010] In some alternative implementations, the computing component management node includes a detection module and multiple master modules;

[0011] The detection module is used to provide virtual IP technology and set multiple master modules to master-slave mode. In master-slave mode, when the master provides services, the slave master works in standby mode until the route specified by the virtual IP is mapped to the slave master, at which point the slave master provides services.

[0012] In the above technical solution, to ensure high availability of the service architecture, the computing component management node includes a detection module and multiple master modules. The detection module provides virtual IP technology, and the multiple master modules are configured in master-slave mode. For example, the detection module uses keepalived software. When the master provides services, the slave master works in standby mode until the route specified by the virtual IP is mapped to the slave master, at which point the slave master provides services.

[0013] In some alternative implementations, the master module includes a decision module and a first event handler;

[0014] The judgment module is used to determine whether an event is a request to receive event. If so, the first event handler is used to process the event.

[0015] The first event handler includes an interception module and a forwarding module. The interception module uses a series of interceptors to process request receiving events. If the circuit breaker threshold is reached, a failover is performed and the service is provided by the master. Otherwise, the forwarding module selects the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation.

[0016] In the above technical solution, the master module includes a judgment module and a first event handler. When the judgment module determines that an event is a request reception event, the first event handler processes the event. Furthermore, the first event handler has an interception module and a forwarding module. The interception module uses a series of interceptors to process request reception events. If the circuit breaker threshold is reached, failover occurs, and the service is provided by the slave master. Therefore, the master module provides a circuit breaker mechanism. In the computer field, circuit breakers are used to proactively reject some responses in advance, preventing a large number of requests in a short period from overwhelming the service's capacity and causing significant service unavailability. Now, through the master module's management of requests, the overall system's anti-interference capability, security, and stability are improved.

[0017] In some alternative implementations, the load value is determined as follows: D = A × x1 + B × x2 + C × x3;

[0018] Where D is the load value, A is the CPU utilization rate, x1 is the CPU weight value, B is the memory utilization rate, x2 is the memory weight value, C is the service response failure rate, and x3 is the service response weight value.

[0019] In the above technical solution, the computing component node with the lowest load value and whose load indicators do not exceed the threshold is selected for invocation. The load value includes three indicators: CPU utilization, memory utilization, and service response failure rate. The thresholds and weight values ​​can be adjusted through configuration, for example, as follows: CPU threshold 75%, memory threshold 75%, request response rate 75%, CPU weight value 100, memory weight value 100, and service response weight value 100.

[0020] In some alternative implementations, the master module may also include a second event handler;

[0021] The judgment module is also used to determine whether the event is a request sending event; if so, it is processed using the second event handler.

[0022] The second event handler includes a timeout queue, which is used to scan threads and identify tasks that have timed out.

[0023] If a timed-out task has already been completed, discard the timed-out task.

[0024] If a timed-out task is still in progress, retry the timed-out task and update the retry count to the original retry count plus 1.

[0025] If the number of retries for a timed-out task reaches the preset limit, a failover operation will be performed, and the service will be provided by the slave master.

[0026] In the above technical solution, the master module also includes a second event handler, which provides services for processing request sending events. Specifically, it uses a timeout queue scanning thread to scan for timeout tasks. If a timeout task has already been completed, it is discarded. If a timeout task is still in progress, it is retried, and the retry count is updated to the original retry count plus 1. If the number of retries for a timeout task reaches a preset number, a failover operation is performed, and the slave master provides the service.

[0027] In some alternative implementations, the master module may also include a third event handler;

[0028] The judgment module is also used to determine whether the event is a registration event of the computing component node. If so, it is processed using the third event handler.

[0029] The third event handler includes a caching module and a heartbeat check module. The caching module is used to write the current node information of the registered events of the computing component node, and the heartbeat check module is used to obtain the running status of the computing component node, remove unavailable computing component nodes, and update the load data of running computing component nodes.

[0030] In the above technical solution, the master module also includes a third event handler, which provides services for processing computing component node registration events. Specifically, it uses a caching module to write the current node information for the computing component node registration event, a heartbeat detection module to obtain the running status of the computing component node, removes unavailable computing component nodes, and updates the load data of running computing component nodes. By processing computing component node registration events, horizontal scaling of computing component nodes can be achieved, avoiding single points of failure caused by the unavailability of a single computing component node. Simultaneously, the platform initiates computing tasks seamlessly, achieving complete decoupling.

[0031] This application provides a task distribution method for a privacy computing platform system, which includes a platform node, a computing component management node, and multiple computing component nodes.

[0032] The method is applied to the compute component management node, and includes:

[0033] Receive network requests from platform nodes and computing component nodes;

[0034] Wrap a network request as an event; and

[0035] Determine the type of event. If the event is a request receiving event, select the computing component node with the lowest load value and whose load metric does not exceed the threshold for task distribution. The load metric includes at least one of CPU utilization, memory utilization, and service response failure rate. The load value is calculated from the load metric.

[0036] In the above technical solution, the privacy computing platform system includes a platform node, a computing component management node, and multiple computing component nodes. The computing component management node receives network requests sent by the platform or computing component nodes, packages the network request into an event, and if the event is a request reception event, selects the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation. In other words, the computing component management node can perceive the running status of computing component nodes, thereby selecting appropriate computing component nodes for task distribution, avoiding the distribution of tasks issued by the platform to offline algorithm component nodes or algorithm component nodes with tasks running and high load, ensuring the stable execution of the platform. Furthermore, the platform no longer needs to worry about the management and invocation of computing component nodes; it only needs to issue tasks to the computing component management node, achieving true decoupling.

[0037] In some optional implementations, after determining the type of the event, if the event is a request reception event, the process further includes: using a series of interceptors to process the request reception event; if the circuit breaker threshold is reached, a failover operation is performed and the service is provided by the slave master; otherwise, the forwarding module selects the computing component node with the lowest load value and whose load index does not exceed the threshold for task distribution.

[0038] In the above technical solution, when the judgment module determines that the event is a request receiving event, it uses a series of interceptors to process the request receiving event. If the circuit breaker threshold is reached, a failover occurs, and the service is provided by the master. Therefore, the master module provides a circuit breaker mechanism. In the computer field, the circuit breaker mechanism is also used to proactively reject some responses in advance to avoid a large number of requests in a short period of time from breaking through the service's carrying capacity and causing significant losses due to service unavailability. Now, through the management of requests by the master module, the anti-interference, security and stability of the entire system are improved.

[0039] In some optional implementations, the type of event is determined. If the event is a request sending event, a timeout queue is used to complete multiple retry operations and remove multiple retry result responses.

[0040] In the above technical solution, when the event is determined to be a request sending event, the timeout queue scanning thread is used to scan out the timeout tasks; if the timeout task has been completed, it is discarded; if the timeout task is still in progress, it is retried and the retry count is updated to the original retry count plus 1; if the timeout task has reached the preset number of retries, a failover operation is performed and the service is provided by the slave master.

[0041] In some optional implementations, the type of the event is determined. If the event is a computing component node registration event, the current node information is written to the cache, the running status of the computing component node is obtained, unavailable computing component nodes are removed, and the load data of the running computing component nodes is updated.

[0042] In the above technical solution, when an event is identified as a computing component node registration event, the current node information for that event is written using a caching module, the running status of the computing component node is obtained using a heartbeat detection module, unavailable computing component nodes are removed, and the load data of running computing component nodes is updated. By handling computing component node registration events, horizontal scaling of computing component nodes can be achieved, avoiding single points of failure caused by the unavailability of a single computing component node. Simultaneously, the platform-initiated computing tasks are seamlessly integrated, achieving complete decoupling.

[0043] An electronic device provided in this application includes a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the machine-readable instructions, when executed by the processor, perform any of the methods described above.

[0044] This application provides a computer-readable storage medium storing a computer program, which is executed by a processor as described above. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A schematic diagram of the functional modules of a privacy computing platform system provided in an embodiment of this application;

[0047] Figure 2 This is a schematic diagram of the functional modules of the computing component management node provided in the embodiments of this application;

[0048] Figure 3 This is a functional module diagram of the master module provided in the embodiments of this application;

[0049] Figure 4 A flowchart illustrating the steps of a task distribution method for a privacy computing platform system provided in this application embodiment;

[0050] Figure 5 This is a schematic diagram of the functional modules of an electronic device provided in an embodiment of this application.

[0051] Icons: 1-Platform node, 2-Computing component management node, 21-Master, 211-Judgment module, 212-First event processor, 213-Second event processor, 214-Third event processor, 22-Detection module, 23-Slave master, 3-Computing component node, 41-Processor, 42-Memory, 43-Communication interface, 44-Communication bus. Detailed Implementation

[0052] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0053] This application's embodiment of a privacy computing platform system and task distribution method is applicable to, but not limited to, the Netty network service framework. Netty is an asynchronous, event-driven, high-performance, and highly reliable network service framework based on Java NIO, widely used in the internet field. Alibaba's microservice framework Dubbo uses Netty for underlying network communication, and the distributed infrastructure Hadoop also uses Netty as a basic component of its communication module. This embodiment uses TCP to implement a private protocol, enabling more secure and efficient network transmission.

[0054] Please refer to Figure 1 , Figure 1 This is a functional module diagram of a privacy computing platform system provided in an embodiment of this application. The privacy computing platform system includes a platform node 1, a computing component management node 2, and multiple computing component nodes 3. The platform node 1 and computing component nodes 3 are used to send network requests. The computing component management node 2 is used to provide services for processing network requests. The services include: receiving network requests, packaging the network request into an event, and determining the type of the event. If the event is a request receiving event, the computing component node 3 with the lowest load value and whose load index does not exceed the threshold is selected for invocation. The load index includes at least one of CPU utilization, memory utilization, and service response failure rate, and the load value is calculated from the load index.

[0055] In this embodiment, the privacy computing platform system includes a platform node 1, a computing component management node 2, and multiple computing component nodes 3. The computing component management node 2 receives network requests from the platform or the computing component nodes 3, packages the network request into an event, and if the event is a request reception event, selects the computing component node 3 with the lowest load value and whose load index does not exceed the threshold for invocation. In other words, the computing component management node 2 can perceive the running status of the computing component nodes 3, thereby selecting a suitable computing component node 3 for task distribution. This avoids the platform distributing tasks to offline algorithm component nodes or algorithm component nodes with high load and tasks in progress, ensuring the stable execution of the platform. Furthermore, the platform no longer needs to worry about the management and invocation of the computing component nodes 3; it only needs to distribute tasks to the computing component management node 2, achieving true decoupling.

[0056] Please refer to Figure 2 , Figure 2 This is a functional module diagram of the computing component management node 2 provided in the embodiments of this application. The computing component management node 2 includes a detection module 22 and multiple master modules. The detection module 22 is used to provide virtual IP technology and set the multiple master modules to master-slave mode. In master-slave mode, when the master 21 provides services, the slave master 23 works in standby mode until the route specified by the virtual IP is mapped to the slave master 23, at which point the slave master 23 provides services.

[0057] In this embodiment, to ensure high availability of the service architecture, the computing component management node 2 includes a detection module 22 and multiple master modules. The detection module 22 provides virtual IP technology and sets the multiple master modules in master-slave mode. For example, the detection module 22 uses keepalived software. When the master 21 provides services, the slave master 23 works in standby mode until the route specified by the virtual IP is mapped to the slave master 23, at which point the slave master 23 provides services.

[0058] It should be noted that the master-slave mode is a very important design concept in distributed architecture. In order to avoid the unavailability of a single service node from causing the unavailability of the entire service, the master is the node that is currently providing services, while the slave is the node that is not currently providing services, but its data is kept consistent with the master at regular intervals. When the master node can no longer provide services due to various factors, the slave node will be promoted to the master node in a timely manner to continue to provide services.

[0059] Virtual IP technology, with its IP migration feature, allows for node switching. For example, a primary node AIP and a secondary node BIP can be virtualized into a single CIP using this VIP technology. When used externally, only the CIP is used, and the AIP and BIP are not considered. Originally, the CIP would be mapped to the AIP, but when the AIP becomes unavailable due to downtime, network instability, or other service unavailability, the CIP will detect the unavailability of the AIP and automatically switch to map to the BIP without manual intervention.

[0060] Please refer to Figure 3 , Figure 3 This is a functional module diagram of the master module provided in this embodiment. The master module in this embodiment includes a judgment module 211 and a first event processor 212. The judgment module 211 is used to determine whether the event is a request to receive event. If so, the first event processor 212 is used to process the event. The first event processor 212 includes an interception module and a forwarding module. The interception module uses a series of interceptors to process the request to receive event. If the circuit breaker threshold is reached, the failure transfer is performed and the service is provided by the slave master 23. Otherwise, the forwarding module selects the computing component node 3 with the lowest load value and whose load index does not exceed the threshold for invocation.

[0061] In this embodiment, the master module includes a judgment module 211 and a first event processor 212. When the judgment module 211 determines that an event is a request reception event, the first event processor 212 processes the event. Furthermore, the first event processor 212 has an interception module and a forwarding module. The interception module uses a series of interceptors to process request reception events. If the circuit breaker threshold is reached, a failover occurs, and the service is provided by the slave master 23. Therefore, the master module provides a circuit breaker mechanism. By managing requests through the master module, the overall system's anti-interference capability, security, and stability are improved.

[0062] It should be noted that "circuit breaking" originally refers to a physical concept, such as when too many household appliances are connected, causing an excessive voltage load that blows a fuse, thus cutting off power to prevent damage to appliances from overvoltage. In the computer field, the circuit breaking mechanism is also used to proactively reject certain responses in advance, preventing a large number of requests in a short period from overwhelming the service's capacity and causing significant losses due to service unavailability.

[0063] The event handler in this application adopts an event scheduling model based on task splitting and sequential invocation by multiple threads. This model generates a large number of context switches and potential thread safety issues, but it can achieve the maximum granularity of task splitting, making it very convenient to expand and modify business operations.

[0064] In some alternative implementations, the load value is determined as follows: D = A × x1 + B × x2 + C × x3; where D is the load value, A is the CPU utilization rate, x1 is the CPU weight value, B is the memory utilization rate, x2 is the memory weight value, C is the service response failure rate, and x3 is the service response weight value.

[0065] In this embodiment, the computing component node 3 with the lowest load value and whose load indicators do not exceed the threshold is selected for invocation. The load value includes three indicators: CPU utilization, memory utilization, and service response failure rate. The thresholds and weights can be adjusted through configuration, for example, as follows: CPU threshold 75%, memory threshold 75%, request response rate 75%, CPU weight 100, memory weight 100, and service response weight 100.

[0066] In some optional implementations, the master module further includes a second event processor 213; the judgment module 211 is also used to determine whether the event is a request sending event, and if so, to process it using the second event processor 213; wherein, the second event processor 213 includes a timeout queue, which is used to scan threads to scan out tasks that have timed out; if the timed-out task has been completed, the timed-out task is discarded; if the timed-out task is still in progress, the timed-out task is retried and the retry count is updated to the original retry count plus 1; if the number of retries for the timed-out task reaches a preset number, a failover operation is performed and the service is provided by the slave master 23.

[0067] It should be noted that the timeout queue is essentially a buffer, where each stored object has a timeout duration setting. It allows for the retrieval of timeout tasks for subsequent timeout processing. Furthermore, due to network latency, processing results may not be immediately apparent, leading to retries. To avoid excessive retries, the timeout duration should be dynamically calculated based on the current task processing load.

[0068] In this embodiment, the master module further includes a second event processor 213, which provides services for processing request sending events. Specifically, it uses a timeout queue scanning thread to scan for timeout tasks. If a timeout task has been completed, it is discarded. If a timeout task is still in progress, it is retried, and the retry count is updated to the original retry count plus 1. If the number of retries for a timeout task reaches a preset number, a failover operation is performed, and the service is provided by the slave master 23.

[0069] In some optional implementations, the master module further includes a third event processor 214; the judgment module 211 is also used to determine whether the event is a registration event of computing component node 3, and if so, to process it using the third event processor 214; wherein, the third event processor 214 includes a cache module and a heartbeat check module; the cache module is used to write the current node information of the registration event of computing component node 3, and the heartbeat check module is used to obtain the running status of computing component node 3, remove unavailable computing component node 3, and update the load data of running computing component node 3.

[0070] In this embodiment, the master module further includes a third event processor 214, which provides services for processing registration-type events of computing component node 3. Specifically, it uses a caching module to write the current node information of the registration-type event of computing component node 3, uses a heartbeat detection module 22 to obtain the running status of computing component node 3, removes unavailable computing component node 3, and updates the load data of running computing component node 3. By processing the registration-type events of computing component node 3, horizontal scaling of computing component node 3 can be achieved, avoiding single-point-of-failure problems caused by the unavailability of a single computing component node 3. Simultaneously, the platform initiates computing tasks without any awareness, achieving complete decoupling.

[0071] It should be noted that the heartbeat check provided by the heartbeat detection module 22 is a liveness check mechanism. The master module can sense the running status of the computing component node 3 by sending heartbeat requests to the computing component. If the relevant metadata is returned normally within the specified time, it means that the computing component node 3 is being used normally; otherwise, it is considered that an abnormal situation has occurred. If multiple request processing failures occur in a row, it can be considered that the subjective offline has become the objective offline (this situation includes intermittent interruptions caused by network fluctuations). Once the objective offline occurs, the computing component node 3 is removed.

[0072] A single point of failure is a phenomenon in which the entire system becomes unavailable because only a single service node is unavailable. In a distributed architecture, this situation should be avoided. The only way to solve a single point of failure is redundancy, and the master-slave architecture is a very common solution.

[0073] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating the steps of a task distribution method for a privacy computing platform system provided in this application embodiment. The task distribution method for a privacy computing platform system provided in this application embodiment is applied to a computing component management node 2, and the method includes:

[0074] Step S1: Receive network requests sent by platform node 1 and computing component node 3;

[0075] Step S2: Wrap the network request as an event; and

[0076] Step S3: Determine the type of event. If the event is a request receiving event, select the computing component node 3 with the lowest load value and whose load index does not exceed the threshold for task distribution. The load index includes at least one of CPU utilization, memory utilization, and service response failure rate. The load value is calculated from the load index.

[0077] In this embodiment, the privacy computing platform system includes a platform node 1, a computing component management node 2, and multiple computing component nodes 3. The computing component management node 2 receives network requests from the platform or the computing component nodes 3, packages the network request into an event, and if the event is a request reception event, selects the computing component node 3 with the lowest load value and whose load index does not exceed the threshold for invocation. In other words, the computing component management node 2 can perceive the running status of the computing component nodes 3, thereby selecting a suitable computing component node 3 for task distribution. This avoids the platform distributing tasks to offline algorithm component nodes or algorithm component nodes with high load and tasks in progress, ensuring the stable execution of the platform. Furthermore, the platform no longer needs to worry about the management and invocation of the computing component nodes 3; it only needs to distribute tasks to the computing component management node 2, achieving true decoupling.

[0078] In some optional implementations, after determining the type of the event, if the event is a request reception event, the process further includes: processing the request reception event using a series of interceptors; if the circuit breaker threshold is reached, a failover operation is performed, and the service is provided by the slave master 23; otherwise, the forwarding module selects the computing component node 3 with the lowest load value and whose load index does not exceed the threshold for task distribution. In this embodiment, when the determination module 211 determines that the event is a request reception event, it processes the request reception event using a series of interceptors. If the circuit breaker threshold is reached, a failover operation is performed, and the service is provided by the slave master 23. Therefore, the master module provides a circuit breaker mechanism. In the computer field, the circuit breaker mechanism is also used to proactively reject some responses in advance to avoid a large number of requests in a short period of time breaking through the service's carrying capacity and causing significant service unavailability. Now, through the management of requests by the master module, the anti-interference, security, and stability of the entire system are improved.

[0079] In some optional implementations, the type of event is determined. If the event is a request sending event, a timeout queue is used to perform multiple retries and remove responses to the multiple retries. In this embodiment, when the event is determined to be a request sending event, a timeout queue scanning thread is used to scan for timed-out tasks. If a timed-out task has already been completed, it is discarded. If a timed-out task is still in progress, it is retried, and the retry count is updated to the original retry count plus 1. If the number of retries for a timed-out task reaches a preset number, a failover operation is performed, and the service is provided by the slave master23.

[0080] In some optional implementations, the type of the event is determined. If the event is a registration event for computing component node 3, the current node information is written to the cache, the running status of computing component node 3 is obtained, unavailable computing component node 3 is removed, and the load data of running computing component node 3 is updated. In this embodiment, when the event is determined to be a registration event for computing component node 3, the current node information of the registration event for computing component node 3 is written using the cache module, the running status of computing component node 3 is obtained using the heartbeat detection module 22, unavailable computing component node 3 is removed, and the load data of running computing component node 3 is updated. By processing registration events for computing component node 3, horizontal scaling of computing component node 3 can be achieved, avoiding single point of failure caused by the unavailability of a single computing component node 3, while ensuring that the platform initiates computing tasks without awareness and with complete decoupling.

[0081] Figure 5 This illustration shows a possible structure of an electronic device provided in an embodiment of this application. (Refer to...) Figure 5 The electronic device includes a processor 41, a memory 42, and a communication interface 43, which are interconnected and communicate with each other via a communication bus 44 and / or other forms of connection mechanism (not shown).

[0082] The memory 42 includes one or more (only one is shown in the figure), which may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The processor 41 and other possible components may access the memory 42 to read and / or write data therein.

[0083] Processor 41 includes one or more (only one is shown in the figure), which can be an integrated circuit chip with signal processing capabilities. The processor 41 can be a general-purpose processor, including a Central Processing Unit (CPU), a Microcontroller Unit (MCU), a Network Processor (NP), or other conventional processors; it can also be a special-purpose processor, including a Neural-network Processing Unit (NPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Furthermore, when there are multiple processors 41, some can be general-purpose processors and others can be special-purpose processors.

[0084] Communication interface 43 includes one or more (only one is shown in the figure) that can be used to communicate directly or indirectly with other devices to exchange data. Communication interface 43 may include interfaces for wired and / or wireless communication.

[0085] One or more computer program instructions may be stored in the memory 42, and the processor 41 may read and run these computer program instructions to implement the task distribution method provided in the embodiments of this application.

[0086] Understandable. Figure 5 The structure shown is for illustrative purposes only; the electronic device may also include structures that are more complex than those shown. Figure 5 The more or fewer components shown, or having the same Figure 5 The different structures shown. Figure 5 The components shown can be implemented using hardware, software, or a combination thereof. Electronic devices may be physical devices, such as PCs, laptops, tablets, mobile phones, servers, embedded devices, etc., or they may be virtual devices, such as virtual machines, virtualized containers, etc. Furthermore, electronic devices are not limited to a single device; they can also be a combination of multiple devices or a cluster of a large number of devices.

[0087] This application also provides a computer-readable storage medium storing computer program instructions. These instructions are read and executed by a computer's processor to perform the task distribution method provided in this application. For example, the computer-readable storage medium can be implemented as follows: Figure 5 Memory 42 in electronic devices.

[0088] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0089] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0090] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0091] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0092] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A privacy computing platform system, characterized in that, This includes platform nodes, computing component management nodes, and multiple computing component nodes; The platform node and computing component node are used to send network requests; The computing component management node is used to provide services for processing the network request; wherein, the service includes: receiving the network request, packaging the network request into an event, and determining the type of the event; if the event is a request receiving event, then selecting the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation; After determining the type of the event, the process also includes: if the event is a request sending event, using a timeout queue to complete multiple retry operations and remove multiple retry result responses; if the event is a computing component node registration event, writing the current node information into the cache, obtaining the running status of the computing component node, removing unavailable computing component nodes, and updating the load data of running computing component nodes. The load metrics include at least one of CPU utilization, memory utilization, and service response failure rate, and the load value is calculated from the load metrics. The computing component management node includes a detection module and multiple master modules; The detection module is used to provide virtual IP technology and set the multiple master modules to master-slave mode. In the master-slave mode, when the master provides the service, the slave master works in standby mode until the route specified by the virtual IP is mapped to the slave master, at which point the slave master provides the service. The master module includes a judgment module and a first event handler; The judgment module is used to determine whether the event is a request to receive event. If so, the first event handler is used to process the event. The first event handler includes an interception module and a forwarding module. The interception module uses a series of interceptors to process the request receiving events. If the circuit breaker threshold is reached, a failover is performed and the service is provided by the master. Otherwise, the forwarding module selects the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation.

2. The system as described in claim 1, characterized in that, The load value is determined as follows: D = A × x1 + B × x2 + C × x3; Where D is the load value, A is the CPU utilization rate, x1 is the CPU weight value, B is the memory utilization rate, x2 is the memory weight value, C is the service response failure rate, and x3 is the service response weight value.

3. The system as described in claim 1, characterized in that, The master module also includes a second event handler; The judgment module is also used to determine whether the event is a request sending event; if so, it is processed using the second event handler. The second event handler includes a timeout queue, which is used to scan threads and identify tasks that have timed out. If a timed-out task has already been completed, discard the timed-out task. If a timed-out task is still in progress, retry the timed-out task and update the retry count to the original retry count plus 1. If the number of retries for a timed-out task reaches the preset limit, a failover operation will be performed, and the service will be provided by the slave master.

4. The system as described in claim 1, characterized in that, The master module also includes a third event handler; The judgment module is also used to determine whether the event is a computing component node registration event. If so, it is processed using the third event handler. The third event processor includes a caching module and a heartbeat check module. The caching module is used to write the current node information of the registration type event of the computing component node, and the heartbeat check module is used to obtain the running status of the computing component node, remove unavailable computing component nodes, and update the load data of the running computing component node.

5. A task distribution method for a privacy computing platform system, characterized in that, The privacy computing platform system includes a platform node, a computing component management node, and multiple computing component nodes; The method is applied to a computing component management node, and the method includes: Receive network requests from platform nodes and computing component nodes; Wrap the network request as an event; and Determine the type of the event. If the event is a request receiving event, select the computing component node with the lowest load value and whose load metric does not exceed the threshold for task distribution. The load metric includes at least one of CPU utilization, memory utilization, and service response failure rate. The load value is calculated from the load metric. After determining the type of the event, the process also includes: if the event is a request sending event, using a timeout queue to complete multiple retry operations and remove multiple retry result responses; if the event is a computing component node registration event, writing the current node information into the cache, obtaining the running status of the computing component node, removing unavailable computing component nodes, and updating the load data of running computing component nodes. The computing component management node includes a detection module and multiple master modules; The detection module is used to provide virtual IP technology and set the multiple master modules to master-slave mode. In the master-slave mode, when the master provides the service, the slave master works in standby mode until the route specified by the virtual IP is mapped to the slave master, at which point the slave master provides the service. The master module includes a judgment module and a first event handler; The judgment module is used to determine whether the event is a request to receive event. If so, the first event handler is used to process the event. The first event handler includes an interception module and a forwarding module. The interception module uses a series of interceptors to process the request receiving events. If the circuit breaker threshold is reached, a failover is performed and the service is provided by the master. Otherwise, the forwarding module selects the computing component node with the lowest load value and whose load index does not exceed the threshold for invocation.

6. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when executed by the processor, perform the method as described in claim 5.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that is executed by a processor to perform the method as described in claim 5.

Citation Information

Patent Citations

  • Cluster resource control method used for complicated production management system

    CN105808343A

  • Task processing method, device, system, and apparatus and medium

    CN113886089A