Method and apparatus, device, and medium for sending a data processing request

By assigning encodings to data processing requests and filtering them in the data processing device, the problem of out-of-order transmission of data processing requests is solved, ensuring the correctness and consistency of data processing.

CN116016373BActive Publication Date: 2025-05-30KUNLUNXIN TECHNOLOGY (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211735004.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-05-30
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

The out-of-order transmission of data processing requests may affect the normal execution of data processing tasks, and thus affect the correctness of processing results.

Method used

By receiving multiple data processing requests sorted in a preset order, the encoding is determined based on the number of arrangements of each data processing request, and the data processing request and its encoding are sequentially sent to the data processing device, so that the data processing device can filter based on the encoding.

Benefits of technology

The data processing device is avoided to perform data processing in the wrong order, ensure the correctness and consistency of the data processing process, and avoid the impact of transmission failures on data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016373B_ABST
    Figure CN116016373B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and apparatus, a device, and a medium for sending data processing requests, relating to the field of computer technologies, and particularly to the field of data processing technologies. The implementation solution is as follows: receiving a plurality of data processing requests sorted in a preset order; for each data processing request among the plurality of data processing requests, determining an encoding of the data processing request based on the ordinal number of the data processing request in a preset sequence composed of the plurality of data processing requests; and sequentially sending the plurality of data processing requests and the encodings of the plurality of data processing requests to a data processing device based on the reception order of the plurality of data processing requests, so that the data processing device can perform filtering on the plurality of data processing requests based on the encodings of the plurality of data processing requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and more particularly to the field of data processing technologies. Specifically, the present disclosure relates to a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for sending a data processing request. Background Art

[0002] In order to improve the efficiency of data processing, a distributed system can be utilized to perform data processing. Consequently, it is necessary for a host to send data processing requests to different data processing devices. The out-of-order transmission of data processing requests may affect the normal execution of data processing tasks, and further affect the correctness of processing results.

[0003] The methods described in this section are not necessarily methods that have been previously conceived or adopted. Unless otherwise specified, any method described in this section should not be considered to be prior art merely because it is included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered to have been recognized in any prior art. Summary of the Invention

[0004] The present disclosure provides a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for sending a data processing request.

[0005] According to an aspect of the present disclosure, there is provided a method for sending a data processing request, including: receiving a plurality of data processing requests sorted in a preset order; for each data processing request among the plurality of data processing requests, determining an encoding of the data processing request based on the ordinal number of the data processing request in a preset sequence composed of the plurality of data processing requests; and based on the reception order of the plurality of data processing requests, sequentially sending the plurality of data processing requests and the encodings of the plurality of data processing requests to a data processing device, so that the data processing device can perform filtering on the plurality of data processing requests based on the encodings of the plurality of data processing requests.

[0006] According to another aspect of the present disclosure, there is provided a data processing method, including: sequentially receiving a plurality of data processing requests sent by a host and the encodings of the plurality of data processing requests, where the encoding of each data processing request can indicate the ordinal number of the data processing request in a preset sequence composed of the plurality of data processing requests; for each data processing request among the plurality of data processing requests, determining whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request; and in response to determining not to filter the data processing request, performing data processing based on the data processing request.

[0007] According to another aspect of the present disclosure, there is provided a sending device for data processing requests, including: a first receiving unit configured to receive a plurality of data processing requests sorted in a preset order; an encoding unit configured to determine an encoding of each data processing request among the plurality of data processing requests based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests; and a first sending unit configured to sequentially send the plurality of data processing requests and the encodings of the plurality of data processing requests to a data processing device based on the receiving order of the plurality of data processing requests, so that the data processing device can filter the plurality of data processing requests based on the encodings of the plurality of data processing requests.

[0008] According to another aspect of the present disclosure, there is provided a data processing device, including: a third receiving unit configured to sequentially receive a plurality of data processing requests sent by a host and the encodings of the plurality of data processing requests, and the encoding of each data processing request can indicate the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests; a filtering unit configured to determine whether to filter each data processing request among the plurality of data processing requests based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request; and an execution unit configured to, in response to determining not to filter the data processing request, perform data processing based on the data processing request.

[0009] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above methods.

[0010] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute any of the above methods.

[0011] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, wherein the computer program can implement any of the above methods when executed by a processor.

[0012] According to one or more embodiments of the present disclosure, it is possible to avoid the transmission failure of data processing requests from affecting the correct execution of the data processing process.

[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings exemplarily illustrate embodiments and form a part of the specification, and are used together with the written description of the specification to explain the exemplary embodiments of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0015] Figure 1 A schematic diagram of an exemplary system in which various methods described herein can be implemented according to an exemplary embodiment of the present disclosure is shown;

[0016] Figure 2 A flowchart of a method for sending a data processing request according to an exemplary embodiment of the present disclosure is shown;

[0017] Figure 3 A flowchart of a data processing method according to an exemplary embodiment of the present disclosure is shown;

[0018] Figure 4 A block diagram of a device for sending a data processing request according to an exemplary embodiment of the present disclosure is shown;

[0019] Figure 5 A block diagram of a data processing device according to an exemplary embodiment of the present disclosure is shown;

[0020] Figure 6 A schematic diagram of a data processing system according to an exemplary embodiment of the present disclosure is shown;

[0021] Figure 7 A schematic diagram of a data processing process according to an exemplary embodiment of the present disclosure is shown;

[0022] Figure 8 A block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0024] In the present disclosure, unless otherwise specified, the use of terms such as "first", "second", etc. to describe various elements does not intend to limit the positional relationship, timing relationship or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, and in certain cases, based on the context description, they may also refer to different instances.

