CN117149820B - Borrowing operation detection method, device, equipment and storage medium - Google Patents

Borrowing operation detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN117149820B
CN117149820B CN202311239616.XA CN202311239616A CN117149820B CN 117149820 B CN117149820 B CN 117149820B CN 202311239616 A CN202311239616 A CN 202311239616A CN 117149820 B CN117149820 B CN 117149820B
Authority
CN
China
Prior art keywords
borrowing
information
interface
database
borrowing operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311239616.XA
Other languages
Chinese (zh)
Other versions
CN117149820A (en
Inventor
胡啸旭
郝大程
李振宇
廖宜银
张文超
李尼科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Changyin May 8th Consumer Finance Co ltd
Original Assignee
Hunan Changyin May 8th Consumer Finance Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Changyin May 8th Consumer Finance Co ltd filed Critical Hunan Changyin May 8th Consumer Finance Co ltd
Priority to CN202311239616.XA priority Critical patent/CN117149820B/en
Publication of CN117149820A publication Critical patent/CN117149820A/en
Application granted granted Critical
Publication of CN117149820B publication Critical patent/CN117149820B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a borrowing operation detection method, a device, equipment and a storage medium, which are applied to the technical field of computers, and the method comprises the following steps: ordering all borrowing operations according to the business date to obtain the execution sequence of the borrowing operations of each borrowing; detecting all information returned by the interface and all information of the database before and after the borrowing operation is executed when the borrowing operation of each borrow is executed according to the execution sequence; and outputting abnormal information corresponding to the borrowing operation for detecting the abnormality. According to the method, the borrowing operation of each borrowing is arranged according to the service date, so that the full-life flow detection of multiple borrowing under the same data environment is realized, the environment is not required to be repeatedly configured, the time-consuming problem of repeated detection is reduced while the full-life flow of the borrowing is covered, and the execution time of an automatic task is shortened; and the method for directly detecting all returned data is more efficient and comprehensive.

Description

Borrowing operation detection method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting borrowing operations.
Background
The credit core system is a core computer software system for a bank or consumer finance company to process credit business. After a user initiates a borrowing, the credit core system generates information such as a borrowing parameter, a repayment plan and the like of the borrowing, pays the user on a repayment day, and records actual repayment and arrearage information of the user until the borrowing is cleared.
The credit core system performing the borrowing operation may experience errors during the update iteration. Thus, a tester is required to test the credit core system. At this stage, there are generally two methods for borrowing detection: (1) automatic detection based on real-time construction of data. Regression verification is performed on the system functions, an automatic test script generally takes test cases as minimum units, each test case performs a single operation after data preparation is completed, and an operation result is verified. After the data is constructed in real time, the corresponding test case is called to detect the constructed data, and when the method is applied to a credit core system, the test case needs to perform more complex data preparation work, wherein the execution of multiple batch tasks of each data is also involved, so that the method is very time-consuming. (2) automatic detection based on data backup. The method simplifies the data preparation steps and shortens the data preparation time, but needs to maintain a large amount of backup database information, increases the maintenance cost and does not achieve the effect of borrowing the whole life flow detection.
Thus, current borrowing operations detection methods suffer from detection time consuming and non-life-time flow detection situations.
Disclosure of Invention
Accordingly, the present invention is directed to a borrowing operation detection method, device, apparatus and storage medium, which solve the problems of low borrowing operation detection efficiency and incomplete detection in the prior art.
In order to solve the above technical problems, the present invention provides a borrowing operation detection method, including:
Ordering all borrowing operations according to the business date to obtain the execution sequence of the borrowing operations of each borrowing; the service date is the execution date of the borrowing operation of each borrower;
detecting all information returned by the interface and all information of the database before and after the borrowing operation is executed when the borrowing operation of each borrow is executed according to the execution sequence;
and outputting abnormal information corresponding to the borrowing operation for detecting the abnormality.
Optionally, the detecting all information returned by the interface and all information of the database before performing the borrowing operation and after performing the borrowing operation includes:
calling an external http interface of a credit core system to acquire all information returned by the interface; all the information returned by the interface is dictionary object type;
Acquiring all information of a MySQL database by inquiring the database; all information of the database is a tuple object type;
And detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm.
Optionally, the detecting all information returned by the interface by using a depth difference comparison algorithm includes:
Comparing all information returned by the interface with expected information returned by the interface by corresponding keys;
and when the corresponding key comparison is not different, comparing all the information returned by the interface with the expected information returned by the interface according to the corresponding key value.
Optionally, the detecting all information of the database by using a depth difference comparison algorithm includes:
Converting the tuple object type to a list object type;
Comparing all information in the database with elements of expected information of the database one by one in the form of the list object types.
Optionally, the outputting the abnormal information corresponding to the abnormal borrowing operation includes:
When abnormal borrowing operation is detected, continuing to detect subsequent borrowing operation, and at least recording the position, judgment condition, actual value and expected value of the abnormal borrowing operation;
and outputting abnormal information after all borrowing operations are detected.
Optionally, after all borrowing operations are detected, outputting abnormal information includes:
After all borrowing operations are detected, matching the abnormal information with an exclusion list; the exclusion list is used for ignoring the specified elements; the specified elements include at least: a request id to distinguish request uniqueness, a time parameter in the return parameter, and a borrowing id to distinguish borrowing uniqueness.
And outputting abnormal information which is not successfully matched.
The invention also provides a borrowing operation detection device, which comprises:
The ordering module is used for ordering the borrowing operations of all borrowing according to the service date to obtain the execution sequence of the borrowing operations of all borrowing; the service date is the execution date of the borrowing operation of each borrower;
The detection module is used for detecting all information returned by the interface and all information of the database before the borrowing operation is executed and after the borrowing operation is executed when the borrowing operation of each borrowing is executed according to the execution sequence;
and the output module is used for outputting abnormal information corresponding to the borrowed operation for detecting the abnormality.
Optionally, the detection module includes:
the interface return information acquisition unit is used for calling an external http interface of the credit core system to acquire all information returned by the interface; all the information returned by the interface is dictionary object type;
The database information acquisition unit is used for acquiring all information of the database by utilizing a query MySQL database mode; all information of the database is a tuple object type;
And the comparison detection unit is used for detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm.
The invention also provides a borrowing operation detection device, which comprises:
A memory for storing a computer program;
and the processor is used for realizing the borrowing operation detection method when executing the computer program.
The present invention also provides a storage medium having stored therein computer executable instructions that when loaded and executed by a processor implement a borrowing operation detection method as described above.
Therefore, the invention obtains the execution sequence of the borrowing operation of each borrowing by sequencing the borrowing operation of all borrowing according to the business date; detecting all information returned by the interface and all information of the database before and after the borrowing operation is executed when the borrowing operation of each borrow is executed according to the execution sequence; and outputting abnormal information corresponding to the borrowing operation for detecting the abnormality. According to the method, the borrowing operation of each borrowing is arranged according to the service date, so that the full-life flow detection of multiple borrowing under the same data environment is realized, the environment is not required to be repeatedly configured, the time-consuming problem of repeated detection is reduced while the full-life flow of the borrowing is covered, and the execution time of an automatic task is shortened; and the method for directly detecting all returned data is more efficient and comprehensive.
In addition, the invention also provides a borrowing operation detection device, equipment and a storage medium, which have the same beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a borrowing operation detection method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an example of an exception information processing flow provided in an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for detecting borrowing operations according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a borrowing operation detection device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a borrowing operation detection device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The credit core system is a core computer software system for a bank or consumer finance company to process credit business. After a user initiates a borrowing, the credit core system generates information such as a borrowing parameter, a repayment plan and the like of the borrowing, pays the user on a repayment day, and records actual repayment and arrearage information of the user until the borrowing is cleared.
The existing detection method for borrowing operation is divided into manual detection and automatic detection. Because the manual test needs to be performed in a plurality of operation stages of the borrowing, the manual test has a very large workload due to long operation flow and a plurality of inspection items (including a plurality of system external interfaces and a plurality of database tables), and is easy to miss in dense data comparison. Because software automation testing uses a computer to verify the information processed and recorded by the system, the correctness of the software system is rapidly and accurately ensured, and therefore, an automation testing method is generally used in the world. Regression verification is performed on the system functions by using an automatic test method, so that a large number of repeated verification works are avoided being manually executed. The automated test scripts generally take test cases as minimum units, each test case performs a single operation after data preparation is completed, and verifies the operation result. When the method is applied to a credit core system, each test case needs to perform complex data preparation work, wherein the execution of batch tasks each day is time-consuming, so that the existing method generally prepares data in advance by backing up databases and restores the data prepared in advance in the test cases by restoring the databases. Therefore, the method provides an automatic test method for borrowing the whole life flow, and the method realizes the inspection of the whole life flow of multiple borrowings in the same data environment by arranging the borrowing operation according to the service date, thereby solving the problem of long time consumption of automatic task execution.
Meanwhile, when the system information is checked by the automatic use case, only the interface return and part of key elements of the database are generally selected for checking, the checking is not comprehensive enough, and the interface return of the credit core system is generally provided with a plurality of key value pairs, so that the database table fields are also very many. The method also compares the interface return and database table information through the whole batch inspection method, and excludes the specified fields, so that only the rest part is inspected in batches, and the inspection in the automatic use case is more comprehensive and flexible.
Referring to fig. 1 in detail, fig. 1 is a flowchart of a borrowing operation detection method according to an embodiment of the invention. The method may include:
S101: ordering all borrowing operations according to the business date to obtain the execution sequence of the borrowing operations of each borrowing; the service date is the execution date of the borrowing operation of each borrower.
The execution main body of the embodiment is a credit core system, and the credit core system needs to check the whole life flow of borrowing data of different scenes according to business dates. The borrowing of different scenes is formed by any combination of various borrowing operations. The borrowing operations may include normal payment on the billing day, failed payment on the billing day, advanced payment, advanced statement, active payment, etc. The borrowing scene composed of the method is quite various, and the borrowing scene can comprise normal payment all the time, multiple early payment, early settlement in the middle stage, early settlement in the end stage, failure payment after normal payment, failure payment after early payment, failure payment all the time, overdue amount of the active payment part after failure payment, normal payment after one period of failure payment, normal payment after multiple periods of failure payment, active payment after failure payment, early payment again and the like. Before formally performing the detection, the test environment needs to be initialized, which specifically may include emptying the database, cleaning the ftp (FILE TRANSFER Protocol) directory, and resetting the service date to be the start date.
S102: when executing the borrowing operation of each borrow according to the execution sequence, all information returned by the interface and all information of the database are detected before executing the borrowing operation and after executing the borrowing operation.
Specifically, a system operation flow is formed after a plurality of borrowing operation steps are arranged according to a service date sequence, a plurality of borrowing covers all test scenes, and each test scene comprises borrowing operation and inspection before and after each operation node. In the checking before and after each operation node, checking the checking items in batches, wherein the checking items comprise the return information of the external interface of the credit core system and the database table information of the credit core system.
Further, the detecting all information returned by the interface and all information of the database before and after the borrowing operation is performed when the borrowing operation of each borrow is performed according to the execution sequence may include the following steps:
Step 21: calling an external http interface of a credit core system to acquire all information returned by the interface; all information returned by the interface is dictionary object type;
Step 21: acquiring all information of a database by using a query MySQL database mode; all information of the database is a tuple object type;
step 23: and detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm.
Specifically, considering that the current-stage general automatic test only takes part of fields for detection, the correctness of the result is judged only by comparing part of detected elements with expected results, and the detection has the problem of incomplete detection. Thus, the present embodiment can use a batch inspection method, with the comparison object being the entire content returned by the interface and the entire content of the database. Batch inspection refers to comparing the interface return data and the database return information as a whole with a preset expected result, rather than extracting some elements in the interface and database return information.
The present embodiment does not limit the acquisition order and the detection order of the interface return information and the database table information. For example, simultaneous acquisition and simultaneous detection may be performed; or can be acquired sequentially and detected sequentially. The interface returns information to call the external http (HyperText Transfer Protocol ) interface mode of the credit core system to obtain. All information returned by the interface is dictionary object type. Wherein the interface may comprise: the system comprises a borrowing information query interface, a repayment plan query interface, a client-level repayment plan query interface, a client limit query interface, a repayment history query interface, a system period repayment query interface, a repayment record query interface and the like. Database table information is obtained by querying a mysql (an open source database service) database. All information of the database is tuple object type. The database table information may include: order information table, account information table, borrowing information table, repayment schedule table, credit schedule table, repayment allocation table, overdue list, loan balance list, etc. And using a depth difference comparison algorithm to rapidly compare values of basic types by recursively traversing structures of two objects, and obtaining differences of corresponding elements.
Further, the detecting all information returned by the interface by using the depth difference comparison algorithm may include the following steps:
Step 31: comparing all information returned by the interface with expected information returned by the interface by corresponding keys;
Step 32: and when the corresponding key comparison is not different, comparing all the information returned by the interface with the expected information returned by the interface according to the corresponding key value.
Specifically, taking a borrowing information query interface as an example, for dictionary objects, firstly determining the difference of keys of two comparison objects, for the same keys, converting the value corresponding to the key into a hash value, and determining whether the difference exists by comparing the hash values. For a multi-layered nested dictionary object, recursively traversing the nested dictionary object, repeating the above key and value comparison step until a difference result is obtained for all key-value pairs in the dictionary object.
Further, the detecting all information of the database by using the depth difference comparison algorithm may include the following steps:
step 41: converting the tuple object type to a list object type;
Step 42: all information in the database is compared one by one with elements of the expected information of the database in the form of list object types.
Specifically, taking the information of the repayment schedule table of the database as an example, for comparison, the tuple object is converted into the list object, and the differences are compared one by one according to the element sequence in the list object. For nested tuple objects with multiple layers, recursively traversing the nested objects, and repeating the comparison until a difference result of all elements in the tuple object is obtained.
S103: and outputting abnormal information corresponding to the borrowing operation for detecting the abnormality.
The present embodiment is not limited to the output step. For example, when the presence of an abnormality is detected, abnormality information may be directly output, and the subsequent detection step may be stopped; or when detecting that the abnormality exists, directly outputting the abnormality information and continuing the subsequent detection step; or after all borrowing operations are detected, all abnormal information can be output simultaneously; or after all borrowing operations are detected, all abnormal information is arranged, and the arranged information is output, wherein the arrangement can comprise the step of eliminating part of abnormal information; or it may also be to check for anomaly information.
Further, the outputting the abnormality information corresponding to the abnormal borrowing operation may include the steps of:
step 41: when abnormal borrowing operation is detected, continuing to detect subsequent borrowing operation, and at least recording the position, judgment condition, actual value and expected value of the abnormal borrowing operation;
step 42: and outputting abnormal information after all borrowing operations are detected.
The embodiment combines the soft assertion, does not interrupt the step of the process where the difference points appear, and ensures the complete execution of the whole life process. And when the abnormal borrowing operation is detected, continuing to detect the subsequent borrowing operation until the detection of the borrowing operation steps of all borrowing is completed. The specific soft assertion implementation method can capture assertion errors through a try-exception (structured exception handling) method, and record information such as positions, judgment conditions, actual values, expected values and the like where test cases do not pass.
Further, after all borrowing operations are detected, outputting the abnormal information may include the following steps:
After all borrowing operations are detected, matching the abnormal information with an exclusion list; the exclusion list is used to ignore the specified element; the specified elements include at least: a request id to distinguish request uniqueness, a time parameter in the return parameter, and a borrowing id to distinguish borrowing uniqueness.
Specifically, the method can also flexibly exclude the appointed elements at the same time, so that the inspection in the automation use case is more comprehensive and flexible. For an abnormal element to be ignored, the element is ignored by designating the element name, the specific method is that the designated element name is composed into an exclusion list, and whether the difference result of the element is ignored is determined by judging whether the element in the difference result is in the exclusion list. Thus, ignoring the difference result of the element will not be in the final difference result. The ignore element may include a request id (Identity document, identification number) to distinguish request uniqueness, a time parameter in the return parameters, a borrowed id to distinguish borrowed uniqueness, and so on. Specific abnormal result processing process may refer to fig. 2, and fig. 2 is an exemplary diagram of an abnormal information processing flow provided in an embodiment of the present invention. Acquiring interface return information and database table information, comparing the whole information of the two types with corresponding expected data to obtain a difference result, judging whether a difference element of the difference result exists in an exclusion list, if so, deleting the difference element in the exclusion list, and outputting a deleted abnormal result; if not, outputting all the difference results.
Further, after the detecting of all borrowing operations is completed and the outputting of the abnormality information is completed, the method may further include the following steps:
And counting the proportion of the borrowing operation without abnormality, outputting an automatic test report, and completing an automatic task.
By applying the borrowing operation detection method provided by the embodiment of the invention, the execution sequence of the borrowing operation of each borrowing is obtained by sequencing all the borrowing operations of the borrowing according to the service date; the business date is the execution date of the borrowing operation of each borrower; detecting all information returned by the interface and all information of the database before and after the borrowing operation is executed when the borrowing operation of each borrow is executed according to the execution sequence; and outputting abnormal information corresponding to the borrowing operation for detecting the abnormality. According to the method, the borrowing operation of each borrowing is arranged according to the service date, so that the full-life flow detection of multiple borrowing under the same data environment is realized, the environment is not required to be repeatedly configured, the time-consuming problem of repeated detection is reduced while the full-life flow of the borrowing is covered, and the execution time of an automatic task is shortened; and the method for directly detecting all returned data is more efficient and comprehensive. In addition, in the detection process of the automatic use case, only the rest part is inspected in batches by neglecting the depth difference comparison of the specified elements, so that the inspection in the automatic use case is more flexible, and more comprehensive data inspection is realized; and, carry on the soft assertion to compare the difference result obtained, guarantee the inspection of the whole life flow is not interrupted.
For better understanding of the present invention, reference may be made to fig. 3, and fig. 3 is a flowchart illustrating a method for detecting borrowing operations according to an embodiment of the present invention, which may include:
(1) Initializing a test environment comprises emptying a database, cleaning an ftp directory, and resetting a business date to be a starting date.
(2) And performing the arrangement of a plurality of borrowing operation steps according to the service date sequence to form a system operation flow, wherein the borrowing operation steps cover all test scenes, and each test scene comprises borrowing operation and inspection before and after each operation node.
The process starts with the initiation of borrowing, and the business date of the credit core system is increased through the execution of batch tasks. And carrying out advanced partial repayment and advanced settlement on the borrowing A and the borrowing B on the same business date, and checking interface return information and database information before and after operation.
After the whole process of the business date is completed, batch tasks are executed again, so that the business date is added to the account date of the borrowing C. And (3) checking interface return information and database information before and after deduction automatically according to the fact that the C normally deducts money on the day of the bill and the bill of the first period is finished. Under the same business date, the borrowing D fails to deduct money on the bill date, the bill of the period is not completed, the borrowing is overdue, and the interface returns and database information before and after overdue are automatically checked.
And executing batch tasks again, increasing service dates, carrying out advanced part repayment again in a second bill period of the borrowing A, checking interface return and database information before and after the advanced part repayment, carrying out active repayment on overdue borrowing D on the same date, and checking interface return information and database information before and after the active repayment. The subsequent process is similar to that described above until all borrowing steps are completed.
In the checking before and after each operation node, batch checking is performed on checking items, wherein the checking items comprise return information of an external interface of a credit core system and database table information of the credit core system, and taking checking interface information after the advance part of the borrowing A in fig. 3 is taken as an example, the checking of the operation steps of the borrowing operation of the advance part of the borrowing A can be arranged according to a sequence, and the checking can be sequentially a borrowing information inquiry interface, a repayment plan inquiry interface, a client credit inquiry interface, a repayment history inquiry interface, a system period repayment inquiry interface and a repayment record inquiry interface. If the borrowing information inquiry interface and the client limit inquiry interface are abnormal, a difference result is obtained when the borrowing information inquiry interface is checked, the interface checking step declares that the interface checking step does not pass, but the subsequent interface checking is continued until all the interface checking is completed, and two checking failure items are obtained, namely the borrowing information inquiry interface and the client limit inquiry interface. After the step is completed, the whole flow is not interrupted, and the step of checking the database information after the partial repayment is carried out in advance according to the borrow A is continued.
The following describes a borrowing operation detection device provided in an embodiment of the present invention, and the borrowing operation detection device described below and the borrowing operation detection method described above may be referred to correspondingly.
Referring to fig. 4 specifically, fig. 4 is a schematic structural diagram of a borrowing operation detection device according to an embodiment of the present invention, which may include:
the ordering module 100 is configured to order the borrowing operations of all borrows according to the service date, so as to obtain an execution sequence of the borrowing operations of all borrows; the service date is the execution date of the borrowing operation of each borrower;
The detecting module 200 is configured to detect, when performing the borrowing operation of each borrow according to the execution order, all information returned by the interface and all information of the database before performing the borrowing operation and after performing the borrowing operation;
and the output module 300 is configured to output abnormality information corresponding to the borrowing operation for detecting the abnormality.
Based on the above embodiment, the detection module 200 may include:
the interface return information acquisition unit is used for calling an external http interface of the credit core system to acquire all information returned by the interface; all the information returned by the interface is dictionary object type;
The database information acquisition unit is used for acquiring all information of the database by utilizing a query MySQL database mode; all information of the database is a tuple object type;
And the comparison detection unit is used for detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm.
Based on the above embodiment, the contrast detection unit may include:
The first detection subunit is used for carrying out corresponding key comparison on all the information returned by the interface and the expected information returned by the interface;
and the second detection subunit is used for comparing all the information returned by the interface with the expected information returned by the interface according to the corresponding key value when the corresponding key comparison is not different.
Based on the above embodiment, the contrast detection unit may include:
a conversion subunit for converting the tuple object type to a list object type;
and a third detection subunit, configured to compare all information in the database with elements of expected information of the database one by one in the form of the list object type.
Based on any of the above embodiments, the output module 300 may include:
The abnormal processing unit is used for continuously detecting the subsequent borrowing operation when the abnormal borrowing operation is detected, and at least recording the position, the judging condition, the actual value and the expected value of the abnormal borrowing operation;
The abnormal information output unit is used for outputting abnormal information after all borrowing operations are detected.
Based on any of the above embodiments, the abnormality information output unit may include:
The matching output subunit is used for matching the abnormal information with the exclusion list after all borrowing operations are detected; the exclusion list is used for ignoring the specified elements; the specified elements include at least: a request id to distinguish request uniqueness, a time parameter in the return parameter, and a borrowing id to distinguish borrowing uniqueness.
By applying the borrowing operation detection device provided by the embodiment of the invention, the sorting module 100 is used for sorting all borrowing operations according to service dates to obtain the execution sequence of each borrowing operation; the business date is the execution date of the borrowing operation of each borrower; the detecting module 200 is configured to detect, when performing borrowing operations of each borrow according to the execution order, all information returned by the interface and all information of the database before performing the borrowing operations and after performing the borrowing operations; and the output module 300 is configured to output abnormality information corresponding to the borrowing operation for detecting the abnormality. The device realizes the detection of the whole life flow of multiple borrowings in the same data environment by arranging the borrowing operation of each borrowing according to the service date, does not need to repeatedly configure the environment, reduces the time consumption problem of repeated detection while covering the whole life flow of the borrowing, and shortens the execution time of an automatic task; and the method for directly detecting all returned data is more efficient and comprehensive. In addition, in the detection process of the automatic use case, only the rest part is inspected in batches by neglecting the depth difference comparison of the specified elements, so that the inspection in the automatic use case is more flexible, and more comprehensive data inspection is realized; and, carry on the soft assertion to compare the difference result obtained, guarantee the inspection of the whole life flow is not interrupted.
The following describes a borrowing operation detection device provided in an embodiment of the present invention, where the borrowing operation detection device described below and the borrowing operation detection method described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a borrowing operation detection device according to an embodiment of the present invention, which may include:
A memory 10 for storing a computer program;
The processor 20 is configured to execute a computer program to implement the borrowing operation detection method described above.
The memory 10, the processor 20, and the communication interface 31 all communicate with each other via a communication bus 32.
In the embodiment of the present invention, the memory 10 is used for storing one or more programs, the programs may include program codes, the program codes include computer operation instructions, and in the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
Ordering all borrowing operations according to the business date to obtain the execution sequence of the borrowing operations of each borrowing; the business date is the execution date of the borrowing operation of each borrower;
Detecting all information returned by the interface and all information of the database before and after the borrowing operation is executed when the borrowing operation of each borrow is executed according to the execution sequence;
and outputting abnormal information corresponding to the borrowing operation for detecting the abnormality.
In one possible implementation, the memory 10 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, memory 10 may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a fpga or other programmable logic device, and the processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10.
The communication interface 31 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 5 is not limited to the borrowing operation detection device in the embodiment of the present invention, and the borrowing operation detection device may include more or less components than those shown in fig. 5 or may be combined with some components in practical applications.
The following describes a storage medium provided in an embodiment of the present invention, and the storage medium described below and the borrowing operation detection method described above may be referred to correspondingly.
The present invention also provides a storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the borrowing operation detection method described above.
The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Finally, it is further noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The foregoing has described in detail the method, apparatus, device and storage medium for detecting borrowing operations, and specific examples have been applied to illustrate the principles and embodiments of the present invention, and the above examples are only for aiding in understanding the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (7)

1. A borrowing operation detection method, comprising:
Ordering all borrowing operations according to the business date to obtain the execution sequence of the borrowing operations of each borrowing; the service date is the execution date of the borrowing operation of each borrower;
detecting all information returned by the interface and all information of the database before and after the borrowing operation is executed when the borrowing operation of each borrow is executed according to the execution sequence;
Outputting abnormal information corresponding to the borrowing operation for detecting the abnormality;
the outputting abnormal information corresponding to abnormal borrowing operation includes:
When abnormal borrowing operation is detected, continuing to detect subsequent borrowing operation, and at least recording the position, judgment condition, actual value and expected value of the abnormal borrowing operation;
after all borrowing operations are detected, outputting abnormal information;
All information returned by the detection interface and all information of the database comprise:
Detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm;
the detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm comprises the following steps:
Comparing all information returned by the interface with expected information returned by the interface by corresponding keys;
When the corresponding key comparison is not different, comparing all the information returned by the interface with the expected information returned by the interface to obtain corresponding key values;
Converting the tuple object type to a list object type;
Comparing all information in the database with elements of expected information of the database one by one in the form of the list object types.
2. The borrowing operation detection method of claim 1, wherein the detecting all information returned by the interface and all information of the database before and after the borrowing operation is performed comprises:
calling an external http interface of a credit core system to acquire all information returned by the interface; all the information returned by the interface is dictionary object type;
Acquiring all information of a MySQL database by inquiring the database; all information of the database is a tuple object type;
And detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm.
3. The borrowing operation detection method of claim 1, wherein the outputting of the anomaly information after all the borrowing operations are detected comprises:
after all borrowing operations are detected, matching the abnormal information with an exclusion list; the exclusion list is used for ignoring the specified elements; the specified elements include at least: a request id for distinguishing the request uniqueness, a time parameter in the return parameter, and a borrowing id for distinguishing the borrowing uniqueness;
And outputting abnormal information which is not successfully matched.
4. A borrowing operation detection device, comprising:
The ordering module is used for ordering the borrowing operations of all borrowing according to the service date to obtain the execution sequence of the borrowing operations of all borrowing; the service date is the execution date of the borrowing operation of each borrower;
The detection module is used for detecting all information returned by the interface and all information of the database before the borrowing operation is executed and after the borrowing operation is executed when the borrowing operation of each borrowing is executed according to the execution sequence;
the output module is used for outputting abnormal information corresponding to the borrowing operation for detecting the abnormality;
The output module includes:
The abnormal processing unit is used for continuously detecting the subsequent borrowing operation when the abnormal borrowing operation is detected, and at least recording the position, the judging condition, the actual value and the expected value of the abnormal borrowing operation;
the abnormal information output unit is used for outputting abnormal information after all borrowing operations are detected;
the detection module comprises:
The comparison detection unit is used for detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm;
The contrast detection unit includes:
The first detection subunit is used for carrying out corresponding key comparison on all the information returned by the interface and the expected information returned by the interface;
The second detection subunit is used for comparing all the information returned by the interface with the expected information returned by the interface according to the corresponding key value when the corresponding key comparison is not different;
a conversion subunit for converting the tuple object type to a list object type;
and a third detection subunit, configured to compare all information in the database with elements of expected information of the database one by one in the form of the list object type.
5. A borrowing operation detection device as defined in claim 4 wherein the detection module comprises:
the interface return information acquisition unit is used for calling an external http interface of the credit core system to acquire all information returned by the interface; all the information returned by the interface is dictionary object type;
The database information acquisition unit is used for acquiring all information of the database by utilizing a query MySQL database mode; all information of the database is a tuple object type;
And the comparison detection unit is used for detecting all information returned by the interface and all information of the database by using a depth difference comparison algorithm.
6. A borrowing operation detection device, comprising:
A memory for storing a computer program;
a processor for implementing a borrowing operation detection method as claimed in any one of claims 1 to 3 when executing the computer program.
7. A storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement a borrowing operation detection method as claimed in any one of claims 1 to 3.
CN202311239616.XA 2023-09-25 2023-09-25 Borrowing operation detection method, device, equipment and storage medium Active CN117149820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311239616.XA CN117149820B (en) 2023-09-25 2023-09-25 Borrowing operation detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311239616.XA CN117149820B (en) 2023-09-25 2023-09-25 Borrowing operation detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117149820A CN117149820A (en) 2023-12-01
CN117149820B true CN117149820B (en) 2024-05-14

Family

ID=88908131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311239616.XA Active CN117149820B (en) 2023-09-25 2023-09-25 Borrowing operation detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117149820B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009087050A (en) * 2007-09-28 2009-04-23 Mizuho Bank Ltd Repayment plan generation support system, repayment plan generation support method and repayment plan generation support program
CN103164312A (en) * 2011-12-09 2013-06-19 阿里巴巴集团控股有限公司 Method and system for preparing interface testing data
CN106227666A (en) * 2016-07-25 2016-12-14 微梦创科网络科技(中国)有限公司 A kind of automated testing method based on big data and system
CN109828903A (en) * 2018-12-14 2019-05-31 中国平安人寿保险股份有限公司 Automated testing method, device, computer installation and storage medium
KR102360061B1 (en) * 2020-11-17 2022-02-09 쿠팡 주식회사 Systems and methods for improving database query efficiency.
CN114218097A (en) * 2021-12-13 2022-03-22 平安证券股份有限公司 Test case generation method and device, computer equipment and storage medium
CN115576817A (en) * 2022-10-14 2023-01-06 中国农业银行股份有限公司 Automatic test system, method, electronic equipment and storage medium
WO2023123943A1 (en) * 2021-12-27 2023-07-06 深圳前海微众银行股份有限公司 Interface automation testing method and apparatus, and medium, device and program
CN116523543A (en) * 2023-04-27 2023-08-01 浪潮工业互联网股份有限公司 Data processing method, equipment and medium for preformed dish transaction progress display
CN116756046A (en) * 2023-08-16 2023-09-15 湖南长银五八消费金融股份有限公司 Automatic interface testing method, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050086257A1 (en) * 2003-10-17 2005-04-21 Measured Progress, Inc. Item tracking, database management, and relational database system associated with multiple large scale test and assessment projects
US10176426B2 (en) * 2015-07-07 2019-01-08 International Business Machines Corporation Predictive model scoring to optimize test case order in real time
JP2023504529A (en) * 2019-12-04 2023-02-03 テンパス ラブズ,インコーポレイテッド Systems and methods for automating RNA expression calls in cancer prediction pipelines

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009087050A (en) * 2007-09-28 2009-04-23 Mizuho Bank Ltd Repayment plan generation support system, repayment plan generation support method and repayment plan generation support program
CN103164312A (en) * 2011-12-09 2013-06-19 阿里巴巴集团控股有限公司 Method and system for preparing interface testing data
CN106227666A (en) * 2016-07-25 2016-12-14 微梦创科网络科技(中国)有限公司 A kind of automated testing method based on big data and system
CN109828903A (en) * 2018-12-14 2019-05-31 中国平安人寿保险股份有限公司 Automated testing method, device, computer installation and storage medium
KR102360061B1 (en) * 2020-11-17 2022-02-09 쿠팡 주식회사 Systems and methods for improving database query efficiency.
CN114218097A (en) * 2021-12-13 2022-03-22 平安证券股份有限公司 Test case generation method and device, computer equipment and storage medium
WO2023123943A1 (en) * 2021-12-27 2023-07-06 深圳前海微众银行股份有限公司 Interface automation testing method and apparatus, and medium, device and program
CN115576817A (en) * 2022-10-14 2023-01-06 中国农业银行股份有限公司 Automatic test system, method, electronic equipment and storage medium
CN116523543A (en) * 2023-04-27 2023-08-01 浪潮工业互联网股份有限公司 Data processing method, equipment and medium for preformed dish transaction progress display
CN116756046A (en) * 2023-08-16 2023-09-15 湖南长银五八消费金融股份有限公司 Automatic interface testing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN117149820A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN104252481A (en) Dynamic check method and device for consistency of main and salve databases
CN110633977A (en) Payment exception processing method and device and terminal equipment
CN108897686B (en) Full-entry automatic testing method and device
CN113760476A (en) Task dependency processing method and related device
CN112148614A (en) Regression testing method and device
CN113220597B (en) Test method, test device, electronic equipment and storage medium
CN102981946A (en) Extract Transform and Load (ETL) smoke test method
CN116662351B (en) Bank data acquisition method and system
CN117149820B (en) Borrowing operation detection method, device, equipment and storage medium
CN112613288A (en) Bill generation method and device, computer equipment and storage medium
CN117474696A (en) Diagnosis method, system, equipment and storage medium for commission settlement problem
CN107423140B (en) Return code identification method and device
US20120198281A1 (en) Validation rules for process validation
CN111857670A (en) Application architecture determination method and device
CN112419052A (en) Transaction testing method and device, electronic equipment and readable storage medium
CN112131100A (en) Metadata-based front-end and back-end verification method and device
CN112785320B (en) Credit risk determination method and device, storage medium and electronic equipment
US9128640B2 (en) Software product consistency assessment
CN113986203B (en) Trigger automatic verification method and system, electronic equipment and storage medium
CN117271367A (en) Configuration of application system test flow, application system test method and device
CN115250231B (en) Application configuration method and device
CN112115046B (en) Software fault positioning method, device and terminal
CN112214409B (en) Operation and maintenance method and device used in test environment
CN115578070A (en) Project progress evaluation processing method, device, server, medium and product
CN115858390A (en) mock testing method, mock testing device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant