Method for constructing user-defined association relationship bill data in batches

By obtaining the fund characteristic data and the proportion information in the preset configuration file, the association relationship of the bill data is generated and constructed, which solves the problem of being unable to construct large data volume and complex association relationship in the existing technology, and realizes efficient bill data construction and Generation of test data.

CN118552191APending Publication Date: 2024-08-27XIAMEN MEIYABAIKE INFORMATION SECURITY RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410562814.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing data construction technology cannot effectively construct large amounts of billing data, especially cannot meet the requirements of software function and performance verification, and conventional methods cannot construct complex and real relationships.

Method used

Generate customized bill data by obtaining the capital characteristic data, the proportion of the number of common counterparties in the preset configuration file, the proportion of common transaction IPs, and the proportion of common transaction Macs, and build an association file between the bill data to support Generate in batches and save to Excel, CSV, database files.

Benefits of technology

It realizes the batch construction of billing data with custom associated relationships, meets the testing needs of large data volumes, ensures the authenticity of the data and the complexity of the associated relationships, reduces the investment of manpower and time, and improves the efficiency of data construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552191A
    Figure CN118552191A
Patent Text Reader

Abstract

The invention provides a method for constructing user-defined incidence relation bill data in batches. The method comprises the steps that fund feature data, the number of files and output file types are obtained; acquiring a common transaction opponent number proportion, a common transaction IP proportion and a common transaction Mac proportion in a preset configuration file; generating a corresponding number of bill files according to the proportion of the number of common transaction opponents; data in the bill file is generated according to specified parameters in a preset configuration file; constructing corresponding data based on the fund feature data, and writing the data into a bill file; and constructing a common transaction opponent / IP / Mac relation file between the bill data. By reading a common opponent number proportion, a common transaction IP proportion and a common transaction Mac proportion which are set in a preset configuration file, personal / enterprise bill data are generated in batches to be stored in Excel, CSV and database files, data of different fund characteristics and files corresponding to a common transaction opponent / IP / Mac relation are automatically generated, daily use of testing is met, and the testing efficiency is improved. The product quality is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information security, and in particular to a method for batch constructing user-defined association relationship billing data. Background Art

[0002] The development of data analysis software often requires a large amount of real data for support. However, due to the complexity and diversity of customer data and the privacy and security of personal information in the digital age, conventional data construction methods cannot construct test data with complex and realistic relationships, and manually constructed data cannot meet the requirements of performance testing. Existing data construction technology cannot meet the requirements of software function and performance verification.

[0003] Most of the existing test data construction adopts two schemes:

[0004] 1. Manual construction: Business data is usually manually constructed into a single file with a small amount of data. This method is the simplest and most direct, so it is also widely used. However, the data constructed by this method is too single and cannot be analyzed for large amounts of data, which poses a software quality risk.

[0005] 2. Semi-automatic construction: Use open source tools on the Internet to batch generate fields such as bank cards and names, and then manually integrate them into the bill file. The data constructed in this way cannot retain the association relationship, and duplicate data is prone to occur during batch generation.

[0006] According to the existing technology, test data construction requires a lot of manpower and time to construct. If large amounts of data and related files need to be constructed in batches, it is almost impossible to achieve. Summary of the invention

[0007] In order to solve the problem that the bill data construction method in the prior art is single and cannot meet the user's customization requirements, the present invention proposes a method for batch constructing customized associated bill data to solve the above technical problem.

[0008] According to one aspect of the present invention, a method for batch constructing custom association relationship bill data is proposed, comprising:

[0009] S1. Obtain fund characteristic data, the number of files, and the output file type, wherein the fund characteristic data includes special time periods, special amounts, and fast in and fast out;

[0010] S2. Obtain the ratio of the number of common trading counterparties, the ratio of common trading IP addresses, and the ratio of common trading Mac addresses in the preset configuration file;

[0011] S3. Generate a corresponding number of bill files according to the proportion of the number of common trading counterparties, wherein the bill files include user information, access type, transaction amount, balance, transaction time, IP and MAC; wherein the transaction time, IP and MAC are generated according to the specified parameters in the preset configuration file;