[0025] In the description of the various examples in the present disclosure, the terms used are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in the present disclosure covers any one of the listed items and all possible combinations.

[0026] In the related art, usually, multiple received data processing requests are directly forwarded to the data processing device in sequence according to the reception order, without considering that in the case of a transmission failure, the data processing device cannot execute the data processing in sequence according to the sending order, thus affecting the normal data processing process.

[0027] Based on this, the present disclosure provides a method for sending a data processing request, which can encode the data processing request based on the arrangement ordinal number of each data processing request, and send the data processing request and its encoding to the data processing device together, so that the data processing device can filter the data processing request based on the encoding of the data processing request, and avoid the data processing device executing the data processing in the wrong order.

[0028] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0029] Figure 1 FIG. shows a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein can be implemented according to an embodiment of the present disclosure. Referring to Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 that couple the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.

[0030] In an embodiment of the present disclosure, the server 120 can run one or more services or software applications that enable the execution of the method for sending a data processing request or the data processing method.

[0031] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0032] In Figure 1 the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that may be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be understood that various different system configurations are possible, which may be different from system 100. Thus, Figure 1 is an example of a system for implementing the various methods described herein and is not intended to be limiting.

[0033] Users may use client devices 101, 102, 103, 104, 105, and / or 106 to send data processing requests. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although Figure 1 only six client devices are depicted, those skilled in the art will be able to understand that the present disclosure may support any number of client devices.

[0034] Client devices 101, 102, 103, 104, 105, and / or 106 can include various categories of computing devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices, etc. These computing devices can run various categories and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT WindowsMobile OS, iOS, Windows Phone, Android. Portable handheld devices can include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices can include head-mounted displays (such as smart glasses) and other devices. Gaming systems can include various handheld gaming devices, Internet-enabled gaming devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.

[0035] Network 110 can be any category of network known to those skilled in the art, which can support data communication using any one of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, token ring, wide area network (WAN), the Internet, virtual network, virtual private network (VPN), intranet, extranet, blockchain network, public switched telephone network (PSTN), infrared network, wireless network (such as Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0036] Server 120 can include one or more general-purpose computers, dedicated server computers (such as PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframes, server clusters, or any other suitable arrangement and / or combination. Server 120 can include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (such as one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the server). In various embodiments, server 120 can run one or more services or software applications that provide the functions described below.

[0037] The computing units in server 120 can run one or more operating systems including any of the above-mentioned operating systems and any commercially available server operating systems. Server 120 can also run any one of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0038] In some embodiments, server 120 can include one or more applications to analyze and combine data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 can also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0039] In some embodiments, server 120 can be a server of a distributed system or a server incorporating a blockchain. Server 120 can also be a cloud server or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system to address the defects of high management difficulty and weak business scalability existing in traditional physical hosts and virtual private server (VPS) services.

