Processing method and device for batch processing requests, equipment and medium

By combining operation statements in batch processing requests in the aPaaS platform, a unified operation request is generated, which solves the problem of failure of some data processing in batch processing requests, and achieves unified and transactional processing results.

CN119513144APending Publication Date: 2025-02-25BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311061484.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the application platform as a service (aPaaS) platform, batch processing requests fail to process some data due to network problems or other problems, resulting in inconsistent processing results, making it difficult for users to continue to process failed data.

Method used

By obtaining multiple operation statements in batch processing requests, combining these operation statements according to the merge sorting rules, generating merged operation requests, thereby realizing the execution of multiple operation statements in one request, ensuring transactional and unified processing results.

Benefits of technology

The unified processing results of batch processing requests are realized, multiple processing results after processing failure are avoided, and the continuity and consistency of user operations are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and device for batch processing requests, equipment and a medium, which are applied to the technical field of data processing. The method comprises the following steps: firstly, acquiring a batch processing request comprising a plurality of operation statements, and merging the operation statements according to a merging and sorting rule to obtain a merged statement; the combined statement can integrate a plurality of operation statements. And generating an operation request comprising the merged statement. In this way, the multiple operation statements can be executed in one request, the transactionality of the multiple operation statements is guaranteed, that is, the multiple operation statements are all successfully processed or all the operation statements are all failed to be processed, a unified processing result after the operation request is processed is obtained, and multiple different processing results can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and medium for processing batch processing requests. Background Art

[0002] The application platform as a service (aPaaS) platform is used to provide application development services to users. In the aPaaS platform, users can create applications using the elements and modules provided by the aPaaS platform for application development. In the process of developing applications, users also need to operate the data used by the application to run. For a large amount of data that needs to be processed, users can use batch processing to trigger batch processing requests for a large amount of data.

[0003] When the aPaaS platform processes data based on batch processing requests, some data processing may fail due to network problems or other problems. In this case, the same batch of data will be processed successfully for some data and failed for others. This processing method is difficult to ensure the uniformity of the processing results of the same batch of data, and it also makes it difficult for users to continue processing the data that failed to be processed. Summary of the invention

[0004] In view of this, the present application provides a method, apparatus, device and medium for processing batch processing requests, which can merge multiple operation statements included in the batch processing requests into one operation request to achieve the unification of the processing results of executing the batch processing requests.

[0005] Based on this, the technical solutions provided by this application are as follows:

[0006] In a first aspect, the present application provides a method for processing batch processing requests, the method comprising:

[0007] A batch processing request is obtained, wherein the batch processing request includes a plurality of operation statements; the plurality of operation statements are merged according to a merge sorting rule to obtain a merged statement; and an operation request including the merged statement is generated.

[0008] In a possible implementation, before merging the multiple operation statements according to the merge sorting rule to obtain a merge statement, the method further includes:

[0009] Determine a dependent statement combination included in the multiple operation statements, the dependent statement combination includes a dependent statement and a dependent statement, and the dependent statement is executed depending on the execution result of the dependent statement;

[0010] The merging of the multiple operation statements according to the merge sorting rule to obtain the merged statement includes: sorting the dependent statement combination according to the dependent sorting rule, the dependent sorting rule including sorting the dependent statement before sorting the dependent statement; merging the multiple operation statements in the order of sorting according to the dependent sorting rule to obtain the merged statement.

[0011] In a possible implementation, the dependency sorting rule further includes that the dependent statement is adjacent to the dependent statement.

[0012] In a possible implementation, the dependent statement includes a target field, and a field value of the target field is determined based on the dependent statement.

[0013] In a possible implementation, before merging the multiple operation statements according to the merge sorting rule to obtain a merged statement, the method further includes:

[0014] Generate an assignment statement and a reference statement, wherein the assignment statement is used to assign the value of the target field included in the dependent statement to the intermediate variable, and the reference statement is used to reference the intermediate variable to assign the target field included in the dependent statement; use the assignment statement to modify the dependent statement, and use the reference statement to modify the dependent statement.

