Business instruction response method and device, equipment and storage medium

By combining preliminary verification, formatting, type recognition, and logical processing models for business instructions, the problem of low response efficiency in existing technologies is solved, achieving efficient business instruction response and improved user experience.

CN121541927APending Publication Date: 2026-02-17HANGZHOU DBAPPSECURITY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511794198.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies suffer from low response efficiency when processing business instructions because the rule engine lacks the ability to handle complex logic, cannot efficiently filter multiple types of instructions, and lacks persistence and timeout resending mechanisms.

Method used

After initial verification and formatting of the original business instructions, type identification and routing decisions are performed using a pre-set persistent storage device and rule matching model. Combined with a logical processing model and retransmission mechanism, the successful transmission of response content is ensured.

Benefits of technology

It improved the efficiency of business command response, enhanced the user experience, ensured a resend mechanism in case of timeout, and strengthened the reliability and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541927A_ABST
    Figure CN121541927A_ABST
Patent Text Reader

Abstract

The invention discloses a service instruction response method and device, equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps: carrying out the preliminary verification of an original service instruction, carrying out the formatting processing after the verification is passed, generating a to-be-processed service instruction, writing the to-be-processed service instruction into a preset persistent storage device, and marking the state of the to-be-processed service instruction as received; writing the instruction into a preset message queue, performing type identification and routing decision by using a rule matching model, and determining a processing result containing a processing path and parameter information; writing the processing result into a persistent storage device and a logic processing queue, and processing through a logic processing model to generate response content; and updating the instruction state to be processing completion, issuing the content to a user interface through a response sending device, monitoring whether the content is successfully sent within a preset time, if so, updating the state to be response success, otherwise, obtaining the content from the persistent storage through a retransmission mechanism, and sending the content again. The efficiency of responding to the service instruction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for responding to business instructions. Background Technology

[0002] Currently, with the widespread adoption of distributed systems and microservice architectures, various business systems frequently need to receive and process external commands. These commands may originate from user operations, third-party system calls, or scheduled task triggers. Traditional command processing systems often employ a single processing model, such as simple rule matching or fixed logic processing, which suffers from the following problems:

[0003] 1. While rule engines are flexible, they lack the ability to handle complex logic.

[0004] 2. Although the logic processing model is powerful, it cannot efficiently handle the initial screening of multiple types of instructions;

[0005] 3. Without persistence and timeout retransmission mechanisms, instructions may still be lost;

[0006] 4. Lacks a mechanism to guarantee a response even after a timeout.

[0007] As can be seen from the above, how to improve the efficiency of responding to business instructions is an urgent problem to be solved. Summary of the Invention

[0008] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for responding to business instructions, which can improve the efficiency of responding to business instructions during the response process. The specific solution is as follows:

[0009] Firstly, this application provides a method for responding to a business instruction, including:

[0010] The original business instruction is initially verified, and after the verification is passed, the original business instruction is formatted to obtain the business instruction to be processed. Then, the business instruction to be processed is written to a preset persistent storage device, and the status of the business instruction to be processed is marked as received in the preset persistent storage device.

[0011] The pending business instructions are written into a preset message queue to obtain a pending queue. A preset rule matching model is used to identify the type and make routing decisions for the pending business instructions in the pending queue to obtain a processing result corresponding to the pending business instructions, including processing path and parameter information.

[0012] The processing result is written to the preset persistent storage device and the preset logical processing queue. Then, the processing result in the preset logical processing queue is obtained using the preset logical processing model. Based on the instruction type corresponding to the processing result, the corresponding processing sub-model is called to process it and obtain the response content. The preset logical processing model includes a general processing sub-model and an instruction type-specific processing sub-model.

[0013] The instruction status corresponding to the processing result is updated to "processing completed", and the response content is sent to the current user interface through a preset response sending device. Then, it is monitored whether the response content is successfully sent within a preset time interval. If successful, the instruction status corresponding to the pending business instruction is updated to "response successful". If unsuccessful, the corresponding response content is retrieved from the preset persistent storage device using a preset resend mechanism and the sending is attempted again.

[0014] Optionally, the step of using a preset rule matching model to perform type identification and routing decisions on the pending business instructions in the pending queue to obtain a processing result corresponding to the pending business instruction, including processing path and parameter information, includes:

[0015] The system retrieves pending business instructions from the pending queue, determines the metadata and content features corresponding to the pending business instructions, and then uses the preset rule engine in the preset rule matching model to perform type matching operations on the pending business instructions to obtain type matching results; the type matching results include order processing type, user authentication type, and data query type.

