Online batch request response method and device, electronic equipment and storage medium

By using the HTTP protocol to generate request sequence numbers and job plans in online batch processing, the problem of low TCP response efficiency is solved, and efficient and low-cost batch processing responses are achieved.

CN116346916BActive Publication Date: 2025-10-17AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310318796.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2025-10-17
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

In the prior art, TCP-based online batch processing request response efficiency is low, development cost is high, and response efficiency is insufficient during request peak periods.

Method used

The HTTP protocol is used to generate request sequence numbers, and the target job plan is generated through the candidate job template. The online job plan request table is updated to achieve asynchronous response, avoid resource preemption, and improve response efficiency.

Benefits of technology

It improves the response efficiency of online batch processing, reduces development costs, and maintains efficient response capabilities during peak periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346916B_ABST
    Figure CN116346916B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an online batch request response method and device, electronic equipment and a storage medium. In response to an online batch request of a client based on a hypertext transfer protocol (HTTP), a request sequence number of the online batch request is generated, and the request sequence number is fed back to the online request client; a target job template is determined in a candidate job template according to an HTTP message in the online batch request, and a target job plan is generated by using the target job template; and an online job plan request table is updated according to the request sequence number and the target job plan. The embodiments of the present application improve the development efficiency, reduce the development cost, and improve the response efficiency of batch processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to data processing technology, and in particular, to an online batch request response method and device, electronic equipment and storage medium. BACKGROUND

[0002] Online services need to process a large amount of data, and the execution time is long, forming an online batch service. It is necessary to efficiently manage the online batch scheduling tasks in the batch processing system to ensure the orderly and efficient operation of the batch tasks.

[0003] In the prior art, the batch processing request is responded based on the Transmission Control Protocol (TCP). However, the TCP packet assembly is complex, the development efficiency is low, a special component needs to be introduced separately to support the sending and receiving of TCP packets, increasing the development cost; and the response efficiency of the batch processing request is low during the request peak period. SUMMARY

[0004] The present application provides an online batch request response method and device, electronic equipment and storage medium to improve the development efficiency, reduce the development cost, and improve the response efficiency of batch processing.

[0005] In a first aspect, the embodiments of the present application provide an online batch request response method, which comprises:

[0006] In response to an online batch request of an online request client based on the Hypertext Transfer Protocol (HTTP), a request sequence number of the online batch request is generated, and the request sequence number is fed back to the online request client;

[0007] According to the HTTP packet in the online batch request, a target job template is determined in a candidate job template, and a target job plan is generated using the target job template;

[0008] According to the request sequence number and the target job plan, an online job plan request table is updated.

[0009] In a second aspect, the embodiments of the present application further provide an online batch request response device, which comprises:

[0010] The request sequence number feedback module is configured to, in response to an online batch request of an online request client based on the Hypertext Transfer Protocol (HTTP), generate a request sequence number of the online batch request, and feed back the request sequence number to the online request client;

[0011] The target job plan generation module is configured to, according to the HTTP packet in the online batch request, determine a target job template in a candidate job template, and generate a target job plan using the target job template.

[0012] updating the online job plan request table according to the request sequence number and the target job plan.

[0013] In a third aspect, an electronic device is provided, and the electronic device includes:

[0014] one or more processors;

[0015] a storage device storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement any one of the online batch request response methods provided by the embodiments of the present application.

[0017] In a fourth aspect, a storage medium including computer executable instructions is provided, and the computer executable instructions, when executed by a computer processor, are used to perform any one of the online batch request response methods provided by the embodiments of the present application.