[0015] In a possible implementation, the method is applied to a request processing service module of a server, and the method further includes:

[0016] The operation request is sent to the operation service module; the operation result fed back by the operation service module is obtained; and the operation result is sent to the client so that the client displays the operation result.

[0017] In a possible implementation manner, the operation result is an operation failure, and the method further includes:

[0018] Obtain a retry instruction for the batch processing request, and send the operation request to the operation service module; obtain a retry operation result fed back by the operation service module; and send the retry operation result to the client so that the client displays the retry operation result.

[0019] In a possible implementation, each two adjacent operation statements included in the merge statement are separated by a separator.

[0020] In a second aspect, the present application provides a processing device for batch processing requests, the device comprising: an acquisition unit, used to acquire batch processing requests, the batch processing requests comprising multiple operation statements; a merging unit, used to merge the multiple operation statements according to a merge sorting rule to obtain a merged statement; and a request generating unit, used to generate an operation request including the merged statement.

[0021] In a possible implementation manner, the device further includes:

[0022] The determining unit is used to determine a dependent statement combination included in the multiple operation statements, wherein the dependent statement combination includes a dependent statement and a dependent statement, and the dependent statement is executed depending on the execution result of the dependent statement; the merging unit is specifically used to sort the dependent statement combination according to a dependency sorting rule, wherein the dependency sorting rule includes sorting the dependent statement before sorting the dependent statement; and merge the multiple operation statements in the order sorted according to the dependency sorting rule to obtain a merged statement.

[0023] In a possible implementation, the dependency sorting rule further includes that the dependent statement is adjacent to the dependent statement.

[0024] In a possible implementation, the dependent statement includes a target field, and a field value of the target field is determined based on the dependent statement.

[0025] In a possible implementation, the device also includes: a statement generation unit, used to generate an assignment statement and a reference statement, the assignment statement is used to assign the numerical value of the target field included in the dependent statement to the intermediate variable, and the reference statement is used to reference the intermediate variable to assign the target field included in the dependent statement; the dependent statement is modified by using the assignment statement, and the dependent statement is modified by using the reference statement.

[0026] In one possible implementation, the device is applied to a request processing service module of a server, and the device also includes: a sending unit, used to send the operation request to the operation service module; an acquisition unit, used to obtain the operation result fed back by the operation service module; the sending unit is also used to send the operation result to the client so that the client displays the operation result.

[0027] In one possible implementation, the operation result is an operation failure, and the acquisition unit is further used to obtain a retry instruction for the batch processing request and send the operation request to the operation service module; obtain the retry operation result fed back by the operation service module; and the sending unit is further used to send the retry operation result to the client so that the client displays the retry operation result.

[0028] In a possible implementation, each two adjacent operation statements included in the merge statement are separated by a separator.

[0029] In a third aspect, the present application provides an electronic device, including:

[0030] one or more processors;

[0031] a storage device having one or more programs stored thereon,

[0032] When the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect.

[0033] In a fourth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method described in the first aspect is implemented.

[0034] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute the method described in the first aspect.

[0035] It can be seen that this application has the following beneficial effects:

[0036] The present application provides a method, device, equipment and medium for processing batch processing requests. The method first obtains a batch processing request including multiple operation statements, merges the multiple operation statements according to a merge sorting rule, and obtains a merged statement. The merge statement can integrate multiple operation statements. An operation request including the merge statement is generated. In this way, multiple operation statements can be executed in one request, and the transactionality of multiple operation statements is guaranteed, that is, multiple operation statements are successfully processed or multiple operation statements fail to be processed, and a unified processing result after processing the operation request is obtained, which can avoid the occurrence of multiple different processing results when processing a batch processing request. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a framework of an exemplary application scenario provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of a method for processing batch processing requests provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of the structure of a processing device for batch processing requests provided in an embodiment of the present application;

