Request Processing Method, Apparatus, Device, and Medium
By obtaining and managing communication handles, judging the status of work program changes, and assigning transaction requests to appropriate idle processes, the problem of work program changes in the bank core system affecting transaction request processing is solved, and stable and efficient transaction request processing is achieved.
Patent Information
- Application Number
- CN202210568522.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-05-24
AI Technical Summary
In the AS400 banking core system, how to change the working program without affecting the processing of transaction requests, especially in the case of time-consuming program calls, it is difficult to control the time when the transaction stops, and the memory retention design causes the program to be called quickly after the change, which may lead to incorrect request processing results.
By obtaining a pre-save communication handle, the request category of the transaction request is determined, and based on external parameters, determine whether the current worker has changed. If changed, read the idle process number deployed in advance and send the communication handle to the target idle process to process the transaction request and send the processing result.
It realizes that when the work program changes, transaction requests can be processed normally, avoiding errors and pauses caused by program changes in transaction request processing, and ensuring the continuous and stable operation of the bank core system.
Smart Images

Figure CN114896044B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a request processing method, apparatus, device, and medium. Background Art
[0002] Currently, when the AS400 bank core system needs to use the changed program to complete the processing of transaction requests, usually two methods are adopted. The first method: stop processing transaction requests, deploy the changed program online, and then resume receiving new transaction requests and complete the request processing. However, if there is a situation where a time-consuming program call is in progress during a transaction, the time for stopping the transaction cannot be controlled, and it is difficult to find a suitable downtime. The second method: do not stop processing transaction requests and directly change the program. However, when the program to be changed adopts a memory-resident design method, there is a situation where the changed program cannot be quickly called after going online, which may cause errors in the request processing results.
[0003] In summary, how to implement the change of the working program and be able to normally process transaction requests is a problem to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a request processing method, apparatus, device, and medium, which can implement the change of the working program and be able to normally process transaction requests. The specific solutions are as follows:
[0005] In a first aspect, the present application discloses a request processing method, which is applied to a transaction request dispatching tool and includes:
[0006] Obtain a communication handle pre-stored in a first queue, and obtain a transaction request sent by a client based on the communication handle;
[0007] Determine the request category of the transaction request, and determine whether the current working program has been changed based on external parameters;
[0008] If it is determined that the current working program has been changed, read the idle process number of the current working program in a second queue deployed in advance, and determine the target idle process of the current working program based on the request category;
[0009] Send the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle and processes the transaction request, and then sends the processing result to the client.
[0010] Optionally, before obtaining the communication handle pre-stored in the first queue, it further includes:
[0011] Send the communication handle generated based on the obtained transaction request to the first queue through the communication program.
[0012] Optionally, before obtaining the communication handle pre-stored in the first queue, it further includes:
[0013] Use the first preset time window or the first preset traffic interval to determine whether the communication program has been changed;
[0014] When the communication program has been changed, send the communication handle generated based on the historical transaction request to the first queue through the communication program before the change, receive the current transaction request through the communication program after the change, and then send the generated communication handle corresponding to the current transaction request to the first queue.
[0015] Optionally, after determining whether the current working program has been changed based on the external parameter, it further includes:
[0016] If the current working program has not been changed, read the idle process number corresponding to the current working program in the third queue, and determine the target idle process of the current working program based on the request category.
[0017] Optionally, after determining that the current working program has been changed, it further includes:
[0018] Check whether the process corresponding to the working program before the change has processed all historical transaction requests, and send the processing result of the historical transaction request to the client.
[0019] Optionally, determining whether to change the current working program based on the external parameter includes:
[0020] Read the configuration file based on the second preset time window or the second preset traffic interval, so as to determine whether the current working program has been changed based on the keywords in the configuration file.
[0021] Optionally, it further includes:
[0022] Based on the third preset time window or the third preset traffic interval, determine whether the transaction request dispatching tool has been changed;
[0023] If it is changed, stop the transaction request dispatching tool from performing the step of obtaining the communication handle pre-stored in the first queue, and use the changed transaction request dispatching tool to execute the step of obtaining the communication handle pre-stored in the first queue.
[0024] In a second aspect, the present application discloses a request processing device, which is applied to a transaction request dispatching tool and includes:
[0025] A request acquisition module, configured to acquire a communication handle pre-stored in a first queue, and acquire a transaction request sent by a client based on the communication handle;
[0026] A judgment module, configured to determine a request category of the transaction request, and judge whether a current working program has been changed based on an external parameter;
[0027] A process determination module, configured to, if it is determined that the current working program has been changed, read an idle process number of the current working program in a second queue deployed in advance, and determine a target idle process of the current working program based on the request category;
[0028] A handle sending module, configured to send the communication handle to the target idle process, so that the target idle process acquires the transaction request based on the communication handle, processes the transaction request, and then sends a processing result to the client.
[0029] In a third aspect, the present application discloses an electronic device, including:
[0030] A memory, configured to store a computer program;
[0031] A processor, configured to execute the computer program to implement the steps of the request processing method disclosed above.
[0032] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the steps of the request processing method disclosed above are implemented.
[0033] It can be seen that the present application first obtains the communication handle pre - saved in the first queue, and obtains the transaction request sent by the client based on the communication handle; determines the request category of the transaction request, and judges whether the current working program has changed based on external parameters; if it is determined that the current working program has changed, reads the idle process number of the current working program in the pre - deployed second queue, and determines the target idle process of the current working program based on the request category; sends the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle and processes the transaction request, and then sends the processing result to the client. Thus, the present application obtains the transaction request sent by the client, and can judge the queue for obtaining the idle process number by judging whether the current working program has changed; when it is determined that the current working program has changed, reads the idle process number of the current working program in the pre - deployed second queue, so as to realize the invocation of the changed working program; determines the target idle process of the changed working program based on the request category, and can use the working process corresponding to the request category to complete the normal request processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0035] Figure 1 It is a flowchart of a request processing method disclosed in the present application;
[0036] Figure 2 It is a flowchart of a specific request processing method disclosed in the present application;
[0037] Figure 3 It is a flowchart of a specific working program processing method disclosed in the present application;
[0038] Figure 4 It is a flowchart of a specific request processing method disclosed in the present application;
[0039] Figure 5 It is a flowchart of a specific request processing method disclosed in the present application;
[0040] Figure 6 It is a flowchart of a specific request processing method disclosed in the present application;
[0041] Figure 7Structural schematic diagram of a request processing device disclosed in this application;
[0042] Figure 8 Structural diagram of an electronic device disclosed in this application. Specific embodiments
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0044] Currently, when the bank core system needs to use the changed program to complete the processing of transaction requests, usually two methods are adopted. The first method: stop processing transaction requests, deploy and go live with the changed program, and then resume receiving requests for new transactions and complete the request processing. However, if there is a situation where a time-consuming program call is in progress during a transaction, the stop time of the transaction cannot be controlled, and it is very difficult to find a suitable downtime; the second method: do not stop processing transaction requests and directly change the program. However, when the program to be changed adopts a memory-resident design method, there is a situation where the changed program cannot be quickly called after going live, which may cause errors in the request processing results.
[0045] Therefore, this application correspondingly provides a request processing solution, which can realize the change of the working program and can normally process transaction requests.
[0046] See Figure 1 As shown, the embodiment of the present invention discloses a request processing method, which is applied to a transaction request dispatching tool and includes:
[0047] Step S11: Obtain the communication handle pre-saved in the first queue, and obtain the transaction request sent by the client based on the communication handle.
[0048] In this embodiment, it can be understood that before the transaction request dispatching tool obtains the communication handle pre-saved in the first queue, it also includes that the communication program obtains the current transaction request sent by the client through the target IP address and target port, generates a corresponding communication handle based on the current transaction request, and then sends the communication handle to the first queue. The transaction request dispatching tool obtains the communication handle pre-saved in the first queue and establishes a socket connection with the client based on the communication handle, so that it can obtain the transaction request in the form of a message sent by the client and split the transaction request in the form of a message for subsequent determination of the type of the transaction request.
[0049] Step S12: Determine the request category of the transaction request, and determine whether the current working procedure has been changed based on external parameters.
[0050] In this embodiment, determining whether the current working procedure is changed based on external parameters specifically includes: reading a configuration file based on a second preset time window or a second preset traffic interval, so as to determine whether the current working procedure has been changed based on keywords in the configuration file. It can be understood that the second preset time window can be set according to the time of the transaction request. For example, the period from 23:00 to 24:00 every day is the period with the lowest transaction request volume. Therefore, after changing the working procedure during this period, the negative impact on request processing can be reduced; the second preset traffic interval can set the traffic interval according to the daily transaction request volume. For example, if the daily transaction request volume is 30 million times, then it can be determined whether the current working procedure has been changed every 10 million times. It can be understood that the present application can implement program changes through keywords in the configuration file, so the change process of the bank core system can be simplified.
[0051] In this embodiment, after determining whether the current working procedure has been changed based on external parameters, it further includes: if the current working procedure has not been changed, read the idle process number corresponding to the current working procedure in the third queue, and determine the target idle process of the current working procedure based on the request category. For example Figure 2 As shown, if the current working procedure has not been changed, read the idle process number corresponding to the current working procedure in queue B, so that the idle process in the current working procedure can process the transaction request.
[0052] Step S13: If it is determined that the current working procedure has been changed, read the idle process number of the current working procedure in the pre-deployed second queue, and determine the target idle process of the current working procedure based on the request category.
[0053] In this embodiment, after determining that the current working program has been changed, the method further includes: checking whether the process corresponding to the working program before the change has processed all historical transaction requests, and sending the processing result of the historical transaction requests to the client. For example, if the current working program has been changed, the idle process number corresponding to the current working program is read from queue C, so as to use the idle process corresponding to the idle process number in queue C to process the current transaction request, and the process corresponding to the working program before the change processes all historical transaction requests, so that the historical transaction requests can be processed normally. Therefore, when the working program before the change executes time-consuming transaction requests, such as branch account query and online batch transaction, no abnormal situation will occur due to the change of the working program. It can be understood that after the historical transaction requests are processed normally, the idle process number corresponding to the working program before the change is sent to the third queue, and the process that has processed the historical transaction requests is asynchronously ended through the process termination operation. Therefore, when all historical transaction requests are processed normally, the processes corresponding to the working program before the change are all terminated. It should be noted that an online deployment record output file can be set, such as the / tmp / update_2022_01_22.txt file, to record the processing time, processing content and processing result of the entire request processing process. If an exception occurs during the request processing process, the detailed process of the error, the code program and code line where the error is executed are recorded, and an error code is returned to analyze the root cause of the error. In this embodiment, a change management record can also be maintained to record all program change processes and transaction processing processes. For example, if a program exception occurs during the operation process or the processing result does not meet the expectation, the effective specific upgrade change process can be found by checking the change history record, and the problem can be corrected in time.
[0054] Step S14: Send the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle, processes the transaction request, and then sends the processing result to the client.
[0055] In this embodiment, the working program is used to process all transaction requests. Since the working process is behind the communication program and the transaction request dispatching tool, the working program needs to receive the communication handle from the transaction request dispatching tool to receive the transaction request in the form of a message sent by the client. For example Figure 3The shown working procedure processing flowchart. If the transaction request to be processed by the working procedure is for realizing account change, then the target idle process is called to conduct transaction processing and update the background data, and the request processing result is returned to the client in the form of a message. The working procedure is the most important part of the entire transaction structure and is responsible for completing all calculations and data processing of the transaction request. Therefore, the working procedure before the change is pre-backed up or copied to the backup library or backup directory, and the current working procedure is deployed in advance to the specified location to replace the previous working procedure.
[0056] It can be understood that when the target idle process obtains the transaction request based on the communication handle and processes the transaction request, the target idle process is in the working state. After the target idle process finishes sending the processing result to the client, the target idle process is in the idle state. Therefore, the idle process number of the target idle process in the idle state is sent to the second queue, so that the transaction request dispatching tool can read the idle process number of the current working procedure from the second queue.
[0057] It can be seen that this application first obtains the communication handle pre-saved in the first queue, and obtains the transaction request sent by the client based on the communication handle; determines the request category of the transaction request, and judges whether the current working procedure has been changed based on the external parameters; if it is determined that the current working procedure has been changed, then reads the idle process number of the current working procedure in the second queue deployed in advance, and determines the target idle process of the current working procedure based on the request category; sends the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle and processes the transaction request, and then sends the processing result to the client. Thus, it can be seen that this application obtains the transaction request sent by the client, and can judge the queue for obtaining the idle process number by judging whether the current working procedure has been changed; when it is determined that the current working procedure has been changed, then reads the idle process number of the current working procedure in the second queue deployed in advance, so as to realize the call of the changed working procedure; determines the target idle process of the changed working procedure based on the request category, and can use the working process corresponding to the request category to complete the normal request processing.
[0058] See Figure 4 As shown, the embodiment of the present invention discloses a specific request processing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:
[0059] Step S21: Send the communication handle generated based on the obtained transaction request to the first queue through the communication program, and obtain the communication handle in the first queue, so as to obtain the transaction request sent by the client based on the communication handle.
[0060] In this embodiment, the communication program sends the communication handle generated based on the obtained transaction request to the first queue. For example, in the design process of the Socket server program, after the basic settings of the socket are completed, it waits for the transaction request sent by the socket client program at the target IP (Internet Protocol) address and the target port; after receiving the transaction request, it generates a communication handle (socket descriptor) and sends the communication handle to the first queue, thereby completing the establishment process of a communication session and returning to continue waiting for the transaction request of the next socket client.
[0061] In this embodiment, before obtaining the communication handle pre-saved in the first queue, it further includes: judging whether the communication program has been changed by using the first preset time window or the first preset communication volume interval; when the communication program has been changed, send the communication handle generated based on the historical transaction request to the first queue through the communication program before the change, and receive the current transaction request through the communication program after the change, and then send the generated communication handle corresponding to the current transaction request to the first queue. It can be understood that the online deployment platform creates 1 to N first preset time windows based on the time of the transaction request. For example, at 24:00 every day, the external parameters of the communication program are read and it is determined that the number of change time windows created by the online deployment platform is two, and the specific times of the two change time windows are 23:00 and 1:30 respectively. Therefore, the communication program is changed at 23:00 and 1:30; create the first preset communication volume interval based on the number of transaction requests. For example, if the number of daily transaction requests is 30 million times, then create the first preset communication volume interval with an interval of 10 million times, that is, when every 10 million times of transaction requests are processed, judge whether the communication program has been changed. If the communication program has been changed, terminate the communication program before the change from receiving the current transaction request. After the communication program before the change completes the task of generating communication handles based on all historical transaction requests, exit the communication program before the change. It should be noted that before it is determined that the current communication program has been changed, the communication program after the change is put online in advance, so that it can be determined that the current communication program is the communication program after the change, that is, it is determined that the current communication program has been changed.
[0062] Step S22: Determine the request category of the transaction request, and determine whether the current working procedure has been changed based on external parameters.
[0063] Step S23: If it is determined that the current working procedure has been changed, read the idle process number of the current working procedure in the second queue deployed in advance, and determine the target idle process of the current working procedure based on the request category.
[0064] Step S24: Send the communication handle to the target idle process, so that the target idle process can obtain the transaction request based on the communication handle, process the transaction request, and then send the processing result to the client.
[0065] Among them, for the more specific working processes of the above steps S22, S23, and S24, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.
[0066] Thus, the communication program after the change is launched in advance in this application to ensure the stability of program operation; if it is determined that the current communication program has been changed, the communication program before the change needs to complete the historical transaction requests and no longer receive the current transaction requests, and the current communication program receives the current transaction requests, ensuring that both the historical transaction requests and the current transaction requests can be processed normally, ensuring the continuous operation of transaction processing, and thus providing strong support for the continuous and stable operation of the bank core system.
[0067] See Figure 5 As shown, an embodiment of the present invention discloses a specific request processing method, including:
[0068] Step S31: Obtain the communication handle pre-saved in the first queue, and obtain the transaction request sent by the client based on the communication handle.
[0069] In this embodiment, it further includes: determining whether the transaction request dispatching tool has been changed based on a third preset time window or a third preset communication volume interval; if it has been changed, stopping the transaction request dispatching tool from performing the step of obtaining the communication handle pre-saved in the first queue, and using the changed transaction request dispatching tool to execute the step of obtaining the communication handle pre-saved in the first queue. It can be understood that the online deployment platform determines whether the transaction request dispatching tool needs to be changed. If so, the changed transaction request dispatching tool is deployed online. The online deployment platform sets 1 to N third preset time windows, which can be set at times when the number of transaction requests is small. For example, at 24:00 every day, external parameters are read to determine the number and time of the transaction request dispatching tool adjustment windows. If there are two transaction request dispatching tool adjustment windows at 23:30 and 2:00 respectively, the current transaction request dispatching tool is launched at 23:30 and 2:00 respectively, and the current transaction request dispatching tool completes the step of obtaining the communication handle pre-saved in the first queue and obtaining the transaction requests sent by the client based on the communication handle. The transaction request dispatching tool before the change no longer performs the step of obtaining the communication handle pre-saved in the first queue and only needs to complete the processing of the historical communication handle to ensure the continuous and stable operation of the program.
[0070] Step S32: Determine the request category of the transaction request, and determine whether the current working program has been changed based on external parameters.
[0071] Step S33: If it is determined that the current working program has been changed, determine whether the association status between the current working program and the transaction request dispatching tool meets a preset condition.
[0072] It can be understood that in this embodiment, the current working program is the changed working program. Therefore, it is necessary to determine whether the association status between the current working program and the transaction request dispatching tool meets a preset condition, that is, whether the current working program is connected to the transaction request dispatching tool and can normally process transaction requests.
[0073] Step S34: If the association status meets the preset condition, read the idle process number of the current working program in the pre-deployed second queue, and determine the target idle process of the current working program based on the request category.
[0074] In this embodiment, as Figure 6As shown, if the current working program has established a connection with the transaction request dispatching tool and can process transaction requests normally, read the idle process numbers of the current working program in the second queue deployed in advance, and terminate reading the idle process numbers of the working program before the change in the third queue, so that the processes in the working program before the change no longer process the current transaction request, and only need to complete the processing of historical transaction requests.
[0075] Step S35: Send the communication handle to the target idle process, so that the target idle process can obtain the transaction request based on the communication handle and process the transaction request, and then send the processing result to the client.
[0076] It can be seen that through judging whether the association status between the current working program and the transaction request dispatching tool meets the preset conditions, the present application realizes the online change of each program in the bank core system, which can not only ensure the correctness and stability of program operation, ensure that the changed program is normally called, but also ensure the continuous operation of existing transactions. The bank core usually consists of thousands of programs and auxiliary objects, and the change of these programs and objects itself is a complex process. The present application designs a practical online deployment mechanism for the program code at different levels of the core program, and can online maintain each functional module and program code of the core system.
[0077] See Figure 7 As shown, an embodiment of the present invention discloses a request processing device, which is applied to a transaction request dispatching tool and includes:
[0078] A request acquisition module 11, configured to acquire a communication handle pre-saved in a first queue, and acquire a transaction request sent by a client based on the communication handle;
[0079] A judgment module 12, configured to determine the request category of the transaction request, and judge whether the current working program has been changed based on external parameters;
[0080] A process determination module 13, configured to, if it is determined that the current working program has been changed, read the idle process numbers of the current working program in the second queue deployed in advance, and determine the target idle process of the current working program based on the request category;
[0081] A handle sending module 14, configured to send the communication handle to the target idle process, so that the target idle process can obtain the transaction request based on the communication handle and process the transaction request, and then send the processing result to the client.
[0082] It can be seen that this application first obtains the communication handle pre - saved in the first queue, and obtains the transaction request sent by the client based on the communication handle; determines the request category of the transaction request, and judges whether the current working program has been changed based on external parameters; if it is determined that the current working program has been changed, reads the idle process number of the current working program in the pre - deployed second queue, and determines the target idle process of the current working program based on the request category; sends the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle and processes the transaction request, and then sends the processing result to the client. Thus, this application obtains the transaction request sent by the client, and can judge the queue for obtaining the idle process number by judging whether the current working program has been changed; when it is determined that the current working program has been changed, reads the idle process number of the current working program in the pre - deployed second queue, so as to realize the call of the changed working program; determines the target idle process of the changed working program based on the request category, and can complete the normal request processing by using the working process corresponding to the request category.
[0083] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the request processing method executed by the computer device disclosed in any of the foregoing embodiments.
[0084] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the computer device 20; the communication interface 24 can create a data transmission channel between the computer device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is imposed here.
[0085] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for the rendering and drawing of the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0086] In addition, the memory 22, as a carrier for resource storage, may be a read-only memory, a random access memory, a disk, or an optical disc, etc. The resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage method may be temporary storage or permanent storage.
[0087] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the computer device 20 to enable the processor 21 to perform operations and processing on the massive data 223 in the memory 22. It may be Windows, Unix, Linux, etc. In addition to the computer program that can be used to complete the request processing method executed by the computer device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by external devices received by the computer device, but also the data collected by its own input / output interface 25, etc.
[0088] Furthermore, the embodiment of the present application also discloses a storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps executed in the request processing process disclosed in any of the foregoing embodiments are implemented.
[0089] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0090] The above has introduced in detail a request processing method, apparatus, device and medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A request processing method, characterized in that, Applied to a transaction request dispatching tool, including: Obtain the communication handle pre - saved in the first queue, and obtain the transaction request sent by the client based on the communication handle; Determine the request category of the transaction request, and judge whether the current working procedure has changed based on external parameters; If it is determined that the current working procedure has changed, read the idle process number of the current working procedure in the second queue deployed in advance, and determine the target idle process of the current working procedure based on the request category; Send the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle and processes the transaction request, and then sends the processing result to the client.
2. The request processing method according to claim 1, wherein Before obtaining the communication handle pre - saved in the first queue, it further includes: Send the communication handle generated based on the obtained transaction request to the first queue through the communication program.
3. The request processing method according to claim 2, characterized in that Before obtaining the communication handle pre - saved in the first queue, it further includes: Judge whether the communication program has changed by using the first preset time window or the first preset communication volume interval; When the communication program has changed, send the communication handle generated based on the historical transaction request to the first queue through the communication program before the change, receive the current transaction request through the communication program after the change, and then send the generated communication handle corresponding to the current transaction request to the first queue.
4. The request processing method according to claim 1, characterized in that, After judging whether the current working procedure has changed based on external parameters, it further includes: If the current working procedure has not changed, read the idle process number corresponding to the current working procedure in the third queue, and determine the target idle process of the current working procedure based on the request category.
5. The request processing method according to claim 1, characterized in that, After it is determined that the current working procedure has changed, it further includes: Check whether the process corresponding to the working procedure before the change has processed all historical transaction requests, and send the processing result of the historical transaction request to the client.
6. The request processing method according to claim 1, characterized in that, Judging whether to change the current working procedure based on external parameters includes: Read the configuration file based on the second preset time window or the second preset communication volume interval, so as to judge whether the current working procedure has changed based on the keywords in the configuration file.
7. The request processing method according to any one of claims 1 to 6, characterized in that, It further includes: Judge whether the transaction request dispatching tool has changed based on the third preset time window or the third preset communication volume interval; If there is a change, stop the transaction request dispatching tool from performing the step of obtaining the communication handle pre - saved in the first queue, and use the changed transaction request dispatching tool to execute the step of obtaining the communication handle pre - saved in the first queue.
8. A request processing device, characterized in that, Applied to a transaction request dispatching tool, including: A request acquisition module, used to obtain the communication handle pre - saved in the first queue, and obtain the transaction request sent by the client based on the communication handle; A judgment module, used to determine the request category of the transaction request, and judge whether the current working procedure has changed based on external parameters; A process determination module, configured to, if it is determined that the current working program has changed, read the idle process number of the current working program in a pre-deployed second queue, and determine a target idle process of the current working program based on the request category; A handle sending module, configured to send the communication handle to the target idle process, so that the target idle process obtains the transaction request based on the communication handle, processes the transaction request, and then sends a processing result to the client.
9. An electronic device, characterized in that, Comprising: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the steps of the request processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, the steps of the request processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for processing video processing tasks by aid of multi-core processing chip and system using method
CN102609306A
Data processing method and device, electronic equipment and storage medium
CN112698962A