[0040] System 100 can also include one or more databases 130. In certain embodiments, these databases can be used to store data and other information. For example, one or more of databases 130 can be used to store information such as audio files and video files. Databases 130 can reside in various locations. For example, the databases used by server 120 can be local to server 120 or can be remote from server 120 and can communicate with server 120 via a network-based or dedicated connection. Databases 130 can be of different categories. In certain embodiments, the databases used by server 120 can be, for example, relational databases. One or more of these databases can store, update, and retrieve data to and from the databases in response to commands.

[0041] In certain embodiments, one or more of databases 130 can also be used by applications to store application data. The databases used by applications can be databases of different categories, such as key-value repositories, object repositories, or conventional repositories supported by a file system.

[0042] Figure 1The system 100 can be configured and operated in various ways to enable the application of various methods and devices described in the present disclosure.

[0043] Figure 2 FIG. 4 shows a flowchart of a data processing request method 200 according to an exemplary embodiment of the present disclosure. As Figure 2 shown, method 200 includes:

[0044] Step S201, receiving a plurality of data processing requests sorted in a preset order;

[0045] Step S202, for each data processing request among the plurality of data processing requests, determining an encoding of the data processing request based on the ordinal number of the data processing request in a preset sequence formed by the plurality of data processing requests; and

[0046] Step S203, based on the reception order of the plurality of data processing requests, sequentially sending the plurality of data processing requests and the encodings of the plurality of data processing requests to a data processing device, so that the data processing device can filter the plurality of data processing requests based on the encodings of the plurality of data processing requests.

[0047] By encoding each data processing request based on its ordinal number and sending the data processing request and its encoding to the data processing device together, the data processing device can filter the data processing requests based on the encodings of the data processing requests, avoiding the data processing device from performing data processing in the wrong order and avoiding the transmission failures (such as duplication, omission, out-of-order, etc.) of the data processing requests from affecting the normal data processing process.

[0048] In some examples, for a plurality of sequentially received data processing requests sorted in a preset order, the encoding of each data processing request can be determined in a manner of sequential increment encoding (such as 1, 2, 3,...) based on the reception order.

[0049] According to some embodiments, determining the encoding of the data processing request based on the ordinal number of the data processing request in a preset sequence formed by the plurality of data processing requests in step S202 includes: determining the encoding of the data processing request based on the ordinal number of the data processing request in a preset sequence formed by the plurality of data processing requests and the reception time of the data processing request. Thus, the encoding of the data processing request can be formed by splicing time and increment ordinal numbers to support the encoding of a large number of data processing requests and fully meet the requirements of actual application scenarios.

[0050] According to some embodiments, each of the plurality of data processing requests includes data to be processed, the data processing apparatus includes a plurality of data processing units, and method 200 further includes: for each of the plurality of data processing requests, dividing the data to be processed in the data processing request into a plurality of sub-data respectively corresponding to the plurality of data processing units, and wherein, sending each of the plurality of sub-data and the encoding of the data processing request to the data processing unit corresponding to the sub-data. Thus, method 200 can be applied to a distributed data processing system. After the host splits the data to be processed, it encodes the data processing request and sends it together with the data to be processed to each data processing unit in the distributed system, which can avoid each data processing unit executing data processing in the wrong order and avoid the transmission failure (such as duplication, omission, out-of-order, etc.) of the data processing request from affecting the normal data processing process, thereby ensuring the data consistency of distributed processing.

[0051] In some examples, it may be that while sending the data processing request and sending it to the data processing apparatus, the storage location information of the corresponding data to be processed is sent to the data processing apparatus, so that the data processing apparatus can read the data to be processed by itself based on the storage location information, improving data security.

[0052] According to some embodiments, method 200 further includes: receiving a plurality of data processing results for the plurality of data processing requests sent by the data processing apparatus, and each of the plurality of data processing results includes the encoding of the data processing request corresponding to the data processing result. Thus, it is possible to receive the data processing results carrying the encoding returned by the data processing apparatus, and thereby monitor the working state of the data processing apparatus using the returned encoding.

[0053] According to some embodiments, when the data processing apparatus includes a plurality of data processing units, each of the plurality of data processing results includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each of the plurality of sub-processing results includes the identifier of the data processing unit corresponding to the sub-processing result. When method 200 is applied to a distributed data processing system, the data processing results returned to the host consist of a plurality of sub-processing results carrying the identifiers of the data processing units, so that the host can monitor the working state of each data processing unit based on the data processing unit identifiers in the sub-processing results.