[0040] Figure 4 A schematic diagram of the basic structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.

[0042] When users develop applications using the aPaaS platform, they need to operate on a large amount of data. Users can trigger batch processing requests to operate on a batch of data. For example, in the scenario of workflow editing provided by the aPaaS platform, users need to import 100 pieces of data into a form. The user triggers a batch processing request for the import operation of 100 pieces of data. The workflow service module of the aPaaS platform obtains the batch processing request triggered by the user. The workflow service module generates multiple operation statements using the statement protocol based on the batch processing request of the import operation and the 100 pieces of data. The workflow service module generates multiple operation requests, each of which includes an operation statement. The workflow service module sends multiple operation requests to the operation service module, such as the data service module. The data service module opens the corresponding operation transaction based on each operation request to implement the import operation of some data. However, during the interaction between the workflow service module and the data service module, or during the process of the data service module processing multiple operation requests, a fault may occur, affecting the processing of some operation requests. For example, affected by a network failure, some operation requests sent by the workflow service module to the data service module are lost. For another example, due to the abnormal operation of the server, the data service module processes some operation requests abnormally. This will cause the data service module to be unable to process some operation requests normally. The processing results of multiple operation requests fed back by the data service module to the workflow service module include partial successful processing results and partial failed processing results. In this case, some of the 100 data have been successfully imported, but some data have failed to be imported. The user cannot try to import the 100 data as a whole again, which affects the user's subsequent operations.

[0043] Based on this, an embodiment of the present application provides a method, device, equipment and medium for processing batch processing requests. The method first obtains a batch processing request including multiple operation statements, merges the multiple operation statements according to the merge sorting rule, and obtains a merged merge statement. The merge statement can integrate multiple operation statements. An operation request including the merge statement is generated. In this way, multiple operation statements can be executed in one request, and the transactionality of multiple operation statements is guaranteed, that is, multiple operation statements are processed successfully or multiple operation statements are processed unsuccessfully, and a unified processing result after processing the operation request is obtained, which can avoid the occurrence of multiple different processing results.

[0044] In order to facilitate understanding of a method for processing batch processing requests provided in an embodiment of the present application, a method for processing batch processing requests provided in an embodiment of the present application is described below in conjunction with the accompanying drawings. Figure 1 See the example scenario shown in the figure. Figure 1 As shown, this figure is a framework diagram of an exemplary application scenario provided in an embodiment of the present application.

[0045] Those skilled in the art will understand that Figure 1 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.

[0046] The user triggers a batch processing request for batch data in the client of the aPaaS platform. The server of the aPaaS platform obtains the batch processing request. The batch processing request includes multiple operation statements, such as operation statement 1, operation statement 2, operation statement 3, ..., operation statement 10. The workflow service module included in the server of the aPaaS platform merges the multiple operation statements included in the batch processing request according to the merge sorting rule to obtain a merged statement. As an example, the merged statement is, for example: "Operation statement 1; Operation statement 2; Operation statement 3; ...; Operation statement 10;". The two adjacent operation statements included in the merged statement are separated by a separator ";". The separator is used to divide different operation statements to facilitate the execution of operation statements. An operation request including a merged statement is generated. The operation request is processed to obtain a successful or failed processing result. In this way, the overall transactionality of the batch processing request can be achieved, and the overall success or overall failure of the operation request can be achieved, avoiding the occurrence of partial success and partial failure of the batch processing request.

[0047] In order to facilitate understanding of the technical solution provided by the embodiment of the present application, the processing method of batch processing requests provided by the embodiment of the present application is described below with reference to the accompanying drawings.

[0048] See also Figure 2 As shown in FIG. 1 , this figure is a flow chart of a method for processing batch processing requests provided by an embodiment of the present application, such as Figure 2 As shown, the method may include S201-S203:

[0049] S201: Obtain a batch processing request, where the batch processing request includes multiple operation statements.

