A method and device for data analysis
By obtaining code mapping relationships and configuration information, determining the regular expressions and business types of transaction data, the problem of custom development in the existing technology is solved, and the data analysis is achieved without development is achieved.
Patent Information
- Application Number
- CN202111544371.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-12-16
AI Technical Summary
In the prior art, new business type data need to be customized to be developed before it can be parsed in the data processing system, resulting in time-consuming and labor-consuming.
By obtaining the code mapping relationship, the regular expression corresponding to the transaction data is determined, and the first transaction business type corresponding to the transaction data is determined based on the regular expression and configuration information, thereby generating an information table.
It realizes the rapid parsing of new business type data without development, improves data parsing efficiency, and reduces development time and resources.
Smart Images

Figure CN114219640B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis, and in particular to a method and device for data analysis. Background Art
[0002] With the continuous development of big data technology, data can be analyzed in the corresponding data processing system. However, due to the continuous development of the economy, the types and quantities of data are becoming more and more numerous, and the corresponding data processing system also needs to consume a lot of time and resources to analyze the data.
[0003] If the current data analysis method is to parse data of a new business type, it is necessary for the technical department personnel to carry out development, testing and other steps before the data analysis can be performed in the data processing system, which makes the data analysis time-consuming and labor-intensive.
[0004] In summary, how to quickly parse data of new business types without development is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for data analysis, which are used to solve the problem in the prior art that new business type data appears and needs to be customized before it can be used.
[0006] In a first aspect, an embodiment of the present invention provides a method for data parsing, the method comprising: obtaining a code mapping relationship, the code mapping relationship comprising an N-bit prefix item and an M-bit regular matching code; obtaining transaction data and configuration information; determining a regular expression corresponding to the transaction data based on the code mapping relationship; determining a first transaction business type corresponding to the transaction data based on the regular expression and the configuration information; and generating an information table based on the transaction data, the first transaction business type and the configuration information.
[0007] In the above technical solution, the transaction data can determine the regular expression more accurately according to the code mapping relationship, and then determine the first transaction business type corresponding to the transaction data according to the regular expression, so that the configuration information corresponding to the transaction data can be determined according to the first transaction business type and the result of transaction data parsing can be obtained by combining the information of the transaction data, and a more accurate information table can be generated from the parsed result.
[0008] Optionally, the transaction data includes a transaction code and a second transaction business type; the second transaction business type is used to determine a code mapping relationship corresponding to the transaction data; determining a regular expression corresponding to the transaction data based on the code mapping relationship includes: determining a target code mapping relationship corresponding to the transaction data based on the second transaction business type; and converting the transaction data into a corresponding regular expression based on the target code mapping relationship.
[0009] In the above technical solution, because different transaction data correspond to different regular expressions, it is necessary to determine the corresponding target code mapping relationship according to the second transaction business type in the transaction data. In this way, a more accurate regular expression can be obtained according to the corresponding target code mapping relationship, which is convenient for the subsequent generation of a more accurate information table.
[0010] Optionally, the transaction data includes first transaction data and second transaction data, and the code mapping relationship includes a first code mapping relationship and a second code mapping relationship; after determining the regular expression corresponding to the transaction data according to the code mapping relationship, it also includes: determining a first regular expression corresponding to the first transaction data according to the first code mapping relationship corresponding to the first transaction data; determining a second regular expression corresponding to the second transaction data according to the second code mapping relationship corresponding to the second transaction data; if the first code mapping relationship is the same as the second code mapping relationship, merging the first regular expression and the second regular expression to obtain a third regular expression.
[0011] In the above technical solution, the regular expressions corresponding to the same type of transaction data are merged to obtain a regular expression with a maximized range, which facilitates the subsequent determination of the first transaction business type based on the regular expression and configuration information.
[0012] Optionally, the transaction data includes the currently recorded buying and selling direction, transaction market information, transaction platform information and user information; the information table is generated based on the transaction data, the first transaction business type and the configuration information, and the information table includes the transaction date, transaction account, buying and selling direction, the first transaction business type, the second transaction business type, transaction data, transaction name, transaction market, transaction platform, securities delivery date, funds settlement date, transaction unit, clearing amount, and securities delivery date.
[0013] In the above technical solution, basic information of the data can be determined based on the transaction data, and combined with the first transaction business type and the corresponding configuration information, a comprehensive and relatively accurate information table can be generated.
[0014] Optionally, the configuration information includes at least one of the following: accounting for the first transaction business type; accounting for the second transaction business type; securities delivery date; settlement margin calculation mark; minimum reserve interest calculation mark; margin calculation mark; whether liquidation is required; minimum reserve statistical classification; delivery method; funds settlement date; securities delivery date; securities delivery mark.
[0015] In the above technical solution, the corresponding first transaction business type can be obtained in the configuration information according to the regular expression, and then the corresponding configuration information is determined according to the obtained first transaction business type and transaction data, so as to obtain a comprehensive and more accurate information table.
[0016] Optionally, the method further includes: if it is determined that a new code mapping relationship exists, updating the code mapping relationship.
[0017] In the above technical solution, the code mapping relationship is not always constant, and the code mapping relationship can be updated according to specific circumstances, so as to generate a more accurate information table.
[0018] In the second aspect, an embodiment of the present invention also provides a data parsing device, including: an acquisition unit, used to acquire a code mapping relationship, the code mapping relationship including an N-bit prefix item and an M-bit regular matching code; an acquisition unit, used to acquire transaction data, and configuration information; a processing unit, used to determine a regular expression corresponding to the transaction data according to the code mapping relationship; determine a first transaction business type corresponding to the transaction data according to the regular expression and the configuration information; and generate an information table according to the first transaction business type and the configuration information.
[0019] Optionally, the processing unit is specifically used to determine a target code mapping relationship corresponding to the transaction data according to the second transaction business type; and convert the transaction data into a corresponding regular expression according to the target code mapping relationship.
[0020] Optionally, the processing unit is specifically used to determine a first regular expression corresponding to the first transaction data based on the first code mapping relationship corresponding to the first transaction data; determine a second regular expression corresponding to the second transaction data based on the second code mapping relationship corresponding to the second transaction data; if the first code mapping relationship is the same as the second code mapping relationship, merge the first regular expression and the second regular expression to obtain a third regular expression.
[0021] Optionally, the processing unit is specifically used to generate the information table based on the transaction data, the first transaction business type and the configuration information, and the information table includes the transaction date, transaction account, buy and sell direction, first transaction business type, second transaction business type, transaction data, transaction name, transaction market, trading platform, securities delivery date, funds settlement date, and securities delivery date.
[0022] Optionally, the processing unit is specifically used for the configuration information including at least one of the following: transaction date, accounting of the first transaction business type, accounting of the second transaction business type, securities delivery date, settlement margin calculation flag, minimum reserve interest calculation flag, margin calculation flag, whether liquidation is required, minimum reserve statistical classification, delivery method, funds settlement date or securities delivery flag.
[0023] Optionally, the processing unit specifically maps the regular matching code to at least one of the following: numbers are mapped to \d, regular characters are mapped to \w, all characters are mapped to [\s\S], or character lengths are mapped to {M}.
[0024] Optionally, the processing unit is specifically configured to update the code mapping relationship if it is determined that a new code mapping relationship exists.
[0025] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory for storing program instructions; and a processor for calling the program instructions stored in the memory, and executing the steps of the method described in the first aspect according to the obtained program.
[0026] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, the computer program / instruction being executed by a processor to implement the steps of the method described in the first aspect.
[0027] In a fifth aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program / instructions, which are executed by a processor to implement the steps of the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 A schematic diagram of a possible application scenario provided by an embodiment of the present invention;
[0030] Figure 2 A flow chart of a data analysis method provided by an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of the structure of a data analysis device provided by an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] like Figure 1 FIG. 1 is a schematic diagram of a possible application scenario provided by an embodiment of the present invention. The application scenario may include a business system, a custody system, and an exchange. Figure 1 Take the business system 100, the custody system 101 and the exchange 102 as an example. Generally, the exchange 102 will send the transaction data to the custody system 101, and then the custody system 101 will perform data analysis based on the data provided by the exchange 102. Finally, the custody system 101 will send the results of the data analysis to the business system 100, and the business system 100 will perform some business processing based on the results of the data analysis. For example, the custody system 101 will analyze the transaction data and send it to the business system 100, and the business system 100 will check the data based on the results of the data analysis to determine whether the data is correct.
[0035] In one possible case, the exchange 102 provides transaction data A to the custody system 101. Since the custody system 101 has not parsed the transaction data A, the custody system 101 cannot directly parse the transaction data A. The developer needs to perform customized development according to the business type corresponding to the transaction data A. The custody system 101 can only parse the transaction data A after the development is completed. Among them, this development is only for the transaction data A. If the exchange 102 provides the custody system 101 with transaction data B again, and the business types corresponding to the transaction data A and the transaction data B are different, since the custody system 101 has not parsed the transaction data B, the custody system 101 needs to perform customized development again according to the business type corresponding to the transaction data B. The custody system 101 can only parse the transaction data B after the development is completed.
[0036] In view of this, an embodiment of the present invention provides a data parsing method, which can implement rapid data parsing of transaction data of a new business type without development.
[0037] like Figure 2 FIG. 1 is a flow chart of a method for data analysis provided by an embodiment of the present invention. The method comprises the following steps:
[0038] Step 201, obtaining a code mapping relationship.
[0039] In the embodiment of the present invention, the code mapping relationship includes an N-bit prefix item and an M-bit regular matching code. Further, the code mapping relationship also includes a fixed code value. When the second transaction business type is an ETF fund, the code mapping relationship is a prefix code of 3 bits + a regular matching code of 2 bits + a fixed code value of 0; when the second transaction business type is an ETF Shanghai market fund, the code mapping relationship is a prefix code of 3 bits + a regular matching code of 2 bits + a fixed code value of 2; when the second transaction business type is an ETF non-Shanghai market fund, the code mapping relationship is a prefix code of 3 bits + a regular matching code of 2 bits + a fixed code value of 5; when the second transaction business type is a local government bond, the code mapping relationship is a prefix code of 3 bits + a regular matching code of 3 bits; when the second transaction business type is a convertible bond, the code mapping relationship is a prefix code of 4 bits + a regular matching code of 2 bits; when the second transaction business type is a separated transaction type convertible bond, the code mapping relationship is a prefix code of 3 bits + a fixed code value of 1 bit + a regular matching code of 2 bits; it can also be other code mapping relationships, which are not limited here.
[0040] For example, if the transaction data is 517300, the second transaction business type corresponding to the transaction data is ETF fund. According to the code mapping relationship corresponding to the ETF fund, it is a 3-digit prefix code + a 2-digit regular matching code + a fixed code value of 0. Substituting the transaction data 517300 into the code mapping relationship, it can be seen that 571 is the 3-digit prefix code of the code mapping relationship, 30 is the 2-digit regular matching code, and 0 is the fixed code value.
[0041] It should be noted that the code mapping relationship can be expanded accordingly. For example, a new code mapping relationship can be added to update the code mapping relationship. For example, the transaction data is 133001, and the corresponding second transaction business type is private corporate bonds. Since the second transaction business type does not pass the above business type and belongs to a new transaction business type, a corresponding code mapping relationship is added according to the newly added second transaction business type. The code mapping relationship is two prefix codes + one first regular matching code + three second regular matching codes. The first regular matching code is limited to only the number 3 or the number 4, and the second regular matching code is not limited and can be any number or character.
[0042] Step 202, obtaining transaction data and configuration information.
[0043] In an embodiment of the present invention, the transaction data and configuration information that need to be analyzed are obtained. Since the configuration information corresponding to the transaction data cannot be directly determined, the configuration information corresponding to the transaction data needs to be determined according to the following steps 203 to 205. The transaction data includes the current recorded buying and selling direction, transaction market information, transaction platform information, transaction account number, transaction code and transaction name. The configuration information includes the transaction date, the first transaction business type, the second transaction business type, the securities delivery date, the settlement margin calculation flag, the minimum reserve interest calculation flag, the calculation margin calculation flag, whether liquidation is required, the minimum reserve statistical classification, the delivery method, the fund settlement date and the securities delivery flag.
[0044] Step 203: Determine the regular expression corresponding to the transaction data according to the code mapping relationship.
[0045] In the embodiment of the present invention, the transaction data includes a second transaction business type, and the second transaction business type is used to determine which code mapping relationship the transaction data corresponds to. Then, the transaction data is substituted into the corresponding code mapping relationship to obtain a corresponding regular expression.
[0046] For example, if the transaction data is 517000, and according to the transaction data, it can be known that the second transaction business type is ETF fund, according to the above step 201, the code mapping relationship corresponding to the ETF fund is a prefix code of 3 digits + a regular matching code of 2 digits + a fixed code value of 0. Substituting the transaction data 517000 into the code mapping relationship, 517 is obtained as 3 as the prefix code, 00 is a two-digit regular matching code, and 0 is a fixed code value, where the regular matching code also has a corresponding mapping method, which can be a number mapping to \d, a regular character mapping to \w, all characters mapping to [\s\S], a character length mapping to {M}, etc., or other mapping methods, which can be expanded accordingly and are not limited here. In the above example, 00 is a two-digit regular matching code, where the two-digit regular matching code is both a number, then the corresponding mapping method of the regular matching code is \d{2}. A regular expression is composed of a prefix code + a mapping method of a regular matching code + a fixed code value. According to the transaction data 517000 above, 517 represents a three-digit prefix code, \d{2} represents a mapping method of a regular matching code, and 0 represents a fixed code value. Then the regular expression corresponding to the transaction data 517000 is 517\d{2}0.
[0047] For example, if the transaction data is 517300, then according to the transaction data 517300, the corresponding second transaction business type can be obtained as ETF fund. According to the above step 201, the code mapping relationship corresponding to the ETF fund is a prefix code of 3 digits + a regular matching code of 2 digits + a fixed code value of 0. Substituting the transaction data 517300 into the corresponding code mapping relationship and according to the mapping method of the regular matching code, the regular expression 517\d{2}0 can be generated.
[0048] For example, if the transaction data is 588002, then the second transaction business type corresponding to 588002 is ETF Shanghai Stock Exchange Funds. According to the above step 201, the code mapping relationship corresponding to ETF Shanghai Stock Exchange Funds is a 3-digit prefix code + a 2-digit regular matching code + a fixed code value of 2. Substitute the transaction data 588002 into the corresponding code mapping relationship, and generate the expression 588\d{2}2 according to the mapping method of the regular matching code.
[0049] For example, if the transaction data is 588005, then the second transaction business type corresponding to 588005 is ETF non-Shanghai Stock Exchange funds. According to the above step 201, the code mapping relationship corresponding to ETF non-Shanghai Stock Exchange funds is a prefix code of 3 digits + a regular matching code of 2 digits + a fixed code value of 5. Substitute the transaction data 588005 into the corresponding code mapping relationship, and generate the expression 588\d{2}5 according to the mapping method of the regular matching code.
[0050] For example, if the transaction data is 100007, then the second transaction business type corresponding to 100007 is convertible bonds. According to the above step 201, the code mapping relationship corresponding to the convertible bonds is a 4-digit prefix code + a 2-digit regular matching code. Substitute the transaction data 100007 into the corresponding code mapping relationship, and generate the expression 1000\d{2} according to the mapping method of the regular matching code.
[0051] Optionally, if the code mapping relationships corresponding to two or more transaction data are the same, the same type of regular expressions can be generated based on the same code mapping relationships. At this time, the same type of regular expressions can be merged to generate a new regular expression. This can reduce the number of regular expressions and make the subsequent correspondence between the regular expressions and the first transaction business type clearer.
[0052] For example, if the transaction data is 138001 and 139002, the second transaction business type corresponding to 138001 is local government bonds, and 139002 also corresponds to local government bonds, then the code mapping relationship corresponding to 138001 and the code mapping relationship corresponding to 139001 are the same, both of which are code mapping relationships corresponding to convertible bonds. According to the above step 201, the code mapping relationship is a 3-digit prefix code + a 3-digit regular matching code. Substituting the transaction data 138001 into the corresponding code mapping relationship, and determining the mapping method of the regular matching code according to the above step 202, the generated regular expression is 138\d{3}, substituting the transaction data 139002 into the corresponding code mapping relationship, and according to the mapping relationship of the regular matching code, the generated regular expression is 139\d{3}. Since 138\d{3} and 139\d{3} belong to the same type of regular expressions, the two can be merged into one regular expression, which is 13[8-9]\d{3}.
[0053] Step 204: Determine the first transaction service type corresponding to the transaction data according to the regular expression and the configuration information.
[0054] In the embodiment of the present invention, after obtaining the regular expression, the first transaction business type corresponding to the regular expression can be found from the configuration information according to the regular expression. For example, the first transaction business type can include ETF fund single market Shanghai market funds, ETF fund sub-market Shanghai market funds, ETF fund cross-market Shanghai market funds, ETF fund single market non-Shanghai market funds, ETF fund sub-market non-Shanghai market funds, ETF fund cross-market non-Shanghai market funds, single market convertible bonds, sub-market convertible bonds, cross-market convertible bonds, ETF fund single market, ETF fund sub-market, ETF fund cross-market, single market local government bonds, sub-market local government bonds, cross-market local government bonds, single market separated trading type convertible bonds, sub-market separated trading type convertible bonds, cross-market separated trading type convertible bonds, and other first transaction business types may also be included, which are not limited here. There is a corresponding relationship between the regular expression and the first transaction business type, which may be that the first transaction business type contains an identifier that can be recognized in the regular expression, or the regular expression contains an identifier that can be recognized in the first transaction business type, which is not limited here.
[0055] For example, when it is determined that the regular expression corresponding to the transaction data 517000 is 517\d{2}0, according to the regular expression, the corresponding first transaction business type, that is, the ETF fund single market, can be found in the configuration information according to the identifier of the first transaction business type.
[0056] For example, when it is determined that the regular expression corresponding to the transaction data 588002 is 588\d{2}2, according to the regular expression, the corresponding first transaction business type can be found in the configuration information according to the identifier of the first transaction business type, that is, ETF fund market non-Shanghai funds.
[0057] For example, when it is determined that the regular expression corresponding to the transaction data 588005 is 588\d{2}5, according to the regular expression, the corresponding first transaction business type can be found in the configuration information according to the identifier of the first transaction business type, that is, ETF fund cross-market non-Shanghai funds.
[0058] For example, when it is determined that the regular expression corresponding to the transaction data 100007 is 1000\d{2}, according to the regular expression, the corresponding first transaction business type, that is, the market-specific convertible bonds, can be found in the configuration information according to the identifier of the first transaction business type.
[0059] Step 205: Generate an information table according to the transaction data, the first transaction service type and the configuration information.
[0060] In the embodiment of the present invention, the first transaction service type corresponding to the transaction data may be obtained according to the above step 204, and the corresponding configuration information may be obtained according to the first transaction service type.
[0061] It can be seen from the information table that the information table includes transaction date, transaction account, buying and selling direction, first transaction business type, second transaction business type, transaction data, transaction name, transaction market, transaction platform, securities delivery date, fund settlement date, and securities delivery date. The transaction data includes transaction account, buying and selling direction, transaction name, transaction market, and transaction platform. The configuration information determined according to the second business type includes transaction date, second transaction business type, securities delivery date, fund settlement date, and securities delivery date. The information table comprehensively displays the results of transaction data analysis. The information table is shown in Table 1.
[0062] Table 1 Information table
[0063]
[0064] For example, if one of the transaction data corresponding to the transaction account 800199000 is 517300, and the first business type corresponding to the transaction data is ETF fund, but the custody system has not parsed this transaction data and cannot parse it directly, it is necessary to first determine the code mapping relationship according to the first business type of the transaction data 517300. Since the first business type of the transaction data 517300 is ETF fund, the corresponding code mapping relationship is 3-digit prefix code + 2-digit regular match + fixed code value 0, and then according to the code mapping relationship and the regular match described in step 203 above, The mapping method of the matching code determines that the regular expression of the transaction data 517300 is 517\d{2}0. According to the corresponding relationship between the regular expression and the first transaction business type, it can be determined that the corresponding first transaction business type is the ETF fund single market. Then the corresponding configuration information is determined according to the first transaction business type. The configuration information corresponding to the transaction data 517000 and the current recorded buying and selling direction, transaction market information, transaction platform information, transaction account and transaction name included in the transaction data 517000 are combined together to determine the content of the information table of the transaction data.
[0065] The information table will display the results of data analysis of the transaction data corresponding to the same transaction account in the form of a table, wherein Table 1 is a display form of the information table, and the table can also be changed accordingly according to the expansion of the configuration information, which is not limited here. Another information table is shown in Table 2.
[0066] Table 2 Information table
[0067]
[0068] It can be seen from the above steps 201 to 205 that, through the code mapping relationship, the unparsed transaction data in the hosting system can be converted into corresponding regular expressions, and then based on the regular expression and configuration information, the first transaction business type corresponding to the transaction data can be obtained more accurately, so as to obtain the corresponding configuration information according to the first transaction business type, thereby realizing development without customization, and also obtaining the configuration information corresponding to the unparsed transaction data, and finally obtaining a comprehensive display in the information table.
[0069] Based on the same technical concept as above, an embodiment of the present invention further provides a data analysis device, which can execute the method in the above method embodiment. The structure of the data analysis device provided by the embodiment of the present invention can be seen in Figure 3The device 300 includes: an acquisition unit 301 for acquiring transaction data and configuration information. A processing unit 302 is used to determine a regular expression corresponding to the transaction data according to the code mapping relationship; determine a first transaction business type corresponding to the transaction data according to the regular expression and the configuration information; and generate an information table according to the first transaction business type and the configuration information.
[0070] Optionally, the processing unit 302 is specifically configured to determine a target code mapping relationship corresponding to the transaction data according to the second transaction business type; and convert the transaction data into a corresponding regular expression according to the target code mapping relationship.
[0071] Optionally, the processing unit 302 is specifically used to determine a first regular expression corresponding to the first transaction data based on the first code mapping relationship corresponding to the first transaction data; determine a second regular expression corresponding to the second transaction data based on the second code mapping relationship corresponding to the second transaction data; if the first code mapping relationship is the same as the second code mapping relationship, merge the first regular expression and the second regular expression to obtain a third regular expression.
[0072] Optionally, the processing unit 302 is specifically used to generate an information table based on the transaction data, the first transaction business type and the configuration information, the information table including the transaction date, transaction account, buy and sell direction, the first transaction business type, the second transaction business type, transaction data, transaction name, transaction market, trading platform, securities delivery date, funds settlement date, and securities delivery date.
[0073] Optionally, the processing unit 302 is specifically used to configure information including at least one of the following: transaction date, accounting of the first transaction business type, accounting of the second transaction business type, securities delivery date, settlement margin calculation flag, minimum reserve interest calculation flag, calculation margin calculation flag, whether liquidation is required, minimum reserve statistical classification, delivery method, funds settlement date or securities delivery flag.
[0074] Optionally, the processing unit 302 specifically maps the regular matching code to at least one of the following: mapping numbers to \d, mapping regular characters to \w, mapping all characters to [\s\S], or mapping character lengths to {M}.
[0075] Optionally, the processing unit 302 is specifically configured to update the code mapping relationship if it is determined that a new code mapping relationship exists.
[0076] Based on the same technical concept, the embodiment of the present application also provides an electronic device, such as Figure 4As shown, the electronic device 400 includes at least one processor 401 and a memory 402 connected to the at least one processor. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 For example, the processor 401 and the memory 402 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc. In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401, and at least one processor 401 can execute the steps included in the aforementioned data parsing method by executing the instructions stored in the memory 402.
[0077] Among them, the processor 401 is the control center of the computing device, and can use various interfaces and lines to connect various parts of the computing device, and realize data processing by running or executing instructions stored in the memory 402 and calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes the issuance of instructions. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0078] Processor 401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the method embodiment of the data parsing method can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0079] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data. Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program that can be executed by a computing device. When the program runs on the computing device, the computing device executes the steps of the above-mentioned data parsing method.
[0080] Based on the same technical concept, an embodiment of the present application also provides a computer program product, including computer-readable instructions, which, when executed by a processor, implement the above-mentioned data parsing method.
[0081] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0082] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0085] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0086] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for data analysis, characterized in that: The method comprises: Obtain a code mapping relationship, wherein the code mapping relationship includes an N-bit prefix item and an M-bit regular matching code and a fixed code value; Obtain transaction data and configuration information; Determine a regular expression corresponding to the transaction data according to the code mapping relationship; Determine, according to the regular expression and the configuration information, a first transaction business type corresponding to the transaction data; Generate an information table according to the transaction data, the first transaction business type and the configuration information; The transaction data includes a transaction code and a second transaction business type; the second transaction business type is used to determine a code mapping relationship corresponding to the transaction data; Determining the regular expression corresponding to the transaction data according to the code mapping relationship includes: Determining, according to the second transaction business type, a target code mapping relationship corresponding to the transaction data; According to the target code mapping relationship, the transaction data is converted into a corresponding regular expression; the transaction data includes first transaction data and second transaction data, and the code mapping relationship includes a first code mapping relationship and a second code mapping relationship; After determining the regular expression corresponding to the transaction data according to the code mapping relationship, the method further includes: Determining a first regular expression corresponding to the first transaction data according to the first code mapping relationship corresponding to the first transaction data; Determine a second regular expression corresponding to the second transaction data according to the second code mapping relationship corresponding to the second transaction data; If the first code mapping relationship is the same as the second code mapping relationship, the first regular expression and the second regular expression are merged to obtain a third regular expression.
2. The method according to claim 1, characterized in that The transaction data includes the currently recorded buying and selling direction, transaction market information, transaction platform information, transaction account number, and transaction name; The information table is generated based on the transaction data, the first transaction business type and the configuration information, and the information table includes transaction date, transaction account, buy and sell direction, first transaction business type, second transaction business type, transaction data, transaction name, transaction market, transaction platform, securities delivery date, funds settlement date, and securities delivery date.
3. The method according to claim 1, characterized in that The configuration information includes at least one of the following: Transaction date; Calculate the first transaction type; Accounting for the second transaction business type; Securities delivery date; Clearing margin calculation flag; Minimum reserve interest calculation mark; Calculate margin calculation flag; Whether liquidation is required; Statistical classification of minimum reserve funds; Delivery method; Funds settlement date; Securities delivery sign.
4. The method according to claim 1, characterized in that The method further comprises: If it is determined that there is a newly added code mapping relationship, the code mapping relationship is updated.
5. A data analysis device, characterized in that: include: An acquisition unit, used to acquire a code mapping relationship, wherein the code mapping relationship includes an N-bit prefix item and an M-bit regular matching code and a fixed code value; An acquisition unit, used to acquire transaction data and configuration information; a processing unit, configured to determine a regular expression corresponding to the transaction data according to the code mapping relationship; determine a first transaction service type corresponding to the transaction data according to the regular expression and the configuration information; and generate an information table according to the first transaction service type and the configuration information; The transaction data includes a transaction code and a second transaction business type; the second transaction business type is used to determine a code mapping relationship corresponding to the transaction data; the processing unit is further used to determine a target code mapping relationship corresponding to the transaction data according to the second transaction business type; and convert the transaction data into a corresponding regular expression according to the target code mapping relationship; The transaction data includes first transaction data and second transaction data, and the code mapping relationship includes a first code mapping relationship and a second code mapping relationship; the processing unit is further used to: determine a first regular expression corresponding to the first transaction data according to the first code mapping relationship corresponding to the first transaction data; determine a second regular expression corresponding to the second transaction data according to the second code mapping relationship corresponding to the second transaction data; If the first code mapping relationship is the same as the second code mapping relationship, the first regular expression and the second regular expression are merged to obtain a third regular expression.
6. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory and execute the method according to any one of claims 1 to 4 according to the obtained program.
7. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Patent Citations
Transaction record extraction method and system based on communication record
CN106095745A
Transaction data calling method and system
CN110378790A