DATA PROCESSING METHOD IMPLEMENTED AT EDGE SWITCH, ELECTRONIC DEVICE, AND PROGRAM PRODUCT

Embodiments of the present disclosure provide a data processing method implemented at an edge switch, an electronic device, and a program product. For example, a data processing method implemented at an edge switch is provided. The method includes receiving at least two data packets for floating-point arithmetic operations from at least one source device. In addition, the method may include acquiring corresponding floating-point numerical sequences respectively from the at least two data packets; and acquiring a floating-point arithmetic method from at least one data packet of the at least two data packets to determine a floating-point arithmetic result of the corresponding floating-point numerical sequences. The method may further include sending the floating-point arithmetic result to a target device indicated by the at least one data packet of the at least two data packets.

The present application claims priority to Chinese Patent Application No. 202210071619.6, filed Jan. 21, 2022, and entitled “Data Processing Method Implemented at Edge Switch, Electronic Device, and Program Product,” which is incorporated by reference herein in its entirety.

FIELD

Embodiments of the present disclosure relate to the field of Internet of Things (IoT), and more specifically, to a data processing method implemented at an edge switch, an electronic device, and a computer program product.

BACKGROUND

With the development of Internet of Things (IoT) techniques, more and more IoT devices are widely applied. Some IoT devices, such as air conditioners, smart locks, traffic lights, and web cameras, can communicate with clouds or servers through edge switches communicatively connected thereto. It should be understood that data acquired from IoT devices, especially sensory data, can be used for machine learning or deep learning, or for some special applications, such as commercial applications. However, machine learning, deep learning, or commercial applications often require floating-point arithmetic. Such applications are currently hindered by the fact that IoT devices generally do not have floating-point arithmetic capabilities.

SUMMARY

Embodiments of the present disclosure provide a solution of implementing data processing at an edge switch.

In a first aspect of the present disclosure, a data processing method implemented at an edge switch is provided. The method includes receiving at least two data packets for floating-point arithmetic operations from at least one source device. In addition, the method may include acquiring corresponding floating-point numerical sequences respectively from the at least two data packets; and acquiring a floating-point arithmetic method from at least one data packet of the at least two data packets to determine a floating-point arithmetic result of the corresponding floating-point numerical sequences. The method may further include sending the floating-point arithmetic result to a target device indicated by the at least one data packet of the at least two data packets.

In a second aspect of the present disclosure, an electronic device is provided, which includes: a processor; and a memory coupled to the processor, where the memory has instructions stored therein, which, when executed by the processor, cause the electronic device to perform actions including: receiving at least two data packets for floating-point arithmetic operations from at least one source device; acquiring corresponding floating-point numerical sequences respectively from the at least two data packets; acquiring a floating-point arithmetic method from at least one data packet of the at least two data packets to determine a floating-point arithmetic result of the corresponding floating-point numerical sequences; and sending the floating-point arithmetic result to a target device indicated by the at least one data packet of the at least two data packets.

In a third aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions that, when executed by a machine, cause the machine to perform any steps of the method according to the first aspect.

This Summary is provided to introduce the selection of concepts in a simplified form, which will be further described in the Detailed Description below. The Summary is neither intended to identify key features or main features of the present disclosure, nor intended to limit the scope of the present disclosure.

DETAILED DESCRIPTION

Principles of the present disclosure will be described below with reference to several example embodiments illustrated in the accompanying drawings.

The term “include” used herein and variants thereof indicate open-ended inclusion, that is, “including but not limited to.” Unless otherwise stated, the term “or” means “and/or.” The term “based on” denotes “at least partially based on.” The terms “an example embodiment” and “an embodiment” indicate “a group of example embodiments.” The term “another embodiment” indicates “a group of additional embodiments.” The terms “first,” “second,” and the like may refer to different or identical objects. Other explicit and implicit definitions may also be included below.