[0050] A batch processing request is a request for batch processing of processing objects. In some implementations, the user triggers the batch processing request based on the processing needs. For example, the user selects multiple data in the interface displayed by the client and clicks the "batch import" button to trigger the batch processing request. In other implementations, the batch processing request is automatically triggered during the running of a pre-configured workflow.

[0051] The embodiments of the present application do not limit the specific processing objects of the batch processing request. For example, a batch processing request can be triggered for table data. For another example, a batch processing request can be triggered for multiple process nodes included in a workflow. The embodiments of the present application also do not limit the specific processing content of the batch processing. The processing content of the batch processing can be, for example, import, delete, update and other operations. It should be noted that the batch processing of the batch processing request can include one or more processing contents. For example, the batch processing request is to import 100 pieces of data. The batch processing of the batch processing request is an import operation. For another example, the batch processing request is to delete 50 pieces of data and update 50 pieces of data. The batch processing of the batch processing request includes a delete operation and an update operation.

[0052] The batch processing request includes multiple operation statements. Executing the operation statements can realize the processing of the processing object. The embodiment of the present application does not limit the statement type of the operation statement included in the batch processing request. The statement type can be determined by the programming language used. As an example, the statement type is object query language (OQL).

[0053] S202: Merge the multiple operation statements according to a merge sorting rule to obtain a merged statement.

[0054] The merge sorting rule is a pre-set order rule for merging multiple operation statements. In one possible implementation, the merge sorting rule is to randomly sort multiple operation statements. In another possible implementation, the merge sorting rule is consistent with the generation order of each operation statement in the batch processing request. In another possible implementation, the batch processing request includes operation statements with dependencies. Dependency means that the execution of an operation statement needs to be based on the execution result of another operation statement. Among them, the operation statement that requires the execution result of another operation statement to be executed can be called a dependent statement. The operation statement that generates the used execution result can be called a dependent statement. The dependent statement needs to be executed before the dependent statement to ensure the normal execution of the dependent statement. The merge sorting rule includes a dependent sorting rule and a non-dependent sorting rule. The dependent sorting rule is a sorting rule for dependent statements and dependent statements. The non-dependent sorting rule is a sorting rule for operation statements that do not have a dependency relationship with other operation statements. For details about dependencies and merge sorting rules in the scenario of dependencies, please refer to the following introduction.

[0055] A merged statement obtained by merging multiple operation statements according to the merge sorting rule, including each operation statement.

[0056] In a possible implementation, each operation statement included in the merge statement needs to be processed separately so that each operation statement is executed when the merge statement is executed.

[0057] As an example, two adjacent operation statements included in the merged statement are separated by a separator. The separator is used to divide different operation statements. The embodiment of the present application does not limit the specific symbol of the separator. As an example, the separator is ";". The separator can be added at the end of each operation statement. As another example, the end of each operation statement includes an end character. The end character can be used to determine different operation statements and achieve separation of different operation statements. This makes it easy to perform corresponding operations based on each operation statement when executing the merged statement, avoiding the problem of confusion of operation statements caused by the merged operation statement.

[0058] S203: Generate an operation request including the merge statement.

[0059] Executing an operation request including a merge statement can realize overall processing of the merge statement, that is, multiple operation statements, and obtain an overall result of processing the multiple operation statements.

[0060] Based on the relevant contents of S201-S203 above, it can be known that by generating an operation request including a merge statement, that is, including multiple operation statements, the overall processing for multiple operation statements is realized. The processing method of batch processing requests provided by the embodiment of the present application can ensure the transactionality of multiple operation statements and the atomicity of the execution results, that is, multiple operation statements are successfully processed or multiple operation statements are failed to be processed, and a unified processing result after processing the operation request is obtained, which is convenient for the user to continue processing. In this way, it is also possible to avoid the occurrence of multiple different processing results when processing a batch processing request.