[0012] S4, constructing the special time period, the special amount and the fast-in-fast-out data based on the fund characteristic data, and writing the special time period, the special amount and the fast-in-fast-out data into the bill file;

[0013] S5. Based on the proportion of the number of common transaction counterparties, the proportion of the common transaction IPs and the proportion of the common transaction Macs, a common transaction counterparty / IP / Mac relationship file between the billing data is constructed.

[0014] The method of this application can read the percentage of common counterparties, common transaction IPs, and common transaction Macs set in the preset configuration file, and batch generate personal / corporate billing data to save in Excel, CSV, or database files.

[0015] In some specific embodiments, the user information in step S3 includes name, card number, name of the other party and card number of the other party, and the generation of the user information includes: according to the proportion of the number of common transaction counterparties, obtaining the corresponding number of name and card number information from the preset user information file, when the number of name and card number information in the preset user information file is less than the number, randomly generating the remaining required name and card number information, and updating the preset user information file based on the name and card number information. The name and card number information is automatically generated, and the constructed data is not prone to duplication, and a certain amount of user information can be automatically generated according to the configuration information.

[0016] In some specific embodiments, the access type in step S3 is transfer-in or transfer-out, and the transaction amount is generated based on the access type, including: when the access type is transfer-in, setting the probability value of each transaction amount interval based on the transaction upper limit amount, and generating the transaction amount according to the probability value; when the access type is transfer-out, randomly generating a transaction amount with an upper limit not exceeding the balance value of the previous line. Configure the corresponding rules to generate the corresponding transaction amount according to transfer-in and transfer-out, and set the probability value, so that the user can customize the probability value, so that the application generates billing data more flexibly.

[0017] In some specific embodiments, the balance is calculated based on the access type and the transaction amount, including: when the access type is transfer-in, the balance is equal to the value obtained by adding the balance value of the previous row to the transaction amount; when the access type is transfer-out, the balance is equal to the value obtained by subtracting the balance value of the previous row from the transaction amount.

[0018] In some specific embodiments, the generation of the transaction time in step S3 includes:

[0019] S301, obtaining the transaction start time and transaction end time in the preset configuration file;

[0020] S302, converting the transaction start time and the transaction end time into a timestamp;

[0021] S303, when the difference between the timestamps corresponding to the transaction start time and the transaction end time is less than the number of items, re-execute S301 and S302; when the difference between the timestamps corresponding to the transaction start time and the transaction end time is greater than the number of items, randomly generate a date and time. Set and convert the data type of the transaction time, according to the settings of the preset configuration file, and also improve the flexibility of generating the transaction time.

[0022] In some specific embodiments, the generation of the IP and the MAC in step S3 includes: obtaining the number of IP and MAC in the preset configuration file, the number of IP and MAC defaults to the number of entries; when the number of IP and MAC is less than the number of entries, randomly filling the remaining data after the generated data is taken once, and prompting the user to reset the number of IP and MAC in the preset configuration file. Automatically fill in and generate corresponding IP and MAC data according to the number of entries, and automatically prompt the user to set the corresponding IP and MAC data when the number of IP and MAC data is abnormal.

[0023] In some specific embodiments, the construction of the special period data in step S4 includes:

[0024] S401, obtaining the statutory holiday date in the preset configuration file, randomly generating a year within the transaction time, and concatenating the year with the statutory holiday date to form a special date;

[0025] S402, obtaining a time interval and a probability value of a special time period in the preset configuration file, generating a special time interval based on the time interval and the probability value of the special time period, and combining the special date with the special time interval to generate a special time period;

[0026] S403, obtaining the transaction amount, and generating a corresponding number of special period data based on the proportion of the number of special period data items set in the configuration file, wherein the special period data includes the transaction amount and the special period. According to the configuration in the preset configuration file, a special date and time period are generated, and the transaction amount is collected to generate the special period transaction data, and data with different fund characteristics are automatically constructed.

[0027] In some specific embodiments, the construction of the special amount data in step S4 includes: obtaining the special amount enumeration value in the preset configuration file, generating the corresponding number of special amount data according to the proportion of the number of special amount data set in the configuration file; and randomly generating the remaining number of special amount data. According to the special amount enumeration value set by the user in the preset configuration file, the corresponding special amount data is generated, and the special amount enumeration value set can be customized by the user, which ensures the scalability when generating special amounts.