[0054] According to another aspect of the present disclosure, there is also provided a data processing method. Figure 3 The flowchart of a data processing method 300 according to an exemplary embodiment of the present disclosure is shown. As Figure 3 shown, method 300 includes:

[0055] Step S301: Sequentially receive a plurality of data processing requests sent by the host and the respective encodings of the plurality of data processing requests. The encoding of each data processing request can indicate the ordinal number of the data processing request in a preset sequence composed of the plurality of data processing requests.

[0056] Step S302: For each data processing request among the plurality of data processing requests, determine whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request; and

[0057] Step S303: In response to determining not to filter the data processing request, perform data processing based on the data processing request.

[0058] Thus, it is possible to filter the data processing request based on its encoding, avoid the data processing device from executing data processing in the wrong order, and avoid the transmission failure of the data processing request from affecting the normal data processing process.

[0059] According to some embodiments, in step S302, determining whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request includes: in response to determining that the encoding of the data processing request is greater than the encoding of each historical data processing request among the at least one historical data processing request, determining not to filter the data processing request. Thus, it is possible to determine whether the newly received data processing request is out of order based on the relative magnitude relationship between the encoding of the newly received data processing request and the encodings of the historical data processing requests, and determine the corresponding filtering information based on this.

[0060] As described above, the encoding of each data processing request is determined based on the ordinal number of the data processing request in the reception sequence. That is to say, in the case of normal transmission of the data processing request, the encoding of each newly received data processing request should be greater than the respective encodings of all historical data processing requests. Based on this, it is possible to utilize the relative magnitude relationship between the encoding of the newly received data processing request and the encodings of the historical data processing requests to determine whether the transmission of the data processing request is out of order or repeated.

[0061] According to some embodiments, method 300 further includes: sending the data processing result for the data processing request to the host, where the data processing result includes the encoding of the data processing request. Thus, by returning the data processing result carrying the encoding to the host, the host can monitor the data processing process based on the request encoding and can determine whether it is necessary to resend the data processing request based on this.

[0062] According to some embodiments, the data processing device includes a plurality of data processing units, and wherein, the data processing result includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each sub-processing result among the plurality of sub-processing results includes an identifier of the data processing unit corresponding to the sub-processing result. Thus, the method 300 can be applied to a distributed data processing system. In this case, the data processing result returned to the host consists of a plurality of sub-processing results carrying the identifiers of the data processing units, so that the host can monitor the working status of each data processing unit based on the data processing unit identifiers in the sub-processing results.

[0063] According to another aspect of the present disclosure, there is also provided a device for sending a data processing request. Figure 4 The structural block diagram of a device 400 for sending a data processing request according to an exemplary embodiment of the present disclosure is shown. As Figure 4 shown, the device 400 includes:

[0064] A first receiving unit 401, configured to receive a plurality of data processing requests sorted in a preset order;

[0065] An encoding unit 402, configured to, for each data processing request among the plurality of data processing requests, determine an encoding of the data processing request based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests; and

[0066] A first sending unit 403, configured to, based on the receiving order of the plurality of data processing requests, sequentially send the plurality of data processing requests and the encodings of the plurality of data processing requests to the data processing device, so that the data processing device can perform filtering on the plurality of data processing requests based on the encodings of the plurality of data processing requests.

[0067] According to some embodiments, the first determining unit 402 is configured to: determine the encoding of the data processing request based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests and the receiving time of the data processing request.

[0068] According to some embodiments, each of the plurality of data processing requests includes data to be processed, and the data processing device 400 includes a plurality of data processing units. The device further includes: a dividing unit, configured to, for each data processing request among the plurality of data processing requests, divide the data to be processed in the data processing request into a plurality of sub-data respectively corresponding to the plurality of data processing units, and wherein, the first sending unit is further configured to send each sub-data among the plurality of sub-data and the encoding of the data processing request to the data processing unit corresponding to the sub-data.

[0069] According to some embodiments, the apparatus 400 further includes: a second receiving unit configured to receive a plurality of data processing results sent by the data processing apparatus for the plurality of data processing requests, and each data processing result in the plurality of data processing results includes an encoding of the data processing request corresponding to the data processing result.

