CN116996514A - Computing task allocation method, system, electronic device, medium and program product - Google Patents

Computing task allocation method, system, electronic device, medium and program product Download PDF

Info

Publication number
CN116996514A
CN116996514A CN202310877992.5A CN202310877992A CN116996514A CN 116996514 A CN116996514 A CN 116996514A CN 202310877992 A CN202310877992 A CN 202310877992A CN 116996514 A CN116996514 A CN 116996514A
Authority
CN
China
Prior art keywords
computing task
network
host
information
sending
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
CN202310877992.5A
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.)
Siemens Ltd China
Original Assignee
Siemens Ltd China
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 Siemens Ltd China filed Critical Siemens Ltd China
Priority to CN202310877992.5A priority Critical patent/CN116996514A/en
Publication of CN116996514A publication Critical patent/CN116996514A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a computing task allocation method, which is applied to an edge server in a first network and comprises the following steps: determining an edge server in the first network as a host; when a first message based on UDP broadcast sent by a first device in a first network is received, host information is sent to the first device; wherein the first message contains information indicating to find a device in the first network; receiving a registration request of a first device, wherein the registration request comprises the first device information; when detecting that the available resources of the first equipment reach a preset threshold value and cannot process the first computing task, the API information of the first computing task is sent to the first equipment, so that the first equipment processes the first equipment and returns a computing result.

Description