[0028] In some specific embodiments, the construction of the fast-in and fast-out data in step S4 includes:

[0029] Obtaining a transaction amount probability value in the preset configuration file, and randomly generating an integer transaction amount based on the probability value;

[0030] Obtaining the transaction amount difference rate in the preset configuration file, and calculating the next transaction amount according to the transaction amount difference rate, wherein the next transaction amount is equal to the current transaction amount - the current transaction amount * the difference rate;

[0031] Obtain the time difference between transfer-in and transfer-out, and calculate the time range of the next transaction based on the time difference between transfer-in and transfer-out;

[0032] The proportion of fast-in and fast-out data in the preset configuration file is obtained, and a corresponding number of fast-in and fast-out data is generated, wherein the fast-in and fast-out data includes the transaction amount, the next transaction amount, and the next transaction time range; the remaining number of fast-in and fast-out data is randomly generated. Based on the fast-in and fast-out characteristics, the data of the fast-in and fast-out characteristics are generated through corresponding rules and steps.

[0033] In some specific embodiments, the construction of the common counterparty / IP / Mac relationship file in step S5 includes:

[0034] S501, based on the common transaction counterparty quantity ratio, the common transaction IP ratio or the common transaction Mac ratio, generate billing data of corresponding quantity ratio, wherein user information, IP and MAC of the billing data are generated according to the relationship between the common transaction counterparty, the common transaction IP ratio or the common transaction Mac ratio;

[0035] S502, constructing a relationship file according to the bill data generated in S501;

[0036] S503, looping S501 to S502 in sequence according to the number of files to keep the association relationship between the generated multiple bill files. The association relationship between bill data is automatically constructed by generating the corresponding quantity ratio by presetting the common transaction counterparty quantity ratio, the common transaction IP ratio or the common transaction Mac ratio in the configuration file, so as to avoid the problem that conventional data construction methods cannot construct test data with complex association relationships and real ones.

[0037] The method of the present application can read the percentage of common counterparties, the percentage of common transaction IPs, and the percentage of common transaction Macs set in the preset configuration file, batch generate personal / corporate billing data to save in Excel, CSV, and database files, and automatically generate data with different fund characteristics, as well as files corresponding to the common transaction counterparty / IP / Mac relationships, which meets the needs of daily testing and ensures product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and together with the description are used to explain the principles of the present invention. Other embodiments and many expected advantages of the embodiments will be readily appreciated as they become better understood by reference to the following detailed description. Other features, objects and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments made with reference to the following drawings:

[0039] Figure 1 This is a flow chart of a method for batch constructing custom association relationship bill data according to an embodiment of the present application;

[0040] Figure 2 This is an example diagram of name and card number generation in a specific embodiment of the present application;

[0041] Figure 3 This is an example diagram of a bill file generated by a specific embodiment of the present application;

[0042] Figure 4 It is a common counterparty relationship document of a specific embodiment of the present application;

[0043] Figure 5 It is a common transaction IP relationship file of a specific embodiment of the present application;

[0044] Figure 6 It is a common transaction MAC relationship file of a specific embodiment of the present application;

[0045] Figure 7It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0046] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0047] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0048] Figure 1 FIG. 1 is a flow chart of a method for batch constructing custom association relationship bill data according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0049] S1. Obtain fund characteristic data, the number of files, and the output file type, wherein the fund characteristic data includes special time periods, special amounts, and fast in and fast out;

[0050] Through the above technical means, users can select the required fund characteristic data according to different usage scenarios; such as special time periods, special amounts, and quick in and out; users can select the number of files to support business testing according to different usage scenarios; users can select the storage format of running results.

[0051] S2. Obtain the ratio of the number of common trading counterparties, the ratio of common trading IP addresses, and the ratio of common trading Mac addresses in the preset configuration file;

[0052] Through the above technical means, it is possible to read the data on the proportion of common trading counterparties, the proportion of common trading IPs and the proportion of common trading Macs from the preset configuration file. The values ​​of the data can be modified by the user according to business needs.