[0016] Based on the type matching result, the routing direction of the service instruction to be processed is determined, and the processing path corresponding to the service instruction to be processed is determined based on the routing direction. Then, the preset rule matching model is used to generate parameter information including processing priority indicators, resource allocation requirements and timeout thresholds based on the service instruction to be processed, so as to determine the processing result based on the processing path and the parameter information.

[0017] Optionally, the step of writing the processing result to the preset persistent storage device and the preset logical processing queue, and then using the preset logical processing model to obtain the processing result in the preset logical processing queue, includes:

[0018] The processing result, including the processing path and the parameter information, is written to the preset persistent storage device and the preset logical processing queue, respectively. Then, the processing result in the preset logical processing queue is obtained using the preset logical processing model and based on user requirements.

[0019] The preset logic processing model includes a general processing sub-model and several dedicated processing sub-models. The general processing sub-model is used to execute the basic processing logic common to all instructions, including data verification processing logic and log recording logic. The dedicated processing sub-models are models designed based on specific instruction types, including an order processing sub-model, a user authentication sub-model, and a data query sub-model. The order processing sub-model is used to perform order creation and update operations. The user authentication sub-model is used to perform identity verification and permission checks. The data query sub-model is used to perform database queries and result formatting.

[0020] Optionally, after writing the processing result to the preset persistent storage device and the preset logical processing queue, the method further includes:

[0021] The waiting time of the processing result is monitored by the timeout monitoring mechanism in the preset logical processing queue to obtain the real-time monitoring time, and it is determined whether the real-time monitoring time is greater than the preset time threshold. If the real-time monitoring time is greater than the preset time threshold, the preset logical processing queue is invoked to re-queue the processing result.

[0022] Alternatively, a preset instruction processing unit may be invoked to retry the processing result, and the retry result may be retransmitted to the preset logic processing queue.

[0023] Optionally, the step of calling the corresponding processing sub-model based on the instruction type corresponding to the processing result to obtain the response content includes:

[0024] Determine the instruction type corresponding to the processing result, and use the preset logic processing model to determine and activate the corresponding processing sub-model based on the processing result and the instruction type, so as to process the processing result using the processing sub-model and obtain the corresponding response content;

[0025] The processing state corresponding to the processing result is tracked using the preset logical processing model, and the processing state is stored in the preset persistent storage device; the processing state includes the start processing state, the processing state, the processing completed state, and the processing failed state.

[0026] Optionally, updating the instruction status corresponding to the processing result to "processing completed" and sending the response content to the current user interface via a preset response sending device, then monitoring whether the response content was successfully sent within a preset time interval; if successful, updating the instruction status corresponding to the pending business instruction to "response successful"; if unsuccessful, retrieving the corresponding response content from the preset persistent storage device using a preset retransmission mechanism and attempting to send it again, includes:

[0027] When the processing result is detected to be completed, the instruction status corresponding to the processing result is updated to the processing completion status, and the processing completion status and the response content are stored in the preset persistent storage device;

[0028] The corresponding content is determined from the preset persistent storage device by the preset response sending device, and the response content is sent to the current user interface. Then, it is monitored whether the response content is successfully sent within the preset time interval. If the response content is successfully sent within the preset time interval, the instruction status corresponding to the pending business instruction is updated to response success.

[0029] If the response content fails to be sent within the preset time interval, the corresponding response content is retrieved from the preset persistent storage device using a preset retransmission mechanism, and the response content is sent again until it is successfully sent.

[0030] Secondly, this application provides a response device for a business instruction, comprising:

[0031] The instruction formatting processing module is used to perform preliminary verification on the original business instruction, and after the verification is passed, to format the original business instruction to obtain the business instruction to be processed. Then, the business instruction to be processed is written to a preset persistent storage device, and the status of the business instruction to be processed is marked as received in the preset persistent storage device.

[0032] The processing result determination module is used to write the business instruction to be processed into a preset message queue to obtain a processing queue, and use a preset rule matching model to perform type identification and routing decision on the business instruction to be processed in the processing queue to obtain a processing result corresponding to the business instruction to be processed, including processing path and parameter information.

[0033] The response content generation module is used to write the processing result to the preset persistent storage device and the preset logical processing queue, then use the preset logical processing model to obtain the processing result in the preset logical processing queue, and call the corresponding processing sub-model based on the instruction type corresponding to the processing result to process and obtain the response content; the preset logical processing model includes a general processing sub-model and an instruction type-specific processing sub-model.

[0034] The response content delivery module is used to update the instruction status corresponding to the processing result to "processing completed", and deliver the response content to the current user interface through a preset response sending device. Then, it monitors whether the response content is successfully delivered within a preset time interval. If successful, the instruction status corresponding to the pending business instruction is updated to "response successful". If unsuccessful, the corresponding response content is retrieved from the preset persistent storage device using a preset resend mechanism and the module attempts to send it again.