[0018] The present application generates a request sequence number of an online batch request of an online request client based on a HyperText Transfer Protocol (HTTP) and feeds back the request sequence number to the online request client, thereby achieving asynchronous response to the online batch request of the online request client, improving the timeliness of the response and improving the response efficiency. According to the HTTP message in the online batch request, a target job template is determined in a candidate job template, and the target job template is used to generate a target job plan. According to the request sequence number and the target job plan, an online job plan request table is updated. The online batch request based on the HTTP does not need to increase additional components, reduces the development cost, and the message of the HTTP has high development efficiency and is easy to assemble. Therefore, through the technical solution of the present application, the problems of complex TCP message assembly, low development efficiency, the need to separately introduce special components, and increased development cost are solved, and the response efficiency of batch processing requests in the request peak period is improved, thereby achieving the effects of improving the development efficiency, reducing the development cost, and improving the response efficiency of batch processing. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a flowchart of an online batch request response method in the first embodiment of the present application;

[0020] Figure 2 is a flowchart of an online batch request response method in the second embodiment of the present application;

[0021] Figure 3 is a structural schematic diagram of an online batch request response device in the third embodiment of the present application;

[0022] Figure 4 is a structural schematic diagram of an electronic device in Embodiment Four of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first" and "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0025] Embodiment One

[0026] Figure 1 A flowchart of an online batch request response method provided by Embodiment One of the present application. The present embodiment can be applied to the case of responding to batch scheduling requests. The method can be executed by an online batch request response device, which can be implemented by software and / or hardware and specifically configured in a batch scheduling platform, for example, a server.

[0027] Referring to Figure 1 The online batch request response method specifically includes the following steps:

[0028] S110, in response to the online request client based on the HyperText Transfer Protocol (HTTP) online batch request, generating a request sequence number of the online batch request, and feeding back the request sequence number to the online request client.

[0029] Hyper Text Transfer Protocol (HTTP) is a simple request-response protocol. The online request client and the online request server communicate based on HTTP, the settable HTTP message improves the development efficiency, does not need to introduce a separate component, saves the hardware cost, and HTTP can resist some simple attacks and vulnerabilities, and improves the security of the online request response.

[0030] The request sequence number can be a sequence number for uniquely identifying the online batch processing request, used for uniquely identifying the online batch processing request and as a query basis for the subsequent online request client. Illustratively, the request sequence number can be sequentially generated by a counter.

[0031] The online request client sends the online batch processing request based on HTTP, the online request server verifies the online batch processing request, and after verification, generates the request sequence number of the online batch request in response to the online request client. After generating the request sequence number, the request sequence number is fed back to the online request client.

[0032] In the prior art, after receiving the online batch request based on TCP, the unique request sequence number needs to be verified and generated, and the response to the online batch request is completed, and then the request processing result is returned, the whole process is a synchronous operation. If the online batch request is in the peak, the online batch processing may be slow due to resource occupation, and then the online batch request times out and cannot be responded in time. By feeding back the request sequence number to the online request client after generating the request sequence number, asynchronous processing of the online batch request is realized, so that the online request client can obtain the request sequence number in time, and then query the response process of the online request according to the request sequence number, and improve the timeliness and response efficiency of the response.

[0033] S120, determining a target job template in the candidate job template according to the HTTP message in the online batch request, and generating a target job plan by using the target job template.

[0034] The HTTP message can be a data unit for recording the content of the online batch request based on HTTP, used to deliver the specific content of the online batch request. Illustratively, the HTTP message can include a job plan number, a plan execution start date, a plan execution start time, and request parameters, etc. The content of the message can be adjusted according to actual needs, which is not limited in the present application.

[0035] The candidate job template can be a pre-configured job plan template, which is used to generate a target job plan to facilitate the online request server to determine the target operation of the batch request. For example, the candidate job template can be set according to the business type, data type or processing method of the batch processing, and the present application does not make specific limitation. The target job template can be the candidate job template specified in the HTTP message in the online batch request. Specifically, the target job template is determined according to the HTTP message in the candidate job template, and the specific content in the HTTP message in the online batch request is filled into the corresponding position in the target job template to generate the target job plan.

[0036] In an optional embodiment, the HTTP message in the online batch request includes a job time, which is used to specify the job time of the online batch request.

[0037] The job time can be a time point for processing the target job plan. For example, the job time in the online batch request can specify that the target job plan is executed immediately or delayed. The job time cannot be limited in the TCP-based online batch request, and the TCP-based online batch request will be responded immediately after being received. Since the online batch request is not timed and has high concurrency, it is easy to cause excessive concentration of tasks, resulting in response delay.