As discussed above, currently, Internet of Things (IoT) devices at edge nodes and edge switches generally do not have floating-point arithmetic functions. In an IoT device at a transmitting side, an embedded central processing unit (CPU) usually does not have strong computing power. Therefore, algorithms that require floating-point arithmetic are difficult to implement inline. A conventional method for users to solve this problem is to first quantize a floating-point value into an integer at a server side, then send it to an edge switch for simple online integer calculation, and finally convert the result from an integer to a floating-point value on the server. Therefore, the conventional data floating-point arithmetic process of an IoT device limits highly efficient transmission of data. In addition, due to the quantization conversion process from floating-point values to integers and from integers to floating-point values, the calculation accuracy is difficult to ensure. Moreover, in a cloud or server at a receiving side, due to the limited computing resources of the cloud and the server, the above-mentioned arithmetic mechanism may sometimes become a computing burden. Therefore, a conventional process of data floating-point arithmetic in the cloud or server is relatively inefficient.

To at least partially solve the above defects, embodiments of the present disclosure provide a solution of implementing data floating-point arithmetic at an edge switch. The solution can transfer computing operations such as floating-point addition and floating-point subtraction from a server side to the edge switch. Correspondingly, the solution may utilize a programmable circuit of the edge switch to implement floating-point data reception, floating-point arithmetic, and transmission at the same time. Hence, the computing power of the edge switch can be used to implement floating-point arithmetic operations on data.

FIG.1is a schematic diagram of example environment100according to an embodiment of the present disclosure. In example environment100, a device and/or a process according to an embodiment of the present disclosure may be implemented. As shown inFIG.1, example environment100may include IoT device110. IoT device110is generally an edge computing node that has limited computing power and is used to perform specific functions. As an example, IoT device110may be one or more air conditioners, smart locks, traffic lights, webcams, and the like.

In order to transmit data, IoT device110is usually communicatively connected to edge switch120. Edge switch120is usually arranged near IoT device110, which serves as an edge computing node, so as to provide a data exchange service for the corresponding IoT device. In order to undertake a calculation task of a data floating-point calculation operation of IoT device110, computing device130arranged in edge switch120may perform a floating-point arithmetic operation on floating-point numerical sequences therein based on a data packet received from IoT device110for the floating-point arithmetic operation.

It should be understood that computing device130may be any device with computing power that is disposed in edge switch120or is communicatively connected to edge switch120. As a non-limiting example, the computing device may be any type of fixed computing device, mobile computing device, or portable computing device, including but not limited to a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a smart phone, and the like. All or part of the components of the computing device may be distributed in the cloud. The computing device may also adopt a cloud-edge architecture.

In addition, edge switch120may also include a storage apparatus (not shown). The storage apparatus includes a register for storing data. In addition, the storage apparatus may comprise one or more storage disks. The storage disk can be various types of devices with a storage function, including but not limited to a hard disk drive (HDD), a solid state drive (SSD), a removable disk, any other magnetic storage device, any other optical storage device, or any combination thereof. As an example, a data packet for floating-point arithmetic operations may be divided into multiple data blocks, and computing device130may perform floating-point arithmetic operations on these data blocks sequentially. Whenever a floating-point arithmetic operation is performed on a data block, the data block which has been subjected to the floating-point arithmetic can be stored in the storage apparatus. Moreover, when the floating-point arithmetic is completed for all the data blocks of the data packet, all the data blocks stored in the storage apparatus can be combined into a floating-point arithmetic result.

After performing the floating-point arithmetic operation on the data packet from IoT device110, computing device130may send the data packet which has been subjected to the floating-point arithmetic to cloud (network)140, and via the cloud140, the data packet which has been subjected to the floating-point arithmetic can be sent to computing node150. It should be understood that computing node150may be a server which has functions of training a machine learning model or a deep learning model. Hence, data communication from IoT device110to computing node150is implemented, and the entire data operation process of the communication is completed at the corresponding edge switch. Although not shown, the floating-point arithmetic result determined at edge switch120may also be returned to IoT device110. That is, the floating-point arithmetic result may be output to any specified device.