[0053] Specifically, the proportion of common trading counterparties, the proportion of common trading IPs, and the proportion of common trading Macs can be read through the Python third-party library pandas.

[0054] S3. Generate a corresponding number of bill files according to the proportion of the number of common trading counterparties, wherein the bill files include user information, access type, transaction amount, balance, transaction time, IP and MAC; wherein the transaction time, IP and MAC are generated according to the specified parameters in the preset configuration file;

[0055] The contents of the bill data are shown in the following table:

[0056]

[0057] Specifically, the user information, namely name, card number, other party's name and other party's card number, is generated through the following steps:

[0058] Step 1: Obtain the corresponding number of name and card number information from the preset user information file according to the proportion of the number of common transaction counterparties;

[0059] Step 2: When the number of name and card number information in the preset user information file is less than the number of entries, randomly generate the remaining required name and card number information;

[0060] Further, when the preset user information file does not exist, the remaining required name and card number information is randomly generated, and the preset user information file is updated based on the name and card number information; and the name information includes the personal name and company name, such as Figure 2 As shown, it can be generated by:

[0061] Use Faker(locale='zh_CN').name() method to generate Chinese name;

[0062] Use Faker(locale='zh_CN').company() method to generate Chinese company name;

[0063] The card number information can be generated in the following ways:

[0064] Issuing bank identification code (BIN number) + random filling digits = bank card number.

[0065] Step 3: Update the preset user information file based on the name and card number information. The name and card number information is automatically generated, and the constructed data is not prone to duplication, and a certain amount of user information can be automatically generated according to the configuration information.

[0066] Specifically, in step S3, the deposit and access type is transfer-in or transfer-out, and the transaction amount is generated based on the deposit and access type, and is generated through the following steps:

[0067] Step 1: Generate access type: randomly generate transfer-in and transfer-out;

[0068] Step 2: Generate transaction amount:

[0069] The transaction amount is generated according to the deposit and withdrawal type:

[0070] A. When the deposit and access type is transfer-in, the probability value of each transaction amount range is set based on the transaction upper limit amount. If the upper limit amount is set to 110,000, the probability of the randomly generated transaction amount range is as follows (as consistent as possible with the real scenario), and the transaction amount is generated according to the probability value:

[0071] Transaction amount range 0-100 100-1000 1000-10000 1W-10W 10W-11W Default probability value Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5

[0072] B. When the access type is transfer-out, randomly generate a transaction amount with an upper limit not exceeding the balance value of the previous line. Configure the corresponding rules to generate the corresponding transaction amount based on transfer-in and transfer-out, and set the probability value so that users can customize the probability value, making the bill data generated by this application more flexible.

[0073] Step 3: Balance generation. The balance is calculated based on the deposit and access type and the transaction amount, including:

[0074] A. The balance of the first row of data is randomly generated, and the probability of generating a balance interval is shown in the following table:

[0075] Balance range 0-100 100-1000 1000-10000 1W-10W 10W-100W Default probability value Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5

[0076] B. Starting from the second line, the balance calculation method is based on the deposit and withdrawal type and the transaction amount. The specific algorithm is as follows:

[0077] Deposit and withdrawal type is transfer-in: Balance = previous line balance + transaction amount

[0078] Deposit and withdrawal type is transfer out: Balance = previous line balance - transaction amount

[0079] Specifically, step S3, generating the transaction time, includes:

[0080] S301, obtaining the transaction start time and transaction end time in the preset configuration file;

[0081] S302, converting the transaction start time and the transaction end time into a timestamp;

[0082] S303, when the difference between the timestamps corresponding to the transaction start time and the transaction end time is less than the number of items, re-execute S301 and S302; when the difference between the timestamps corresponding to the transaction start time and the transaction end time is greater than the number of items, randomly generate a date and time. Set and convert the data type of the transaction time, according to the settings of the preset configuration file, and also improve the flexibility of generating the transaction time.

[0083] Specifically, the generation of IP and MAC includes:

[0084] A. Get the number of IP and MAC in the preset configuration file. The number of IP and MAC is the number of entries by default.