[0038] By including the job time in the HTTP message in the online batch request, the job time of the online batch request can be specified, so that the online batch request can be sent in advance to avoid the response delay caused by the excessive concentration of online batch requests, and the efficiency of responding to the online batch request is improved.

[0039] S130, updating the online job plan request table according to the request sequence number and the target job plan.

[0040] The online job plan request table can be a plan request table of online jobs in a preset time period, that is, a plan of all online job requests in the preset time period. For example, the online job plan request table can be a plan of online job requests on the same day. The request sequence number and the target job plan are associated, and the target job plan is added to the online job plan request table to update the online job plan request table.

[0041] The technical scheme of the embodiment is characterized in that, in response to an online batch request of a client based on a Hyper Text Transfer Protocol (HTTP), a request sequence number of the online batch request is generated, and the request sequence number is fed back to the online request client; asynchronous response to the online batch request of the online request client is realized, the timeliness of the response is improved, and the response efficiency is improved; a target job template is determined from candidate job templates according to an HTTP message in the online batch request, and the target job template is used to generate a target job plan; the online job plan request table is updated according to the request sequence number and the target job plan, and the online batch request based on HTTP does not need to increase additional components, reduces the development cost, and the message of HTTP has high development efficiency and is easy to assemble. Therefore, the technical scheme of the application solves the problems of complex TCP message assembly, low development efficiency, the need to separately introduce special components, and increased development cost, and low response efficiency of batch processing requests in a request peak period, and achieves the effects of improving the development efficiency, reducing the development cost, and improving the response efficiency of batch processing.

[0042] In an optional embodiment, after the online job plan request table is updated according to the request sequence number and the target job plan, the method further includes: determining whether the online job plan request table is successfully updated; if yes, generating update success information, and if not, generating update failure information.

[0043] After the online job plan request table is updated, it is necessary to determine whether the online job plan request table is successfully updated. When the online job plan request table is updated, a sudden condition may exist, which may cause the online job plan request table to fail to be updated. For example, the sudden condition can be network instability or power failure. Specifically, whether the online job plan request table is successfully updated is determined by determining whether all contents in the target job plan corresponding to the request sequence number are updated into the online job plan request table.

[0044] If yes, that is, it is determined that the online job plan request table is successfully updated, update success information is generated, and the request sequence number and the update success information are recorded, so as to respond to a query request of the online request client. Otherwise, that is, it is determined that the online job plan request table is not successfully updated, update failure information is generated, and the request sequence number and the update failure information are recorded, so as to respond to the query request of the online request client and resend the online batch request in time after it is determined that the update fails.

[0045] By determining whether the online job plan request table is successfully updated, if yes, update success information is generated, and if not, update failure information is generated, the result of updating the online job plan request table is determined in time, so as to respond to a query of the online request client according to the update success information and the update failure information.

[0046] In an optional embodiment, after the request sequence number is fed back to the online request client, further comprising: in response to the online query request of the online request client based on HTTP, querying the processing result of the online batch request corresponding to the request sequence number according to the request sequence number in the online query request, and feeding back the processing result to the online request client.

[0047] The online query request can be a request sent by the online request client based on HTTP to query the processing result of the online batch request, and can be used to query whether the online batch request is added to the online job plan request table. The processing result can be a result of updating the online job plan request table according to the online batch request, and is used to respond to the online query request of the online request client based on HTTP. For example, the processing result can include update success information and update failure information. Specifically, after receiving the online query request, the request sequence number in the online query request is matched in the online job plan request table. If the matching is successful, the update success information of the corresponding online batch request is fed back to the online request client. Otherwise, the update failure information of the corresponding online batch request is fed back to the online request client. For example, the update failure information can be that the processing result is not queried, prompting the user to check whether the request sequence number is correct or to query later.