[0035] Optionally, the instruction formatting processing module includes:

[0036] The type matching result determination unit is used to obtain the business instructions to be processed from the queue to be processed, determine the metadata and content features corresponding to the business instructions to be processed, and then use the preset rule engine in the preset rule matching model to perform type matching operation on the business instructions to be processed to obtain the type matching result; the type matching result includes order processing type, user authentication type and data query type;

[0037] The parameter information generation unit is used to determine the routing direction of the service instruction to be processed based on the type matching result, and to determine the processing path corresponding to the service instruction to be processed based on the routing direction. Then, it uses the preset rule matching model and the service instruction to be processed to generate parameter information including processing priority indicators, resource allocation requirements and timeout thresholds, so as to determine the processing result based on the processing path and the parameter information.

[0038] Thirdly, this application provides an electronic device, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor for executing the computer program to implement the aforementioned response method for business instructions.

[0041] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned response method for business instructions.

[0042] As can be seen from the above, before responding to a business instruction, this application needs to perform a preliminary verification of the original business instruction, and after the verification is passed, format the original business instruction to obtain the business instruction to be processed. Then, the business instruction to be processed is written to a preset persistent storage device, and the status of the business instruction to be processed is marked as received in the preset persistent storage device. The business instruction to be processed is written to a preset message queue to obtain a processing queue, and a preset rule matching model is used to perform type identification and routing decision on the business instructions to be processed in the processing queue to obtain a processing result corresponding to the business instruction to be processed, including processing path and parameter information. The processing result is written to the preset persistent storage device and the preset logical... The system processes the data in the pre-defined logical processing queue, then uses a pre-defined logical processing model to obtain the processing results from the queue. Based on the instruction type corresponding to the processing result, it calls the corresponding processing sub-model for processing to obtain the response content. The pre-defined logical processing model includes a general processing sub-model and an instruction type-specific processing sub-model. The system updates the status of the instruction corresponding to the processing result to "processing completed" and sends the response content to the current user interface through a pre-defined response sending device. It then monitors whether the response content is successfully sent within a pre-defined time interval. If successful, the status of the instruction corresponding to the pending business instruction is updated to "response successful". If unsuccessful, the system uses a pre-defined retransmission mechanism to retrieve the corresponding response content from the pre-defined persistent storage device and attempts to send it again.

[0043] Therefore, this application first needs to perform preliminary verification on the original business instructions, and after the verification is passed, format the original business instructions to obtain the business instructions to be processed. Then, the business instructions to be processed are written to a preset persistent storage device, and the status of the business instructions to be processed is marked as received in the preset persistent storage device. Second, the business instructions to be processed are written to a preset message queue to obtain a processing queue, and a preset rule matching model is used to perform type identification and routing decisions on the business instructions to be processed in the processing queue to obtain the processing result corresponding to the business instructions to be processed, including processing path and parameter information. Then, the processing result is written to a preset... The system uses a persistent storage device and a preset logical processing queue. It then retrieves the processing results from the queue using a preset logical processing model, and calls the corresponding processing sub-model based on the instruction type of the result to process it and obtain the response content. Finally, it updates the instruction status corresponding to the processing result to "processing complete" and sends the response content to the current user interface via a preset response sending device. It then monitors whether the response content was successfully sent within a preset time interval. If successful, the instruction status corresponding to the pending business instruction is updated to "response successful." If unsuccessful, a preset resend mechanism retrieves the corresponding response content from the preset persistent storage device and attempts to send it again. This improves the efficiency of responding to business instructions, thereby enhancing the user experience. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0045] Figure 1 This is a flowchart of a business instruction response method disclosed in this application;

[0046] Figure 2 This is a schematic diagram of the structure of a business instruction response device disclosed in this application;

[0047] Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] Currently, with the widespread adoption of distributed systems and microservice architectures, various business systems frequently need to receive and process external instructions. These instructions may originate from user operations, third-party system calls, or scheduled task triggers. Traditional instruction processing systems often employ a single processing model, such as simple rule matching or fixed logic processing, which suffers from the following problems: 1. While the rule engine is flexible, it lacks the ability to handle complex logic; 2. While the logic processing model is powerful, it cannot efficiently handle the initial screening of multiple types of instructions; 3. Without persistence and timeout resending mechanisms, instructions may still be lost; 4. There is a lack of mechanisms to guarantee a response even after a timeout. Therefore, this application provides a business instruction response method that can improve the efficiency of responding to business instructions during the response process.

[0050] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for responding to a business instruction, including:

[0051] Step S11: Perform preliminary verification on the original business instruction, and after the verification is passed, format the original business instruction to obtain the business instruction to be processed. Then, write the business instruction to be processed to a preset persistent storage device, and mark the status of the business instruction to be processed as received in the preset persistent storage device.

[0052] In this embodiment, the original business instructions undergo multi-dimensional preliminary verification, including instruction format compliance verification, business permission validity verification, and input parameter legality verification. After successful verification, the original business instructions are standardized and formatted according to a preset structured template to generate business instructions to be processed with a unified data structure. Subsequently, the formatted business instructions to be processed are persistently stored in a persistent storage device composed of a distributed database cluster, and the instruction status metadata is synchronously updated during storage through transactional operations. The status of the business instructions to be processed is marked as "received," and the receiving timestamp and initial context information are recorded. It is worth mentioning that the above process ensures that the integrity of the business instructions can be protected through status tracing in the event of system anomalies, and establishes a reliable data foundation for subsequent asynchronous processing.

[0053] Step S12: Write the pending business instruction into a preset message queue to obtain a pending queue, and use a preset rule matching model to perform type identification and routing decision on the pending business instructions in the pending queue to obtain a processing result corresponding to the pending business instruction, including processing path and parameter information.

[0054] In this embodiment, the pending business instructions are first asynchronously written to a preset message queue based on a distributed architecture, forming an ordered pending queue. New instructions in the queue are captured through a real-time monitoring mechanism, and a preset rule matching model is invoked for multi-dimensional analysis. The rule matching model integrates a natural language processing module and a business rule engine, capable of parsing the semantic features of instructions and matching historical behavior patterns to achieve accurate type identification and dynamic routing decisions. Subsequently, based on the identified instruction type and load characteristics, a complete processing result is generated, including a standardized processing path, priority parameters, resource allocation strategies, and dependent components. The processing path explicitly specifies the workflow nodes for subsequent processing stages, and the parameter information covers key metadata such as timeout control configuration, retry strategies, and data conversion rules. It is worth noting that the above processing result will serve as the basis for the execution of all subsequent processing stages, ensuring that the system can automatically adapt to the optimal processing link according to business characteristics, while providing structured data support for the observability of the processing process.

[0055] Specifically, a preset rule matching model is used to identify the type and make routing decisions for pending business instructions in the processing queue, obtaining a processing result corresponding to the pending business instruction, including processing path and parameter information. This can include: retrieving the pending business instruction from the processing queue and determining the metadata and content features corresponding to the pending business instruction; then using the preset rule engine in the preset rule matching model to perform type matching operations on the pending business instruction to obtain type matching results; the type matching results include order processing type, user authentication type, and data query type; determining the routing direction of the pending business instruction based on the type matching results, and determining the processing path corresponding to the pending business instruction based on the routing direction; then using the preset rule matching model and based on the pending business instruction to generate parameter information including processing priority indicators, resource allocation requirements, and timeout thresholds, so as to determine the processing result based on the processing path and parameter information.

[0056] Step S13: Write the processing result to the preset persistent storage device and the preset logical processing queue, then use the preset logical processing model to obtain the processing result in the preset logical processing queue, and call the corresponding processing sub-model to process based on the instruction type corresponding to the processing result to obtain the response content; the preset logical processing model includes a general processing sub-model and an instruction type-specific processing sub-model.

[0057] In this embodiment, the processing results need to be synchronously written to the instruction trace table and the preset logical processing queue in the preset persistent storage device. The persistent storage adopts a dual-write mechanism to ensure data consistency, and the logical processing queue is partitioned according to priority to achieve differentiated scheduling. The preset logical processing model is triggered by an event-driven mechanism to actively obtain the processing results in the logical processing queue. Subsequently, the preset logical processing model can dynamically call the corresponding processing sub-model to execute specific business logic according to the instruction type metadata encapsulated in the processing results: for general query instructions, the general processing sub-model is called to perform standardized data retrieval; for complex transaction instructions, the corresponding special processing sub-model is called to perform domain-specific operations. Each processing sub-model obtains the required service resources through dependency injection, generates structured logs in real time during execution and updates the execution status, and finally generates response content that conforms to the front-end specification by aggregating the output data of each sub-model. The response content includes complete response elements such as business data entities, status codes and user prompts.

[0058] Specifically, the processing results are written to a preset persistent storage device and a preset logical processing queue. Then, the processing results in the preset logical processing queue are retrieved using a preset logical processing model. This can include: writing the processing results, including processing path and parameter information, to the preset persistent storage device and the preset logical processing queue respectively; then retrieving the processing results in the preset logical processing queue using the preset logical processing model and based on user requirements. The preset logical processing model includes a general processing sub-model and several dedicated processing sub-models. The general processing sub-model executes basic processing logic common to all instructions, including data verification processing logic and log recording logic. The dedicated processing sub-models are models designed based on specific instruction types, including an order processing sub-model, a user authentication sub-model, and a data query sub-model. The order processing sub-model performs order creation and update operations; the user authentication sub-model performs identity verification and permission checks; and the data query sub-model performs database queries and result formatting.