[0085] B. When the number of IP and MAC is less than the number of entries, the remaining data after the generated data is taken once is randomly filled, and the user is prompted to reset the number of IP and MAC in the preset configuration file. The corresponding IP and MAC data are automatically filled and generated according to the number of entries, and when the number of IP and MAC data is abnormal, the user is automatically prompted to set the corresponding IP and MAC data.

[0086] Time interval 0:00-6:00 6:00-12:00 12:00-18:00 18:00-24:00 Default probability value Parameter 1 Parameter 2 Parameter 3 Parameter 4

[0087] S403, obtaining the transaction amount, generating the corresponding number of special period data based on the proportion of the number of special period data items set in the configuration file, the special period data including the transaction amount and the special period; and randomly generating the transaction amount of the remaining number of items;

[0088] Specifically, the transaction amount can be randomly generated according to the probability configured in the following table:

[0089] Transaction amount range 0-100 100-1000 1000-10000 1W-10W Default probability value Parameter 1 Parameter 2 Parameter 3 Parameter 4

[0090] Specifically, the summary, currency, transaction channel, and remarks fields are randomly obtained by reading the contents of the preset configuration file and written into the bill file, such as Figure 3 shown.

[0091] S4, constructing the special time period, the special amount and the fast-in-fast-out data based on the fund characteristic data, and writing the special time period, the special amount and the fast-in-fast-out data into the bill file;

[0092] Specifically, step S4 of constructing the special period data includes:

[0093] S401, obtaining the statutory holiday date in the preset configuration file, randomly generating a year during the transaction time, and concatenating the year with the statutory holiday date to form a special date;

[0094] Specifically, the statutory holidays are set as shown in the following table:

[0095]

[0096] Specifically, the time interval settings for special periods are shown in the following table:

[0097] S402, obtaining a time interval and a probability value of a special time period in a preset configuration file, generating a special time interval based on the time interval and the probability value of the special time period, and combining a special date with the special time interval to generate a special time period;

[0098] Specifically, the time interval and probability value settings for special periods are shown in the following table:

[0099] According to the configuration in the preset configuration file, special dates and time periods are generated, and transaction amounts are aggregated to generate transaction data for special time periods, automatically constructing data with different fund characteristics.

[0100] Specifically, step S4 of constructing special amount data includes:

[0101] Step 1: Get the special amount enumeration value in the preset configuration file;

[0102] Specifically, the definition of special amount enumeration values ​​is shown in the following table:

[0103]

[0104] Step 2: Generate the corresponding number of special amount data according to the proportion of special amount data set in the configuration file; the remaining number of special amount data is randomly generated. Generate the corresponding special amount data according to the special amount enumeration value set by the user in the preset configuration file. The special amount enumeration value set can be customized by the user, ensuring the scalability when generating special amounts.

[0105] Specifically, step S4, constructing the fast-in and fast-out data, includes:

[0106] Step 1: Obtain the transaction amount probability value in the preset configuration file, and randomly generate an integer transaction amount based on the probability value;

[0107] Specifically, the definition of the transaction amount probability value is shown in the following table:

[0108] Amount range 10,000-50,000 5W-10W 10W-15W 15W-20W Default probability value Parameter 1 Parameter 2 Parameter 3 Parameter 4

[0109] Randomly generated integer transaction amount, such as 50000, 65000, 100000, etc.

[0110] Step 2: Get the transaction amount difference rate in the preset configuration file, and calculate the next transaction amount based on the transaction amount difference rate. The next transaction amount is equal to the current transaction amount - current transaction amount * difference rate;

[0111] Optional, the amount difference rate defaults to 20%.

[0112] Step 3: Obtain the time difference between transfer-in and transfer-out, and calculate the time range of the next transaction based on the time difference between transfer-in and transfer-out;

[0113] Optional. The default time difference between transfer-in and transfer-out is 1 hour.

[0114] Step 4: Get the percentage of fast-in and fast-out data in the preset configuration file, generate the corresponding number of fast-in and fast-out data, which includes the transaction amount, the next transaction amount and the next transaction time range; the remaining number of fast-in and fast-out data is randomly generated. Based on the fast-in and fast-out characteristics, generate data with fast-in and fast-out characteristics through corresponding rules and steps.