It should be understood that the architecture and functions of example environment100are described for illustrative purposes only, without implying any limitation to the scope of the present disclosure. Embodiments of the present disclosure may also be applied to other environments having different structures and/or functions.

A process according to an embodiment of the present disclosure will be described in detail below with reference toFIGS.2and3. For ease of understanding, the specific data mentioned in the following description are all illustrative and are not intended to limit the scope of protection of the present disclosure. It should be understood that the embodiment described below may also include additional actions not shown and/or may omit actions shown, and the scope of the present disclosure is not limited in this regard.

FIG.2is a flowchart of process200of implementing data processing at an edge switch according to an embodiment of the present disclosure. In some embodiments, process200may be implemented by computing device130inFIG.1. Process200for data processing according to an embodiment of the present disclosure is now described with reference toFIG.1. For ease of understanding, specific examples mentioned in the following description are all illustrative and are not used to limit the protection scope of the present disclosure.

As shown inFIG.2, at202, computing device130may receive at least two data packets for floating-point arithmetic operations from at least one source device. As an example, the at least one source device may be IoT device110shown inFIG.1. As another example, the at least one source device may be two or more IoT devices, and each of the IoT devices sends data packets for floating-point arithmetic operations to computing device130in edge switch120.

In some embodiments, to determine whether computing device130in edge switch120has a floating-point arithmetic function, IoT device110may send a floating-point arithmetic service request message to edge switch120. After computing device130determines that the floating-point arithmetic service request message is received from IoT device110, computing device130may send a floating-point arithmetic service response message to IoT device110, so as to inform IoT device110that edge switch120can provide floating-point arithmetic services. In this way, it can be avoided that IoT device110directly sends the data packet used for the floating-point arithmetic operation to the edge switch that does not have the floating-point arithmetic function.

Subsequently, at204, computing device130may acquire corresponding floating-point numerical sequences respectively from the at least two data packets. As an example, the at least two data packets are a first data packet, a second data packet, and a third data packet. Therefore, computing device130may acquire floating-point numerical sequences used for the floating-point arithmetic respectively from the first data packet, the second data packet, and the third data packet, such as a first floating-point numerical sequence [A, B, C, D, E, F, G, H], a second floating-point numerical sequence [a, b, c, d, e, f, g, h], and a third floating-point numerical sequence [1, 2, 3, 4, 5, 6, 7, 8]. A, B, C, D, E, F, G, H, a, b, c, d, e, f, g, and h are floating-point numerical values.

At206, computing device130may acquire a floating-point arithmetic method from at least one data packet of the at least two data packets to determine a floating-point arithmetic result of the corresponding floating-point numerical sequences. As an example, the floating-point arithmetic method may be used to indicate whether the floating-point arithmetic is floating-point addition arithmetic or floating-point subtraction arithmetic. For example, when it is determined that the floating-point arithmetic method is floating-point addition arithmetic, computing device130may sum the first floating-point numerical sequence [A, B, C, D, E, F, G, H], the second floating-point numerical sequence [a, b, c, d, e, f, g, h], and the third floating-point numerical sequence [1, 2, 3, 4, 5, 6, 7, 8] to determine the floating-point arithmetic result [A+a+1, B+b+2, C+c+3, D+d+4, E+e+5, F+f+6, G+g+7, H+h+8].

In some embodiments, in order to save computing resources of computing device130such as a CPU in edge switch120, computing device130may also perform floating-point arithmetic on corresponding floating-point numerical sequences by using a programmable circuit component arranged in edge switch120.FIG.3is a flowchart of process300of processing floating-point numerical sequences by using a programmable circuit component arranged in an edge switch according to an embodiment of the present disclosure. In some embodiments, process300may be executed on computing device130inFIG.1. Process300of processing floating-point numerical sequences by using a programmable circuit component arranged in an edge switch according to an embodiment of the present disclosure is described with reference toFIG.1. For ease of understanding, specific examples mentioned in the following description are all illustrative and are not used to limit the protection scope of the present disclosure.