[0070] According to some embodiments, when the data processing apparatus includes a plurality of data processing units, each data processing result in the plurality of data processing results includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each sub-processing result in the plurality of sub-processing results includes an identifier of the data processing unit corresponding to the sub-processing result.

[0071] According to another aspect of the present disclosure, there is also provided a data processing apparatus. Figure 5 The structural block diagram of a data processing apparatus 500 according to an exemplary embodiment of the present disclosure is shown. As Figure 5 shown, the apparatus 500 includes:

[0072] A third receiving unit 501 configured to sequentially receive a plurality of data processing requests sent by a host and the encodings of the plurality of data processing requests respectively, and the encoding of each data processing request can indicate the arrangement ordinal number of the data processing request in a preset sequence composed of the plurality of data processing requests;

[0073] A filtering unit 502 configured to, for each data processing request in the plurality of data processing requests, determine whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request; and

[0074] An execution unit 503 configured to, in response to determining not to filter the data processing request, perform data processing based on the data processing request.

[0075] According to some embodiments, the filtering unit 502 is configured to: in response to determining that the encoding of the data processing request is greater than the encoding of each historical data processing request in the at least one historical data processing request, determine not to filter the data processing request.

[0076] According to some embodiments, the apparatus 500 further includes: a second sending unit configured to send a data processing result for the data processing request to the host, and the data processing result includes the encoding of the data processing request.

[0077] According to some embodiments, the data processing device 500 includes a plurality of data processing units, and among them, the data processing result includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each sub-processing result among the plurality of sub-processing results includes an identifier of the data processing unit corresponding to this sub-processing result.

[0078] According to another aspect of the present disclosure, there is also provided a data processing system, including the data processing request sending device 400 and the data processing device 500 as described above.

[0079] Figure 6 A schematic diagram of a data processing system 600 according to an exemplary embodiment of the present disclosure is shown. As Figure 6 shown, the data processing system 600 includes a host 610 and a data processing device 620. In this example, the host 610 includes the data processing request sending device 400 described above, and is capable of receiving a plurality of data processing requests, encoding them, and then forwarding the plurality of data processing requests and their respective encodings to the data processing device 620.

[0080] In this example, the data processing device 620 is a distributed data processing system, and this distributed data processing system includes a first layer and a second layer, where the first layer includes n data processing units 621, and the second layer includes n data processing units 622. This distributed data processing system can be used, for example, to perform distributed inference tasks of large-scale models. During the model inference process, the graph structure of the model calculation can be sliced, horizontally sliced into a first-layer subgraph, a second-layer subgraph, etc., and each subgraph is further vertically sliced into multiple batches, and each batch is assigned to a data processing unit. In this case, it can be the data processing request sending device 400 that sends the data processing request, its encoding, and the split data to be processed to the n data processing units of the first layer, and the n data processing units of the first layer sequentially pass the received data to the lower layer, and return the corresponding data processing result to the host 610 after the data processing is completed.

[0081] Figure 7 A schematic diagram of a data processing process according to an exemplary embodiment of the present disclosure is shown. As Figure 7As shown, the host 710 includes a first receiving unit configured to receive a plurality of data processing requests sorted in a preset order; an encoding unit 712 configured to encode each data processing request based on the receiving order of the plurality of data processing requests; a request queue 713 configured to store the encoded data processing requests and transmit the data processing requests in the queue to a partitioning unit according to the first-in-first-out rule; a partitioning unit 714 configured to divide the data to be processed in the data processing request into a plurality of sub-data respectively corresponding to a plurality of data processing units in the distributed system; a first sending unit 715 configured to send the plurality of sub-data, the corresponding data processing requests of the plurality of sub-data, and their encodings to the plurality of data processing units in the distributed system respectively; a second receiving unit 716 configured to receive a plurality of data processing results for the plurality of data processing requests, each data processing result includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each sub-processing result carries the identifier of the corresponding data processing unit; the first sending unit 715 and the second receiving unit 716 can jointly update the information in the monitoring water level table 717 to record and monitor the operating loads of the plurality of data processing units.