[0048] It should be noted that the online query request can also query whether the corresponding online batch task in the online batch request is executed, and the corresponding query result is the execution result of the online batch task, which is not limited in the present application.

[0049] By responding to the online query request of the online request client based on HTTP, querying the processing result of the online batch request corresponding to the request sequence number according to the request sequence number in the online query request, and feeding back the processing result to the online request client, the online request client can obtain the processing result of the online batch request in time, so as to re-initiate the online batch request in time when the update fails, so as to ensure that the online batch request can be responded in time and shorten the delay time.

[0050] Embodiment Two

[0051] Figure 2 A flowchart of an online batch request response method provided by Embodiment Two of the present application is provided. The technical solution of the present embodiment is further refined on the basis of the above technical solution.

[0052] Further, the "determining the target job template from the HTTP message in the online batch request in the candidate job templates, and generating the target job plan by using the target job template" is further specified as: "determining the target template number according to the HTTP message in the online batch request; judging whether the target job plan template number is a predefined job plan template in the job scheduling platform according to the target template number; if yes, verifying whether the target job template corresponding to the target template number is an online batch type job plan according to the target template number; if yes, updating the configuration of the online batch job node in the target job template according to the configuration information in the HTTP message, and generating the target job plan", so as to generate the target job plan.

[0053] Before the "determining the target job template from the HTTP message in the online batch request in the candidate job templates, and generating the target job plan by using the target job template", the "creating the target update task according to the request sequence number and the HTTP message in the online batch request; sending the target update task to the waiting queue of the thread pool, and when there is an idle thread in the thread pool, distributing the update task in the waiting queue to the idle thread for processing in the first-in first-out order until the target update task is distributed to the idle processing thread for processing" is added, so as to distribute the target update task to the idle processing thread.

[0054] Referring to Figure 2 The online batch request response method shown in the drawing comprises:

[0055] S210, in response to the online batch request of the online request client based on the hypertext transfer protocol (HTTP), generating a request sequence number of the online batch request, and feeding back the request sequence number to the online request client.

[0056] S220, creating a target update task according to the request sequence number and the HTTP message in the online batch request.

[0057] The target update task can be a task of updating the target job template according to the HTTP message in the online batch request. The target update task and the request sequence number establish a corresponding relationship, which can be understood as identifying the target update task by the request sequence number.

[0058] S230, sending the target update task to the waiting queue of the thread pool, and when there is an idle thread in the thread pool, distributing the update task in the waiting queue to the idle thread for processing in the first-in first-out order until the target update task is distributed to the idle processing thread for processing.

[0059] The thread pool can be a set of threads for processing the target update task. The idle thread can be a thread that is not assigned a task, that is, the idle thread can process the target update task. The waiting queue can be a queue for storing the target update task, for waiting for the assignment of the idle thread.

[0060] The input and output mode of the target update task in the waiting queue is first-in first-out, that is, when the target update task enters or exits the waiting queue, it is stored at the tail of the waiting queue, when there is an idle thread, the target update task at the head of the queue is output, and other target update tasks in the waiting queue are moved one position to the head of the queue.

[0061] By sending the target update task to the waiting queue of the thread pool, when the online batch request is high concurrency, it can be ensured that all online batch requests can be responded, and the risk of task omission caused by resource preemption can be resolved.

[0062] S240, according to the HTTP message in the online batch request, determine the target template number.

[0063] The target template number can be a number determined according to the business type of the online batch processing, used to determine the target template. For example, the business type can be a data scheduling type and a data calculation type, etc., which can be set according to actual needs. The target template number is included in the HTTP message, and the target template number is read out at a predetermined position.

[0064] S250, according to the target template number, determine whether the target template number is a predefined job plan template number in the job scheduling platform.

[0065] The predefined job plan template number can be a job plan template predefined in the job scheduling platform, so as to generate a job plan. The job scheduling platform is used to respond to the online batch request, and according to the subsequent generated online job plan request table, the data required in the process of processing the online task is scheduled. The job scheduling platform has predefined a plurality of job plan templates, and different numbers are assigned. If the target template number is a predefined job plan template number in the job scheduling platform, the target template number can be used to determine the job template; otherwise, an error message can be returned to indicate the user to check the target template number in the sent online batch request.