[0059] Subsequently, after writing the processing result to the preset persistent storage device and the preset logical processing queue, the process may further include: using the timeout monitoring mechanism in the preset logical processing queue to monitor the waiting time of the processing result, obtaining the real-time monitoring time, and determining whether the real-time monitoring time is greater than the preset time threshold. If the real-time monitoring time is greater than the preset time threshold, the preset logical processing queue is invoked to re-queue the processing result; or, the preset instruction processing unit is invoked to retry the processing result, and the obtained retry result is retransmitted to the preset logical processing queue.

[0060] In this embodiment, the corresponding processing sub-model is invoked based on the instruction type corresponding to the processing result to obtain the response content. This may include: determining the instruction type corresponding to the processing result, and using a preset logical processing model to determine and activate the corresponding processing sub-model based on the processing result and instruction type, so as to use the processing sub-model to process the processing result and obtain the corresponding response content; using the preset logical processing model to track the processing status corresponding to the processing result, and storing the processing status to a preset persistent storage device; the processing status includes the start processing status, the processing status, the processing completion status, and the processing failure status.

[0061] Step S14: Update the instruction status corresponding to the processing result to "processing completed", and send the response content to the current user interface through a preset response sending device. Then monitor whether the response content is successfully sent within a preset time interval. If successful, update the instruction status corresponding to the pending business instruction to "response successful". If unsuccessful, use a preset resend mechanism to retrieve the corresponding response content from the preset persistent storage device and try to send it again.

[0062] In this embodiment, after completing the business logic processing, the application embodiment needs to synchronously update the instruction status corresponding to the processing result to "processing completed," and record the processing completion timestamp and execution node identifier. Then, the fully encapsulated response content is sent to the current user interface according to a specified communication protocol via a preset response sending device. The response sending device has connection multiplexing and load balancing capabilities to ensure transmission efficiency. Subsequently, a transmission status monitoring mechanism is activated to continuously monitor whether the response content is successfully received by the receiving end within a preset time interval. If a reception confirmation signal is detected before the timeout threshold, the final instruction status corresponding to the pending business instruction in the persistent storage device is immediately updated to "response successful," and a success timestamp is recorded.

[0063] It is worth mentioning that if a monitoring timeout occurs or a transmission failure notification is received, a preset retransmission mechanism is triggered: First, the complete response content and metadata are retrieved from the persistent storage device based on the unique identifier of the instruction. Then, an exponential backoff strategy is used to dynamically calculate the retransmission interval, and retransmission is continuously attempted within the retry limit. Each retry updates the retry counter and the last attempt time, until the transmission is successful or the maximum number of retries is reached, at which point the instruction is marked as "response failure" and an alarm event is generated.

[0064] Specifically, the system updates the status of the instruction corresponding to the processing result to "processing complete" and sends the response content to the current user interface via a preset response sending device. It then monitors whether the response content was successfully sent within a preset time interval. If successful, the status of the instruction corresponding to the pending business instruction is updated to "response successful." If unsuccessful, a preset retransmission mechanism is used to retrieve the corresponding response content from a preset persistent storage device and resend it. This can include: when the processing result is detected as complete, updating the status of the instruction corresponding to the processing result to "processing complete" and storing the "processing complete" status and response content in the preset persistent storage device; determining the corresponding content from the preset persistent storage device via the preset response sending device and sending the response content to the current user interface; monitoring whether the response content was successfully sent within a preset time interval; if successfully sent within the preset time interval, the status of the instruction corresponding to the pending business instruction is updated to "response successful." If the response content was unsuccessfully sent within the preset time interval, the preset retransmission mechanism is used to retrieve the corresponding response content from the preset persistent storage device and resend the response content until successful.