[0082] Figure 7 An exemplary data processing unit 720 in the distributed data processing system is also shown. The data processing unit 720 includes a third receiving unit 721 configured to receive the data processing request sent by the host and the encoding of the data processing request; a request queue 722 configured to store the received data processing request and transmit the data processing request in the queue to a filtering unit according to the first-in-first-out rule; a filtering unit 723 configured to determine filtering information based on the encoding of the data processing request and the encodings of at least one historical data processing request (for example, it can be the encoding of the last received data processing request); an execution unit 724 configured to perform data processing on the unfiltered data processing requests and the corresponding sub-data; a second sending unit 725 configured to send the data processing result for the received data processing request to the host 710, and the data processing result includes the encoding of each data processing request and the identifier of the data processing unit.

[0083] According to another aspect of the present disclosure, there is also provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of the above.

[0084] According to another aspect of the present disclosure, there is also provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of the above.

[0085] According to another aspect of the present disclosure, there is also provided a computer program product including a computer program, wherein the computer program, when executed by a processor, implements any of the above methods.

[0086] Reference Figure 8 , a block diagram of an electronic device 800 that can be used as a server or a client of the present disclosure will now be described. It is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0087] As Figure 8 shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0088] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, output unit 807, storage unit 808, and communication unit 809. The input unit 806 can be any type of device capable of inputting information into device 800. The input unit 806 can receive input digital or character information, and generate key signal inputs related to the user settings and / or function controls of the electronic device, and can include but are not limited to a mouse, keyboard, touch screen, trackpad, trackball, joystick, microphone, and / or remote control. The output unit 807 can be any type of device capable of presenting information, and can include but are not limited to a display, speaker, video / audio output terminal, vibrator, and / or printer. The storage unit 808 can include but is not limited to magnetic disks and optical discs. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and can include but are not limited to a modem, network card, infrared communication device, wireless communication transceiver, and / or chipset, such as a Bluetooth™ device, 802.11 device, WiFi device, WiMax device, cellular communication device, and / or the like.

[0089] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 executes the various methods and processes described above, such as sending a data processing request or a data processing method. For example, in some embodiments, sending a data processing request or a data processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the data processing request sending or data processing method described above can be executed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute the data processing request sending or data processing method by any other suitable means (e.g., by means of firmware).

[0090] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0091] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.

[0092] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball), by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input received from the user can be in any form (including acoustic input, speech input, or tactile input).

[0094] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), the Internet, and blockchain networks.

[0095] A computer system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating blockchain.

[0096] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is imposed herein.

[0097] Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only defined by the authorized claims and their equivalent scope. Various elements in the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, the steps may be executed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, with the evolution of technology, many of the elements described herein may be replaced by equivalent elements that emerge after the present disclosure.

Claims

1. A method for sending data processing requests, including: Receiving a plurality of data processing requests sorted in a preset order, each data processing request in the plurality of data processing requests including data to be processed; For each data processing request in the plurality of data processing requests, determining an encoding of the data processing request based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests; Dividing the data to be processed in the data processing request into a plurality of sub-data respectively corresponding to a plurality of data processing units included in the data processing device; Based on the reception order of the plurality of data processing requests, sequentially sending the plurality of data processing requests and the respective encodings of the plurality of data processing requests to the data processing device, so that the data processing device can perform filtering on the plurality of data processing requests based on the respective encodings of the plurality of data processing requests, wherein the sending process of each data processing request includes: for each sub-data in the plurality of sub-data, sending the sub-data and the encoding of the data processing request corresponding to the sub-data to the data processing unit corresponding to the sub-data; Receiving a plurality of data processing results for the plurality of data processing requests sent by the data processing device, wherein each data processing result includes a plurality of sub-processing results respectively corresponding to a plurality of data processing units included in the data processing device, and each sub-processing result includes an identifier of the data processing unit corresponding to the sub-processing result and an encoding of the data processing request corresponding to the sub-processing result; and For each data processing unit included in the data processing device, monitoring the load of the data processing unit based on the encoding of the data processing request sent to the data processing unit and the identifier and encoding of the data processing request included in the received sub-processing result.

2. The method according to claim 1, wherein, The determining the encoding of the data processing request based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests includes: Determining the encoding of the data processing request based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests and the reception time of the data processing request.