[0066] S260, if yes, according to the target template number, verify whether the target job template corresponding to the target template number is an online batch type job plan.

[0067] If yes, the target template number is a predefined job plan template number in the job scheduling platform. The online batch type can be a job type, used to determine the job type of the online batch request. The target job template can be a job template corresponding to the target template number. Different target template numbers correspond to different target job templates. The target job template can be set according to actual needs.

[0068] Specifically, the job plan can include online batch type and non-online batch type, and the target template number is used to determine whether the target job template corresponding to the target template number is an online batch type job plan. For example, the number corresponding to the online batch type job plan can be preset in the job scheduling platform. If the target template number is the preset number corresponding to the online batch type job plan, it is determined that the target job template corresponding to the target template number is an online batch type job plan.

[0069] S270, if yes, the configuration information in the HTTP message is used to update the configuration of the corresponding online batch job node in the target job template, and the target job plan is generated.

[0070] The configuration information can be information for configuring specific job content parameters of the target job plan, used to update the configuration of the corresponding online batch job node. For example, the configuration information can include execution parameters. For example, the execution parameters can be at least one of data source, data type and calculation method. The online batch job node can be a configuration unit of an online batch task, which usually includes batch task, processing time, execution parameters and processing rules and other configuration information. The target job template can include multiple job nodes. The HTTP message can be set according to needs to adapt to the changing online batch processing needs, and the configuration information is read according to the configuration rules of the HTTP message in the specified position. According to the configuration information in the HTTP message, the corresponding job node is configured in the target job template, the target job template is updated, and the target job plan is generated.

[0071] S280, update the online job plan request table according to the request sequence number and the target job plan.

[0072] The technical scheme of the embodiment determines the target template number according to the HTTP message in the online batch request; determines whether the target job plan template number is a predefined job plan template in the job scheduling platform according to the target job plan template number; if yes, verifies whether the target job template corresponding to the target template number is an online batch type job plan according to the target template number; if yes, updates the configuration of the online batch job node in the target job template according to the configuration information in the HTTP message, generates the target job plan, and can set the HTTP message according to the configuration requirement to meet different online batch processing tasks and improve the flexibility of online batch processing; creates a target update task according to the request sequence number and the HTTP message in the online batch request; sends the target update task to the waiting queue of the thread pool, and when there is an idle thread in the thread pool, distributes the update task in the waiting queue to the idle thread for processing in the first-in first-out order until the target update task is distributed to the idle processing thread for processing, so that the waiting queue guarantees that the task is not missed.

[0073] Embodiment three

[0074] Figure 3 Fig. 3 shows a structural schematic diagram of an online batch request response device provided by the embodiment three of the application. The embodiment can be applied to the case of responding to a batch scheduling request. The specific structure of the online batch request response device in the batch scheduling platform, for example, a server, is as follows:

[0075] The request sequence number feedback module 310 is configured to generate a request sequence number of the online batch request and feed back the request sequence number to the online request client in response to the online batch request of the online request client based on the HTTP.

[0076] The target job plan generation module 320 is configured to determine a target job template in the candidate job template according to the HTTP message in the online batch request, and generate a target job plan by using the target job template.

[0077] The plan request table update module 330 is configured to update the online job plan request table according to the request sequence number and the target job plan.

[0078] The technical scheme of the embodiment is characterized in that, in response to an online batch request of a client based on a hypertext transfer protocol (HTTP), a request sequence number of the online batch request is generated, and the request sequence number is fed back to the online request client; asynchronous response to the online batch request of the online request client is realized, the timeliness of the response is improved, and the response efficiency is improved; a target job template is determined from candidate job templates according to an HTTP message in the online batch request, and a target job plan is generated by using the target job template; an online job plan request table is updated according to the request sequence number and the target job plan, and the online batch request based on the HTTP does not need to increase additional components, the development cost is reduced, and the message of the HTTP has high development efficiency and is convenient to assemble. Therefore, by using the technical scheme of the application, the problems of complex TCP message assembly, low development efficiency, the need to separately introduce special components, and increased development cost are solved, and the response efficiency of batch processing requests in a request peak period is improved, so that the development efficiency is improved, the development cost is reduced, and the response efficiency of batch processing is improved.