[0065] As can be seen from the above, the embodiments of this application first need to perform preliminary verification on the original business instructions, and after the verification is passed, the original business instructions are formatted to obtain the business instructions to be processed. Then, the business instructions to be processed are written to a preset persistent storage device, and the status of the business instructions to be processed is marked as received in the preset persistent storage device. Next, the business instructions to be processed are written to a preset message queue to obtain a queue to be processed, and a preset rule matching model is used to perform type identification and routing decisions on the business instructions to be processed in the queue to obtain a processing result corresponding to the business instructions to be processed, including processing path and parameter information. Then, the processing result is written to The system employs a pre-defined persistent storage device and a pre-defined logical processing queue. It then uses a pre-defined logical processing model to retrieve processing results from the queue and calls the corresponding processing sub-model based on the instruction type of the result to obtain the response content. Finally, it updates the instruction status corresponding to the processing result to "processing complete" and sends the response content to the current user interface via a pre-defined response sending device. It then monitors whether the response content was successfully sent within a pre-defined time interval. If successful, the instruction status corresponding to the pending business instruction is updated to "response successful." If unsuccessful, a pre-defined resend mechanism retrieves the corresponding response content from the pre-defined persistent storage device and attempts to send it again. This improves the efficiency of responding to business instructions, thereby enhancing the user experience.

[0066] Accordingly, see Figure 2 As shown, this application also provides a response device for a business instruction, including:

[0067] The instruction formatting processing module 11 is used to perform preliminary verification on the original business instruction, and after the verification is passed, to format the original business instruction to obtain the business instruction to be processed. Then, the business instruction to be processed is written to a preset persistent storage device, and the status of the business instruction to be processed is marked as received in the preset persistent storage device.

[0068] The processing result determination module 12 is used to write the business instruction to be processed into a preset message queue to obtain a processing queue, and use a preset rule matching model to perform type identification and routing decision on the business instruction to be processed in the processing queue to obtain a processing result corresponding to the business instruction to be processed, including processing path and parameter information.

[0069] The response content generation module 13 is used to write the processing result to the preset persistent storage device and the preset logical processing queue, then use the preset logical processing model to obtain the processing result in the preset logical processing queue, and call the corresponding processing sub-model to process based on the instruction type corresponding to the processing result to obtain the response content; the preset logical processing model includes a general processing sub-model and an instruction type-specific processing sub-model.

[0070] The response content delivery module 14 is used to update the instruction status corresponding to the processing result to "processing completed", and deliver the response content to the current user interface through a preset response sending device. Then, it monitors whether the response content is successfully delivered within a preset time interval. If successful, the instruction status corresponding to the pending business instruction is updated to "response successful". If unsuccessful, the corresponding response content is retrieved from the preset persistent storage device using a preset retransmission mechanism and the delivery is attempted again.

[0071] In some specific embodiments, the instruction formatting processing module 11 may specifically include:

[0072] The type matching result determination unit is used to obtain the business instructions to be processed from the queue to be processed, determine the metadata and content features corresponding to the business instructions to be processed, and then use the preset rule engine in the preset rule matching model to perform type matching operation on the business instructions to be processed to obtain the type matching result; the type matching result includes order processing type, user authentication type and data query type;

[0073] The parameter information generation unit is used to determine the routing direction of the service instruction to be processed based on the type matching result, and to determine the processing path corresponding to the service instruction to be processed based on the routing direction. Then, it uses the preset rule matching model and the service instruction to be processed to generate parameter information including processing priority indicators, resource allocation requirements and timeout thresholds, so as to determine the processing result based on the processing path and the parameter information.

[0074] In some specific embodiments, the response content generation module 13 may specifically include:

[0075] The processing result storage unit is used to write the processing result, including the processing path and the parameter information, to the preset persistent storage device and the preset logical processing queue, respectively. Then, it uses the preset logical processing model and retrieves the processing result from the preset logical processing queue based on user needs. The preset logical processing model includes a general processing sub-model and several dedicated processing sub-models. The general processing sub-model executes basic processing logic common to all instructions, including data verification processing logic and log recording logic. The dedicated processing sub-models are models designed based on specific instruction types, including an order processing sub-model, a user authentication sub-model, and a data query sub-model. The order processing sub-model performs order creation and update operations. The user authentication sub-model performs identity verification and permission checks. The data query sub-model performs database queries and result formatting.

[0076] In some specific embodiments, the response device for the service instruction may further include:

[0077] The real-time monitoring time determination unit is used to monitor the waiting time of the processing result using the timeout monitoring mechanism in the preset logical processing queue, obtain the real-time monitoring time, and determine whether the real-time monitoring time is greater than the preset time threshold. If the real-time monitoring time is greater than the preset time threshold, the preset logical processing queue is invoked to re-queue the processing result.

[0078] The unit is used to call a preset instruction processing unit to retry the processing result and retransmit the obtained retry result to the preset logic processing queue.

[0079] In some specific embodiments, the response content generation module 13 may specifically include:

[0080] A response content generation subunit is used to determine the instruction type corresponding to the processing result, and to use the preset logic processing model and based on the processing result and the instruction type to determine and activate the corresponding processing sub-model, so as to use the processing sub-model to process the processing result and obtain the corresponding response content.