[0061] In some possible implementations, among the multiple operation statements included in the batch processing request, there may be operation statements with a dependency relationship. A dependency relationship means that the execution of an operation statement needs to be based on the execution result of another operation statement. An operation statement that requires the execution result of another operation statement to be executed can be called a dependent statement. An operation statement that generates an execution result that is used can be called a dependent statement. Operation statements with a dependency relationship, that is, dependent statements and dependent statements, constitute a dependent statement combination. It should be noted that the number of dependent statements included in the dependent statement combination can be one or more, and the number of dependent statements can be one or more.

[0062] The embodiments of the present application provide two specific examples of operation statements with dependency relationships. As an example, operation statement A includes field 1, and operation statement B also includes field 1. The value of field 1 in operation statement B is determined based on the execution result of operation statement A. Operation statement A and operation statement B have a dependency relationship. Among them, operation statement A is a dependent statement. Operation statement B is a dependent statement. As another example, operation statement C is used to import data 1, and operation statement D is used to operate on data 2 based on the value of the imported data 1. Operation statement C and operation statement D have a dependency relationship. Among them, operation statement C is a dependent statement. Operation statement D is a dependent statement.

[0063] For operation statements with dependency relationships, the execution order of the dependent statement needs to be before the execution order of the dependent statement. Before merging multiple operation statements according to the merge sorting rule, it is necessary to first determine whether the multiple operation statements included in the batch processing request include a dependent statement combination.

[0064] The embodiments of the present application do not limit the method of determining the dependent statement combination.

[0065] In a possible implementation, the execution logic of the operation statement is automatically analyzed to determine the dependent statement combination. As an example, the batch processing request includes the following two OQL statements, that is, the operation statements.

[0066] Operation statement 1 is:

[0067] inset into_user values(1, 'Zhang San', 'Employee No. 1007');

[0068] Operation statement 1 indicates inserting a user record. The specific user record content is: the identifier value is 1, the user name is Zhang San, and the work number is 1007.

[0069] Operation statement 2 is:

[0070] update_user set job_number='job number 1008' where_id=1;

[0071] Operation statement 2 indicates changing the user's work number. The specific content of the change is to change the work number of the user whose identification value is 1 to 1008.

[0072] By analyzing the processing logic of operation statement 1 and operation statement 2, it can be determined that operation statement 1 imports the user record identified as 1, and operation statement 2 needs to modify the user ID identified as 1. Operation statement 2 can only be executed based on the execution result of the operation statement. It is determined that operation statement 1 and operation statement 2 are operation statements with a dependency relationship, and a dependent statement combination including operation statement 1 and operation statement 2 is determined.

[0073] In another possible implementation, the dependent statement combination is determined based on the processing flow of the execution operation corresponding to the operation statement. For example, operation statement 3 is used to import data. Operation statement 4 is used to update the imported data. The operation flow of updating the imported data is related to the operation flow of importing data and is after the operation flow of importing data. Operation statement 3 and operation statement 4 are determined to be operation statements with a dependent relationship, and a dependent statement combination including operation statement 3 and operation statement 4 is determined.

[0074] After determining the dependent statement combination, the embodiment of the present application provides a specific implementation method for merging the multiple operation statements according to the merge sorting rule to obtain a merged statement, including the following two steps A1 and A2:

[0075] A1: Sort the dependent statement combinations according to the dependency sorting rules.

[0076] The dependency sorting rule includes sorting the dependent statements before the dependent statements. This ensures that the dependent statements can be executed normally based on the execution results of the dependent statements. In one possible implementation, the order of the dependent statements determined based on the dependency sorting rule is not adjacent to the order of the dependent statements. Other operation statements may be included between the dependent statements and the dependent statements. In another possible implementation, the order of the dependent statements determined based on the dependency sorting rule is adjacent to the order of the dependent statements.

[0077] A2: Merge the multiple operation statements according to the dependency sorting rule to obtain a merged statement.