[0115] S5. Based on the proportion of the number of common trading counterparties, the proportion of common trading IPs and the proportion of common trading Macs, a common trading counterparty / IP / Mac relationship file between billing data is constructed.

[0116] Specifically, step S5, constructing the common counterparty / IP / Mac relationship file, includes:

[0117] S501. Generate billing data of corresponding quantity proportions based on the quantity proportions of common transaction counterparties, the quantity proportions of common transaction IPs or the quantity proportions of common transaction Macs. The user information (name and card number), IP and MAC of the billing data are generated according to the relationship between the common transaction counterparties, the quantity proportions of common transaction IPs or the quantity proportions of common transaction Macs;

[0118] S502, constructing a relationship file according to the bill data generated in S501;

[0119] S503, looping S501 to S502 in sequence according to the number of files to keep the association relationship between the generated multiple bill files. The association relationship between bill data is automatically constructed by generating the corresponding quantity ratio by presetting the common transaction counterparty quantity ratio, common transaction IP ratio or common transaction Mac ratio in the configuration file, so as to avoid the problem that conventional data construction methods cannot construct test data with complex association relationships and real ones.

[0120] In order to highlight the technical effect of the present application, the method of the present application is carried out on an ordinary PC machine with 8G memory, Intel core i5-7500 processor model, and Windows 10 operating system. The performance of the constructed data is shown in the following table:

[0121]

[0122] It can be seen from the table above that it only takes 2 minutes to construct a single file and 10,000 bill data pages using the method of this application; the generated file is as follows: Figure 4 As shown, the common counterparty / IP / Mac relationship file between the constructed bill data is as follows Figure 4-Figure 6As shown, multiple names and card number transactions are conducted by the same trader, the same IP or the same Mac. The method of this application can read the common counterparty ratio, common transaction IP ratio and common transaction Mac ratio set in the preset configuration file, batch generate personal / corporate bill data to save in Excel, CSV, database files, and automatically generate data with different fund characteristics, as well as files corresponding to common transaction counterparty / IP / Mac relationships, which meets the daily use of testing and ensures product quality.

[0123] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 suitable for implementing an electronic device of an embodiment of the present application. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0124] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0125] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0126] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.

[0127] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The modules involved in the embodiments of the present application may be implemented by software or by hardware.

[0130] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains fund characteristic data, the number of files and the output file type, wherein the fund characteristic data includes special time periods, special amounts and fast-in and fast-out; obtains the proportion of the number of common trading counterparties, the proportion of common trading IPs and the proportion of common trading Macs in the preset configuration file; generates a corresponding number of bill files according to the proportion of the number of common trading counterparties, and the bill files include user information, access type, transaction amount, balance, transaction time, IP and MAC; wherein the transaction time, IP and MAC are generated according to the specified parameters in the preset configuration file; constructs the special time period, the special amount and the fast-in and fast-out data based on the fund characteristic data, and writes the special time period, the special amount and the fast-in and fast-out data into the bill file; constructs a common trading counterparty / IP / Mac relationship file between the bill data based on the proportion of the number of common trading counterparties, the proportion of the common trading IPs and the proportion of the common trading Macs.

[0131] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for batch constructing custom association relationship bill data, characterized in that: include: S1. Obtain fund characteristic data, the number of files, and the output file type, wherein the fund characteristic data includes special time periods, special amounts, and fast in and fast out; S2. Obtain the ratio of the number of common trading counterparties, the ratio of common trading IP addresses, and the ratio of common trading Mac addresses in the preset configuration file; S3. Generate a corresponding number of bill files according to the proportion of the number of common trading counterparties, wherein the bill files include user information, access type, transaction amount, balance, transaction time, IP and MAC; wherein the transaction time, IP and MAC are generated according to the specified parameters in the preset configuration file; S4, constructing the special time period, the special amount and the fast-in-fast-out data based on the fund characteristic data, and writing the special time period, the special amount and the fast-in-fast-out data into the bill file; S5. Based on the proportion of the number of common transaction counterparties, the proportion of the common transaction IPs and the proportion of the common transaction Macs, a common transaction counterparty / IP / Mac relationship file between the billing data is constructed.