[0081] A processing state storage unit is used to track the processing state corresponding to the processing result using the preset logical processing model, and store the processing state to the preset persistent storage device; the processing state includes a start processing state, a processing in progress state, a processing completion state, and a processing failure state.

[0082] In some specific embodiments, the response content delivery module 14 may specifically include:

[0083] The status update unit is used to update the instruction status corresponding to the processing result to the processing completion status when the processing result is detected to be completed, and to store the processing completion status and the response content in the preset persistent storage device.

[0084] The response content delivery unit is used to determine the corresponding content from the preset persistent storage device through the preset response sending device, and to deliver the response content to the current user interface. Then, it monitors whether the response content is successfully delivered within a preset time interval. If the response content is successfully delivered within the preset time interval, the instruction status corresponding to the pending business instruction is updated to "response successful".

[0085] The response content retrieval unit is used to retrieve the corresponding response content from the preset persistent storage device using a preset retransmission mechanism if the response content fails to be sent within the preset time interval, and then attempt to send the response content again until it is successfully sent.

[0086] Furthermore, embodiments of this application also disclose an electronic device, Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically 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. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the response method of the business instructions disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0087] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0088] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0089] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of responding to business instructions executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0090] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for responding to business instructions. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0091] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0092] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0093] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0094] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0095] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method of responding to a service instruction, characterized by, The method comprises the following steps: performing preliminary verification on the original service instruction, and performing format processing on the original service instruction after the verification is passed to obtain a to-be-processed service instruction, then writing the to-be-processed service instruction into a preset persistent storage device, and marking the state of the to-be-processed service instruction as a received state in the preset persistent storage device; writing the to-be-processed service instruction into a preset message queue to obtain a to-be-processed queue, and performing type identification and routing decision on the to-be-processed service instruction in the to-be-processed queue by using a preset rule matching model to obtain a processing result corresponding to the to-be-processed service instruction, the processing result comprising a processing path and parameter information; writing the processing result into the preset persistent storage device and a preset logical processing queue, then obtaining the processing result in the preset logical processing queue by using a preset logical processing model, and calling a corresponding processing sub-model based on the instruction type corresponding to the processing result to obtain response content; the preset logical processing model comprises a general processing sub-model and an instruction type dedicated processing sub-model; updating the instruction state corresponding to the processing result to processing completion, and issuing the response content to a current user interface through a preset response sending device, then monitoring whether the response content is issued successfully within a preset time interval, if yes, updating the instruction state corresponding to the to-be-processed service instruction to response success; if not, obtaining the corresponding response content from the preset persistent storage device by using a preset retransmission mechanism and trying to send again.

2. The method of claim 1, wherein the service instruction is a response to a service request. the method of performing type identification and routing decision on the to-be-processed service instruction in the to-be-processed queue by using a preset rule matching model to obtain a processing result corresponding to the to-be-processed service instruction, the processing result comprising a processing path and parameter information, comprises the following steps: obtaining a to-be-processed service instruction from the to-be-processed queue, determining metadata and content features corresponding to the to-be-processed service instruction, then performing type matching operation on the to-be-processed service instruction by using a preset rule engine in a preset rule matching model to obtain a type matching result; the type matching result comprises an order processing type, a user authentication type and a data query type; determining a routing direction of the to-be-processed service instruction based on the type matching result, determining a processing path corresponding to the to-be-processed service instruction based on the routing direction, then generating parameter information comprising a processing priority index, a resource allocation requirement and a timeout time threshold by using the preset rule matching model based on the to-be-processed service instruction, to determine a processing result based on the processing path and the parameter information.

3. The method of claim 1, wherein the service instruction is a response to a service request. the method of writing the processing result into the preset persistent storage device and the preset logical processing queue, then obtaining the processing result in the preset logical processing queue by using a preset logical processing model, comprises the following steps: writing the processing result comprising the processing path and the parameter information into the preset persistent storage device and the preset logical processing queue respectively, then obtaining the processing result in the preset logical processing queue by using a preset logical processing model based on user demand; The preset logical processing model comprises a general processing sub-model and a plurality of special processing sub-models; the general processing sub-model is used for executing basic processing logic common to all instructions, comprising data verification processing logic and log recording logic; the special processing sub-model is a model designed based on a specific instruction type, comprising an order processing sub-model, a user authentication sub-model and a data query sub-model; the order processing sub-model is used for executing order creation and update operations; the user authentication sub-model is used for identity verification and permission checking; and the data query sub-model is used for executing database query and result formatting.