[0078] There is no need to restrict the execution order of operation statements other than dependent statement combinations during the execution process. For operation statements other than dependent statement combinations, non-dependent sorting rules can be used for sorting. For example, the non-dependent sorting rule is random sorting. Another example of the non-dependent sorting rule is consistent with the generation order of each operation statement in the batch processing request.

[0079] The embodiments of the present application do not limit the order of sorting the dependent statement combination and the order of sorting the operation statements other than the dependent statement combination, as well as the sorting order between the dependent statement combination and the operation statements other than the dependent statement combination. In a possible implementation, the dependent statement combination is sorted first, and then the operation statements other than the dependent statement combination are sorted. Moreover, in the merged statement, the execution order of the dependent statement combination is before the execution order of the operation statements other than the dependent statement combination. In another possible implementation, the operation statements other than the dependent statement combination are sorted first, and then the dependent statement combination is sorted. Moreover, in the merged statement, the execution order of the operation statements other than the dependent statement combination is before the execution order of the dependent statement combination. In another possible implementation, the operation statements are sorted based on the generation order of each operation statement in the batch processing request, and when the sorting process reaches the dependent statement, the dependent statement combination to which the dependent statement belongs is sorted; when the sorting process reaches the operation statement other than the dependent statement combination, the operation statements other than the dependent statement combination are sorted.

[0080] It should be noted that in the scenario where the dependent statement includes a field whose field value is determined by the execution of the dependent statement, the dependent statement and the dependent statement also include a statement for implementing the call field value. The dependent statement includes a target field. The field value of the target field is determined based on the dependent statement. After determining the dependent statement combination, before merging multiple operation statements, an assignment statement and a reference statement are also generated, and the assignment statement is used to modify the dependent statement, and the reference statement is used to modify the dependent statement. Among them, the assignment statement is used to assign the field value of the target field included in the dependent statement to the intermediate variable. The reference statement is used to reference the intermediate variable to assign the target field included in the dependent statement. The assignment statement and the reference statement can be generated based on the grammatical rules corresponding to the statement type of the operation statement. The embodiment of the present application does not limit the method of modifying the dependent statement using the assignment statement, and modifying the dependent statement using the reference statement. As an example, the assignment statement can be added to the original dependent statement, that is, the end of the operation statement, to obtain the modified dependent statement. The reference statement can be used to adjust the statement that assigns the target field in the dependent statement to obtain the modified dependent statement.

[0081] Taking the above operation statement 1: inset into_user values(1, 'Zhang San', 'Employee ID 1007'), and operation statement 2: update_user set job_number = 'Employee ID 1008' where_id = 1 as an example, the target field is id. Create an intermediate variable record_id.

[0082] Generate an assignment statement: returning_id as record_id, and a reference statement: where_id = @record_id. The assignment statement is used to assign the value of the id field to the intermediate variable record_id. Among them, the returning syntax is a pre-defined syntax for assignment. The reference statement is used to reference the value of the intermediate variable record_id for id. The @ syntax is a pre-defined syntax for reference.

[0083] The dependent statement modified by the assignment statement is:

[0084] inset into_user values(1, 'Zhang San', 'Employee ID 1007') returning_id as record_id;

[0085] The dependent statement modified by the reference statement is:

[0086] update_user set job_number = 'Employee ID 1008' where_id = @record_id;

[0087] In this way, by using the assignment statement and the reference statement to modify the dependent statement and the dependent statement respectively, the use of the intermediate variable between the operation statements with a dependency relationship can be realized, ensuring that the dependent statement can normally use the execution result of the dependent statement after merging.

[0088] In some possible implementation manners, the method for processing batch requests provided by the embodiments of the present application can be applied to the request processing service module of the server.

[0089] After obtaining the operation request, the request processing service module sends the operation request to the operation service module. The request processing service module and the operation service module can be different service modules obtained by functionally partitioning the server. The request processing service module and the operation service module can belong to the same server or different servers. As an example, the server is the server of the aPaaS platform. The request processing service module is, for example, the workflow service module of the aPaaS platform. The operation service module is, for example, the data service module of the aPaaS platform.

