Interface simulation method, device and equipment for order cancel-after-verification and medium
By implementing the interface simulation method on the server, the problem of the order verification system recording feedback information when the related party services are unavailable is solved, automation and accuracy are achieved, and the stability of the order verification system and data consistency are ensured.
Patent Information
- Application Number
- CN202510285915.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-06
AI Technical Summary
The existing order verification system is difficult to automatically and accurately record feedback information of third-party services when related party services are unavailable, resulting in untimely and inconsistent data updates, affecting the timeliness and accuracy of order verification.
By implementing the interface simulation method on the server, we obtain the associated party interface information in the user-generated order verification instruction, access the associated party and detect its availability. If it is not available, the stored return information is matched from the preset storage information library and sent it to the client as the target information returned by the simulation interface.
It realizes automatic and accurate recording of feedback information of third-party services when related party services are unavailable, ensures the stable operation of the order verification system, and improves data consistency and reliability of the verification process.
Smart Images

Figure CN120106949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an interface simulation method, device, equipment and medium for order verification. Background Art
[0002] The order verification system usually adopts a multi-layer architecture design, including a front-end user interface, a middle-tier service layer, and a back-end data layer. The front-end user interface is responsible for patient code scanning verification, displaying verification results and operation history records. The service layer handles business logic, such as verification of verification results, update of order status, sending of notification messages, etc. The data layer stores structured data such as patient medical information, order records, payment information, etc. In the process of development and iteration, it usually involves front-end and back-end joint debugging, and related party joint debugging. The key operations of some businesses depend on the availability of related party services.
[0003] At present, when the affiliated party services are unavailable, developers usually manually create simulation data files or scripts to replace the real third-party service return data, which leads to untimely data updates and data inconsistencies. With the substantial increase in service orders, manual simulation of data is labor-intensive and error-prone, and is not suitable for complex service interfaces and changing business scenarios.
[0004] First of all, most of the current order settlement methods have unstable network communications and once service failures, maintenance and upgrades occur, problems will arise in the connection between the server and the related parties, such as timeouts, network errors, etc., making the related party services unavailable. As a result, in the property insurance business in the financial field, the insurance company server cannot obtain the real feedback information from the related parties, and cannot obtain the bank's payment verification results in a timely manner, affecting the timeliness of order settlement.
[0005] Secondly, since most of the current order verification methods may cause data loss or damage in the storage information database when there are problems such as data storage device failure and untimely data backup, if the mapping relationship data between the instruction identifier of the associated party and the returned information is lost, when the associated party service is unavailable, the server will not be able to accurately match the simulated return information, affecting the accuracy of order verification. For example, in the field of medical health, the failure of the hospital database server caused the loss of some medical insurance reimbursement historical data, which made it impossible for users to perform accurate simulated verification when verifying orders.
[0006] Therefore, how to automatically and accurately record feedback information from third-party services in order to stably operate the order verification system has become an urgent problem to be solved. Summary of the invention
[0007] The embodiments of the present invention provide an interface simulation method, device, equipment and medium for order verification to solve the problem of how to automatically and accurately record feedback information of third-party services to stably operate an order verification system.
[0008] In a first aspect, an embodiment of the present invention provides an interface simulation method for order verification, the interface simulation method is applied to a server, the server is connected to a client and an associated party in communication, and the interface simulation method includes: Obtaining a cancellation instruction of the order information generated by the user through the client to the server, and extracting the interface information of the associated party in the cancellation instruction; Accessing the associated party according to the interface information, and if it is detected that the associated party is unavailable, extracting the instruction identifier of the associated party in the write-off instruction; According to the instruction identifier, the stored return information is matched from a preset storage information library, wherein the preset storage information library is used to store a mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available; The stored return information is used as target information returned by the interface simulating the associated party, and the target information is sent to the client.
[0009] In a second aspect, an embodiment of the present invention provides an interface simulation device for order verification, comprising: An interface information extraction module, used to obtain a cancellation instruction of the order information generated by the user through the client to the server, and extract the interface information of the associated party in the cancellation instruction; An instruction identifier extraction module, used to access the associated party according to the interface information, and if it is detected that the associated party is unavailable, extract the instruction identifier of the associated party in the write-off instruction; An information matching module, used to match the stored return information from a preset storage information library according to the instruction identifier, wherein the preset storage information library is used to store the mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available; The information simulation module is used to use the stored return information as target information returned by the interface of the simulated associated party, and send the target information to the client.
[0010] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned interface simulation method for order verification when executing the computer program.
[0011] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the interface simulation method for order verification is implemented.
[0012] Compared with the prior art, the present invention has the following beneficial effects: by obtaining the cancellation instruction of the order information generated by the user through the client to the server, the interface information of the associated party in the cancellation instruction is extracted, and the associated party is accessed according to the interface information. If the associated party is detected to be unavailable, the instruction identifier of the associated party in the cancellation instruction is extracted, and the stored return information is matched from the preset storage information library according to the instruction identifier. The preset storage information library is used to store the mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available, and the stored return information is used as the target information returned by the interface of the simulated associated party, and the target information is sent to the client. The technical solution of the present application can be applied to the policy business management program system of property insurance, medical health, etc., and the associated party is accessed through the interface information in the cancellation instruction. When the associated party is unavailable, the return information in the storage information library is matched according to the instruction identifier in the cancellation instruction, and the return information is sent to the client as the target information. Thereby, the feedback information of the third-party service is automatically and accurately recorded to stably operate the order cancellation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0014] Figure 1 This is a schematic diagram of an application environment of an interface simulation method for order verification provided by the first embodiment of the present invention; Figure 2 It is a flow chart of an interface simulation method for order cancellation provided in the second embodiment of the present invention; Figure 3 It is a flow chart of an interface simulation method for order cancellation provided in Embodiment 3 of the present invention; Figure 4 It is a flow chart of an interface simulation method for order cancellation provided by Embodiment 4 of the present invention; Figure 5 It is a flowchart of an interface simulation method for order cancellation provided in Embodiment 5 of the present invention; Figure 6 It is a flowchart of an interface simulation method for order cancellation provided by Embodiment 6 of the present invention; Figure 7 It is a structural schematic diagram of an interface simulation device for order verification provided by Embodiment 7 of the present invention; Figure 8 It is a structural diagram of a computer device provided in Embodiment 8 of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0016] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0017] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0018] It should be understood that the size of the serial numbers of the steps in the following embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0019] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0020] like Figure 1 As shown, it is a schematic diagram of the application environment of an interface simulation method for order verification provided by Embodiment 1 of the present invention, wherein the client and the server are connected to communicate, and the user can provide the server with conditions, requirements and operation instructions for interface simulation of order verification by operating the client, and the server is used to execute the interface simulation method for order verification of the present invention according to the relevant content sent by the client. Among them, the client includes but is not limited to various personal computers, laptops, smart phones, tablet computers, portable wearable devices and other computer devices. The computer device corresponding to the server can be implemented with an independent server or a server cluster composed of multiple servers.
[0021] like Figure 2 FIG. 1 is a flow chart of an interface simulation method for order verification provided by Embodiment 2 of the present invention, wherein the interface simulation method for order verification is applied in Figure 1 The interface simulation method for order verification may include the following steps: Step S201, obtaining a cancellation instruction of order information generated by a user via a client to a server, and extracting interface information of associated parties in the cancellation instruction.
[0022] The user clicks a "cancellation" button on the client (for example, through the user's terminal or the terminal of the service provider), and the client collects the order information entered by the user (such as order ID, user information, cancellation amount, etc.), and encapsulates the order information and the interface information of the related party into a cancellation instruction and sends it to the server.
[0023] The server receives the cancellation instruction sent by the client through the communication protocol. The server parses the received cancellation instruction, extracts the order information and the interface information of the associated party, and extracts the interface information of the associated party from the cancellation instruction (for example, interface URL, request parameters, interface name, etc.). This information will be used for subsequent interface calls or simulations.
[0024] For example, in the application of vehicle property insurance scenarios in the property insurance business field, the car owner enters the claim order page on the insurance company APP (client) installed on the mobile phone. On this page, the car owner can see the details of the completed claim order, including accident details, damage assessment amount, compensation amount, etc. After the car owner confirms that the information is correct, click the "Write Off" button on the page. When the insurance company accepts the claim application, it assigns a unique order ID to the claim order. The client extracts the car owner's name, ID number, contact number and other basic information from the user registration information to ensure that the car owner himself performs the write-off operation. According to the claim result, the client obtains the compensation amount of this claim, such as 5,000 yuan. The client encapsulates the collected order information and the interface information of the related party into a write-off instruction and sends it to the insurance company's server through the network communication protocol.
[0025] Step S202: access the associated party according to the interface information. If it is detected that the associated party is unavailable, extract the instruction identifier of the associated party in the write-off instruction.
[0026] Among them, the server calls the service interface of the associated party according to the extracted interface information (such as interface URL and request parameters), and can detect the availability of the associated party by setting a timeout and capturing exceptions. If the associated party service responds normally, continue with subsequent processing steps. If the associated party service is unavailable (for example, timeout, network error, server error, etc.), the server needs to capture the exception and process it. When it is detected that the associated party service is unavailable, the server extracts the instruction identifier of the associated party from the write-off instruction, such as order ID, interface name, etc. These instruction identifiers will be used to match the stored return information from the preset storage information library later.
[0027] For example, in the vehicle property insurance business application scenario in the field of property insurance claims, taking the owner's vehicle collision accident claim as an example, the insurance company's service end has obtained the write-off instruction of the claim order and the interface information of the associated party (bank). The service end is ready to call the bank's service interface based on the interface information extracted in step S201, including the URL and request parameters of the bank payment interface (order ID, write-off amount, owner's bank account number, bank reserved mobile phone number, etc.). At the same time, in order to detect the availability of the associated party service, the server sets a 5-second timeout. If the bank's server responds slowly due to high concurrency or other reasons, and the server does not receive a response from the bank interface within the 5-second timeout, it is determined that the bank service is unavailable.
[0028] Step S203, according to the instruction identifier, matching the stored return information from a preset storage information library, the preset storage information library is used to store the mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available.
[0029] Among them, when the system is initialized, a storage information library is created to store all instruction identifiers of the associated party and their corresponding return information. The storage information library can be a database table, a cache system, a file system, etc. When the server successfully calls the associated party service and receives a normal response, the instruction identifier and return information of the associated party are stored in the preset storage information library. When it is detected that the associated party service is unavailable, the instruction identifier (such as order ID, interface name, etc.) is extracted from the verification instruction, and the stored return information is matched from the preset storage information library according to the instruction identifier. If the match is successful, the stored return information is returned. If the match fails, the corresponding error situation is handled (if no matching return information is found, an exception is thrown).
[0030] For example, in the fire claims business application scenario in the field of property insurance claims, a house was damaged by fire, and the owner applied for compensation from the insurance company. In the process of handling claims, the insurance company needs to interact with the third-party assessment agency (related party) to determine the amount of loss of the house. When interacting with the service interface of the assessment agency, the assessment agency service may be unavailable. At this time, it is necessary to match the corresponding return information from the preset storage information library. The server uses the extracted instruction tag to match in the storage information library to complete the subsequent work.
[0031] Step S204: Use the stored return information as target information returned by the interface simulating the associated party, and send the target information to the client.
[0032] Among them, when it is detected that the associated party service is unavailable, the instruction identifier (such as order ID, interface name) has been extracted from the write-off instruction, and these instruction identifiers are used to query the stored return information from the preset storage information library, and the stored return information is parsed into an object with the same format as the associated party interface return information, ensuring that the format and content of the simulated return information are consistent with the actual associated party return information to avoid client parsing errors, and sending the simulated interface return information to the client.
[0033] For example, in the application scenario of automobile insurance claims for property insurance claims, the car owner's car had an accident and applied for compensation from the insurance company. The insurance company needs to connect with the system of the vehicle repair shop to obtain the assessment information of the vehicle repair cost. However, the repair shop system failed and the service was unavailable. The insurance company found the information on the repair cost assessment of similar accident vehicles in the "information warehouse" and simulated this information into the results returned by the current repair shop interface. Then, the insurance company calculated the claim amount based on these simulated repair cost assessments and continued to advance the claim process without waiting for the repair shop system to recover.
[0034] For example, in the field of medical health, patients place orders to make doctor appointments through clients (such as mobile phones, computers, etc.) and generate order verification codes on the client. When the doctor scans the order verification code to verify the order, if the patient's client's third-party service is unavailable (such as network errors, third-party payment software cannot be opened), the server will call the previously stored third-party service's patient client's payment verification return information, and transmit the stored return information as simulation information to the patient's client to help the doctor scan the code for verification, thereby successfully completing the order verification work.
[0035] In the embodiment of the present application, by obtaining the cancellation instruction of the order information generated by the user through the client to the server, the interface information of the associated party in the cancellation instruction is extracted, and the associated party is accessed according to the interface information. If the associated party is detected to be unavailable, the instruction identifier of the associated party in the cancellation instruction is extracted, and the stored return information is matched from the preset storage information library according to the instruction identifier. The preset storage information library is used to store the mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available, and the stored return information is used as the target information returned by the interface of the simulated associated party, and the target information is sent to the client. The technical solution of the present application can be applied to the policy business management program system of property insurance, medical health, etc., and the associated party is accessed through the interface information in the cancellation instruction. When the associated party is unavailable, the return information in the storage information library is matched according to the instruction identifier in the cancellation instruction, and the return information is sent to the client as the target information. Thereby, the feedback information of the third-party service is automatically and accurately recorded to stably operate the order cancellation system.
[0036] like Figure 3 FIG. 2 is a flow chart of an interface simulation method for order write-off provided in Embodiment 3 of the present invention. Step S201 of extracting interface information of associated parties in a write-off instruction may include the following steps: Step S301, obtaining a switch operation of the interface information corresponding to the associated party, where the switch operation is used to control the access of the interface information to the associated party.
[0037] Among them, in the order settlement system, the switch operation is used to control the access of interface information to the related parties. Through the switch operation, the system can flexibly decide whether to call the related party interface. In the test environment, the actual related party interface call can be closed and the preset simulation data can be used for testing to avoid affecting the real production environment. In the production environment, if the related party interface fails, the system can continue to process the order settlement request using the preset simulation data by turning off the switch operation to ensure business continuity.
[0038] The switch status is defined in the configuration file, and the access to the associated party interface is controlled by the switch status of the configuration file. The switch status in the configuration file is read in the code, and whether to call the associated party interface is determined based on the switch status. The switch status is read first. If the switch status is on, the associated party interface information is extracted from the request parameters, and an attempt is made to call the associated party interface. If the switch status is off, the simulation data is directly obtained from the preset storage information library and returned to the client.
[0039] Step S302: If the switch operation is in the open state, the interface information of the associated party corresponding to the open state in the cancellation instruction is extracted.
[0040] In the order write-off system, the switch operation is used to control whether to call the associated party interface. If the switch operation is turned on, the system needs to extract the associated party's interface information from the write-off instruction and try to call these interfaces. First, confirm that the switch operation is turned on. If the switch is turned off, the system will skip the actual interface call and directly use the simulated data.
[0041] The system extracts the interface information of the associated party from the write-off instruction, including the interface URL, request parameters, etc., uses the extracted interface information to call the associated party's interface, processes the result of the interface call, records relevant information when successful, and performs fault tolerance processing when failed. For example, if the call fails, an error log is recorded, and simulated data is obtained from the preset storage information library to ensure that the system can continue to process the order write-off request.
[0042] In this embodiment, the interface information of the associated party is controlled by switching the interface information of the associated party, and the interface information of the associated party in the corresponding open state is accessed. Thus, the system can actually interact with the associated party when necessary, complete the order verification task, and improve the controllability of the system.
[0043] like Figure 4 FIG. 2 is a flow chart of an interface simulation method for order write-off provided in Embodiment 4 of the present invention. After extracting the instruction identifier of the associated party in the write-off instruction in step S202, the interface simulation method for order write-off may further include the following steps: Step S401, obtaining a tracing key value corresponding to an instruction identifier, combining the tracing key value with a target instruction identifier, and obtaining a combined instruction identifier.
[0044] Among them, the combined instruction identifier is used to match the stored return information from the preset storage information library, ensuring that the system can provide accurate simulation data without relying on the actual interface, and extracting the tracking key value from the request parameters. The tracking key value is usually used to track specific operations or requests, which can be order numbers, operation IDs, etc. The target instruction identifier usually refers to the interface name of the associated party. The tracking key value is combined with the interface name to generate a unique combined instruction identifier.
[0045] Among them, the combined instruction identifier is used to accurately find the corresponding simulation data in the preset storage information library. The method of generating the combined instruction identifier can be adjusted according to specific needs. The common combination method is to connect the interface name and the tracking key value with some separator to form a string.
[0046] Step S402: matching the stored return information from a preset storage information library according to the combined instruction identifier.
[0047] Among them, the combined instruction identifier is generated in step S401, which is formed by combining the interface name and the tracking key value. The combined instruction identifier ensures that each verification instruction has a unique identifier in the storage information library. The combined instruction identifier is used as a query condition to find the corresponding simulation return information from the storage information library. If matching simulation data is found, it is parsed into a response object and returned to the caller. If no matching simulation data is found, an exception can be thrown or a default error message can be returned.
[0048] For example, when a company applies for compensation for a warehouse damaged by a fire, the insurance company system extracts the tracking key value, that is, the claim order number, from the claim request parameters to track the claim operation. The related party interface to be called this time is the target instruction identifier. Next, the two are connected with a delimiter to obtain the combined instruction identifier. The insurance company system has a preset storage information library, similar to an "archive room", which records past information about interactions with related parties. The system uses query conditions to search in the library. If a matching record is found, it will be parsed into a response object and returned to the claims staff to continue the claims process. If no matching data is found, the system will throw an exception or return a default error message, and the staff will need to take other measures to obtain the evaluation information.
[0049] In this embodiment, by obtaining the tracking key value of the instruction identifier, combining the tracking key value with the target instruction identifier, and matching the returned information from the storage information base according to the combined instruction identifier, the uniqueness and accurate matching of each write-off instruction are ensured, providing a basis for finding the modified write-off instruction later.
[0050] like Figure 5 FIG. 2 is a flow chart of an interface simulation method for order verification provided by Embodiment 5 of the present invention. After sending the target information to the client in step S204, the interface simulation method for order verification may further include the following steps: Step S501, obtaining the user's modification operation on the returned information, and obtaining modification information corresponding to the modification operation according to the modification operation.
[0051] Step S502: Obtain the response order of the associated parties to the interface information according to the returned information.
[0052] Step S503, according to the response order, combined with the instruction identifier and the modification information, the return information is searched in the preset storage information library to obtain the target query information.
[0053] Among them, after receiving the return information, the client user may modify certain fields. The system needs to capture these modification operations, record the user's modification operations, and generate modification information for use in subsequent steps. In a multi-step or complex write-off process, different related parties may have multiple responses. The order of each response is automatically recorded, the response order information is extracted from the database, and the return data that matches the query conditions is searched in the preset storage information library to be fed back to the client as the target data.
[0054] For example, suppose the client receives the cancellation result of the preliminary review status, and the user changes the status from "pending cancellation" to "cancelled". The system records the user's modification operation and generates modification information. The system obtains the response order from the database based on the combined instruction identifier. The system uses the combined instruction identifier, response order and modification information to perform precise queries in the database and returns the queried simulation data to the client.
[0055] Optionally, after obtaining the target query information in step S503, the following steps may also be included: The target query information and the modification information are parsed respectively to obtain first target parsed data corresponding to the target query information and second target parsed data corresponding to the modification information.
[0056] The second target parsed data is replaced with the first target parsed data to obtain new return information.
[0057] The new returned information is used as the new target information returned by the interface of the simulated associated party, and the new target information is sent to the client.
[0058] Get new interface information corresponding to the new target information in the cancellation instruction.
[0059] Return to execute the step of accessing the associated party according to the new interface information until the new target information is sent to the client.
[0060] Among them, the target query information is the information stored in the database, and the modified information is the information after the user modifies the target query information. When the user performs a modification operation, the target query information is found, the Json (English full name, JavaScript Object Notation, Chinese full name, JavaScript object representation) data corresponding to the target query information is object parsed, the modified information is subjected to the same Json parsing in a new newly added editing interface, the two Json data are compared, the data are replaced, a new Json string is generated and put into the data storage of the associated party interface, thereby obtaining new return information, and the new return information is sent to the client.
[0061] New target information is extracted from the verification instruction, and new interface information is generated based on the extracted new target information. The generated new interface information is used to call the associated party (for example, a third-party payment system, etc.), and new response data is obtained from the associated party. The process returns to execute the above steps S202 to S204, and the new response data obtained from the associated party is processed into a format that can be understood by the client, and finally the processed new target information is sent to the client.
[0062] In this embodiment, by obtaining the user's modification operation on the stored return information, and combining the response order, the instruction identifier and the modification information to query the return information, the target query information is obtained, thereby improving the flexibility of the system and ensuring consistency in the test and production environments.
[0063] like Figure 6 FIG. 2 is a flow chart of an interface simulation method for order verification provided by Embodiment 6 of the present invention. Before matching the stored return information from the preset storage information library in step S203, the interface simulation method for order verification may further include: Step S601, obtaining the interception node between the client and the associated party.
[0064] Step S602: All instruction identifiers and corresponding return information are transmitted to the interception node for processing, and a storage information library containing mapping relationships between all instruction identifiers of associated parties and corresponding return information is obtained.
[0065] Among them, an interception node is set between the client and the associated party. This node can be an intermediate service or proxy server, which is used to process and record all instructions and return information, and transmit all instruction identifiers (such as order ID, payment request ID, etc.) sent by the client and their corresponding return information (such as payment status, payment amount, etc.) to the interception node. The interception node processes this information and establishes a mapping relationship to record each instruction identifier and the corresponding return information.
[0066] For example, in the online payment business scenario in the insurance business field, a user purchased an insurance product on the insurance agency platform for a total price of 500 yuan and chose to use a third-party payment company for payment. The insurance agency platform generates a unique payment request ID "PAY-20250307-001" and sends this payment request (including payment amount, product information, etc.) to the payment company. At this time, "PAY-20250307-001" is the instruction identifier. In the process of the insurance agency platform sending the payment request to the payment company, the interception node will intercept the payment request and record the instruction identifier "PAY-20250307-001". After receiving the payment request, the payment company verifies and processes the user's payment information. After a series of operations, the payment company confirms that the payment is successful and returns a message containing the payment status ("success") and the payment amount (500 yuan) to the insurance agency platform. The return information will also be intercepted by the interception node during the transmission back to the platform. The interception node will associate this return information (payment status "success" and payment amount 500 yuan) with the previously recorded instruction identifier "PAY - 20250307 - 001". The interception node processes this information and establishes a mapping relationship between the instruction identifier "PAY - 20250307 - 001" and the return information (payment status "success", payment amount 500 yuan). Finally, this mapping relationship is stored in a storage information library.
[0067] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0068] like Figure 7 As shown, it is a schematic diagram of an interface simulation device for order verification provided by Embodiment 7 of the present invention, and the interface simulation device for order verification corresponds one-to-one with the interface simulation method for order verification in the above embodiment. The interface simulation device for order verification includes an interface information extraction module 71, an instruction identifier extraction module 72, an information matching module 73, and an information simulation module 74. The functional modules are described in detail as follows: The interface information extraction module 71 is used to obtain the cancellation instruction of the order information generated by the user through the client to the server, and extract the interface information of the associated party in the cancellation instruction; The instruction identification extraction module 72 is used to access the associated party according to the interface information, and if it is detected that the associated party is unavailable, extract the instruction identification of the associated party in the write-off instruction; An information matching module 73, used to match the stored return information from a preset storage information library according to the instruction identifier, the preset storage information library being used to store the mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available; The information simulation module 74 is used to use the stored return information as the target information returned by the interface of the simulated associated party, and send the target information to the client.
[0069] Optionally, the interface information extraction module 71 includes: A switch operation acquisition unit, used to acquire a switch operation corresponding to the interface information of the associated party, the switch operation being used to control the access of the interface information to the associated party; The opening state information acquisition unit is used to extract the interface information of the associated party corresponding to the opening state in the cancellation instruction if the switch operation is in the opening state.
[0070] Optionally, the interface simulation device for order verification further includes: A combined instruction identifier acquisition module is used to obtain a tracking key value of the corresponding instruction identifier after extracting the instruction identifier of the associated party in the write-off instruction, and combine the tracking key value with the target instruction identifier to obtain a combined instruction identifier; The combined instruction identifier matching module is used to match the stored return information from a preset storage information library according to the combined instruction identifier.
[0071] Optionally, the interface simulation device for order verification further includes: The modification information acquisition module is used to obtain the modification operation of the user on the returned information after sending the target information to the client, and obtain the modification information corresponding to the modification operation according to the modification operation; A response order obtaining module is used to obtain the response order of the associated party to the interface information according to the returned information; The target query information acquisition module is used to query the return information in a preset storage information library according to the response order, combined with the instruction identifier and the modification information, to obtain the target query information.
[0072] Optionally, the target query information acquisition module further includes: An information parsing unit, used to parse the target query information and the modification information respectively, to obtain first target parsing data corresponding to the target query information and second target parsing data corresponding to the modification information; A data replacement unit, used for replacing the second target parsed data with the first target parsed data to obtain new return information; The new target information sending unit is used to use the new return information as the new target information returned by the interface of the simulated associated party, and send the new target information to the client.
[0073] Optionally, the new target information sending unit further includes: A new interface information acquisition subunit is used to acquire new interface information corresponding to new target information in the cancellation instruction; The return execution subunit is used to return to execute the step of accessing the associated party according to the new interface information until the new target information is sent to the client.
[0074] Optionally, the interface simulation device for order verification further includes: An interception node acquisition module is used to acquire an interception node between the client and the associated party before matching the stored return information from the preset storage information library; The instruction identification processing module is used to transmit all instruction identifications and corresponding return information to the interception node for processing, and obtain a storage information library containing the mapping relationship between all instruction identifications of the associated parties and the corresponding return information.
[0075] For the specific definition of the interface simulation device for order verification, please refer to the definition of the interface simulation method for order verification mentioned above, which will not be repeated here. Each module in the above-mentioned interface simulation device for order verification can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0076] like Figure 8 As shown, it is a schematic diagram of the structure of a computer device provided in Embodiment 8 of the present invention. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an interface simulation method for order verification is implemented.
[0077] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the interface simulation method for order verification in the above embodiment is implemented, for example Figures 2 to 6Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the interface simulation device for order verification are realized, for example Figure 7 The functions of the interface information extraction module 71, instruction identification extraction module 72, information matching module 73, and information simulation module 74 are not described here in detail to avoid repetition.
[0078] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the interface simulation method for order verification in the above embodiment is implemented, such as Figures 2 to 6 Alternatively, when the computer program is executed by a processor, the functions of each module / unit in the embodiment of the interface simulation device for order verification are realized, for example Figure 7 The functions of the interface information extraction module 71, instruction identification extraction module 72, information matching module 73, and information simulation module 74 are not described here in detail to avoid repetition. The computer-readable storage medium may be non-volatile or volatile.
[0079] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0080] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0081] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An interface simulation method for order verification, characterized in that: The interface simulation method is applied to a server, and the server is connected to a client and an associated party in communication. The interface simulation method includes: Obtaining a cancellation instruction of the order information generated by the user through the client to the server, and extracting the interface information of the associated party in the cancellation instruction; Accessing the associated party according to the interface information, and if it is detected that the associated party is unavailable, extracting the instruction identifier of the associated party in the write-off instruction; According to the instruction identifier, the stored return information is matched from a preset storage information library, wherein the preset storage information library is used to store a mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available; The stored return information is used as target information returned by the interface simulating the associated party, and the target information is sent to the client.
2. The interface simulation method for order verification according to claim 1, characterized in that: The extracting interface information of the associated party in the write-off instruction includes: Acquire a switch operation corresponding to the interface information of the associated party, wherein the switch operation is used to control access of the interface information to the associated party; If the switch operation is in the open state, the interface information of the associated party corresponding to the open state in the cancellation instruction is extracted.
3. The interface simulation method for order verification according to claim 1, characterized in that: After extracting the instruction identifier of the associated party in the write-off instruction, the method further includes: Acquire a tracking key value corresponding to the instruction identifier, and combine the tracking key value with the target instruction identifier to obtain a combined instruction identifier; According to the combined instruction identifier, the stored return information is matched from a preset storage information library.
4. The interface simulation method for order verification according to claim 1, characterized in that: After sending the target information to the client, the method further includes: Acquire the user's modification operation on the returned information, and obtain modification information corresponding to the modification operation according to the modification operation; According to the returned information, obtaining the response order of the associated parties to the interface information; According to the response order, the combined instruction identifier and the modification information, the return information is searched in the preset storage information library to obtain the target query information.
5. The interface simulation method for order verification according to claim 4 is characterized in that: After obtaining the target query information, the method further includes: The target query information and the modification information are respectively parsed to obtain first target parsed data corresponding to the target query information and second target parsed data corresponding to the modification information; Replace the second target parsed data with the first target parsed data to obtain new return information; The new returned information is used as new target information returned by the interface simulating the associated party, and the new target information is sent to the client.
6. The interface simulation method for order verification according to claim 5, characterized in that: After sending the new target information to the client, the method further includes: Acquire new interface information corresponding to the new target information in the cancellation instruction; Return to the step of accessing the associated party according to the new interface information until the new target information is sent to the client.
7. The interface simulation method for order verification according to claim 1, characterized in that: Before matching the stored return information from the preset storage information library, the method further includes: Obtaining an interception node between the client and an associated party; All the instruction identifiers and the corresponding return information are transmitted to the interception node for processing, and a storage information library containing the mapping relationship between all the instruction identifiers and the corresponding return information of the associated party is obtained.
8. An interface simulation device for order verification, characterized in that: include: An interface information extraction module, used to obtain a cancellation instruction of the order information generated by the user through the client to the server, and extract the interface information of the associated party in the cancellation instruction; An instruction identifier extraction module, used to access the associated party according to the interface information, and if it is detected that the associated party is unavailable, extract the instruction identifier of the associated party in the write-off instruction; An information matching module, used to match the stored return information from a preset storage information library according to the instruction identifier, wherein the preset storage information library is used to store the mapping relationship between all instruction identifiers of the associated party and the corresponding return information when the associated party is available; The information simulation module is used to use the stored return information as target information returned by the interface of the simulated associated party, and send the target information to the client.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the interface simulation method for order verification described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the interface simulation method for order verification described in any one of claims 1 to 7 is implemented.