4. The method of claim 1, wherein the service instruction is a response to a service request. After the processing result is written into the preset persistent storage device and the preset logical processing queue, the method further comprises: using a timeout monitoring mechanism in the preset logical processing queue to monitor the waiting time of the processing result, obtaining a real-time monitoring time, and determining whether the real-time monitoring time is greater than a preset time threshold; if the real-time monitoring time is greater than the preset time threshold, the preset logical processing queue is called to perform a re-queuing operation on the processing result; or, a preset instruction processing unit is called to perform a retry on the processing result, and the obtained retry result is transmitted to the preset logical processing queue.

5. The method of claim 1, wherein the service instruction is a response to a service request. The processing sub-model corresponding to the instruction type of the processing result is called based on the instruction type to process the processing result, and response content is obtained, comprising: determining the instruction type corresponding to the processing result, and determining and activating a corresponding processing sub-model based on the processing result and the instruction type using the preset logical processing model, so as to process the processing result using the processing sub-model to obtain corresponding response content; the processing state corresponding to the processing result is tracked using the preset logical processing model, and the processing state is stored in the preset persistent storage device; the processing state comprises a start processing state, a processing state, a processing completion state and a processing failure state.

6. The method of claim 1, wherein the service instruction is a response to a service request. The instruction state corresponding to the processing result is updated to processing completion, the response content is sent to the current user interface through a preset response sending device, and then it is monitored whether the response content is successfully sent within a preset time interval; if yes, the instruction state corresponding to the to-be-processed business instruction is updated to response success; if not, a preset retransmission mechanism is used to obtain corresponding response content from the preset persistent storage device and attempt to send again, comprising: after it is monitored that the processing result is processed, the instruction state corresponding to the processing result is updated to a processing completion state, and the processing completion state and the response content are stored in the preset persistent storage device; the corresponding response content is determined from the preset persistent storage device through a preset response sending device, and the response content is sent to the current user interface, and then it is monitored whether the response content is successfully sent within a preset time interval; if yes, the instruction state corresponding to the to-be-processed business instruction is updated to response success. If the response content is not successfully sent within the preset time interval, the corresponding response content is retrieved from the preset persistent storage device by using a preset retransmission mechanism, and the response content is again attempted to be sent until the sending is successful.

7. A response device to a service instruction, characterized in that The method comprises the following steps: An instruction formatting processing module is configured to perform preliminary verification on an original service instruction, perform formatting processing on the original service instruction after the verification is passed, obtain a to-be-processed service instruction, write the to-be-processed service instruction into a preset persistent storage device, and mark a state of the to-be-processed service instruction as a received state in the preset persistent storage device; A processing result determination module is configured to write the to-be-processed service instruction into a preset message queue to obtain a to-be-processed queue, and perform type identification and routing decision on the to-be-processed service instruction in the to-be-processed queue by using a preset rule matching model to obtain a processing result corresponding to the to-be-processed service instruction, wherein the processing result comprises a processing path and parameter information; A response content generation module is configured to write the processing result into the preset persistent storage device and a preset logical processing queue, obtain the processing result in the preset logical processing queue by using a preset logical processing model, and perform processing by calling a corresponding processing sub-model based on an instruction type corresponding to the processing result to obtain a response content; The preset logical processing model comprises a general processing sub-model and an instruction type dedicated processing sub-model; A response content sending module is configured to update an instruction state corresponding to the processing result to processing completion, send the response content to a current user interface by using a preset response sending device, monitor whether the response content is successfully sent within a preset time interval, update an instruction state corresponding to the to-be-processed service instruction to response success if the sending is successful, and obtain the corresponding response content from the preset persistent storage device by using a preset retransmission mechanism and again attempt to send the response content if the sending is not successful. The instruction formatting processing module comprises:

8. The response to service instruction device of claim 7, wherein, A type matching result determination unit is configured to obtain a to-be-processed service instruction from the to-be-processed queue, determine metadata and content features corresponding to the to-be-processed service instruction, perform type matching operation on the to-be-processed service instruction by using a preset rule engine in a preset rule matching model to obtain a type matching result, and the type matching result comprises an order processing type, a user authentication type, and a data query type; A parameter information generation unit is configured to determine a routing direction of the to-be-processed service instruction based on the type matching result, determine a processing path corresponding to the to-be-processed service instruction based on the routing direction, generate parameter information comprising a processing priority index, a resource allocation requirement, and a timeout time threshold by using the preset rule matching model and based on the to-be-processed service instruction, and determine a processing result based on the processing path and the parameter information. The method comprises the following steps:

9. An electronic device, comprising: A memory is configured to save a computer program; A processor is configured to execute the computer program to implement the response method of the service instruction according to any one of claims 1 to 6. ​ 10. A computer-readable storage medium, characterized in that, A computer program product for saving a computer program, wherein the computer program, when executed by a processor, implements the method of responding to a service instruction according to any one of claims 1 to 6.