[0090] The operation service module obtains the operation request, processes the operation request, and obtains the operation result. The operation result is either a success or a failure. The operation service module feeds back the operation result to the request processing service module.

[0091] The request processing service module obtains the operation results and sends them to the client. The client can display the operation results to the user based on the obtained operation results. The user can view the results of the batch processing request.

[0092] When the operation result is an operation failure, the operation service module has not completed the processing of the operation request. The user can also trigger a retry instruction for the batch processing request to process the operation request again.

[0093] In one possible implementation, the user can click a "retry" button on the interface displaying the operation results to trigger a retry instruction for the batch processing request. In another possible implementation, the user can trigger the same batch processing request again. Taking the above example where the user selects multiple pieces of data in the interface displayed on the client and clicks the "batch import" button to trigger the batch processing request, after viewing the operation results of the failed operation, the user can click the "batch import" button again while keeping the same multiple pieces of data selected to trigger the batch processing request again.

[0094] The request processing service module obtains the retry instruction for the batch processing request sent by the client, and sends the operation request to the operation service module again. The operation service module can process the operation request again and obtain the retry operation result. The operation service module feeds back the retry operation result to the request processing service module.

[0095] The request processing service module obtains the retry operation result and sends the retry operation result to the client. The client can display the retry operation result to the user based on the obtained retry operation result. The user can view the retry results of the batch processing request.

[0096] In the processing method of batch processing requests provided in the embodiment of the present application, when the operation request fails to be executed, the operation request can be re-executed. This can solve the problem that the batch processing request cannot be retried as a whole when some processing fails in the decentralized processing of operation statements, which is convenient for user operation and improves the user experience.

[0097] Based on a method for processing batch processing requests provided by the above method embodiment, an embodiment of the present application also provides a device for processing batch processing requests. The device for processing batch processing requests will be described below in conjunction with the accompanying drawings.

[0098] See also Figure 3 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a processing device for batch processing requests provided in an embodiment of the present application. Figure 3 As shown, the processing device for batch processing requests includes:

[0099] An acquisition unit 301 is used to acquire a batch processing request, where the batch processing request includes multiple operation statements;

[0100] A merging unit 302, configured to merge the multiple operation statements according to a merging order rule to obtain a merged statement;

[0101] The request generating unit 303 is used to generate an operation request including the merge statement.

[0102] In a possible implementation manner, the device further includes:

[0103] a determining unit, configured to determine a dependent statement combination included in the plurality of operation statements, wherein the dependent statement combination includes a dependent statement and a dependent statement, and the dependent statement is executed depending on an execution result of the dependent statement;

[0104] The merging unit 302 is specifically used to sort the dependent statement combination according to a dependency sorting rule, where the dependency sorting rule includes sorting the dependent statement before sorting the dependent statement; and merge the multiple operation statements in the order of sorting according to the dependency sorting rule to obtain a merged statement.

[0105] In a possible implementation, the dependency sorting rule further includes that the dependent statement is adjacent to the dependent statement.

[0106] In a possible implementation, the dependent statement includes a target field, and a field value of the target field is determined based on the dependent statement.

[0107] In a possible implementation manner, the device further includes:

[0108] A statement generation unit is used to generate an assignment statement and a reference statement, wherein the assignment statement is used to assign the numerical value of the target field included in the dependent statement to the intermediate variable, and the reference statement is used to reference the intermediate variable to assign the target field included in the dependent statement; the dependent statement is modified by using the assignment statement, and the dependent statement is modified by using the reference statement.

[0109] In a possible implementation, the device is applied to a request processing service module of a server, and the device further includes:

[0110] A sending unit, used for sending the operation request to the operation service module;

[0111] The acquisition unit 301 is further used to acquire the operation result fed back by the operation service module;

[0112] The sending unit is further used to send the operation result to the client so that the client displays the operation result.