As shown inFIG.3, at302, computing device130may divide a first floating-point numerical sequence and a second floating-point numerical sequence of the corresponding floating-point numerical sequences into multiple data blocks respectively. As an example, computing device130may divide a data packet into eight data blocks, and each of the data blocks has a specific order and number.

At304, computing device130may perform the floating-point arithmetic on a data block in the first floating-point numerical sequence and a corresponding data block in the second floating-point numerical sequence by using the programmable circuit component to determine a corresponding data block which has been subjected to the floating-point arithmetic. As an example, the programmable circuit component may be a programmable switch chip.

At306, computing device130may combine the corresponding data blocks which have been subjected to the floating-point arithmetic to generate a floating-point arithmetic result. In some embodiments, the data packet used for the floating-point arithmetic may be divided into multiple data blocks, and computing device130may perform floating-point arithmetic operations sequentially on these data blocks. Whenever a floating-point arithmetic operation is performed on a data block, the data block which has been subjected to the floating-point arithmetic may be stored in a register arranged in edge switch120. Moreover, after all data blocks of the data packet have undergone floating-point arithmetic, all data blocks stored in the register can be combined into a floating-point arithmetic result. In this way, the floating-point arithmetic can be performed on each data block one by one in a pipelined manner, so as to enable the programmable circuit component such as the programmable switch chip to complete a floating-point arithmetic task of the data packet.

As an example, when the programmable switch chip receives an ingress data packet, floating-point arithmetic processing will be performed on a first data block in an ingress session. A floating-point arithmetic result of the data block may be stored in the register. Subsequently, the programmable switch chip will pop the first data block in an exit session and re-distribute other data blocks. For example, in the ingress session, the second data block may be processed with the same logic. After all the data blocks are processed, results stored in the register will be pushed back to the empty data packet and combined into the floating-point arithmetic result.

Then, referring back toFIG.2, at208, computing device130may send the floating-point arithmetic result to a target device indicated by the at least one data packet of the at least two data packets. As an example, the target device may be computing node150inFIG.1. It should be understood that the data packet may include floating-point numerical sequences for the floating-point arithmetic as well as location information (such as an IP address) of the target device. As another example, when IoT device110needs to perform the floating-point arithmetic on the data acquired by itself, computing device130may return the floating-point arithmetic result to IoT device110. As a further example, when computing node150is configured to collect monitoring data of multiple IoT devices, computing device130may send the floating-point arithmetic result to computing node150.

In some embodiments, edge switch120is configured so as to be adjacent to IoT device110.

In some embodiments, computing node150as the target device is configured to perform model training. For example, IoT device110or multiple IoT devices may send precise floating-point numerical values to edge switch120so that edge switch120can use a programmable circuit therein to sum the floating-point numerical sequences. Hence, edge switch120may directly send a calculation result of the floating-point sum operation to computing node150via cloud140. After collecting a sufficient amount of field data, computing node150may train a corresponding machine learning or deep learning model. Correspondingly, in a model application stage, IoT device110may also send floating-point numerical values collected in real time to edge switch120for relevant floating-point arithmetic, and edge switch120sends a calculation result to computing node150via cloud140. Computing node150may generate a control signal based on the calculation result by using the trained model, and send the control signal to IoT device110via cloud140and edge switch120, so as to adjust relevant functions of IoT device110.

In order to more clearly present example ideas of the present disclosure,FIG.4is a signaling diagram of process400of implementing data processing at an edge switch according to an embodiment of the present disclosure.

As shown inFIG.4, when IoT device410needs to perform floating-point arithmetic, in order to determine whether edge switch420has a function of floating-point arithmetic service, IoT device410may first send401a floating-point arithmetic service request to edge switch420arranged nearby. When edge switch420receives a floating-point arithmetic service request message from IoT device410, edge switch420may send402a floating-point arithmetic service response to IoT device410. In this way, IoT device410may know that edge switch420can provide floating-point arithmetic services. In this way, it can be avoided that IoT device410directly sends a data packet used for the floating-point arithmetic to an edge switch that does not have the floating-point arithmetic function.