3. A data processing method executed by a data processing device, including: Sequentially receiving a plurality of data processing requests sent by a host and the respective encodings of the plurality of data processing requests, and the encoding of each data processing request can indicate the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests; For each data processing request in the plurality of data processing requests, Determining whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request; and In response to determining not to filter the data processing request, performing data processing based on the data processing request. Among them, the data processing device includes a plurality of data processing units, and the data processing result of each data processing request includes a plurality of sub-data respectively corresponding to the plurality of data processing units. The method further includes: Sending the plurality of data processing results respectively corresponding to the plurality of data processing requests to the host, wherein each data processing result includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each sub-processing result includes the identifier of the data processing unit corresponding to the sub-processing result and the encoding of the data processing request corresponding to the data processing result.

4. The method according to claim 3, wherein, Determining whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request includes: In response to determining that the encoding of the data processing request is greater than the encoding of each historical data processing request in the at least one historical data processing request, determining not to filter the data processing request.

5. A sending device for data processing requests, including: A first receiving unit configured to receive a plurality of data processing requests sorted in a preset order, and each data processing request in the plurality of data processing requests includes data to be processed; An encoding unit configured to, for each data processing request in the plurality of data processing requests, determine the encoding of the data processing request based on the arrangement ordinal number of the data processing request in a preset sequence composed of the plurality of data processing requests; A partitioning unit configured to, for each data processing request in the plurality of data processing requests, partition the data to be processed in the data processing request into a plurality of sub-data respectively corresponding to a plurality of data processing units included in the data processing device; A first sending unit configured to, based on the receiving order of the plurality of data processing requests, sequentially send the plurality of data processing requests and the encodings of the plurality of data processing requests to the data processing device, so that the data processing device can perform filtering on the plurality of data processing requests based on the encodings of the plurality of data processing requests respectively. The first sending unit is further configured to send each sub-data in the plurality of sub-data and the encoding of the data processing request to the data processing unit corresponding to the sub-data; A second receiving unit configured to receive a plurality of data processing results for the plurality of data processing requests sent by the data processing device, wherein each data processing result includes a plurality of sub-processing results respectively corresponding to a plurality of data processing units included in the data processing device, and each sub-processing result includes the identifier of the data processing unit corresponding to the sub-processing result and the encoding of the data processing request corresponding to the data processing result; and A monitoring unit configured to, for each data processing unit included in the data processing device, monitor the load of the data processing unit based on the encoding of the data processing request sent to the data processing unit and the identifier and the encoding of the data processing request included in the received sub-processing result.

6. The apparatus according to claim 5, wherein, the encoding unit is configured to: determine the encoding of the data processing request based on the ordinal number of the arrangement of the data processing request in a preset sequence composed of the multiple data processing requests and the reception time of the data processing request.

7. A data processing apparatus, comprising: a third receiving unit configured to sequentially receive a plurality of data processing requests sent by a host and the encodings of the plurality of data processing requests respectively, and the encoding of each data processing request can indicate the ordinal number of the arrangement of the data processing request in a preset sequence composed of the plurality of data processing requests; a filtering unit configured to, for each data processing request among the plurality of data processing requests, determine whether to filter the data processing request based on the encoding of the data processing request and the encodings of at least one historical data processing request received before the data processing request; and an execution unit configured to, in response to determining not to filter the data processing request, perform data processing based on the data processing request, wherein the data processing apparatus includes a plurality of data processing units, and the data processing result of each data processing request includes a plurality of sub-data respectively corresponding to the plurality of data processing units, and the apparatus further includes: a second sending unit configured to send the plurality of data processing results respectively corresponding to the plurality of data processing requests to the host, wherein each data processing result includes a plurality of sub-processing results respectively corresponding to the plurality of data processing units, and each sub-processing result includes the identifier of the data processing unit corresponding to the sub-processing result and the encoding of the data processing request corresponding to the data processing result.

8. The apparatus according to claim 7, wherein, the filtering unit is configured to: in response to determining that the encoding of the data processing request is greater than the encoding of each historical data processing request among the at least one historical data processing request, determine not to filter the data processing request.

9. A data processing system, comprising: the apparatus according to claim 5 or 6; and the apparatus according to claim 7 or 8.

10. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 - 4.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein, the computer instructions are used to cause a computer to execute the method according to any one of claims 1 - 4.

12. A computer program product including a computer program, wherein, the computer program, when executed by a processor, implements the method according to any one of claims 1 - 4.

Citation Information

Patent Citations

  • Method for ensuring strong consistency of data in distributed system

    CN113992681A