[0113] In a possible implementation, the operation result is an operation failure, and the acquisition unit 301 is further used to obtain a retry instruction for the batch processing request, send the operation request to the operation service module; and obtain the retry operation result fed back by the operation service module;

[0114] The sending unit is further used to send the retry operation result to the client so that the client displays the retry operation result.

[0115] In a possible implementation, each two adjacent operation statements included in the merge statement are separated by a separator.

[0116] Based on a method for processing batch processing requests provided in the above method embodiments, the present application also provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing batch processing requests as described in any of the above embodiments.

[0117] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0118] like Figure 4As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0119] Typically, the following devices may be connected to the I / O interface 405: input devices 408 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 408 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 409. The communication devices 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0120] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0121] The electronic device provided in the embodiment of the present application and the method for processing batch processing requests provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0122] Based on a method for processing batch processing requests provided in the above method embodiments, an embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the program is executed by a processor, the method for processing batch processing requests as described in any of the above embodiments is implemented.

[0123] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0124] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0125] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0126] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method for processing batch processing requests.

[0127] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The units involved in the embodiments described in this application may be implemented by software or hardware. The name of a unit / module does not limit the unit itself in some cases. For example, a voice data acquisition module may also be described as a "data acquisition module".

[0130] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0131] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0132] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0133] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0134] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0135] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0136] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing batch processing requests, characterized in that: The method comprises: Obtaining a batch processing request, wherein the batch processing request includes multiple operation statements; Merge the multiple operation statements according to a merge sorting rule to obtain a merge statement; An operation request including the merge statement is generated.

2. The method according to claim 1, characterized in that Before merging the multiple operation statements according to the merge sorting rule to obtain a merge statement, the method further includes: Determine a dependent statement combination included in the multiple operation statements, the dependent statement combination includes a dependent statement and a dependent statement, and the dependent statement is executed depending on the execution result of the dependent statement; The step of merging the multiple operation statements according to the merge sorting rule to obtain a merged statement includes: Sorting the dependent statement combination according to a dependency sorting rule, wherein the dependency sorting rule includes sorting the dependent statement before sorting the dependent statement; The multiple operation statements are merged in the order of sorting according to the dependency sorting rule to obtain a merged statement.

3. The method according to claim 2, characterized in that The dependency ordering rule also includes the dependent statement being adjacent to the dependent statement.

4. The method according to claim 2, characterized in that: The dependent statement includes a target field, and a field value of the target field is determined based on the dependent statement.

5. The method according to claim 4, characterized in that Before merging the multiple operation statements according to the merge sorting rule to obtain a merge statement, the method further includes: Generate an assignment statement and a reference statement, wherein the assignment statement is used to assign the value of the target field included in the dependent statement to the intermediate variable, and the reference statement is used to reference the intermediate variable to assign the value of the target field included in the dependent statement; The dependent statement is modified by using the assignment statement, and the dependent statement is modified by using the reference statement.

6. The method according to any one of claims 1 to 5, characterized in that: The method is applied to a request processing service module of the server, and the method further comprises: Sending the operation request to the operation service module; Obtaining the operation result fed back by the operation service module; The operation result is sent to the client so that the client displays the operation result.

7. The method according to claim 6, characterized in that The operation result is an operation failure, and the method further includes: Obtaining a retry instruction for the batch processing request, and sending the operation request to the operation service module; Obtaining the retry operation result fed back by the operation service module; The retry operation result is sent to the client so that the client displays the retry operation result.

8. The method according to claim 1, characterized in that: Each of the two adjacent operation statements included in the merge statement is separated by a separator.

9. A processing device for batch processing requests, characterized in that: The device comprises: An acquisition unit, used for acquiring a batch processing request, wherein the batch processing request includes a plurality of operation statements; A merging unit, used to merge the multiple operation statements according to a merging sorting rule to obtain a merged statement; The request generating unit is used to generate an operation request including the merge statement.

10. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-8.

11. A computer readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.