After it is determined that edge switch420has a function of performing the floating-point arithmetic on the data packet, IoT device410may further send403an enable signal to edge switch420, so that edge switch420can perform an initialization operation of the floating-point arithmetic. Subsequently, IoT device410may send404floating-point numerical sequences requiring the floating-point arithmetic to edge switch420.

After receiving the floating-point numerical sequences, edge switch420may create an event (or a task) for performing405floating-point arithmetic on the floating-point numerical sequences. As an example, edge switch420may use an internal programmable switch chip to perform floating-point arithmetic operations. In order to enable the programmable switch chip to process large data packets, the data packet can be divided into multiple data blocks, and floating-point arithmetic operations can be performed on each data block in turn. Subsequently, edge switch420may send406a floating-point arithmetic result to IoT device410. It should be understood that the floating-point arithmetic result may also be transmitted to any designated computing node.

By means of the above embodiments, the solution of performing floating-point arithmetic at an edge switch of the present disclosure can reduce the computing load of an IoT device, a cloud, and a server while ensuring the floating-point arithmetic performance, and can also reduce a time delay generated due to floating-point arithmetic operations. A floating-point arithmetic architecture of the present disclosure can establish a transit between the IoT device and the server that undertakes floating-point arithmetic tasks with short delay, and the transit is an edge switch existing in a communication system. In addition, by means of a programmable edge switch, computation tasks of the floating-point arithmetic can be shifted from the IoT device to the programmable edge switch, so that the IoT device can achieve better performance, higher throughput, and lower latency for secure data transmission.

FIG.5is a schematic block diagram of example electronic device500that can be used to implement embodiments of the present disclosure. For example, electronic device500can be used to implement computing device130shown inFIG.1. As shown in the figure, electronic device500includes central processing unit (CPU)501that may perform various appropriate actions and processing according to computer program instructions stored in read-only memory (ROM)502or computer program instructions loaded from storage unit508to random access memory (RAM)503. Various programs and data required for operations of device500may also be stored in RAM503. CPU501, ROM502, and RAM503are connected to each other through bus504. Input/output (I/O) interface505is also connected to bus504.

A plurality of components in device500are connected to I/O interface505, including: input unit506, such as a keyboard and a mouse; output unit507, such as various types of displays and speakers; storage unit508, such as a magnetic disk and an optical disc; and communication unit509, such as a network card, a modem, and a wireless communication transceiver. Communication unit509allows device500to exchange information/data with other devices via a computer network, such as the Internet, and/or various telecommunication networks.

CPU501performs the various methods and processing described above, such as process200and process300. For example, in some embodiments, the various methods and processing described above may be implemented as a computer software program or a computer program product, which is tangibly included in a machine-readable medium, such as storage unit508. In some embodiments, part of or all the computer program may be loaded and/or installed to device500via ROM502and/or communication unit509. When the computer program is loaded into RAM503and executed by CPU501, one or more steps of any process described above may be implemented. Alternatively, in other embodiments, CPU501may be configured in any other suitable manner (for example, by means of firmware) to perform a process such as process200and process300.

Example embodiments of the present disclosure include a method, an apparatus, a system, and/or a computer program product. The computer program product may include a computer-readable storage medium on which computer-readable program instructions for performing various aspects of the present disclosure are loaded.

Various implementations of the present disclosure have been described above. The foregoing description is illustrative rather than exhaustive, and is not limited to the disclosed implementations. Numerous modifications and alterations will be apparent to persons of ordinary skill in the art without departing from the scope and spirit of the illustrated implementations. The selection of terms used herein is intended to best explain the principles and practical applications of the implementations or the improvements to technologies on the market, so as to enable persons of ordinary skill in the art to understand the implementations disclosed herein.