Interface verification method and device, storage medium and electronic device
The response data is scored and sorted through interface calls and preset verification scripts, which solves the problem of interface response data verification, ensures that the data complies with business rules, and improves the reliability of business functions.
Patent Information
- Application Number
- CN202411087006.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art, it is impossible to effectively verify whether the interface response data complies with the business function, resulting in business exceptions.
By receiving the interface call instructions sent by the target object, calling the target interface and receiving response data, using the preset verification script to score and sort the response data to determine whether it meets the preset verification rules. If it passes, the verification will be passed, otherwise the interface call will be saved. and send reminder information.
It realizes effective verification of interface response data, ensures that the data meets business needs, and improves the reliability of business functions and abnormal detection capabilities.
Smart Images

Figure CN119003354A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to an interface verification method, device, storage medium and electronic device. Background Art
[0002] At present, in the process of software development, the verification of calling interfaces is relatively simple, usually only the return status code of the calling interface is verified, but it is impossible to determine whether the content returned by the calling interface meets the business function, that is, no error occurs when calling the interface, but the response data is not the data required by the business function, which can easily lead to business abnormalities. Therefore, in the relevant technology, there is a problem of how to verify the response data of the interface.
[0003] Regarding the problem of how to verify the response data of the interface in the related art, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide an interface verification method, device, storage medium and electronic device to at least solve the problem of how to verify the response data of the interface in the related art.
[0005] According to an embodiment of the embodiments of the present application, an interface verification method is provided, including: receiving an interface call instruction sent by a target object, and calling a target interface based on the interface call instruction, wherein the target interface supports multiple interface call instructions; receiving response data returned by the target interface after responding to the interface call instruction, wherein the response data includes multiple groups of different data records, and the multiple groups of different data records correspond to a first arrangement order; verifying the first arrangement order according to a preset verification script to determine whether the response data satisfies preset verification rules, and when it is determined that the response data satisfies the preset verification rules, determining that the target interface verification has passed.
[0006] In an exemplary embodiment, the first arrangement order is verified according to a preset verification script to determine whether the response data satisfies the preset verification rules, including: scoring the multiple groups of different data records according to preset scoring rules to obtain scoring results, wherein the scoring results include the scores of each group of data in the multiple groups of different data records; sorting the multiple groups of different data records according to the scoring results to obtain a second arrangement order; and when it is determined that the first arrangement order is consistent with the second arrangement order, determining that the response data satisfies the preset verification rules.
[0007] In an exemplary embodiment, the multiple groups of different data records are scored according to preset scoring rules to obtain scoring results, including: for each group of data in the multiple groups of different data records, obtaining a target score for each group of data based on the interface call instruction from a preset score table, wherein each group of data has different scores corresponding to different interface call instructions; determining a score for each group of data according to the target score to obtain scores for the multiple groups of different data records; and determining the scores for the multiple groups of different data records as the scoring results.
[0008] In an exemplary embodiment, the method further includes: when it is determined that the response data does not satisfy the preset verification rules, determining that the target interface verification fails; saving the interface call information to a database, wherein the interface call information includes at least the interface call instruction and the response data.
[0009] In an exemplary embodiment, the method further includes: monitoring the verification results of the target interface, obtaining the number of the first verification results and the number of the second verification results, wherein the first verification result indicates that the verification is passed, and the second verification result indicates that the verification is not passed; when it is determined that the verification result meets a preset condition, sending a reminder message to the target object, wherein the preset condition includes at least one of the following: a ratio of the number of the first verification results to the number of the second verification results is greater than a preset ratio, and the number of the second verification results is greater than a preset value.
[0010] In an exemplary embodiment, after determining that the interface verification has passed, the method further includes: sending the response data to the calling page of the target object; determining the display form of the multiple groups of different data records, wherein the display form includes at least highlighting, display font, and text format based on the first arrangement order to visually display the multiple groups of different data records in the display form on the calling page of the target object.
[0011] According to another aspect of an embodiment of the present application, an interface verification system is also provided, including: a verification module, used to receive an interface call instruction sent by a target object, call a target interface based on the interface call instruction, receive response data returned by the target interface in response to the interface call instruction, and verify the response data according to a preset verification script; a recording module, used to save the interface call information to a database when it is determined that the target interface verification fails, wherein the interface call information includes at least the interface call instruction and the response data; a monitoring module, used to monitor the verification result of the target interface, and send a reminder message to the target object when it is determined that the verification result meets a preset condition, wherein the preset condition includes at least one of the following: the ratio of the number of the first verification results to the number of the second verification results is greater than a preset ratio, and the number of the second verification results is greater than a preset value.
[0012] According to another aspect of an embodiment of the present application, an interface verification device is also provided, including: a calling module, used to receive an interface calling instruction sent by a target object, and call a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions; a receiving module, used to receive response data returned by the target interface after responding to the interface calling instruction, wherein the response data includes multiple groups of different data records, and the multiple groups of different data records correspond to a first arrangement order; a verification module, used to verify the first arrangement order according to a preset verification script to determine whether the response data meets the preset verification rules, and when it is determined that the response data meets the preset verification rules, it is determined that the target interface verification has passed.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned interface verification method when running.
[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the interface verification method through the computer program.
[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0016] In an embodiment of the present application, the target interface can be called by receiving an interface call instruction sent by the target object, and then receiving the response data returned by the target interface after responding to the interface call instruction, obtaining multiple groups of different data records arranged in the first arrangement order in the response data, and verifying the response data according to a preset verification script. When it is determined that the response data meets the preset verification rules, it is determined that the target interface verification has passed. The above technical solution solves the problem of how to verify the response data of the interface, thereby achieving the effect of verifying the response data of the interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a hardware environment diagram of an interface verification method according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of an interface verification method according to an embodiment of the present application;
[0021] Figure 3 is a schematic flow chart of an interface verification method according to an embodiment of the present application (I);
[0022] Figure 4 is a schematic flow chart of an interface verification method according to an embodiment of the present application (II);
[0023] Figure 5 It is a structural block diagram of an interface verification device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to one aspect of an embodiment of the present application, an interface verification method is provided. The interface verification method is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (IntelligenceHouse) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above interface verification method can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0027] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0028] In this embodiment, an interface verification method is provided, which is applied to the above terminal device. Figure 2 : is a flowchart of an interface verification method according to an embodiment of the present application, the process includes the following steps:
[0029] Step S202, receiving an interface calling instruction sent by a target object, and calling a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions;
[0030] Optionally, in the above step S202, the target interface may be a product query interface, the calling instruction may be a product query instruction, and the query instruction may be a product name, product category, product brand, etc.
[0031] Step S204, receiving response data returned by the target interface after responding to the interface call instruction, wherein the response data includes a plurality of groups of different data records, and the plurality of groups of different data records correspond to a first arrangement order;
[0032] Optionally, in the above step S204, the target interface takes a product query interface as an example, and the multiple groups of different data records responded by the product query interface may be data records corresponding to multiple different products.
[0033] Step S206, verifying the first arrangement order according to a preset verification script to determine whether the response data meets the preset verification rules. If it is determined that the response data meets the preset verification rules, it is determined that the target interface verification has passed.
[0034] Through the above steps, the target interface can be called by receiving the interface call instruction sent by the target object, and then receiving the response data returned by the target interface after responding to the interface call instruction, obtaining multiple groups of different data records arranged in the first arrangement order in the response data, and verifying the response data according to the preset verification script. When it is determined that the response data meets the preset verification rules, it is determined that the target interface verification has passed. The problem of how to verify the response data of the interface in the related art is solved, thereby achieving the effect of verifying the response data of the interface.
[0035] In an exemplary embodiment, the process of verifying the response data according to a preset verification script in the above step S206 specifically includes: scoring the multiple groups of different data records according to preset scoring rules to obtain scoring results, wherein the scoring results include the score of each group of data in the multiple groups of different data records; sorting the multiple groups of different data records according to the scoring results to obtain a second arrangement order; and when it is determined that the first arrangement order is consistent with the second arrangement order, determining that the response data satisfies the preset verification rules.
[0036] Optionally, in the above embodiment, for example, the data of the target interface response is multiple commodities, and the preset search results for different search keywords (equivalent to interface call instructions) are also different during the interface development process, wherein the preset search results sort the multiple commodities according to the preset scoring rules, for example, by assigning different weights to the sales volume, page views, clicks, etc. of the commodities to obtain the sorting results. Therefore, after obtaining the multiple commodities responded by the target interface, the above preset scoring rules can be used to score them and determine whether the obtained sorting results are consistent with the sorting results of the response data.
[0037] In an exemplary embodiment, the above-mentioned process of scoring the multiple groups of different data records according to preset scoring rules to obtain scoring results can be achieved in the following way: for each group of data in the multiple groups of different data records, obtaining the target score of each group of data based on the interface call instruction from a preset score table, wherein each group of data has different scores corresponding to different interface call instructions; determining the score of each group of data according to the target score to obtain the scores of the multiple groups of different data records; and determining the scores of the multiple groups of different data records as the scoring results.
[0038] Optionally, in the above embodiment, the target interface takes the product query interface as an example. When the query instruction is "air conditioner", the display order of a certain vertical air conditioner product is relatively late, so the corresponding score is relatively low. When the query instruction is "vertical air conditioner", the display order of the above vertical air conditioner product is relatively early, so the corresponding score is relatively high.
[0039] In an exemplary embodiment, the method further includes: when it is determined that the response data does not satisfy the preset verification rules, determining that the target interface verification fails; saving the interface call information to a database, wherein the interface call information includes at least the interface call instruction and the response data.
[0040] Optionally, in the above embodiment, when the response data of the target interface fails to pass the verification, an error log is recorded, and the erroneous response data and call information are saved in a database so that developers can adjust the response data of the target interface according to the log information.
[0041] In an exemplary embodiment, the method further includes: monitoring the verification results of the target interface, obtaining the number of the first verification results and the number of the second verification results, wherein the first verification result indicates that the verification is passed, and the second verification result indicates that the verification is not passed; when it is determined that the verification result meets a preset condition, sending a reminder message to the target object, wherein the preset condition includes at least one of the following: a ratio of the number of the first verification results to the number of the second verification results is greater than a preset ratio, and the number of the second verification results is greater than a preset value.
[0042] In an exemplary embodiment, after determining that the interface verification has passed in the above step S206, the method also includes: sending the response data to the calling page of the target object; determining the display form of the multiple groups of different data records, wherein the display form at least includes highlighting, display fonts, and text formats based on the first arrangement order to visually display the multiple groups of different data records in the display form on the calling page of the target object.
[0043] Optionally, in the above embodiment, for example, the data in the front row of the response data is set to be highlighted, the font is enlarged, bolded, etc.
[0044] In an exemplary embodiment, an interface verification system is also provided, including: a verification module, used to receive an interface call instruction sent by a target object, call a target interface based on the interface call instruction, receive response data returned by the target interface in response to the interface call instruction, and verify the response data according to a preset verification script; a recording module, used to save the interface call information to a database when it is determined that the target interface verification fails, wherein the interface call information includes at least the interface call instruction and the response data; a monitoring module, used to monitor the verification result of the target interface, and send a reminder message to the target object when it is determined that the verification result meets a preset condition, wherein the preset condition includes at least one of the following: the ratio of the number of the first verification results to the number of the second verification results is greater than a preset ratio, and the number of the second verification results is greater than a preset value.
[0045] In order to better understand the process of the above-mentioned interface verification method, the implementation method flow of the above-mentioned interface verification is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0046] In this embodiment, an interface verification method is provided. Figure 3 is a schematic flow chart of an interface verification method according to an embodiment of the present application, such as Figure 3 As shown, the specific steps are as follows:
[0047] Step S301: the database responds to the ES (Elastic Search, an open source distributed search engine) search engine with basic static data based on the interface call instruction;
[0048] Step S302: The ES search engine scores and sorts the data responded by the database;
[0049] Step S303: the verification module performs a secondary verification on the score ranking results of the ES search engine according to preset rules. If the verification passes, the response data is displayed according to the ranking results of the ES search engine;
[0050] Step S304: If the verification fails, an error log is recorded, and the call information and response data are recorded in a database so that developers can adjust the target interface according to the log information.
[0051] In an alternative embodiment, Figure 4 is a schematic flow chart of an interface verification method according to an embodiment of the present application, such as Figure 4 As shown, the specific steps are as follows:
[0052] Step S401: input search keywords (equivalent to interface call instructions) to call the target interface;
[0053] Step S402: ES search engine queries data according to search keywords;
[0054] Step S403: score the queried data through ES and program design logic, and respond to the queried data according to the score result;
[0055] Step S404: Perform secondary verification on the query data of the response according to the preset scoring rules to determine whether the query data of the response is correct. If so, execute step S405; otherwise, execute step S406;
[0056] Step S405: displaying data on the front-end page;
[0057] Step S406: Record the interface call log to record the call information and response data in the database;
[0058] Step S407: monitoring log record information, and sending reminder information to the target object when a preset condition is met. The preset condition includes, for example, the number of times the error log is recorded.
[0059] Through the above embodiments, the response data of the target call interface can be automatically verified, thereby ensuring the accuracy of the business function, and business anomalies can be discovered in time and the corresponding person in charge can be notified to handle them, thereby improving the reliability of the business function.
[0060] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0061] Figure 5 is a structural block diagram of an interface verification device according to an embodiment of the present application; Figure 5 As shown, including:
[0062] A calling module 52, configured to receive an interface calling instruction sent by a target object, and to call a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions;
[0063] The receiving module 54 is used to receive the response data returned by the target interface after responding to the interface call instruction, wherein the response data includes a plurality of different groups of data records, and the plurality of different groups of data records correspond to the first arrangement order;
[0064] The verification module 56 is used to verify the first arrangement order according to a preset verification script to determine whether the response data meets the preset verification rules. If it is determined that the response data meets the preset verification rules, it is determined that the target interface verification has passed.
[0065] Through the above device, the target interface can be called by receiving the interface call instruction sent by the target object, and then the response data returned by the target interface after responding to the interface call instruction is received, and multiple groups of different data records arranged in the first arrangement order in the response data are obtained. The response data is verified according to the preset verification script, and when it is determined that the response data meets the preset verification rules, it is determined that the target interface verification has passed. The problem of how to verify the response data of the interface in the related art is solved, and the effect of verifying the response data of the interface is achieved.
[0066] In an exemplary embodiment, the verification module 56 is further used to: score the multiple groups of different data records according to preset scoring rules to obtain scoring results, wherein the scoring results include the scores of each group of data in the multiple groups of different data records; sort the multiple groups of different data records according to the scoring results to obtain a second arrangement order; and when it is determined that the first arrangement order is consistent with the second arrangement order, determine that the response data satisfies the preset verification rules.
[0067] In an exemplary embodiment, the verification module 56 is further used to: for each group of data in the multiple groups of different data records, obtain from a preset score table a target score for each group of data based on the interface call instruction, wherein each group of data has different scores corresponding to different interface call instructions; determine a score for each group of data based on the target score to obtain scores for the multiple groups of different data records; and determine the scores for the multiple groups of different data records as the scoring results.
[0068] In an exemplary embodiment, the above-mentioned verification module 56 is also used to: determine that the target interface verification fails when it is determined that the response data does not satisfy the preset verification rules; save the interface call information into a database, wherein the interface call information at least includes the interface call instruction and the response data.
[0069] In an exemplary embodiment, the above-mentioned interface verification device also includes: a monitoring module, which is used to monitor the verification results of the target interface, obtain the number of the first verification results and the number of the second verification results, wherein the first verification result indicates that the verification is passed, and the second verification result indicates that the verification is not passed; when it is determined that the verification result meets the preset conditions, a reminder message is sent to the target object, wherein the preset conditions include at least one of the following: the ratio of the number of the first verification results to the number of the second verification results is greater than the preset ratio, and the number of the second verification results is greater than the preset value.
[0070] In an exemplary embodiment, the above-mentioned interface verification device also includes: a display module, used to send the response data to the calling page of the target object; determine the display form of the multiple groups of different data records, wherein the display form at least includes highlighting, display font, and text format based on the first arrangement order to visually display the multiple groups of different data records in the calling page of the target object in the display form.
[0071] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0072] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0073] S1, receiving an interface calling instruction sent by a target object, and calling a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions;
[0074] S2, receiving response data returned by the target interface after responding to the interface call instruction, wherein the response data includes a plurality of groups of different data records, and the plurality of groups of different data records correspond to a first arrangement order;
[0075] S3, verifying the first arrangement order according to a preset verification script to determine whether the response data satisfies a preset verification rule, and if it is determined that the response data satisfies the preset verification rule, determining that the target interface verification has passed.
[0076] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0077] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0078] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0079] S1, receiving an interface calling instruction sent by a target object, and calling a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions;
[0080] S2, receiving response data returned by the target interface after responding to the interface call instruction, wherein the response data includes a plurality of groups of different data records, and the plurality of groups of different data records correspond to a first arrangement order;
[0081] S3, verifying the first arrangement order according to a preset verification script to determine whether the response data satisfies a preset verification rule, and if it is determined that the response data satisfies the preset verification rule, determining that the target interface verification has passed.
[0082] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0083] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0084] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0085] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.
[0086] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0087] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0088] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An interface verification method, characterized in that: include: Receiving an interface calling instruction sent by a target object, and calling a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions; Receiving response data returned by the target interface after responding to the interface call instruction, wherein the response data includes a plurality of groups of different data records, and the plurality of groups of different data records correspond to a first arrangement order; The first arrangement order is verified according to a preset verification script to determine whether the response data satisfies a preset verification rule. If it is determined that the response data satisfies the preset verification rule, it is determined that the target interface verification has passed.
2. The interface verification method according to claim 1, characterized in that: Verifying the first arrangement order according to a preset verification script to determine whether the response data satisfies a preset verification rule includes: Scoring the multiple groups of different data records according to a preset scoring rule to obtain a scoring result, wherein the scoring result includes a score for each group of data in the multiple groups of different data records; Sorting the multiple groups of different data records according to the scoring results to obtain a second arrangement order; When it is determined that the first arrangement order is consistent with the second arrangement order, it is determined that the response data satisfies the preset verification rule.
3. The interface verification method according to claim 2, characterized in that: Scoring the multiple groups of different data records according to preset scoring rules to obtain scoring results, including: For each group of data in the multiple groups of different data records, obtaining a target score of each group of data based on the interface call instruction from a preset score table, wherein each group of data has different scores corresponding to different interface call instructions; Determine a score for each set of data according to the target score, and obtain scores for the multiple sets of different data records; Scores of the plurality of different groups of data records are determined as the scoring results.
4. The interface verification method according to claim 1, characterized in that: The method further comprises: If it is determined that the response data does not satisfy the preset verification rule, determining that the target interface verification fails; The interface call information is saved in a database, wherein the interface call information at least includes the interface call instruction and the response data.
5. The interface verification method according to claim 1, characterized in that: The method further comprises: Monitoring the verification result of the target interface, obtaining the number of the first verification results and the number of the second verification results, wherein the first verification result indicates that the verification is passed, and the second verification result indicates that the verification is not passed; When it is determined that the verification result meets a preset condition, a reminder message is sent to the target object, wherein the preset condition includes at least one of the following: the ratio of the number of the first verification results to the number of the second verification results is greater than a preset ratio, and the number of the second verification results is greater than a preset value.
6. The interface verification method according to claim 1, characterized in that: After determining that the interface verification passes, the method further includes: Sending the response data to the calling page of the target object; Determine the display form of the plurality of different data records, wherein the display form at least includes highlighting, display font, text format The multiple groups of different data records are visually displayed on the calling page of the target object in the display form based on the first arrangement order.
7. An interface verification system, characterized in that: include: A verification module is used to receive an interface call instruction sent by a target object, call a target interface based on the interface call instruction, receive response data returned by the target interface in response to the interface call instruction, and verify the response data according to a preset verification script; A recording module, used for saving the interface call information into a database when it is determined that the target interface verification fails, wherein the interface call information at least includes the interface call instruction and the response data; A monitoring module is used to monitor the verification results of the target interface, and send a reminder message to the target object when it is determined that the verification results meet the preset conditions, wherein the preset conditions include at least one of the following: the ratio of the number of the first verification results to the number of the second verification results is greater than the preset ratio, and the number of the second verification results is greater than the preset value.
8. An interface verification device, characterized in that: include: A calling module, used for receiving an interface calling instruction sent by a target object, and calling a target interface based on the interface calling instruction, wherein the target interface supports multiple interface calling instructions; A receiving module, used for receiving response data returned by the target interface after responding to the interface call instruction, wherein the response data includes a plurality of groups of different data records, and the plurality of groups of different data records correspond to a first arrangement order; A verification module is used to verify the first arrangement order according to a preset verification script to determine whether the response data meets the preset verification rules, and if it is determined that the response data meets the preset verification rules, determine that the target interface verification has passed.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