Computing task allocation method, system, electronic device, medium and program product
Technical Field
The embodiment of the application mainly relates to the technical field of communication, in particular to a computing task distribution method, a computing task distribution system, electronic equipment, a medium and a program product.
Background
In an edge management system for monitoring in a factory scenario, processing various computing tasks is mainly focused on an edge server. As more and more related devices need to access the edge management system, resulting in more and more digital services to be processed, the functional availability and stability of the edge management system are at risk. Currently, the main means to solve the above problem is to introduce more edge servers or edge server clusters into the system, but this means necessarily results in a significant increase of the total cost of the edge management system due to the higher cost of the edge servers or edge server clusters.
Disclosure of Invention
The embodiment of the application provides a computing task distribution method, a computing task distribution system, an electronic device, a medium and a program product.
In a first aspect, a computing task allocation method is provided, applied to an edge server in a first network, including: determining an edge server in the first network as a host; transmitting host information to a first device in a first network upon receiving a first message broadcast based on a user datagram protocol (User Datagram Protocol, UDP) transmitted by the first device; wherein the first message contains information indicating to find a device in the first network; receiving a registration request of a first device, wherein the registration request comprises the first device information; when detecting that the available resource of the first device reaches a preset threshold value and cannot process the first computing task, sending application programming interface (Application Programming Interface, API) information of the first computing task to the first device so that the first device processes the first computing task and returns a computing result.
In a second aspect, a computing task allocation method is provided, applied to an edge server in a first network, including: determining an edge server in the first network as a host; when receiving a first message based on UDP broadcast sent by a plurality of devices in a first network, sending host information to the plurality of devices; wherein the first message contains information indicating to find a device in the first network; receiving a registration request of each device in the plurality of devices, wherein the registration request of each device comprises corresponding device information; when detecting that the available resources of the device reach a preset threshold value and cannot process the first computing task, the API information of the first computing task is sent to the device meeting the preset condition in the plurality of devices, so that the device meeting the preset condition processes and returns a computing result.
In a third aspect, a computing task allocation system is provided, comprising a host and a first device in a first network, the host in the first network to: when a first message based on UDP broadcast sent by the first equipment is received, host information is sent to the first equipment; wherein the first message comprises a message indicating to find a device in the first network; receiving a registration request of a first device, wherein the registration request comprises the first device information; when detecting that the available resources of the first equipment reach a preset threshold value and cannot process the first computing task, the API information of the first computing task is sent to the first equipment, so that the first equipment processes the first equipment and returns a computing result.
In a fourth aspect, there is provided an electronic device comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus; the memory is configured to store at least one executable instruction that causes the processor to perform the steps of the method provided in the first aspect or the second aspect.
In a fifth aspect, there is provided a computer readable medium having stored thereon a computer program for execution by a processor of the steps of the method provided in the first or second aspect.
In a sixth aspect, there is provided a computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions which, when executed, cause at least one processor to perform the steps of the method provided in the first or second aspect.
Drawings
The following drawings are only for purposes of illustrating and explaining embodiments of the application and are not to be construed as limiting the scope of the embodiments of the application. Wherein:
FIG. 1 is a flow chart of a method of computing task allocation according to one embodiment of the application;
FIG. 2 is a flow chart of another method of computing task allocation according to one embodiment of the application;
FIG. 3 is a schematic diagram of a computing task allocation system according to an embodiment of the application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the application.
Description of the reference numerals
100: computing task allocation methods 101-104: method steps
200: computing task allocation methods 201-204: method steps
30: computing task allocation system 31: host 32: first apparatus
400: electronic device 401: processor 402: communication interface
403: memory 404: communication bus 405: program
Detailed Description
The subject matter described herein will now be discussed with reference to example embodiments. It should be appreciated that these embodiments are discussed only to enable a person skilled in the art to better understand and thereby practice the subject matter described herein, and are not limiting of the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the scope of the embodiments of the application. Various examples may omit, replace, or add various procedures or components as desired. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. In addition, features described with respect to some examples may be combined in other examples as well.
As used herein, the term "comprising" and variations thereof mean open-ended terms, meaning "including, but not limited to. The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment. The term "another embodiment" means "at least one other embodiment". The terms "first," "second," and the like, may refer to different or the same object. Other definitions, whether explicit or implicit, may be included below. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout this specification.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
FIG. 1 is a flowchart of a computing task allocation method according to an embodiment of the present application, as shown in FIG. 1, a computing task allocation method 100, applied to an edge server in a first network, includes:
in step 101, an edge server in a first network is determined as a host.
Optionally, the first network is a local area network.
Step 102, when a first message based on UDP broadcast sent by a first device in a first network is received, host information is sent to the first device. Wherein the first message contains information indicating a search for devices in the first network.
Optionally, the first device in the first network is a device with available resources, such as a touch screen, an industrial personal computer, a communication gateway or a data acquisition gateway, etc.
The host information includes a host identification, an IP address, and API information. Optionally, the API information in the host information includes: paths, ports, and parameters.
Step 103, receiving a registration request of the first device, wherein the registration request contains first device information.
The first device information includes: a first device name, an IP address, and available resources. Optionally, the available resources of the first device include: CPU capacity, memory capacity, and hard disk capacity.
And 104, when detecting that the available resources of the first equipment reach a preset threshold value and cannot process the first computing task, sending the API information of the first computing task to the first equipment so as to enable the first equipment to process and return a computing result.
Available resources include: available CPU capacity, memory capacity, and hard disk capacity.
Optionally, before the API information of the first computing task is sent to the first device, a package link corresponding to the first computing task is sent to the first device, so that the first device can download and run the package. By the method, besides various programs of the first device are expanded, the port of the first device is not required to be actively exposed, so that the safety risk of the first device can be reduced.
According to the embodiment of the application, the first equipment with available resources in the same network, such as a touch screen or an industrial personal computer, searches for an edge server, namely a host in the network by sending a message of searching for the host based on UDP broadcast, and the host sends host information to the first equipment so as to establish communication. After the host side receives the registration request of the first device, under the condition that the host resource can not process a certain computing task any more, the API information of the computing task can be sent to the first device, and after the first device processes, the corresponding computing result is returned to the host. The embodiment of the application shares the processing pressure of the edge server by utilizing the computing power of other devices with available resources in the same network, and the cost of related resources such as CPU or memory and the like required by the edge server can be correspondingly reduced, thereby reducing the cost of the whole system. In addition, the operation stability and usability of the edge server can be better ensured.
FIG. 2 is a flowchart of a computing task allocation method according to an embodiment of the present application, as shown in FIG. 2, a computing task allocation method 200, applied to an edge server in a first network, includes:
in step 201, an edge server in a first network is determined to be a host.
Step 202, when receiving a first message based on UDP broadcast sent by a plurality of devices in a first network, sending host information to the plurality of devices. Wherein the first message contains information indicating a search for devices in the first network.
Optionally, the host information includes a host identity, an IP address, and API information.
Step 203, a registration request of each device of the plurality of devices is received, wherein the registration request of each device includes corresponding device information. Optionally, the device information includes a device name, an IP address, and available resources.
And 204, when detecting that the available resource of the device reaches the preset threshold value and cannot process the first computing task, sending the API information of the first computing task to the device meeting the preset condition in the plurality of devices, so that the device meeting the preset condition processes and returns a computing result. Optionally, the device that satisfies the preset condition includes: the device with the most currently available resources among the plurality of devices.
According to the embodiment of the application, a plurality of devices with available resources in the same network, such as a touch screen or an industrial personal computer, are used for searching an edge server, namely a host in the network by sending a message for searching the host based on UDP broadcast, and the host is used for sending host information to related devices so as to establish communication. After the host side receives the registration request of the related equipment, under the condition that the host resource can not process a certain computing task any more, the API information of the computing task is sent to the equipment with the largest available resource, and the equipment returns the corresponding computing result to the host after processing. The embodiment of the application shares the processing pressure of the edge server by utilizing the computing power of other devices with available resources in the same network. The embodiment of the application can quickly and fully call the available resources in the same network on the premise of not increasing the equipment cost additionally.
FIG. 3 is a schematic diagram of a computing task distribution system according to an embodiment of the present application, as shown in FIG. 3, the computing task distribution system 30 includes a host 31 and a first device 32 in a first network, the host 31 in the first network being configured to: when receiving a first message based on UDP broadcast transmitted from the first device 32, transmitting host information to the first device 32; wherein the first message comprises a message indicating a search for a device in the first network.
A registration request is received for a first device 32, wherein the registration request includes first device information. Optionally, the first device information includes: a first device name, an IP address, and available resources.
When detecting that the available resource of the first device 32 reaches the preset threshold and cannot process the first computing task, the first device 32 sends the API information of the first computing task to the first device 32 so as to process the first device 32 and return a computing result. Wherein the available resources include: available CPU capacity, memory capacity, and hard disk capacity.
Optionally, the first device 32 in the first network is further configured to: after the first message based on the UDP broadcast is sent, all returned device models are received. It is determined whether the host 31 is present among all the returned device models. When the host 31 exists, a registration request of the first device 32 is transmitted to the host 31.
Optionally, the first device 32 in the first network is further configured to: the first protocol link is initiated to establish a full duplex communication channel with the host 31. And receiving the API information of the first computing task through the full duplex communication channel. Optionally, the first protocol link may include: webSocket protocol, http2 protocol or http3 protocol. The advantage of setting up a full duplex communication channel by initiating the first protocol link is that no external communication port is exposed for the first device, whereby network dependency and security risks may be reduced.
The embodiment of the application provides a computing task distribution system, which fully utilizes the computing capability of other devices with available resources in the same network on the premise of ensuring the network security so as to share the computing pressure of an edge server and does not need to additionally increase the cost of the devices. The method is particularly suitable for a low-voltage distribution intelligent edge computing system.
FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present application, and the specific embodiment of the present application is not limited to the specific implementation of the electronic device. As shown in fig. 4, the electronic device 400 may include: a processor 401, a communication interface (Communications Interface) 402, a memory 403, and a communication bus 404. Wherein:
processor 401, communication interface 402, and memory 403 accomplish communication with each other via communication bus 404.
A communication interface 402 for communicating with other electronic devices or servers.
The processor 401 is configured to execute the program 405, and may specifically perform relevant steps in any of the method embodiments described in the foregoing methods embodiments.
In particular, the program 405 may include program code including computer operating instructions.
The processor 401 may be a CPU or a specific integrated circuit ASIC (Application Specific Integrated Circuit) or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors comprised by the smart device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 403 for storing a program 405. Memory 403 may comprise high-speed RAM memory and may also comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 405 may be specifically configured to cause the processor 401 to execute any of the plurality of method embodiments in the foregoing embodiments.
The specific implementation of each step in the program 405 may refer to corresponding steps and corresponding descriptions in the units in the foregoing embodiments of the computing task allocation method, which are not described herein in detail. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The present application also provides a computer readable storage medium storing instructions for causing a machine to perform any one of the method embodiments as herein. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present application.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Embodiments of the present application also provide a computer program product comprising computer instructions that instruct a computing device to perform any corresponding operations of the above-described method embodiments.
It should be noted that, according to implementation requirements, each component/step described in the embodiments of the present application may be split into more components/steps, or two or more components/steps or part of operations of the components/steps may be combined into new components/steps, so as to achieve the objects of the embodiments of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be stored in a local recording medium downloaded through a network, so that the methods described herein may be stored on such software processes on a recording medium using a general purpose computer, special purpose processor, or programmable or special purpose hardware such as an ASIC or FPGA. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by a computer, processor, or hardware, performs the methods described herein. Furthermore, when a general purpose computer accesses code for implementing the methods illustrated herein, execution of the code converts the general purpose computer into a special purpose computer for performing the methods illustrated herein.
It should be noted that not all the steps and modules in the above flowcharts and the system configuration diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
In the above embodiments, the hardware module may be mechanically or electrically implemented. For example, a hardware module may include permanently dedicated circuitry or logic (e.g., a dedicated processor, FPGA, or ASIC) to perform the corresponding operations. The hardware modules may also include programmable logic or circuitry (e.g., a general-purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The particular implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the application has been illustrated and described in detail in the drawings and in the preferred embodiments, the application is not limited to the disclosed embodiments, and those skilled in the art will appreciate that many more embodiments of the application can be obtained by combining the code audits in the different embodiments and still fall within the scope of the application.

Claims (12)

1. A computing task allocation method is applied to an edge server in a first network, and comprises the following steps:
-determining (101) an edge server in the first network as a host;
-upon receiving a first message based on UDP broadcast sent by a first device in a first network, sending (102) host information to said first device; wherein the first message contains information indicating to find a device in the first network;
-receiving (103) a registration request of a first device, wherein the registration request contains the first device information;
-upon detecting that the available resources of itself have reached a preset threshold value and are unable to process the first computing task, sending (104) API information of the first computing task to the first device, to cause the first device to process and return a calculation result.
2. The method of claim 1, wherein the available resources comprise:
available CPU capacity, memory capacity and hard disk capacity.
3. The method of claim 1, wherein,
-the host information comprises a host identity, an IP address and API information;
-the first device information comprises: a first device name, an IP address, and available resources.
4. The method of claim 1, wherein prior to the sending (104) API information for a first computing task to the first device, the method further comprises:
-sending a package link corresponding to processing the first computing task to the first device so that the first device can download and run the package.
5. A computing task allocation method is applied to an edge server in a first network, and comprises the following steps:
-determining (201) an edge server in the first network as a host;
-upon receiving a first message based on UDP broadcast sent by a plurality of devices in a first network, sending (202) host information to the plurality of devices; wherein the first message contains information indicating to find a device in the first network;
-receiving (203) a registration request for each device of the plurality of devices, wherein the registration request for each device comprises corresponding device information;
-when it is detected that the available resources of the device itself have reached a preset threshold value and cannot process the first computing task, sending (204) API information of the first computing task to the device of the plurality of devices that satisfies the preset condition, so that the device that satisfies the preset condition processes and returns a computing result.
6. The method of claim 5, wherein the device satisfying the preset condition comprises: the device with the most currently available resources among the plurality of devices.
7. A computing task allocation system comprising a host (31) and a first device (32) in a first network, the host (31) in the first network being for:
-upon receiving a first message based on UDP broadcast sent by said first device (32), sending host information to said first device (32); wherein the first message comprises a message indicating to find a device in the first network;
-receiving a registration request of the first device (32), wherein the registration request contains the first device information;
-when it is detected that the available resources of itself have reached a preset threshold value and cannot process the first computing task, sending API information of the first computing task to said first device (32) to cause said first device (32) to process and return a calculation result.
8. The system of claim 7, the first device (32) in the first network further being configured to:
-receiving all returned device models after sending the first message based on UDP broadcast;
-determining whether said host (31) is present in said all returned device models;
-sending a registration request of the first device (32) to the host (31) when the host (31) is present.
9. The system of claim 7 or 8, the first device (32) in the first network further being configured to:
-initiating a first protocol link to establish a full duplex communication channel with the host (31);
-receiving API information of the first computing task over the full duplex communication channel.
10. An electronic device (400), comprising: the processor (401), the communication interface (402), the memory (403) and the communication bus (404), and the processor (401), the memory (403) and the communication interface (402) complete communication with each other through the communication bus (404);
memory (403) for storing at least one executable instruction for causing a processor to perform operations corresponding to a method of computing task allocation according to any one of claims 1 to 6.
11. A computer storage medium having stored thereon a computer program which when executed by a processor implements the computing task allocation method of any of claims 1-6.
12. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed, cause at least one processor to perform the computing task allocation method according to any one of claims 1-6.
CN202310877992.5A 2023-07-17 2023-07-17 Computing task allocation method, system, electronic device, medium and program product Pending CN116996514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310877992.5A CN116996514A (en) 2023-07-17 2023-07-17 Computing task allocation method, system, electronic device, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310877992.5A CN116996514A (en) 2023-07-17 2023-07-17 Computing task allocation method, system, electronic device, medium and program product

Publications (1)

Publication Number Publication Date
CN116996514A true CN116996514A (en) 2023-11-03

Family

ID=88525811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310877992.5A Pending CN116996514A (en) 2023-07-17 2023-07-17 Computing task allocation method, system, electronic device, medium and program product

Country Status (1)

Country Link
CN (1) CN116996514A (en)

Similar Documents

Publication Publication Date Title
EP3664372B1 (en) Network management method and related device
EP2806602A1 (en) Feature extraction device, network traffic identification method, device and system.
US20150131445A1 (en) Similarity matching method and related device and communication system
EP3490304B1 (en) Method for identifying access point and hotspot, and related products
US20180091581A1 (en) Method of switching download mode, control method thereof and control system thereof
US20180198643A1 (en) Packet transmission method and apparatus
CN110267314B (en) Method and device for switching network slices
US20150289301A1 (en) Terminal matching method, terminal and system
CN106533973B (en) Method, equipment and system for distributing service message
CN104702564A (en) Tethering user identification method and device
US9641595B2 (en) System management apparatus, system management method, and storage medium
US20170279738A1 (en) Method, apparatus, and system for transmitting data
CN114697391B (en) Data processing method, device, equipment and storage medium
US9405591B2 (en) Method for dynamic load balancing in campus deployments
US9923794B2 (en) Method, apparatus, and system for identifying abnormal IP data stream
CN113873057A (en) Data processing method and device
US20210185132A1 (en) Sip information analysis method and device, server, and medium
CN109639555B (en) Link layer message generation method, link layer message generation device and terminal equipment
CN112311672B (en) Method, device and equipment for obtaining routing table item
CN110198294B (en) Security attack detection method and device
CN116996514A (en) Computing task allocation method, system, electronic device, medium and program product
US10506021B2 (en) Method and device for providing communication connection for a plurality of candidate applications in a mobile device
CN109766347B (en) Data updating method, device, system, computer equipment and storage medium
CN105915639B (en) Page access method and device
CN112804102B (en) Equipment binding method, device and terminal

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