[0079] Optionally, the target job plan generation module 320 comprises:

[0080] The request sequence number feedback unit is configured to determine a target template number according to the HTTP message in the online batch request.

[0081] The target template number matching unit is configured to determine whether the target job plan template number is a predefined job plan template in the job scheduling platform according to the target template number.

[0082] The type inspection unit is configured to inspect whether the target job template corresponding to the target template number is an online batch type job plan according to the target template number if the target template number is a predefined job plan template in the job scheduling platform.

[0083] The target job plan generation unit is configured to update the configuration of the online batch job node in the target job template according to the configuration information in the HTTP message, and generate the target job plan if the target job template corresponding to the target template number is an online batch type job plan.

[0084] Optionally, the online batch request response device further comprises:

[0085] The target update task creation module is configured to create a target update task according to the request sequence number and the HTTP message in the online batch request.

[0086] The target update task allocation module is configured to send the target update task to a waiting queue of a thread pool, and allocate the update task in the waiting queue to an idle thread in the thread pool in a first-in first-out order for processing when there is an idle thread in the thread pool, until the target update task is allocated to the idle processing thread for processing.

[0087] Optionally, the online batch request response device further includes:

[0088] An update result judgment module is used to judge whether the update of the online job plan request table is successful;

[0089] The update result determination module is used to generate update success information if yes, otherwise generate update failure information.

[0090] Optionally, the online batch request response device further includes:

[0091] The query request response module is used to respond to the online query request based on HTTP from the online request client, query the processing results of the online batch request corresponding to the request sequence number according to the request sequence number in the online query request, and feed back the processing results to the online request client.

[0092] The online batch request response device provided in the embodiment of the present application can execute the online batch request response method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects for executing the online batch request response method.

[0093] Example 4

[0094] Figure 4 This is a structural diagram of an electronic device provided in Example 4 of the present application, such as Figure 4 As shown, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the electronic device can be one or more. Figure 4 In the figure, a processor 410 is used as an example; the processor 410, memory 420, input device 430 and output device 440 in the electronic device can be connected via a bus or other means. Figure 4 The bus connection is taken as an example.

[0095] The memory 420, as a computer-readable storage medium, can be used to store software programs, computer executable programs, and modules, such as the program instructions / modules corresponding to the online batch request response method in the embodiments of the present application (e.g., the request sequence number feedback module 310, the target job plan generation module 320, and the plan request table update module 330). The processor 410 executes the software programs, instructions, and modules stored in the memory 420 to execute various functional applications and data processing of the electronic device, thereby implementing the online batch request response method described above.

[0096] The memory 420 can include a program storage area and a data storage area, where the program storage area can store an operating system, application programs required by at least one function, and the like; the data storage area can store data created according to the use of the terminal, and the like. In addition, the memory 420 can include a high-speed random access memory, and can further include a nonvolatile memory such as at least one of a disk storage device, a flash memory device, or other nonvolatile solid-state memory device. In some examples, the memory 420 can further include a memory disposed remotely with respect to the processor 410, which can be connected to the electronic device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0097] The input device 430 can be used to receive input character information, and to generate key signal inputs related to user settings and function controls of the electronic device. The output device 440 can include a display device such as a display screen.

[0098] Embodiment Five

[0099] The embodiment five of the present application further provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used to perform an online batch request response method, the method comprising: in response to an online request client based on a hypertext transfer protocol (HTTP) online batch request, generating a request sequence number of the online batch request, and feeding back the request sequence number to the online request client; determining a target job template in a candidate job template according to an HTTP message in the online batch request, and generating a target job plan using the target job template; and updating an online job plan request table according to the request sequence number and the target job plan.

