Data operation method and system, and storage medium and computer program product
By processing front-end operation commands of multiple syntax types through the business platform server in the data operating system, converting them into intermediate expressions or sending them directly to the back-end server, the complexity of operation caused by the syntax differences between different data analysis platforms is solved, and the efficiency of users and systems is improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-12-11
- Publication Date
- 2026-07-02
Smart Images

Figure CN2025141807_02072026_PF_FP_ABST
Abstract
Description
Data manipulation methods, systems, storage media, and computer program products
[0001] This disclosure claims priority to Chinese Patent Application No. 202411978582.0, filed on December 27, 2024, entitled “Data Manipulation Method, System, Storage Medium and Computer Program Product”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of computer technology, and in particular to a data manipulation method, system, storage medium, and computer program product. Background Technology
[0003] With the advent of the big data era, data analysis platforms have emerged to facilitate data scientists' use of familiar syntax for data manipulation. Users can utilize these platforms to control different backend servers using a unified syntax, enabling various data operations. These backend servers can include database servers and computing servers (e.g., big data servers, artificial intelligence (AI) servers, etc.), and the corresponding data operations can include querying and computation. Using a data analysis platform, users can focus on data processing and analysis without needing to master the syntax of different backend servers or concern themselves with the specific details of data operation implementation.
[0004] There are various data analysis platforms on the market, each with its own syntax, which varies between platforms. A common problem on any data analysis platform is that for certain data operations, the platform's syntax doesn't define direct instructions for execution. Users must manually break down the operation into multiple steps and input various commands to complete it. This increases the complexity of data operations and reduces user efficiency. Summary of the Invention
[0005] This disclosure provides a data manipulation method, system, storage medium, and computer program product that allows users to input operation instructions of multiple syntax types, providing greater flexibility in instruction input. The technical solution includes:
[0006] Firstly, a data manipulation method is provided, which is applied to a data operating system. The data operating system includes a business platform server and at least one backend server. The method includes: firstly, the business platform server receives a sequence of operation instructions consisting of at least one frontend operation instructions sent by a client; then, when at least one frontend operation instruction involves multiple syntax types, the business platform server converts the at least one frontend operation instruction into at least one intermediate expression of a specified syntax type; finally, the business platform server generates at least one backend operation instruction based on the at least one intermediate expression and sends the at least one backend operation instruction to the corresponding backend server for execution.
[0007] This disclosure provides a corresponding handling method for situations where front-end operation commands involve multiple syntax types. Therefore, users do not need to consistently use a single syntax type when inputting commands. When a user wants to perform a first operation, they can choose the first syntax type to write the command, as this type defines instructions that can directly execute the first operation. If the user wants to perform a second operation, and the first syntax type does not define instructions that can directly execute the second operation, the user can choose the second syntax type, which also defines instructions that can directly execute the second operation. This eliminates the need for users to manually break down operations into multiple steps and input multiple commands, thereby improving user efficiency.
[0008] In one possible implementation, when at least one front-end operation instruction involves a single syntax type, the business platform server generates at least one back-end operation instruction based on at least one front-end operation instruction, and sends the at least one back-end operation instruction to the corresponding back-end server for execution.
[0009] In this way, when the front-end operation command involves only a single syntax type, the back-end operation command is directly generated and sent to the back-end server, eliminating the step of converting the command into an intermediate expression. This direct processing method simplifies the operation process, reduces the calculation and data conversion process, and thus improves the system's processing efficiency.
[0010] In one possible implementation, if at least one front-end operation instruction involves a single syntax type, the business platform server will directly send at least one front-end operation instruction to the corresponding back-end server for execution.
[0011] In this way, front-end operation commands are sent directly to the back-end server for execution, without command conversion or generation of back-end operation commands, simplifying the command processing flow and thus improving the system's processing efficiency.
[0012] In one possible implementation, the business platform server receives a syntax type definition instruction, which indicates the syntax type used by the front-end operation instructions in the sequence of operation instructions.
[0013] In this way, by receiving the syntax type definition instruction, the business platform server can clearly identify the syntax type used by the front-end operation instruction, and then adopt the corresponding processing method, such as translation rules, to ensure that the operation instruction is executed correctly.
[0014] In one possible implementation, the syntax type definition instruction is used to indicate, on a session-by-session basis, the syntax type used by the front-end operation instruction in a sequence of operation instructions.
[0015] In this way, the syntax type of the front-end operation command can be specified when the session is created, and the user does not need to specify the syntax type for each operation command separately, which can improve the user's operation efficiency.
[0016] In one possible implementation, the business platform server defines instructions based on syntax types, determining that at least one front-end operation instruction involves multiple syntax types or a single syntax type.
[0017] In this way, after determining whether the front-end operation instructions involve multiple syntax types or a single syntax type, the business platform server can choose different processing methods according to different situations. This case-by-case processing method improves the flexibility and efficiency of the data operating system.
[0018] In one possible implementation, the business platform server determines the first backend server corresponding to the operation type of the first operation involved in the operation instruction sequence based on the correspondence between operation type and backend server, and then sets the first backend server as the backend server corresponding to the first backend operation instruction, wherein the first backend operation instruction is a backend operation instruction used to execute the first operation.
[0019] In this way, by assigning different operation types to different backend servers based on the correspondence between operation types and backend servers, it is possible to select more suitable backend servers for different operations, effectively utilize system resources, and improve execution efficiency.
[0020] In one possible implementation, the business platform server first determines the backend type corresponding to the operation type of the second operation involved in the operation instruction sequence based on the correspondence between operation type and backend type. Then, based on the backend type corresponding to the operation type of the second operation, it determines the second backend server. Finally, it sets the second backend server as the backend server corresponding to the second backend operation instruction. Here, the backend type in the correspondence includes database type and computing type, and the second backend operation instruction is the backend operation instruction used to execute the second operation.
[0021] In this way, by clearly defining the correspondence between operation types and backend types, we can select the appropriate backend type (such as database server or computing server) based on the operation type (such as data query, computing task, etc.), and then further determine the backend server based on the backend type. This allows us to assign a more suitable backend server to each operation, thereby improving resource utilization efficiency.
[0022] In one possible implementation, the business platform server first receives the backend server definition instruction, then determines the third backend server corresponding to the third operation involved in the operation instruction sequence based on the backend server definition instruction, and finally sets the third backend server as the backend server corresponding to the third backend operation instruction, wherein the third backend operation instruction is a backend operation instruction used to execute the third operation.
[0023] In this way, users can specify which backend server should execute each frontend operation command. This allows users to precisely control task scheduling, ensuring that each operation is executed on the appropriate server, thereby improving execution utilization.
[0024] In a second aspect, a data operating system is provided, the system including at least one device for implementing the method provided in the first aspect or any possible implementation thereof.
[0025] Thirdly, a computing device cluster is provided, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, such that the computing device cluster performs the method provided by the first aspect or any possible implementation thereof.
[0026] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, perform the method provided by the first aspect or any possible implementation thereof.
[0027] Fifthly, a computer program product containing instructions is provided, which, when run by a cluster of computing devices, causes the cluster of computing devices to perform the method provided by the first aspect or any possible implementation thereof. Attached Figure Description
[0028] Figure 1 is a schematic diagram of the system architecture of a data operating system provided in an embodiment of this disclosure;
[0029] Figure 2 is a flowchart illustrating a data manipulation method provided in an embodiment of this disclosure;
[0030] Figure 3 is a schematic diagram of the processing of a multi-syntax type front-end operation instruction provided in an embodiment of this disclosure;
[0031] Figure 4 is a flowchart illustrating a data manipulation method provided in an embodiment of this disclosure;
[0032] Figure 5 is a schematic diagram of the processing of a single-syntax type front-end operation instruction provided in an embodiment of this disclosure;
[0033] Figure 6 is a flowchart illustrating a data manipulation method provided in an embodiment of this disclosure;
[0034] Figure 7 is a schematic diagram of the processing of a single-syntax type front-end operation instruction provided in an embodiment of this disclosure;
[0035] Figure 8 is a schematic diagram of the processing procedure of a single-syntax type front-end operation instruction provided in an embodiment of this disclosure;
[0036] Figure 9 is a schematic diagram of a syntax type definition instruction provided in an embodiment of this disclosure;
[0037] Figure 10 is a schematic diagram of a backend server definition instruction provided in an embodiment of this disclosure;
[0038] Figure 11 is a schematic diagram of a method for determining a backend server according to an embodiment of this disclosure;
[0039] Figure 12 is a schematic diagram of a method for determining a backend server according to an embodiment of this disclosure;
[0040] Figure 13 is a schematic diagram of a computing device provided in an embodiment of this disclosure;
[0041] Figure 14 is a schematic diagram of a computing device cluster provided in an embodiment of this disclosure;
[0042] Figure 15 is a schematic diagram of a computing device cluster provided in an embodiment of this disclosure. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0044] The concepts involved in this disclosure are explained below:
[0045] Front-end operation instructions
[0046] Front-end operation commands refer to the instructions entered by the user on the client and issued by the client to the data operating system to perform certain data operations. For example, performing data queries, data filtering, some simple calculations (such as simple mathematical operations, data analysis, etc.), or some more complex calculations (such as matrix operations, graph calculations, machine learning model training, etc.).
[0047] A front-end operation instruction can involve one or more operations. For example, df1 = df1[df1.col1<6], this instruction involves a filtering operation. Another example is result = df1.col1.mean() + df2.col1.mean() + df3.col1.mean(), this instruction involves three average operations and one addition operation.
[0048] Backend operation commands
[0049] Backend operation commands refer to the instructions sent from the business platform server to the backend server in the data operating system to perform certain data operations. Backend operation commands are generally generated based on frontend operation commands, and the operations performed are those involved in the frontend operation commands.
[0050] intermediate expression
[0051] Intermediate expressions can be considered as operation instructions with a specified syntax type. They are called intermediate expressions because they are neither operation instructions input from the front end nor operation instructions directly executed by the back end. Instead, they exist as an intermediary link between front end operation instructions and back end operation instructions.
[0052] operate
[0053] Any instruction among the front-end operation instructions, intermediate expressions, and back-end operation instructions can be considered as consisting of one or more operations.
[0054] For example, df1 = df1[df1.col1<6], this instruction involves a filtering operation.
[0055] For example, the instruction `result = df1.col1.mean() + df2.col1.mean() + df3.col1.mean()` involves three averaging operations and one addition operation.
[0056] In the process from front-end operation instructions to intermediate expression and then to back-end operation instructions, the operations involved can be completely unchanged, or they can involve the splitting or combination of some operations, but the overall task remains the same (for example, splitting operation A into three operations A1, A2 and A3, the process of performing operations A1, A2 and A3 is essentially the process of performing operation A).
[0057] The following example illustrates the relationship between front-end operation commands, intermediate expressions, back-end operation commands, and operations (this example assumes that each operation command corresponds to only one operation):
[0058] There are two front-end operation instructions, X and Y, involving operations A and B respectively. X is translated into intermediate expressions Z1 and Z2, and Y is translated into intermediate expression Z3. Z1 corresponds to operation A1, Z2 corresponds to operation A2, and Z3 corresponds to operation B. It can be seen that operation A is split into two operations, A1 and A2, during the translation process. Based on the intermediate expressions Z1, Z2, and Z3, back-end operation instructions W1, W2, and W3 are generated, corresponding to operations A1, A2, and B respectively.
[0059] The above is just one possible example. In practical applications, the process of translating front-end operation instructions into intermediate expressions may involve operation splitting or operation combination. Similarly, the process of generating back-end operation instructions from intermediate expressions may involve operation splitting or operation combination.
[0060] Implementation Plan
[0061] Generally, after receiving a sequence of instructions input by the user, the device may reorganize the various operations involved in the sequence. The purpose of this reorganization is to improve execution efficiency and reduce resource waste; therefore, this reorganization process can also be called an optimization process. During the reorganization process, operations from different instructions may be merged into one operation, one operation may be split into multiple operations, and the execution order of operations may be adjusted. Ultimately, an optimal sequence of operations is obtained, which is generally called an execution plan. Then, a corresponding sequence of instructions can be generated for each operation in the execution plan. This sequence of instructions is the final sequence of instructions to be executed (corresponding to backend operation instructions in this embodiment of the disclosure).
[0062] conversation
[0063] A session is a user-defined operation procedure, which can consist of one or more instructions. For example, a series of operations on the same variable can be defined as a session. Specific examples of sessions are given later in this embodiment.
[0064] With the advent of the big data era, data analysis platforms have emerged to facilitate data scientists' use of familiar syntax for data manipulation. Users can utilize these platforms to control different backend servers using a unified syntax, enabling various data operations. These backend servers can include database servers and computing servers (e.g., big data servers, AI servers, etc.), and the corresponding data operations can include querying and computation. Using a data analysis platform, users can focus on data processing and analysis without needing to master the syntax of different backend servers or concern themselves with the specific details of data operation implementation.
[0065] There are various data analysis platforms on the market, each with its own syntax, which varies between platforms. A common problem on any data analysis platform is that for certain data operations, the platform's syntax doesn't define direct instructions for execution. Users must manually break down the operation into multiple steps and input various commands to complete it. This increases the complexity of data operations and reduces user efficiency.
[0066] This disclosure provides a data manipulation method. This method can be implemented using a data operating system. The data operating system includes a business platform server and at least one backend server. The backend server may include at least one database server and / or at least one computing server. Figure 1 is a visual example of the system architecture of the data operating system, which includes a business platform server, multiple database servers such as database server A, database server B, and database server C, and multiple computing servers such as computing server Y and computing server Z.
[0067] As the entry point of the entire system, the business platform server can receive and process front-end operation instructions sent by users through the client, parse the operations to be performed, determine the corresponding back-end operation instructions, and send them to the corresponding back-end server for processing. Alternatively, specific front-end operation instructions can be sent directly to the back-end server as back-end operation instructions for processing, and so on.
[0068] The backend server is used to receive backend operation instructions sent by the business platform server and execute corresponding data operations, such as querying and calculation.
[0069] In this embodiment of the disclosure, the business platform server determines whether the syntax type involved in the front-end operation instruction is a multi-syntax type or a single-syntax type, and performs corresponding processing based on the determination result.
[0070] For front-end operation commands involving multiple syntax types, this method uniformly converts these commands into an intermediate expression of a specified syntax type, and then performs subsequent processing on the intermediate expression. This allows users to input operation commands of multiple syntax types, providing greater flexibility in command input. The processing flow of this method is shown in Figure 2, including the following steps:
[0071] Step 201: The business platform server receives a sequence of operation instructions sent by the client, wherein the sequence of operation instructions includes at least one front-end operation instruction.
[0072] When users want to perform certain data analysis-related processing, they can operate within the client by entering the corresponding front-end operation commands. The client will then send the user-entered front-end operation commands to the business platform server.
[0073] During data manipulation, the following situation often occurs: a user wants to perform operation A. The M syntax defines a direct instruction to execute operation A, allowing the user to perform operation A with just one instruction. However, the N syntax does not define a direct instruction to execute operation A, requiring the user to manually break down operation A into multiple steps and input multiple corresponding instructions to complete operation A. Similarly, for operation B, the M syntax does not define a direct instruction to execute operation B, while the N syntax does. Based on the method provided in this disclosure, when a user wants to perform operations A and B, they can use the M syntax to input the instruction for operation A and then use the N syntax to input the instruction for operation B. This effectively improves operational efficiency.
[0074] As can be seen, this method allows users to input front-end operation commands with multiple syntax types.
[0075] The business platform server receives front-end operation instructions sent by the client. Upon triggering a specified event, it performs a multi-syntax type and single-syntax type judgment on at least one received front-end operation instruction, and then proceeds with subsequent processing steps based on the judgment result. The specified trigger event can be the receipt of a specific instruction, such as the `show()` instruction (the general function of which is to provide a result, typically the value of a variable). After receiving the `show()` instruction, the business platform server can retrieve all instructions preceding the `show()` instruction (i.e., the aforementioned at least one front-end operation instruction), perform a multi-syntax type and single-syntax type judgment, and then proceed with subsequent processing steps.
[0076] The business platform server can handle the distinction between multiple syntax types and single syntax types in several possible ways, as follows:
[0077] Method 1: The syntax type of the front-end operation instruction is indicated by the syntax type definition instruction, and the determination of multiple syntax types and single syntax types is made accordingly.
[0078] The corresponding syntax type definition instructions will be explained in detail later.
[0079] The business platform server can determine all the syntax types involved in each front-end operation instruction based on the syntax type definition instructions, and thus determine whether each front-end operation instruction involves multiple syntax types or a single syntax type.
[0080] Method 2: Add specific fields (or comment information) to the front-end operation instructions to indicate the syntax type, and then determine whether it is a multi-syntax type or a single-syntax type.
[0081] When editing front-end operation commands, users can add specific fields (or comments) to indicate the syntax type of the corresponding command. Different identifiers can be used in these fields (or comments) to indicate the corresponding syntax type, or a combination of a specific identifier and a string representing the syntax type can be used.
[0082] The business platform server can read the corresponding fields (or comment information) in each front-end operation instruction to determine all the syntax types involved in each front-end operation instruction, and thus determine whether each front-end operation instruction involves multiple syntax types or a single syntax type.
[0083] The third method of judgment is to indicate whether a multi-syntax type or a single-syntax type is currently being used through specific instructions or client options.
[0084] Users can input specific commands on the client side. For commands with multiple syntax types, a first specified string can be included in the command; for commands with a single syntax type, a second specified string can be included. Upon receiving the command, the business platform server can identify whether it contains the first or second specified string to determine whether the front-end operation command involves multiple syntax types or a single syntax type.
[0085] Alternatively, users can manipulate specific options set in the client interface. For example, the client interface can have a multi-syntax type toggle control; if the control is turned on, it indicates that multiple syntax types are currently used; if the control is turned off, it indicates that a single syntax type is currently used. The business platform server can obtain the on / off information of this control from the client to determine whether each front-end operation command involves multiple syntax types or a single syntax type.
[0086] Step 202: In the case where at least one front-end operation instruction involves multiple syntax types, the business platform server converts at least one front-end operation instruction into at least one intermediate expression of the specified syntax type.
[0087] The specified syntax type can be set arbitrarily according to requirements.
[0088] The business platform server can maintain conversion rules (also known as translation rules) between different syntax types and the specified syntax types mentioned above.
[0089] By using the syntax type definition instruction in the first method of judgment, the business platform server can determine the syntax type involved in each front-end operation instruction. Alternatively, by using the specific fields or comment information in the second method of judgment, the business platform server can determine the syntax type involved in each front-end operation instruction.
[0090] After determining that each front-end operation instruction involves multiple syntax types using the judgment method described above, the business platform server can translate the front-end operation instructions to obtain intermediate expressions. Accordingly, for any front-end operation instruction, it can retrieve the translation rule corresponding to that syntax type based on the instruction's syntax type, and translate the instruction into an intermediate expression of the specified syntax type. For example, as shown in Figure 3, the front-end operation instructions received by the business platform server include front-end operation instructions a1, a2, a3, and a4 of syntax type a, front-end operation instructions b1, b2, and b3 of syntax type b, and c1 and c2 of syntax type c. After determining that the front-end operation instructions involve multiple syntax types, the business platform server converts the instructions into seven intermediate expressions x1, x2, x3, x4, x5, x6, and x7 of the specified syntax type.
[0091] Step 203: The business platform server generates at least one backend operation instruction based on at least one intermediate expression, and sends the at least one backend operation instruction to the corresponding backend server for execution.
[0092] Intermediate representations are merely standardized forms of expression; the actual execution instructions need to be translated into instructions that the backend server can understand and execute. After determining a sequence of intermediate representations consisting of at least one intermediate representation, the business platform server can determine an execution plan based on this sequence. The execution plan can consist of one or more operations with a specific execution order. Then, based on the operations in the execution plan, corresponding backend operation instructions are generated (the relationship between instructions and operations has been explained in detail above). The corresponding backend operation instructions are sent to the corresponding backend servers for execution according to the execution order of the operations in the execution plan. After obtaining the final execution result, the result is fed back to the client.
[0093] Optionally, before determining the backend operation instructions, the business platform server can determine the backend server corresponding to each operation in the execution plan (the specific method for determining the backend server will be explained in detail later). Then, for each operation, the syntax type supported by the corresponding backend server can be determined, and a backend operation instruction of that syntax type can be generated for the operation.
[0094] For example, if the backend server performing data operations is a relational database, the generated backend operation instructions will be Structured Query Language (SQL) statements, such as SELECT, JOIN, and WHERE statements. If the backend server performing data operations is a distributed computing platform (such as Spark), the generated backend operation instructions may be Spark domain-specific language (DSL) statements, such as SparkContext statements, sc.parallelize statements, and rdd.map statements.
[0095] The business platform server sends the corresponding backend operation instructions to the relevant backend servers for execution according to the execution order in the execution plan. The execution result of the earlier backend operation instruction can be used as input data for the subsequent backend operation instructions. After obtaining the final execution result, the result is fed back to the client.
[0096] For example, as shown in Figure 3, the business platform server determines the backend operation instructions A1, A2, C1, C2 and Z1 based on the intermediate expressions x1, x2, x3, x4, x5, x6 and x7, and sends the corresponding backend operation instructions to the corresponding backend servers for execution.
[0097] This disclosure provides a corresponding handling method for situations where front-end operation commands involve multiple syntax types. Therefore, users do not need to consistently use a single syntax type when inputting commands. When a user wants to perform a first operation, they can choose the first syntax type to write the command, as this type defines instructions that can directly execute the first operation. If the user wants to perform a second operation, and the first syntax type does not define instructions that can directly execute the second operation, the user can choose the second syntax type, which also defines instructions that can directly execute the second operation. This eliminates the need for users to manually break down operations into multiple steps and input multiple commands, thereby improving user efficiency.
[0098] The above processing flow can handle front-end operation commands containing multiple syntax types. However, in real-world applications, front-end operation commands may sometimes involve only one syntax type. For cases where front-end operation commands involve a single syntax type, the following methods can be used to achieve effective processing and execution of the commands.
[0099] The first approach involves not translating the front-end operation commands, but instead generating back-end operation commands based on them. The corresponding process is shown in Figure 4, and includes the following steps:
[0100] Step 401: The business platform server receives a sequence of operation instructions sent by the client, wherein the sequence of operation instructions includes at least one front-end operation instruction.
[0101] The business platform server receives a sequence of operation instructions from the client, where each front-end operation instruction uses the same syntax type.
[0102] The specific processing method for this step is the same as that for step 201. Please refer to the relevant instructions for step 201.
[0103] Step 402: When at least one front-end operation instruction involves a single syntax type, the business platform server generates at least one back-end operation instruction based on at least one front-end operation instruction, and sends the at least one back-end operation instruction to the corresponding back-end server for execution.
[0104] By using the syntax type definition instruction in the first method of judgment, the business platform server can determine the syntax type involved in each front-end operation instruction. Alternatively, by using the specific fields or comment information in the second method of judgment, the business platform server can determine the syntax type involved in each front-end operation instruction.
[0105] After determining, using the processing methods described above, that each front-end operation command involves a single syntax type, the business platform server can determine an execution plan based on these commands. Then, based on the operations in the execution plan, corresponding back-end operation commands are generated. These back-end operation commands are sent to the corresponding back-end servers for execution in the order of the operations in the execution plan. The execution results of the earlier back-end operation commands can be used as input data for subsequent back-end operation commands. Finally, the execution result is fed back to the client.
[0106] The processing method for the front-end operation instructions in step 402 is similar to the processing method for the intermediate expression in step 203. Please refer to the relevant description of step 203.
[0107] Optionally, the business platform server may use processing method one only for specified syntax types.
[0108] For example, as shown in Figure 5, the front-end operation instructions received by the business platform server include front-end operation instructions a1, a2, a3, and a4 of syntax type 'a'. After determining that the front-end operation instructions involve a single syntax type, the business platform server generates corresponding back-end operation instructions A1 and A2 based on the front-end operation instructions and sends them to the database server A for execution.
[0109] The second approach is to directly send the front-end operation commands to the back-end server for execution. The corresponding process is shown in Figure 6, and includes the following steps:
[0110] Step 601: The business platform server receives a sequence of operation instructions sent by the client, wherein the sequence of operation instructions includes at least one front-end operation instruction.
[0111] The business platform server receives a sequence of operation instructions from the client, where each front-end operation instruction uses the same syntax type.
[0112] The specific processing method for this step is the same as that for step 201. Please refer to the relevant instructions for step 201.
[0113] Step 602: If at least one front-end operation instruction involves a single syntax type, the business platform server sends at least one front-end operation instruction to the corresponding back-end server for execution.
[0114] The business platform server processes front-end operation commands directly as back-end operation commands. The business platform server can first determine the back-end server corresponding to each front-end operation command, ensuring that the back-end server supports the corresponding syntax type of the front-end operation command. The back-end server can be determined in several ways: first, by pre-specifying the back-end server for a single syntax type; second, by configuring the back-end server through user-defined commands, allowing for separate back-end servers for different front-end operation commands or a unified back-end server for all front-end operation commands; or third, by determining the back-end server for each front-end operation command based on a pre-stored mapping between syntax types and back-end servers, and the syntax type of each front-end operation command.
[0115] After determining the backend server corresponding to the frontend operation command, the business platform server can send the frontend operation command to the backend server for execution in the order of input. The execution result of the frontend operation command executed earlier in the sequence can be used as the input data for the subsequent frontend operation commands. After obtaining the final execution result, the result is fed back to the client.
[0116] For example, as shown in Figure 7, the front-end operation instructions received by the business platform server include front-end operation instructions c1, c2, c3, and c4 of C syntax type. After determining that the front-end operation instructions involve a single syntax type, the business platform server sends the front-end operation instructions c1, c2, c3, and c4 to the database server C for execution.
[0117] Method 3: In the case of a single syntax type, the same processing method as in the case of multiple syntax types can be adopted. For the specific process, please refer to the relevant instructions in steps 201 to 203.
[0118] For example, as shown in Figure 8, the front-end operation instructions received by the business platform server include front-end operation instructions b1, b2, and b3 of syntax type b. After determining that the front-end operation instructions involve a single syntax type, the business platform server converts the front-end operation instructions into three intermediate expressions x1, x2, and x3 of the specified syntax type. Based on the intermediate expressions x1, x2, and x3, the business platform server determines the back-end operation instructions C1, C2, and Z1, and sends back-end operation instructions C1 and C2 to the database server C for execution, and back-end operation instruction Z1 to the computing server Z for execution.
[0119] During the use of the data operating system, users first send a syntax type definition instruction to the business platform server through the client. This instruction indicates the syntax type used by subsequent front-end operation instructions. For example, the syntax definition instruction "frontend='pandas.DataFrame'" indicates that the syntax type used by subsequent front-end operation instructions is pandas.DataFrame (the name of a syntax type).
[0120] Syntax type definition directives can indicate the syntax type used by front-end operation commands on a session-by-session basis.
[0121] For example, as shown in Figure 9, s1 = session.init(frontend = 'pandas.DataFrame') indicates that the syntax type used by the frontend operation commands related to session s1 is pandas.DataFrame.
[0122] The business platform server can determine the number of syntax types involved in the front-end operation instructions based on the received syntax type definition instructions, so as to determine whether it is multiple syntax types or a single syntax type, and then take different processing methods.
[0123] If the business platform server receives multiple syntax type definition instructions, or a single syntax type definition instruction that defines multiple syntax types, it can be determined that the front-end operation instruction involves multiple syntax types, and thus a processing method based on multiple syntax types will be adopted. Conversely, if the business platform server receives a single syntax type definition instruction that defines only one syntax type, it can be determined that the front-end operation instruction involves a single syntax type, and thus a processing method based on a single syntax type will be adopted.
[0124] For example, as shown in Figure 9, the user inputs three syntax definition commands: s1 = session.init(frontend = 'pandas.DataFrame'), s2 = session.init(frontend = 'snowpark.DataFrame'), and s3 = session.init(frontend = 'sql'). Upon receiving these three syntax definition commands, the business platform server can determine that the front-end operation commands involve three syntax types: pandas.DataFrame, snowpark.DataFrame (a syntax type name), and sql, and thus adopt multiple syntax type processing methods.
[0125] In the above-mentioned data operation processing flow, the determination of the backend server is involved. This disclosure provides several possible processing methods, as follows:
[0126] Method 1 for backend selection: Directly select the backend server based on the operation type. The corresponding processing procedure is as follows:
[0127] Based on the mapping between operation types and backend servers, the business platform server determines the first backend server corresponding to the operation type of the first operation involved in the frontend operation instruction. The business platform server sets the first backend server as the backend server corresponding to the first backend operation instruction, where the first backend operation instruction is the backend operation instruction used to execute the first operation.
[0128] For processing operations with a single syntax type, the business platform server can identify the operation corresponding to the front-end operation command and determine the operation type of each operation, such as querying, filtering, clustering, matrix calculation, machine learning, etc. For processing operations with multiple syntax types, the business platform server can first convert multiple front-end operation commands into intermediate expressions with a specified syntax, then parse the intermediate expressions, identify the operations involved in the intermediate expressions (the operations involved in the intermediate expressions translated from the front-end operation commands are the operations involved in the front-end operation commands), and determine the operation type of each operation.
[0129] The business platform server can pre-establish a mapping between operation types and backend servers, which can be stored in the form of a table. After determining the operation type of the first operation involved in the front-end operation instruction, the business platform server can look up the first backend server corresponding to that operation type in the mapping. For example, as shown in Figure 11, if it is a query operation, it may be assigned to database server A; if it is a matrix operation operation, it may be assigned to computing server Z.
[0130] Furthermore, the business platform server sets the found first backend server as the backend to execute the first operation. When generating the first backend operation instruction to execute the first operation, the first backend server is assigned to the first backend operation instruction, that is, the first backend operation instruction is sent to the first backend server for execution.
[0131] There are several possible scenarios regarding the relationship between the first operation and the first back-end operation instruction: Scenario 1: The first back-end operation instruction is used to execute a certain operation, which is a combination of the first operation and another operation; Scenario 2: The first back-end operation instruction is used to execute a group of compound operations, where the first operation is one of the operations in the group; Scenario 3: The first back-end operation instruction is only used to execute the first operation; Scenario 4: The first back-end operation instruction is used to execute one or more operations, including a sub-operation obtained by splitting the first operation, and so on.
[0132] The second method for determining the backend involves identifying the backend type based on the operation type, and then selecting the backend server based on the backend type. The corresponding process can be as follows:
[0133] Based on the mapping between operation types and backend types, the business platform server determines the backend type corresponding to the operation type of the second operation involved in the frontend operation instruction. The backend types in the mapping include database types and computation types. Based on the backend type corresponding to the operation type of the second operation, the business platform server determines the second backend server. The business platform server sets the second backend server as the backend server corresponding to the second backend operation instruction, which is the backend operation instruction used to execute the second operation.
[0134] The business platform server can pre-establish a mapping between operation types and backend types, which can be stored in the form of a table. After determining the operation type of the second operation involved in the front-end operation instruction, the business platform server can look up the corresponding backend type in the mapping. For example, as shown in Figure 12, operation types such as matrix operations and machine learning can correspond to calculation types; operation types such as querying, filtering, and aggregation can correspond to database types.
[0135] After determining the backend type, the business platform server can further determine the specific backend server to perform the second operation based on the backend type. For example, the business platform server can select a relatively idle backend server (i.e., the second backend server) from among multiple backend servers under the currently determined backend type, based on the resource usage of each backend server; it can also select a backend server from among multiple backend servers under the currently determined backend type based on user instructions (the user can input instructions to specify a backend server among multiple database type backend servers, and / or, among multiple computing type backend servers); it can also select a backend server with lower costs based on the current usage costs of each backend server; it can also select a backend server with lower latency and lower packet loss rate based on data such as latency and packet loss rate in communication with each backend server; it can also randomly select a backend server; or it can select a backend server using other pre-configured operation allocation mechanisms.
[0136] The above describes various backend server selection mechanisms. In the business platform server, different selection mechanisms can be set for database type and computing type. For example, for database type, the selection mechanism can be based on user instructions to select the backend server. For computing type, the selection mechanism can be automatic selection by the business platform server, such as selection based on the resource usage of the backend server, random selection, selection based on current usage costs, fixed settings, etc.
[0137] Furthermore, the business platform server sets the selected second backend server as the backend for executing the second operation. When generating the second backend operation instruction for executing the second operation, the second backend server is assigned to the second backend operation instruction, that is, the second backend operation instruction is sent to the second backend server for execution.
[0138] The relationship between the second operation and the second backend operation instruction is similar to the relationship between the first operation and the first backend operation instruction in backend determination method one. Please refer to the relevant explanations above, which will not be repeated here.
[0139] Method 3 for determining the backend: Configure the backend server via commands.
[0140] The business platform server receives a backend server definition instruction, which indicates the third backend server corresponding to the third operation involved in the operation instruction sequence. The business platform server sets the third backend server as the backend server corresponding to the third backend operation instruction, where the third backend operation instruction is the backend operation instruction used to execute the third operation.
[0141] In this approach, when sending front-end operation commands, users can specify which back-end server should execute each command. Before sending a front-end operation command, users can send one or more back-end server definition commands, indicating which back-end server should execute each command. For example, the back-end server definition command "backend='DWS'" indicates that the back-end server corresponding to subsequent front-end operation commands is DWS. Users can specify the back-end server corresponding to a front-end operation command on a session-by-session basis. For example, as shown in Figure 10, s1 = session.init(backend='DWS') indicates that the back-end server corresponding to the relevant front-end operation command for session s1 (the relationship between sessions and front-end operation commands will be explained more comprehensively in later examples) is DWS.
[0142] If the user specifies the backend server corresponding to the frontend operation command, the business platform will execute the scheduling according to the user's requirements. In other words, one or more operations involved in the frontend operation command will eventually be handed over to the backend server for execution.
[0143] For example, a user might specify that a certain query operation is performed by database server A, a certain data calculation operation is performed by computing server Z, and a deep learning model training task is performed by computing server Y.
[0144] After receiving the user's backend server definition instruction and frontend operation instruction, the business platform server can determine the third operation involved in the frontend operation instruction (for specific processing methods, please refer to the relevant instructions in Backend Determination Method 1) and determine the third backend server set by the backend server definition instruction.
[0145] Furthermore, the business platform server sets the third backend server as the backend for executing the third operation. When generating the third backend operation instruction for executing the third operation, the third backend server is assigned to the third backend operation instruction, that is, the third backend operation instruction is sent to the third backend server for execution.
[0146] In method three, the user specifies which backend server should execute each frontend operation command. The advantage of this method is that the user can precisely control task scheduling, ensuring that each operation is executed on the appropriate backend server.
[0147] The following example illustrates the processing procedure of the above data manipulation method. The sequence of operation instructions received by the business platform server is as follows:
[0148] “add_one = udf(lambda x: x + 1, return_type=IntegerType(), input_types=[IntegerType()])
[0149] s1 = session.init(frontend='pandas.DataFrame', backend='DWS')
[0150] s2 = session.init(frontend='snowpark.DataFrame', backend='DWS')
[0151] s3 = session.init(frontend='sql', backend='DWS')
[0152] df1 = s1.DataFrame.table1 # pandas.DataFrame
[0153] df1 = df1[df1.col1 < 6] # DataFrame API
[0154] df2 = s2.DataFrame.table2 # snowpark.DataFrame
[0155] df3 = s3.sql("select * from table3") # SQL
[0156] df1 = df1.select(add_one("col1")) # UDF
[0157] result = df1.col1.mean() + df2.col1.mean() + df3.coli.mean()
[0158] result.show()
[0159] df4 = df1.col1.transpose() * df2 # Matrix multiplication, automatically routed to the TCR backend
[0160] df4.show()”
[0161] It should be noted that there seems to be a typo in the original text where "coli" in line 27 should probably be "col1". This has been corrected in the translation.Here, `add_one = udf(lambda x:x+1, return_type = IntegerType(), input_types = [IntegerType()])` is a function definition directive. This directive allows users to define their own functions, which can then be called in subsequent instructions to achieve customized operations. The function definition directive also generates corresponding backend operation instructions.
[0162] s1=session.init(frontend='pandas.DataFrame',backend='DWS')
[0163] s2=session.init(frontend='snowpark.DataFrame', backend='DWS')
[0164] s3=session.init(frontend='sql',backend='DWS')
[0165] The above three instructions are syntax type definition instructions and backend server definition instructions received by the business platform server in a session-by-session manner. The syntax type of session s1 is pandas.DataFrame and the corresponding backend server is DWS. The syntax type of session s2 is snowpark.DataFrame and the backend server is DWS. The syntax type of session s3 is sql and the backend server is DWS.
[0166] The processing of the above operation instruction sequence is divided into two parts, which are triggered by the business platform server after receiving the result.show() instruction and the df4.show() instruction, respectively.
[0167] The processing flow of the business platform server after receiving the result.show() command is as follows:
[0168] First, after receiving the result.show() instruction, the business platform server performs a multi-syntax type and single-syntax type judgment based on the instructions preceding this instruction. Since three syntax types are involved, a multi-syntax type processing method is adopted.
[0169] Next, the business platform server retrieves the corresponding translation rules for each syntax type and translates the corresponding front-end operation instructions into intermediate expressions of the specified syntax type. Specifically, df1 = s1.DataFrame.table1, df1 = df1[df1.col1<6], df1 = df1.select(add_one("col1")), and df1.col1.mean() belong to session s1 and are of the pandas.DataFrame syntax type; df2 = s2.DataFrame.table2, and df2.col1.mean() belong to session s2 and are of the snowpark.DataFrame syntax type; df3 = s3.sql("select*from table3"), and df3.col1.mean() belong to session s3 and are of the sql syntax type. For the above statement “result = ……”, the three parts df1.col1.mean(), df2.col1.mean(), and df3.col1.mean() adopt the syntax of session s1, session s2, and session s3, respectively. The syntax type of the remaining addition calculation part (“result = …… + …… + ……”) in this statement can be specified in advance. That is, for the instruction content that does not belong to any session, the user is required to use a specified syntax type for input. The specified syntax type can be the same as or different from the specified syntax type of the intermediate expression.
[0170] Then, the business platform server determines the execution plan based on the intermediate representation. Subsequently, based on the operations in the execution plan, it generates corresponding backend operation instructions. Before determining the backend operation instructions, the business platform server can determine the backend server corresponding to each operation in the execution plan. For example, backend determination method two can be used to determine the backend server corresponding to an operation. The operation types corresponding to the frontend operation instructions before the `result.show()` instruction include query, filter, clustering, and simple addition operations. The corresponding backend types are all database types. The user specifies the database type backend server as DWS through the backend definition instruction, thus specifying DWS as the backend server for these operations. Therefore, the corresponding DWS backend operation instructions will be generated. Alternatively, the above addition operation type can also be set to use a calculation type backend server; the related processing will not be elaborated here.
[0171] For the front-end operation commands df1 = s1.DataFrame.table1, df1 = df1[df1.col1<6], df1 = df1.select(add_one("col1")), df1.col1.mean(), the corresponding back-end operation commands are generated as follows:
[0172] WITH r1 AS(SELECT AVG(add_one("col1"))AS a FROM table1 WHERE("col1"<6))
[0173] The corresponding backend server is DWS.
[0174] For the front-end operation command, df2 = s2.DataFrame.table2, df2.col1.mean(), the generated back-end operation command is:
[0175] r2 AS(SELECT AVG(col1)AS b FROM table2)
[0176] The corresponding backend server is DWS.
[0177] For the front-end operation command, df3 = s3.sql("select *from table3"), df3.col1.mean(), the generated back-end operation command is:
[0178] r3 AS(SELECT AVG(col1)AS c FROM table3)
[0179] The corresponding backend server is the database server DWS.
[0180] For the front-end operation command, result = df1.col1.mean() + df2.col1.mean() + df3.col1.mean(), the generated back-end operation command is:
[0181] SELECT r1.a+r2.b+r3.c AS total_avg
[0182] The corresponding backend server is DWS.
[0183] Finally, the business platform server sends the corresponding backend operation instructions to DWS for execution according to the execution order of the operations in the execution plan. After obtaining the final execution result, the server sends the result back to the client.
[0184] The processing flow of the business platform server after receiving the df4.show() command is as follows:
[0185] First, after receiving the df4.show() instruction, the business platform server performs a multi-syntax type and single-syntax type judgment based on the instructions preceding this instruction. That is, df4 = df1.col1.transpose() * df2. This instruction involves two syntax types, so a multi-syntax type processing method is adopted.
[0186] Next, the business platform server retrieves the corresponding translation rules for each syntax type and translates the corresponding instructions into intermediate expressions of the specified syntax type. Specifically, `df1.col1.transpose()` belongs to session s1 and is a syntax type of `pandas.DataFrame`, while `df2` belongs to session s2 and is a syntax type of `snowpark.DataFrame`. For the statement `df4 = ..."`, the parts `df1.col1.transpose()` and `df2` use the syntax of session s1 and session s2 respectively. The syntax type of the remaining matrix multiplication part `df4 = ... * ..."` can be pre-specified. That is, for instructions that do not belong to any session, the user is required to input using a specified syntax type, which can be the same as or different from the specified syntax type of the intermediate expression.
[0187] Then, the business platform server determines the execution plan based on the intermediate representation. Subsequently, based on the operations in the execution plan, it generates corresponding backend operation instructions. Before determining the backend operation instructions, the business platform server can determine the backend server corresponding to each operation in the execution plan. For example, backend determination method two can be used to determine the backend server corresponding to an operation. The operation types corresponding to the frontend operation instructions include query and matrix multiplication. The backend type corresponding to query is database type, and the user specifies the database type backend server as DWS through the backend definition instruction, so the corresponding DWS backend operation instruction will be generated. The backend type corresponding to matrix multiplication is computation type, and the business platform server automatically selects the computation type backend server, for example, selecting the Tensor Compiler Runtime (TCR) as the computation type backend server.
[0188] For the front-end operation command, df1.col1.transpose(), the corresponding back-end operation command is generated as follows:
[0189] WITH r1 AS(SELECT(add_one("col1")AS a FROM table1 WHERE("col1"<6))
[0190] The corresponding backend server is DWS.
[0191] For the front-end operation command df2, the corresponding back-end operation command is generated as follows:
[0192] r2 AS(SELECT*AS b FROM table2)
[0193] The corresponding backend server is DWS.
[0194] For the front-end operation command, df1.col1.transpose()*df2, the generated back-end operation command is:
[0195] SELECT r1.a*r2.b
[0196] The corresponding backend server is TCR.
[0197] Finally, the business platform server sends the corresponding backend operation instructions to DWS and TCR for execution according to the execution order of the operations in the execution plan. After obtaining the final execution result, the execution result is fed back to the client.
[0198] Based on the same technical concept, this disclosure provides a data operating system, which includes a business platform server and at least one backend server, wherein the business platform server is used for:
[0199] The system receives a sequence of operation instructions sent by the client, wherein the sequence of operation instructions includes at least one front-end operation instruction. Specifically, it can implement the processing function of step 201 above, as well as other implicit steps.
[0200] When at least one front-end operation instruction involves multiple syntax types, at least one front-end operation instruction is converted into at least one intermediate expression of a specified syntax type. Specifically, this can implement the processing function of step 202 above, as well as other implicit steps.
[0201] Based on at least one intermediate representation, at least one backend operation instruction is generated, and the at least one backend operation instruction is sent to the corresponding backend server for execution. Specifically, this can implement the processing function of step 203 above, as well as other implicit steps.
[0202] The backend server is used to execute received backend operation instructions.
[0203] In one possible implementation, the business platform server is also used for:
[0204] When at least one front-end operation instruction involves a single syntax type, at least one back-end operation instruction is generated based on the at least one front-end operation instruction, and the at least one back-end operation instruction is sent to the corresponding back-end server for execution. Specifically, this can implement the processing function of step 402 above, as well as other implicit steps.
[0205] In one possible implementation, the business platform server is also used for:
[0206] If at least one front-end operation instruction involves a single syntax type, at least one front-end operation instruction is sent to the corresponding back-end server for execution. Specifically, this can implement the processing function of step 602 above, as well as other implicit steps.
[0207] In one possible implementation, the business platform server is also used for:
[0208] Receive a syntax type definition instruction, which indicates the syntax type used by the front-end operation instruction in the operation instruction sequence.
[0209] In one possible implementation, the syntax type definition instruction is used to indicate, on a session-by-session basis, the syntax type used by the front-end operation instruction in a sequence of operation instructions.
[0210] In one possible implementation, the business platform server is also used for:
[0211] Based on the syntax type definition instructions, determine that at least one front-end operation instruction involves multiple syntax types or a single syntax type.
[0212] In one possible implementation, each front-end operation instruction involves at least one operation.
[0213] The business platform server is also used for:
[0214] Based on the correspondence between operation types and backend servers, determine the first backend server corresponding to the operation type of the first operation involved in the operation instruction sequence.
[0215] The first backend server is set as the backend server corresponding to the first backend operation instruction, wherein the first backend operation instruction is a backend operation instruction used to execute the first operation.
[0216] In one possible implementation, each front-end operation instruction involves at least one operation.
[0217] The business platform server is also used for:
[0218] Based on the correspondence between operation type and backend type, the backend type corresponding to the operation type of the second operation involved in the operation instruction sequence is determined. The backend type in the correspondence includes database type and calculation type.
[0219] The second backend server is determined based on the backend type corresponding to the operation type to which the second operation belongs.
[0220] Set the second backend server as the backend server corresponding to the second backend operation instruction, wherein the second backend operation instruction is the backend operation instruction used to execute the second operation.
[0221] In one possible implementation, each front-end operation instruction involves at least one operation.
[0222] The business platform server is also used for:
[0223] Receive backend server definition instructions, wherein the backend server definition instructions are used to indicate the third backend server corresponding to the third operation involved in the operation instruction sequence.
[0224] Set the third backend server as the backend server corresponding to the third backend operation instruction, where the third backend operation instruction is the backend operation instruction used to execute the third operation.
[0225] This disclosure provides a corresponding handling method for situations where front-end operation commands involve multiple syntax types. Therefore, users do not need to consistently use a single syntax type when inputting commands. When a user wants to perform a first operation, they can choose the first syntax type to write the command, as this type defines instructions that can directly execute the first operation. If the user wants to perform a second operation, and the first syntax type does not define instructions that can directly execute the second operation, the user can choose the second syntax type, which also defines instructions that can directly execute the second operation. This eliminates the need for users to manually break down operations into multiple steps and input multiple commands, thereby improving user efficiency.
[0226] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0227] Both the business platform server and the backend server can be implemented using software or hardware. For example, the implementation of the business platform server will be described below. Similarly, the implementation of the backend server can refer to the implementation method of the business platform server.
[0228] As an example of a software functional unit, a business platform server may include code running on computing instances. These computing instances can be at least one of the following: physical hosts (computing devices), virtual machines, containers, etc. Furthermore, the aforementioned computing devices may be one or more. For example, a business platform server may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application can be distributed within the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code can be distributed within the same Availability Zone (AZ) or in different Availability Zones (AZs), each AZ comprising one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0229] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a single region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0230] As an example of a hardware functional unit, a business platform server may include at least one computing device, such as a server. Alternatively, the business platform server may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The aforementioned PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0231] The business platform server comprises multiple computing devices that can be distributed within the same region or in different regions. Similarly, these computing devices can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, they can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0232] This disclosure also provides a computing device 100. As shown in FIG13, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other via the bus 102. The computing device 100 may be a server or a terminal device. It should be understood that this disclosure does not limit the number of processors and memories in the computing device 100.
[0233] Bus 102 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 13, but this does not imply that there is only one bus or one type of bus. Bus 102 can include pathways for transmitting information between various components of computing device 100 (e.g., memory 106, processor 104, communication interface 108).
[0234] The processor 104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0235] The memory 106 may include volatile memory, such as random access memory (RAM). The memory 106 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0236] The memory 106 stores executable code, which the processor 104 executes to implement the functions of the aforementioned business platform server and backend server, thereby realizing the data operation method. In other words, the memory 106 stores instructions for executing the data operation method.
[0237] The communication interface 108 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 100 and other devices or communication networks.
[0238] This disclosure also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0239] As shown in Figure 14, the computing device cluster includes at least one computing device 100. The memory 106 of one or more computing devices 100 in the computing device cluster may store the same instructions for performing data manipulation methods.
[0240] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing data manipulation methods. In other words, a combination of one or more computing devices 100 can jointly execute instructions for executing data manipulation methods.
[0241] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions, which are used to execute some functions of the business platform server.
[0242] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 15 illustrates one possible implementation. As shown in Figure 15, two computing devices 100A and 100B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 106 in computing device 100A stores instructions for performing the functions of a business platform server. Simultaneously, the memory 106 in computing device 100B stores instructions for performing the functions of a backend server.
[0243] The connection method between the computing device clusters shown in Figure 15 can be considered as follows: taking into account that the data operation method provided in this disclosure requires a large amount of data storage and computation, the functions implemented by the backend server are to be performed by the computing device 100B.
[0244] It should be understood that the functions of computing device 100A shown in Figure 15 can also be performed by multiple computing devices 100. Similarly, the functions of computing device 100B can also be performed by multiple computing devices 100.
[0245] This disclosure also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similarly referred to the connection method of the computing device clusters shown in Figures 14 and 15. The difference is that the memory 106 of one or more computing devices 100 in this computing device cluster can store the same instructions for performing data operation methods.
[0246] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing data manipulation methods. In other words, a combination of one or more computing devices 100 can jointly execute instructions for executing data manipulation methods.
[0247] It should be noted that the memory 106 in different computing devices 100 within the computing device cluster can store different instructions for executing some functions of the data operating system. That is, the instructions stored in the memory 106 of different computing devices 100 can implement the functions of one or more devices in the business platform server and backend server.
[0248] This disclosure also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions capable of running on a computing device or stored on any available medium. When the computer program product is run on at least one cluster of computing devices, it causes at least one computing device to perform a data manipulation method.
[0249] This disclosure also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a cluster of computing devices, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disk (DVD)), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform the data manipulation methods provided in this disclosure.
[0250] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this disclosure.
Claims
1. A method of data manipulation, characterized by, The method is applied to a data operating system, which includes a business platform server and at least one backend server. The method includes: The business platform server receives a sequence of operation instructions sent by the client, wherein the sequence of operation instructions includes at least one front-end operation instruction; In cases where the at least one front-end operation instruction involves multiple syntax types, the business platform server converts the at least one front-end operation instruction into at least one intermediate expression of a specified syntax type. The business platform server generates at least one backend operation instruction based on the at least one intermediate expression, and sends the at least one backend operation instruction to the corresponding backend server for execution.
2. The method of claim 1, wherein, The method further includes: When the at least one front-end operation instruction involves a single syntax type, the business platform server generates at least one back-end operation instruction based on the at least one front-end operation instruction, and sends the at least one back-end operation instruction to the corresponding back-end server for execution.
3. The method of claim 1, wherein, The method further includes: When at least one front-end operation instruction involves a single syntax type, the business platform server sends the at least one front-end operation instruction to the corresponding back-end server for execution.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The business platform server receives a syntax type definition instruction, wherein the syntax type definition instruction is used to indicate the syntax type used by the front-end operation instructions in the operation instruction sequence.
5. The method of claim 4, wherein, The syntax type definition instruction is used to indicate, on a session-by-session basis, the syntax type used by the front-end operation instruction in the sequence of operation instructions.
6. The method according to claim 4 or 5, characterized in that, After the business platform server receives the syntax type definition instruction, the method further includes: The business platform server determines, based on the syntax type definition instructions, that the at least one front-end operation instruction involves multiple syntax types or a single syntax type.
7. The method according to any one of claims 1 to 6, characterized in that, Each front-end operation instruction involves at least one operation; The method further includes: The business platform server determines the first backend server corresponding to the operation type of the first operation involved in the operation instruction sequence based on the correspondence between operation types and backend servers. The business platform server sets the first backend server as the backend server corresponding to the first backend operation instruction, wherein the first backend operation instruction is a backend operation instruction used to execute the first operation.
8. The method according to any one of claims 1 to 6, characterized in that, Each front-end operation instruction involves at least one operation; The method further includes: The business platform server determines the backend type corresponding to the operation type of the second operation involved in the operation instruction sequence based on the correspondence between operation type and backend type, wherein the backend type in the correspondence includes database type and computing type; The business platform server determines the second backend server based on the backend type corresponding to the operation type to which the second operation belongs; The business platform server sets the second backend server as the backend server corresponding to the second backend operation instruction, wherein the second backend operation instruction is a backend operation instruction used to execute the second operation.
9. The method according to any one of claims 1 to 6, characterized in that, Each front-end operation instruction involves at least one operation; The method further includes: The business platform server receives a backend server definition instruction, wherein the backend server definition instruction is used to indicate the third backend server corresponding to the third operation involved in the operation instruction sequence. The business platform server sets the third backend server as the backend server corresponding to the third backend operation instruction, wherein the third backend operation instruction is a backend operation instruction used to execute the third operation.
10. A data operating system, characterized by The data operating system includes a business platform server and at least one backend server, wherein the business platform server is used for: Receive a sequence of operation instructions sent by a client, wherein the sequence of operation instructions includes at least one front-end operation instruction; In cases where the at least one front-end operation instruction involves multiple syntax types, the at least one front-end operation instruction is converted into at least one intermediate expression of a specified syntax type; Based on the at least one intermediate expression, at least one backend operation instruction is generated, and the at least one backend operation instruction is sent to the corresponding backend server for execution.
11. The data operating system of claim 10, wherein, The business platform server is also used for: When the at least one front-end operation instruction involves a single syntax type, at least one back-end operation instruction is generated based on the at least one front-end operation instruction, and the at least one back-end operation instruction is sent to the corresponding back-end server for execution.
12. The data operating system of claim 10, wherein, The business platform server is also used for: If the at least one front-end operation instruction involves a single syntax type, the at least one front-end operation instruction is sent to the corresponding back-end server for execution.
13. The data manipulation system of any of claims 10-12, wherein, The business platform server is also used for: Receive a syntax type definition instruction, wherein the syntax type definition instruction is used to indicate the syntax type used by the front-end operation instruction in the operation instruction sequence.
14. The data operating system of claim 13, wherein, The syntax type definition instruction is used to indicate, on a session-by-session basis, the syntax type used by the front-end operation instruction in the sequence of operation instructions.
15. The data operating system of claim 13 or 14, wherein, The business platform server is also used for: Based on the syntax type definition instructions, it is determined that the at least one front-end operation instruction involves multiple syntax types or a single syntax type.
16. The data manipulation system of any of claims 10-15, wherein, Each front-end operation instruction involves at least one operation; The business platform server is also used for: Based on the correspondence between operation types and backend servers, determine the first backend server corresponding to the operation type of the first operation involved in the operation instruction sequence; The first backend server is set as the backend server corresponding to the first backend operation instruction, wherein the first backend operation instruction is a backend operation instruction used to execute the first operation.
17. The data manipulation system of any of claims 10-15, wherein, Each front-end operation instruction involves at least one operation; The business platform server is also used for: Based on the correspondence between operation type and backend type, the backend type corresponding to the operation type of the second operation involved in the operation instruction sequence is determined, wherein the backend type in the correspondence includes database type and computing type; The second backend server is determined based on the backend type corresponding to the operation type to which the second operation belongs; The second backend server is set as a backend server corresponding to a second backend operation instruction, where the second backend operation instruction is a backend operation instruction used to execute the second operation.
18. The data manipulation system of any of claims 10-15, wherein, Each front-end operation instruction involves at least one operation; The business platform server is further configured to: receive a backend server definition instruction, where the backend server definition instruction is used to indicate a third backend server corresponding to a third operation involved in the sequence of operation instructions; The third backend server is set as a backend server corresponding to a third backend operation instruction, where the third backend operation instruction is a backend operation instruction used to execute the third operation.
19. A cluster of computing devices, characterized in that, The at least one computing device includes a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the cluster of computing devices performs the method according to any one of claims 1-9.
20. A computer program product comprising instructions, characterized in that, The instructions, when executed by the cluster of computing devices, cause the cluster of computing devices to perform the method according to any one of claims 1-9.
21. A computer-readable storage medium, characterized in that, The computer program instructions, when executed by the cluster of computing devices, cause the cluster of computing devices to perform the method according to any one of claims 1-9.