2. The method according to claim 1, characterized in that The user information in step S3 includes name, card number, name of the other party and card number of the other party. The generation of the user information includes: according to the proportion of the number of common transaction counterparties, obtaining the corresponding number of name and card number information from the preset user information file; when the number of name and card number information in the preset user information file is less than the number, randomly generating the remaining required name and card number information, and updating the preset user information file based on the name and card number information.

3. The method according to claim 1, characterized in that: In step S3, the access type is transfer-in or transfer-out, and the transaction amount is generated based on the access type, including: when the access type is transfer-in, setting probability values ​​for each transaction amount interval based on the transaction upper limit amount, and generating the transaction amount according to the probability values; when the access type is transfer-out, randomly generating a transaction amount with an upper limit not exceeding the balance value of the previous row.

4. The method according to claim 3, characterized in that The balance is calculated based on the access type and the transaction amount, including: when the access type is transfer-in, the balance is equal to the value obtained by adding the balance value of the previous row to the transaction amount; when the access type is transfer-out, the balance is equal to the value obtained by subtracting the balance value of the previous row from the transaction amount.

5. The method according to claim 1, characterized in that The generation of the transaction time in step S3 includes: S301, obtaining the transaction start time and transaction end time in the preset configuration file; S302, converting the transaction start time and the transaction end time into a timestamp; S303. When the difference between the timestamps corresponding to the transaction start time and the transaction end time is less than the number of items, re-execute S301 and S302; when the difference between the timestamps corresponding to the transaction start time and the transaction end time is greater than the number of items, randomly generate a date and time.

6. The method according to claim 1, characterized in that The generation of the IP and the MAC in step S3 includes: obtaining the number of IPs and MACs in the preset configuration file, and the number of IPs and MACs defaults to the number of entries; when the number of IPs and MACs is less than the number of entries, the generated data is looped and the remaining data is randomly filled, and the user is prompted to reset the number of IPs and MACs in the preset configuration file.

7. The method according to claim 1, characterized in that The construction of the special period data in step S4 includes: S401, obtaining the statutory holiday date in the preset configuration file, randomly generating a year within the transaction time, and concatenating the year with the statutory holiday date to form a special date; S402, obtaining a time interval and a probability value of a special time period in the preset configuration file, generating a special time interval based on the time interval and the probability value of the special time period, and combining the special date with the special time interval to generate a special time period; S403: Obtain the transaction amount, and generate a corresponding number of special period data based on the proportion of the number of special period data items set in the configuration file, wherein the special period data includes the transaction amount and the special period.

8. The method according to claim 1, characterized in that The construction of the special amount data described in step S4 includes: obtaining the special amount enumeration value in the preset configuration file, generating a corresponding number of special amount data according to the proportion of the number of special amount data items set in the configuration file; and randomly generating the remaining number of special amount data items.

9. The method according to claim 1, characterized in that: The construction of the fast-in and fast-out data in step S4 includes: Obtaining a transaction amount probability value in the preset configuration file, and randomly generating an integer transaction amount based on the probability value; Obtaining the transaction amount difference rate in the preset configuration file, and calculating the next transaction amount according to the transaction amount difference rate, wherein the next transaction amount is equal to the current transaction amount - the current transaction amount * the difference rate; Obtain the time difference between transfer-in and transfer-out, and calculate the time range of the next transaction based on the time difference between transfer-in and transfer-out; The proportion of the number of fast-in and fast-out data in the preset configuration file is obtained, and a corresponding number of fast-in and fast-out data is generated, wherein the fast-in and fast-out data includes the transaction amount, the next transaction amount and the next transaction time range; the remaining number of fast-in and fast-out data is randomly generated.

10. The method according to claim 1, characterized in that The construction of the common counterparty / IP / Mac relationship file in step S5 includes: S501, based on the common transaction counterparty quantity ratio, the common transaction IP ratio or the common transaction Mac ratio, generate billing data of corresponding quantity ratio, wherein user information, IP and MAC of the billing data are generated according to the relationship between the common transaction counterparty, the common transaction IP ratio or the common transaction Mac ratio; S502, constructing a relationship file according to the bill data generated in S501; S503, looping from S501 to S502 in sequence according to the number of files so as to retain the association relationship between the generated multiple bill files.