[0100] Of course, the storage medium containing computer executable instructions provided by the embodiment of the present application is not limited to the method operations as described above, and can also perform related operations in the online batch request response method provided by any embodiment of the present application.

[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disk, and includes a number of instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.

[0102] It is worth noting that in the above embodiments of the search device, each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual differentiation, and do not limit the protection scope of the present application.

[0103] Note that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. An online batch request response method, characterized in that: include: In response to an online batch request from an online request client based on the Hypertext Transfer Protocol (HTTP), generating a request sequence number for the online batch request, and feeding the request sequence number back to the online request client; Determining a target job template from candidate job templates based on the HTTP message in the online batch request, and generating a target job plan using the target job template; updating an online job plan request table according to the request sequence number and the target job plan; Among them, the online job plan request table is a plan request table for all online job requests in a preset time period. The updating of the online job plan request table based on the request sequence number and the target job plan includes: associating the request sequence number with the target job plan, adding the target job plan to the online job plan request table, and updating the online job plan request table.

2. The method according to claim 1, characterized in that The step of determining a target job template from candidate job templates based on the HTTP message in the online batch request, and generating a target job plan using the target job template, includes: Determining a target template number based on the HTTP message in the online batch request; According to the target template number, determining whether the target template number is a predefined job plan template in the job scheduling platform; If yes, then checking whether the target template is an online batch type job plan based on the target template number; If so, the configuration of the corresponding online batch job node in the target job template is updated according to the configuration information in the HTTP message to generate a target job plan.

3. The method according to claim 1, characterized in that The HTTP message in the online batch request includes an operation time, which is used to specify the operation time of the online batch request.

4. The method according to claim 1, wherein Before determining a target job template from candidate job templates based on the HTTP message in the online batch request and generating a target job plan using the target job template, the method further includes: Creating a target update task according to the request sequence number and the HTTP message in the online batch request; The target update task is sent to the waiting queue of the thread pool, and when there is an idle thread in the thread pool, the update tasks in the waiting queue are assigned to the idle threads for processing in a first-in-first-out order until the target update task is assigned to an idle processing thread for processing.

5. The method according to claim 1, wherein After updating the online job plan request table according to the request sequence number and the target job plan, the method further includes: Determining whether the update of the online job plan request table is successful; If yes, an update success message is generated; otherwise, an update failure message is generated.

6. The method according to claim 1, characterized in that After feeding back the request sequence number to the online request client, the method further includes: In response to an online query request based on HTTP from an online request client, the processing result of the online batch request corresponding to the request sequence number is queried according to the request sequence number in the online query request, and the processing result is fed back to the online request client.

7. An online batch request response device, characterized in that: include: a request sequence number feedback module, configured to generate a request sequence number for an online batch request based on the Hypertext Transfer Protocol (HTTP) from an online request client, and feed the request sequence number back to the online request client; a target job plan generating module, configured to determine a target job template from candidate job templates based on the HTTP message in the online batch request, and generate a target job plan using the target job template; A plan request table updating module, configured to update the online operation plan request table according to the request sequence number and the target operation plan; Among them, the online job plan request table is a plan request table for all online job requests in a preset time period, and the plan request table update module is specifically used to: associate the request sequence number with the target job plan, and add the target job plan to the online job plan request table, and update the online job plan request table.

8. The device according to claim 7, characterized in that The plan generation module includes: a target template number determining unit, configured to determine a target template number based on the HTTP message in the online batch request; a target template number matching unit, configured to determine, based on the target template number, whether the target template number is a predefined job plan template in the job scheduling platform; a type checking unit, configured to check, based on the target template number, whether the target job template corresponding to the target template number is an online batch type job plan; The target job plan generating unit is configured to, if yes, update the configuration of the corresponding online batch job node in the target job template according to the configuration information in the HTTP message, and generate a target job plan.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the online batch request response method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the online batch request response method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • A big data task scheduling method and system

    CN109684053A

  • Asynchronous data processing method and device based on big data, equipment and storage medium

    CN111061804A