Derivative variable generation method and apparatus, terminal device, and storage medium

By matching and storing data fields from credit reports in a pre-built logical pool, the parsing and processing processes are decoupled, solving the reusability problem caused by differences in credit report formats and improving the speed and efficiency of generating derived variables.

CN114138772BActive Publication Date: 2026-01-16JINGDONG TECH HLDG CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010925755.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2026-01-16
Estimated Expiration
2040-09-04

AI Technical Summary

Technical Problem

In existing technologies, the differences in the format of credit reports make it impossible to reuse the processing logic of derived variables, which increases the investment of human and material resources and development costs. In addition, the parsing module is highly dependent on the format and structure, which slows down the generation speed.

Method used

By using the pre-built logical pool to match the preset data fields and processing rules required for the target derived variables, the credit report is parsed and the data fields are stored in the preset storage path. Derived variables are generated according to the configured processing rules. The parsing and processing processes are completely decoupled, avoiding format and structure dependencies.

Benefits of technology

It enables the rapid generation of derived variables under different credit report formats, improving work efficiency and preventing format changes or structural variations from affecting the normal operation of the parsing and processing modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138772B_ABST
    Figure CN114138772B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a kind of derivative variable generation method, device, terminal equipment and storage medium, the method includes: obtaining the target derivative variable information to be generated;According to target derivative variable information, at least one preset data field information required for generating target derivative variable is matched from pre-constructed logic pool, and pre-configured processing rule;According to each preset data field information, the preset data field corresponding to preset data field information is called from preset storage path;According to pre-configured processing rule, the preset data field is processed, and target derivative variable is generated.Through this kind of way, prevent the situation that original message format changes or data structure changes will lead to the situation that the analysis module cannot work normally, or lead to the situation that processing module cannot execute work.Greatly speed up the generation process of derivative variable, improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, terminal device and storage medium for generating derived variables. Background Technology

[0002] The parsing and processing of derived variables in credit reports are crucial for their effective use. Because different querying agencies store credit reports in different formats (e.g., XML, HTML, or JSON), and even credit reports in the same format can have structural differences (e.g., even XML-based reports can differ significantly in tag hierarchy and naming), the logic of these derived variables cannot be reused when parsing the raw credit data and processing them. This necessitates customized processing for different projects, increasing the investment of human and material resources and raising development costs.

[0003] In existing technologies, one method involves using a pre-defined parsing component to extract relevant field data from the DOM tree structure of XML-formatted data according to a pre-defined data acquisition format, and then calculating corresponding feature data based on logical processing rules. This process requires a pre-defined parsing component during data parsing, and subsequent feature processing also depends on the format and structure of the credit report. This method is highly dependent on the format and structure of the credit report's metadata; changes in the original report format or data structure will cause the parsing module to malfunction. The feature processing module also suffers from this weakness of strong dependency, leading to a slower generation speed of derived variables. Summary of the Invention

[0004] In view of this, in order to solve the above-mentioned technical problems in the prior art, the present invention provides a method, apparatus, terminal device and storage medium for generating derived variables.

[0005] In a first aspect, embodiments of the present invention provide a method for generating derived variables, the method comprising:

[0006] Obtain information about the target derived variables to be generated;

[0007] Based on the target derived variable information, at least one preset data field information required to generate the target derived variable is matched from the pre-built logic pool, as well as the pre-configured processing rules;

[0008] Based on each preset data field information, retrieve the preset data field corresponding to the preset data field information from the preset storage path;

[0009] According to the pre-configured processing rule, the preset data field is processed to generate a target derived variable, wherein the preset data field is a data field included in at least one credit report, and after the at least one credit report is parsed, the parsed data field is stored in a preset storage path.

[0010] In a possible implementation, the preset data field information includes label information and / or original path information corresponding to the data field, and according to each preset data field information, the preset data field corresponding to the preset data field information is called from the preset storage path, specifically including:

[0011] According to the label information, the preset data field corresponding to the label information is matched in the pre-constructed object storage file;

[0012] And / or, according to the original path information and the relationship mapping table between the pre-constructed preset storage path and the original storage path corresponding to the parsed data field, the first storage path in which the preset data field is stored is found in the preset storage path, and the preset data field is called from the first storage path;

[0013] The relationship mapping table between the preset storage path and the original storage path corresponding to the parsed data field is that after the at least one credit report is parsed and the parsed data field is stored in the preset storage path, the relationship mapping table is generated.

[0014] In a possible implementation, the pre-configured processing rule includes processing functions and logical relationships between the processing functions, and according to the pre-configured processing rule, the preset data field is processed to generate a derived variable, specifically including:

[0015] According to the logical relationship between the processing functions, the preset data field is processed by using the processing functions to obtain the target derived variable, wherein the processing function is an abstract function obtained by abstracting the program code corresponding to each processing step respectively, and the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing step is a method step of processing one or more preset data fields.

[0016] In a possible implementation, after the preset data field is processed according to the pre-configured processing rule to generate a derived variable, the method further includes:

[0017] According to the preset encryption rule, the target derived variable is encrypted and stored in the derived variable pool.

[0018] In a possible implementation, the at least one credit report is parsed, and the parsed data field is stored in the preset storage path, specifically including:

[0019] obtaining at least one credit report and identifying a format of the at least one credit report;

[0020] parsing the credit report according to a parsing rule corresponding to the format of the credit report, obtaining a parsed data field, and storing the parsed data field in a preset storage path.

[0021] In one possible implementation, the parsing of the credit report according to the parsing rule corresponding to the format of the credit report, the obtaining of the parsed data field, and the storing of the parsed data field in the preset storage path specifically include:

[0022] According to a preset object generation tool, the content in the credit report is deserialized to obtain the parsed data field, and an object file corresponding to the format of the credit report is generated, and the parsed data field is stored in a preset storage path in the object file.

[0023] In one possible implementation, after the parsing of the credit report according to the parsing rule corresponding to the format of the credit report, the obtaining of the parsed data field, and the storing of the parsed data field in the preset storage path, the method further includes:

[0024] verifying the format of the parsed data field;

[0025] When it is determined that the format is abnormal, an alarm information is sent so that a staff member corrects the format of the parsed data field.

[0026] In a second aspect, an embodiment of the present application provides a derivative variable generation device, which includes:

[0027] An obtaining unit is configured to obtain target derivative variable information to be generated.

[0028] A matching unit is configured to match, according to the target derivative variable information, at least one preset data field information and a preconfigured processing rule required for generating a target derivative variable from a preconstructed logic pool.

[0029] A calling unit is configured to call, according to each preset data field information, a preset data field corresponding to the preset data field information from a preset storage path.

[0030] A processing unit is configured to process the preset data field according to the preconfigured processing rule to generate the target derivative variable, wherein the preset data field is a data field included in at least one credit report, and the parsed data field is stored in the preset storage path after the at least one credit report is parsed.

[0031] In a third aspect, an embodiment of the present application provides a terminal device, which includes:

[0032] at least one processor and a memory;

[0033] The processor is configured to execute a derivative variable generation program stored in the memory to implement the derivative variable generation method as described in any of the embodiments of the first aspect.

[0034] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing one or more programs, and the one or more programs are executable by the terminal device as described in the third aspect to implement the derivative variable generation method as described in any of the embodiments of the first aspect.

[0035] The derivative variable generation method provided by the embodiment of the present application is to analyze at least one credit report, and then store the parsed data field to a preset storage path for subsequent use. It is to prevent the original credit report format from being different, and the subsequent call being limited by the credit report format. In this case, no matter what format, the parsed data field is obtained after uniform analysis, and then stored to the preset storage path, which is convenient for use. Similarly, the preset field information and the preconfigured processing rule are placed in the logic pool in advance, and then the processing rule is directly called to process the preset data field matched according to the preset field information. The process is no longer coupled with the credit report format, that is, the data field analysis process and the processing process are completely decoupled. The processing rule is no longer customized, and no longer depends on the format and structure of the metadata of the credit report to generate the customized processing rule. Instead, the configured processing rule is stored in the logic pool and repeatedly called according to actual needs. In this way, the situation that the original message format changes or the data structure changes causes the analysis module to fail to work normally or the processing module to fail to work is prevented. The generation process of the derivative variable is greatly accelerated, and the work efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 A derivative variable generation method flowchart provided by an embodiment of the present application;

[0037] Figure 2 A derivative variable generation device structure diagram provided by an embodiment of the present application;

[0038] Figure 3 A terminal device structure diagram provided by an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0040] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0041] Figure 1 A derivative variable generation method flowchart provided by the embodiments of the present application is shown in FIG. 1, which comprises the following steps. Figure 1

[0042] In step 110, target derivative variable information to be generated is acquired.

[0043] Specifically, the target derivative variable information can be the name information of the target derivative variable, and other information with unique indication marks is acquired to determine what the target derivative variable to be generated is.

[0044] In step 120, at least one preset data field information and a preconfigured processing rule required for generating the target derivative variable are matched from a preconstructed logic pool according to the target derivative variable information.

[0045] Specifically, the preset data field information and the processing rule required for generating a certain target derivative variable are preconfigured and stored in the preconstructed logic pool.

[0046] Therefore, after step 110 is executed, at least one preset data field information and a preconfigured processing rule required for generating the target derivative variable can be matched from the preconstructed logic pool according to the target derivative variable information introduced in step 110.

[0047] In step 130, a preset data field corresponding to each preset data field information is called from a preset storage path according to the preset data field information.

[0048] Specifically, the preset data field is a data field included in at least one credit report, and the parsed data field is stored in the preset storage path after the at least one credit report is parsed.

[0049] Before introducing this step, how to parse the at least one credit report and store the parsed data field in the preset storage path will be first described. For details, please refer to the following: ​

[0050] 1. Obtain at least one credit report and identify the format of the at least one credit report.

[0051] Specifically, according to the actual application, the target derived variable to be finally generated can be more than one. The data fields required by at least one target derived variable can be different, for example, target derived variable A requires data field 1 to data field 5, target derived variable B requires data field 6-8, and target derived variable C requires data field 7-15 (in this embodiment, numbers are used to represent data fields, only to illustrate that the data fields required by different target derived fields can not only include one, but also some data fields required by different derived fields are repeated, but some can not be repeated). The data fields available in each credit report are limited, therefore, in order to obtain more complete data fields, at least one credit report is obtained in this embodiment. The number of credit reports obtained is determined according to the actual situation, which will not be described here.

[0052] When identifying the format of the credit report, it is considered that the format of the credit report can be HTML format, json format or XML format, etc. There is corresponding identification information in the report for indicating the format of the credit report, for example, there are some fields in the table header for indicating the report form. Therefore, the format of the credit report can be identified according to the identification information in the credit report.

[0053] 2. According to the analysis rule corresponding to the format of the credit report, the credit report is analyzed, the analyzed data field is obtained, and the analyzed data field is stored in the preset storage path.

[0054] Specifically, different credit report formats correspond to slightly different analysis rules, but the principles are basically the same.

[0055] The specific analysis process includes:

[0056] The preset object generation tool, such as an automatic POJO (Java ordinary object) file generation tool, is used to generate an ordinary object file from a credit report in a specific format. Specifically, the automatic POJO (Java ordinary object) file generation tool is trained in advance, for example, using a credit label dictionary (a complete credit label hierarchical structure dictionary) or learning from multiple real credit samples, so that the automatic POJO (Java ordinary object) file generation tool can finally generate an ordinary object file from a credit report in a specific format, and the data fields are obtained by deserializing the ordinary object file. The specific training process refers to the general machine learning algorithm principle, which will not be described here. The content of the credit report, i.e., the parsed data fields, will be stored in the preset storage path of the object file. The specific storage path can be configured by the developer in advance according to the actual situation, which will not be described here.

[0057] The credit reports in different formats are parsed into ordinary object files according to certain rules, in order to prevent the dependence of metadata on the format and structure of the credit report from being too strong. Avoiding the situation that the subsequent data fields cannot be obtained due to the change of the format or structure of the original credit report, and the processing of the data fields and the generation of derivative variables cannot be performed.

[0058] Optionally, after step 2 is performed, step 3 of generating a relationship mapping table between the preset storage path and the original storage path of the parsed data fields can be further included.

[0059] The specific use of the relationship mapping table will be described in detail below.

[0060] Optionally, after step 2 is performed, steps 4 and 5 can be further included.

[0061] Step 4, verifying the format of the parsed data fields;

[0062] Step 5, when it is determined that the format is abnormal, an alarm information is issued to correct the format of the parsed data fields by the staff. Here, the alarm information is defined as the first alarm information.

[0063] Specifically, the format verification of the parsed data fields mainly identifies whether the format of the data field content belongs to the field format pre-stored in the current system.

[0064] The field format pre-stored in the system is a field format added by the staff in advance according to experience, or a field format determined according to a regular matching method. If the data field format in the parsed data field is not one of the two field formats obtained in the above two ways, it is determined that the format is abnormal. The first warning information is issued so that the staff can correct the format of the parsed data field. Of course, if the staff finds that the format of the current data field is correct when correcting, only it is not filled into the system, then the current field format will also be filled into the system manually. In a specific example, the beanxpath function can be used to obtain specific content in the credit report. The beanmodify function is used to modify the parsed data field (i.e., the data field in the credit report).

[0065] The verification of the parsed data field is also to prevent the data field used when generating the derivative variable from having a format error, which causes the derivative variable generation process to fail.

[0066] Specifically, the preset data field information includes label information and / or original path information corresponding to the data field. According to each preset data field information, the preset data field corresponding to the preset data field information is called from the preset storage path, specifically including:

[0067] According to the label information, the preset data field corresponding to the label information is matched in the pre-constructed object storage file;

[0068] And / or, according to the original path information, and a relationship mapping table between the pre-constructed preset storage path and the original storage path corresponding to the parsed data field, a first storage path in which the preset data field is stored is found in the preset storage path, and the preset data field is called from the first storage path;

[0069] The relationship mapping table between the preset storage path and the original storage path corresponding to the parsed data field is: at least one credit report is parsed, and after the parsed data field is stored in the preset storage path, the generated relationship mapping table. That is, the relationship mapping table mentioned above.

[0070] Specifically, because the staff who needs to provide the parsing report can only know the original storage path of the data field required for generating the target derived variable, but cannot know the current storage path of the parsed data field. The original path is not one-to-one corresponding to the preset storage path. Therefore, in the subsequent derived variable generation method, the required data field cannot be directly found from the preset storage path according to the original storage path. Considering this problem, a relationship mapping table between the preset storage path and the original path of the parsed data field can be generated. It is convenient for subsequent matching of the current preset storage path according to the original path, and accurately finding the data field required for generating the target derived variable.

[0071] Step 140, according to the preconfigured processing rule, processing the preset data field to generate the target derived variable.

[0072] Optionally, the preconfigured processing rule includes a processing function and a logical relationship between the processing functions. In a specific example, the specific execution process of step 140 can include:

[0073] According to the logical relationship between the processing functions, the preset data field is processed by using the processing functions to obtain the target derived variable.

[0074] Wherein the processing function is: after abstracting the program code corresponding to each processing step respectively, the abstract function obtained; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing step is a method step of processing one or more preset data fields.

[0075] Specifically, the staff can configure different processing functions in the logic pool in advance, for example, for data field 1 and data field 2, the program code corresponding to method 1 needs to be executed. However, considering that if the methods executed for multiple data fields are the same, i.e., the program code needs to be written repeatedly once, this repeated process not only increases the workload and reduces the work efficiency, but also is prone to errors. Therefore, in this embodiment, the entire program code corresponding to all processing steps is abstracted into a processing function. Then when the data field is executed, the processing function can be directly called.

[0076] In addition, generating a target derived variable, the processing method step can not only include one, but also can need multiple method steps. There is a certain association relationship between multiple method steps. Therefore, in this embodiment, after the program code corresponding to the processing step is abstracted into the processing function, the logical relationship between different processing steps is also mapped into the logical relationship between different processing functions.

[0077] From then on, as long as the logical relationship between the processing functions is called, the corresponding processing function is used to process the preset data field, and the target derivative variable can be obtained.

[0078] Optionally, when the credit report is a sample report, after extracting all the preset data fields from the first storage path, using the preconfigured processing rules to process the preset data fields to obtain the target derivative variable, the method further comprises:

[0079] Verify the target derivative variable to obtain a verification result.

[0080] When the verification result does not meet the preset requirement, a second alarm information is sent, so that the staff can detect whether the path configuration and the preconfigured processing rule are correct according to the second alarm information.

[0081] Specifically, if the credit report is sample data, it is also known that the generated derivative variable should be a certain result. At this time, if the generated target derivative variable cannot meet the preset requirement, for example, it is greatly different from the known derivative variable result, the system can send a second alarm information to remind the staff to detect whether the path configuration and the preconfigured processing rule are correct in time and take corresponding measures for adjustment.

[0082] Optionally, after generating the target derivative variable, the method can further comprise:

[0083] According to the preset encryption rule, the target derivative variable is encrypted and stored in the derivative variable pool.

[0084] Specifically, the target derivative variable is encrypted so that the counterparty can know the format of the credit report when using the derivative variable. Therefore, it needs to be encrypted according to the preset rule. Then, it is stored in the derivative variable pool, so that the derivative variable can be directly called in the subsequent process, and the processing process of the derivative variable is not repeated.

[0085] The embodiment of the present application provides a derivative variable generation method, which comprises the following steps: analyzing at least one credit report, and storing the analyzed data field into a preset storage path for subsequent use. The method is used to prevent the original credit report format from being different, and the subsequent call being limited by the credit report format. In the method, the format is uniformly analyzed, the analyzed data field is obtained, and the analyzed data field is stored into the preset storage path, so that the method is convenient to use. Similarly, the preset field information and the preconfigured processing rule are placed in a logic pool in advance, the processing rule is directly called, the preset data field matched according to the preset field information is processed, and the coupling relationship between the credit report format and the process is eliminated, that is, the data field analysis process and the processing process are completely decoupled. The processing rule is no longer customized, and no longer depends on the format and structure of the metadata of the credit report to generate the customized processing rule. Instead, the configured processing rule is stored in the logic pool and repeatedly called according to actual needs. In this way, the original message format change or data structure change can prevent the analysis module from working normally, or the processing module from working. The generation process of the derivative variable is greatly accelerated, and the work efficiency is improved.

[0086] Figure 2 The embodiment of the present application provides a derivative variable generation device, which comprises an acquisition unit 201, a matching unit 202, a calling unit 203 and a processing unit 204.

[0087] The acquisition unit 201 is used for acquiring target derivative variable information to be generated.

[0088] The matching unit 202 is used for matching at least one preset data field information and a preconfigured processing rule required for generating the target derivative variable from a preconstructed logic pool according to the target derivative variable information.

[0089] The calling unit 203 is used for calling a preset data field corresponding to the preset data field information from a preset storage path according to each preset data field information.

[0090] The processing unit 204 is used for processing the preset data field according to the preconfigured processing rule to generate the target derivative variable, wherein the preset data field is a data field included in at least one credit report, and the analyzed data field is stored into the preset storage path after the at least one credit report is analyzed.

[0091] Optionally, the preset data field information comprises label information and / or original path information corresponding to the data field, and the calling unit 203 is specifically used for:

[0092] According to the label information, a preset data field corresponding to the label information is matched in a pre-constructed object storage file;

[0093] According to the original path information and a relationship mapping table between a preset storage path and an original storage path corresponding to the parsed data field, a first storage path in which the preset data field is stored is found in the preset storage path, and the preset data field is called from the first storage path.

[0094] The relationship mapping table between the preset storage path and the original storage path corresponding to the parsed data field is generated after at least one credit report is parsed and the parsed data field is stored in the preset storage path.

[0095] Optionally, the preconfigured processing rule includes a processing function and a logical relationship between the processing functions, and the processing unit 204 is specifically configured to process the preset data field by using the processing function according to the logical relationship between the processing functions, to obtain the target derived variable, wherein the processing function is an abstract function obtained by abstracting a program code corresponding to each processing step respectively, and the logical relationship between the processing functions is a logical relationship between all processing steps, and the processing step is a method step of processing one or more preset data fields.

[0096] Optionally, the apparatus further includes an encryption unit 205 configured to store the target derived variable to the derived variable pool after encrypting the target derived variable according to a preset encryption rule.

[0097] Optionally, the apparatus further includes an analysis unit 206.

[0098] The obtaining unit 201 is further configured to obtain at least one credit report and identify a format of the at least one credit report.

[0099] The analysis unit 206 is configured to analyze the credit report according to an analysis rule corresponding to the credit report format, to obtain a parsed data field, and to store the parsed data field to a preset storage path.

[0100] Optionally, the analysis unit 206 is specifically configured to perform deserialization processing on content in the credit report according to a preset object generation tool, to obtain the parsed data field, and to generate an object file corresponding to the credit report format, and to store the parsed data field to the preset storage path in the object file.

[0101] Optionally, the apparatus further includes a verification unit 207 and an alarm unit 208.

[0102] The verification unit 207 is configured to verify a format of the parsed data field.

[0103] The alarm unit 208 is used to issue an alarm information when it is determined that the format is abnormal, so that the staff can correct the format of the parsed data field.

[0104] The functions performed by each functional component in the derivative variable generation and processing device provided by the embodiment have been described in detail in the Figure 1 corresponding embodiments, and thus will not be described again here.

[0105] The derivative variable generation and processing device provided by the embodiment stores the parsed data field into a preset storage path for subsequent use, thereby preventing the subsequent calling from being limited by the format of the credit report. Regardless of the format, the parsed data field is obtained and stored in the preset storage path, which is convenient for use. Similarly, the preset field information and the preconfigured processing rule are placed in the logic pool in advance, and the processing rule is directly called to process the preset data field matched according to the preset field information. The process is no longer coupled with the format of the credit report, that is, the data field parsing process and the processing process are completely decoupled. The processing rule is no longer customized and no longer depends on the format and structure of the metadata of the credit report to generate a customized processing rule. Instead, the configured processing rule is stored in the logic pool and repeatedly called according to actual needs. In this way, the change of the original message format or the change of the data structure will not cause the parsing module to malfunction or the processing module to fail to perform work. The generation process of the derivative variable is greatly accelerated, and the work efficiency is improved.

[0106] Figure 3 A structural schematic diagram of a terminal device provided by the embodiment is shown in the figure, Figure 3 The terminal device 300 shown in the figure includes at least one processor 301, a memory 302, at least one network interface 303 and other user interfaces 304. Each component in the derivative variable generation and processing terminal device 300 is coupled together through a bus system 305. It can be understood that the bus system 305 is used to realize the connection and communication between the components. In addition to the data bus, the bus system 305 also includes a power bus, a control bus and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 305 in the figure. Figure 3

[0107] The user interface 304 can include a display, a keyboard or a clicking device (for example, a mouse, a trackball, a touchpad or a touch screen, etc.).

[0108] ​It is to be appreciated that the memory 302 in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous Dynamic RAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 302 described herein is intended to include, without being limited to, these and any other suitable types of memory.

[0109] In some embodiments, the memory 302 stores the following elements, executable units or data structures, or a subset of them, or an extended set of them: an operating system 3021 and application programs 3022.

[0110] Among them, the operating system 3021 contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application programs 3022 contain various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The programs for implementing the method embodiments of the present application can be contained in the application programs 3022.

[0111] In the embodiments of the present application, by invoking the programs or instructions stored in the memory 302, specifically, the programs or instructions stored in the application programs 3022, the processor 301 is configured to execute the method steps provided by the method embodiments, for example, including:

[0112] Obtaining target derivative variable information to be generated;

[0113] According to the target derived variable information, at least one preset data field information required for generating the target derived variable is matched from a pre-constructed logic pool, and a preconfigured processing rule is matched;

[0114] According to each preset data field information, a preset data field corresponding to the preset data field information is called from a preset storage path;

[0115] According to the preconfigured processing rule, the preset data field is processed to generate the target derived variable, wherein the preset data field is a data field included in at least one credit report, and after the at least one credit report is parsed, the parsed data field is stored in the preset storage path.

[0116] Optionally, the preset data field information includes label information and / or original path information corresponding to the data field, and according to each preset data field information, a preset data field corresponding to the preset data field information is called from a preset storage path, specifically including:

[0117] According to the label information, a preset data field corresponding to the label information is matched in a pre-constructed object storage file;

[0118] And / or, according to the original path information, and a relationship mapping table between the pre-constructed preset storage path and an original storage path corresponding to the parsed data field, a first storage path in which the preset data field is stored is found in the preset storage path, and the preset data field is called from the first storage path;

[0119] Wherein, the relationship mapping table between the pre-constructed preset storage path and the original storage path corresponding to the parsed data field is a relationship mapping table generated after at least one credit report is parsed and the parsed data field is stored in the preset storage path.

[0120] Optionally, the preconfigured processing rule includes a processing function and a logical relationship between the processing functions, and according to the preconfigured processing rule, the preset data field is processed to generate the derived variable, specifically including:

[0121] According to the logical relationship between the processing functions, the preset data field is processed by using the processing functions to obtain the target derived variable, wherein the processing function is an abstract function obtained by abstracting a program code corresponding to each processing step respectively, and the logical relationship between the processing functions is a logical relationship between all processing steps, and the processing step is a method step of processing one or more preset data fields.

[0122] Optionally, after the preset data field is processed according to the preconfigured processing rule to generate the derived variable, the method further includes:

[0123] According to the preset encryption rule, the target derivative variable is encrypted and stored in the derivative variable pool.

[0124] Optionally, the at least one credit report is parsed, and the parsed data field is stored in a preset storage path, specifically including:

[0125] At least one credit report is obtained, and the format of the at least one credit report is identified.

[0126] According to the parsing rule corresponding to the credit report format, the credit report is parsed, the parsed data field is obtained, and the parsed data field is stored in the preset storage path.

[0127] Optionally, according to the parsing rule corresponding to the credit report format, the credit report is parsed, the parsed data field is obtained, and the parsed data field is stored in the preset storage path, specifically including:

[0128] According to the preset object generation tool, the content in the credit report is deserialized to obtain the parsed data field, and the parsed data field is stored in the object file corresponding to the credit report format.

[0129] Optionally, the format of the parsed data field is verified.

[0130] When it is determined that the format is abnormal, an alarm information is sent so that the staff corrects the format of the parsed data field.

[0131] The method disclosed by the embodiments of the present application can be applied to the processor 301 or implemented by the processor 301. The processor 301 can be an integrated circuit chip having a signal processing capability. In the implementation process, the steps of the method can be completed by the integrated logic electric circuit in the processor 301 or the instruction of the software form. The processor 301 can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software units in the code processor for execution. The software unit can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the storage 302, and the processor 301 reads the information in the storage 302 and combines the hardware to complete the steps of the above method.

[0132] It can be understood that the embodiments described herein can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware realization, the processing unit 301 can be realized in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions of the present application or a combination thereof.

[0133] For software realization, the technology herein can be realized by units for executing functions herein. The software code can be stored in the memory and executed by the processor. The memory can be realized in the processor or outside the processor.

[0134] The terminal device provided by the embodiments can be, for example Figure 3The terminal device shown in the method can perform the steps as shown in the method Figure 1 The method can derive the variable generation method, and further implement Figure 1 The technical effects of the variable generation method are shown in the method, and specific reference is made to Figure 1 The related description is not repeated here for brevity.

[0135] The embodiment of the application also provides a storage medium (computer readable storage medium). The storage medium stores one or more programs. The storage medium can include a volatile memory such as a random access memory, and the memory can also include a non-volatile memory such as a read-only memory, a flash memory, a hard disk or a solid state disk, and the memory can also include a combination of the above types of memories.

[0136] When the one or more programs in the storage medium are executed by one or more processors, the above-mentioned derivative variable generation method executed on the terminal device side can be implemented.

[0137] The processor is configured to execute the derivative variable generation program stored in the memory to implement the following steps of the derivative variable generation method executed on the terminal device side:

[0138] Obtain target derivative variable information to be generated;

[0139] According to the target derivative variable information, at least one preset data field information required for generating the target derivative variable is matched from a pre-constructed logic pool, and a pre-configured processing rule is matched;

[0140] According to each preset data field information, a preset data field corresponding to the preset data field information is retrieved from a preset storage path;

[0141] According to the pre-configured processing rule, the preset data field is processed to generate the target derivative variable, wherein the preset data field is at least one data field included in the credit report, and after the at least one credit report is parsed, the parsed data field is stored in the preset storage path.

[0142] Optionally, the preset data field information includes label information and / or original path information corresponding to the data field, and according to each preset data field information, a preset data field corresponding to the preset data field information is retrieved from a preset storage path, specifically including:

[0143] According to the label information, the preset data field corresponding to the label information is matched in the pre-constructed object storage file;

[0144] And / or, according to the original path information, and the relationship mapping table between the pre-built preset storage path and the original storage path corresponding to the parsed data field, the first storage path in which the preset data field is stored is found in the preset storage path, and the preset data field is called from the first storage path.

[0145] The relationship mapping table between the preset storage path and the original storage path corresponding to the parsed data field is generated after at least one credit report is parsed and the parsed data field is stored in the preset storage path.

[0146] Optionally, the preconfigured processing rule includes a processing function and a logical relationship between the processing functions, and the preset data field is processed according to the preconfigured processing rule to generate a derived variable, specifically including:

[0147] According to the logical relationship between the processing functions, the preset data field is processed by using the processing functions to obtain a target derived variable, wherein the processing function is an abstract function obtained by abstracting the program code corresponding to each processing step respectively, and the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing step is a method step of processing one or more preset data fields.

[0148] Optionally, after the preset data field is processed according to the preconfigured processing rule to generate a derived variable, the method further includes:

[0149] According to the preset encryption rule, the target derived variable is encrypted and stored in the derived variable pool.

[0150] Optionally, the at least one credit report is parsed, and the parsed data field is stored in the preset storage path, specifically including:

[0151] At least one credit report is obtained, and the format of the at least one credit report is identified.

[0152] According to the parsing rule corresponding to the credit report format, the credit report is parsed to obtain a parsed data field, and the parsed data field is stored in the preset storage path.

[0153] Optionally, according to the parsing rule corresponding to the credit report format, the credit report is parsed to obtain a parsed data field, and the parsed data field is stored in the preset storage path, specifically including:

[0154] According to the preset object generation tool, the content in the credit report is deserialized to obtain a parsed data field, and an object file corresponding to the credit report format is generated, and the parsed data field is stored in the preset storage path in the object file.

[0155] Optionally, the format of the parsed data field is checked.

[0156] When it is determined that the format is abnormal, an alarm message is sent so that a staff member corrects the format of the parsed data field.

[0157] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, various components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation should not be interpreted to cause a departure from the scope of the present application.

[0158] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0159] The above detailed description has further explained the purpose, technical solutions, and advantages of the present application. It should be understood that the above is only a specific implementation of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for generating a derived variable, characterized by, The method comprises: obtaining target derivative variable information to be generated; According to the target derivative variable information, at least one preset data field information required for generating the target derivative variable is matched from a pre-constructed logic pool, and a pre-configured processing rule is matched; According to each of the preset data field information, the preset data field corresponding to the preset data field information is called from the preset storage path; According to the pre-configured processing rule, the preset data field is processed to generate the target derivative variable, wherein the preset data field is a data field included in at least one credit report, and the parsed data field is stored in the preset storage path after the at least one credit report is parsed; Wherein, at least one credit report is parsed, and the parsed data field is stored in the preset storage path, specifically including: Obtain at least one credit report and identify the format of at least one credit report; According to the preset object generation tool, the credit report of the corresponding format is generated into an ordinary object file, the ordinary object file is deserialized to obtain the parsed data field, and the parsed data field is stored in the preset storage path in the ordinary object file, wherein the preset object generation tool is obtained by learning and training of credit label dictionary or multiple real credit samples; The preset data field information includes original path information, and the preset data field corresponding to the preset data field information is called from the preset storage path according to each of the preset data field information, specifically including: According to the original path information, and the relationship mapping table between the pre-constructed preset storage path and the original storage path corresponding to the parsed data field, the first storage path storing the preset data field is found in the preset storage path, and the preset data field is called from the first storage path; Wherein, the relationship mapping table between the preset storage path and the original storage path corresponding to the parsed data field is: after the at least one credit report is parsed, the parsed data field is stored in the preset storage path, and the generated relationship mapping table.

2. The method of claim 1, wherein, The preset data field information includes label information corresponding to the data field, and the preset data field corresponding to the preset data field information is called from the preset storage path according to each of the preset data field information, specifically including: According to the label information, the preset data field corresponding to the label information is matched in the pre-constructed object storage file.

3. The method according to claim 1 or 2, characterized in that, The pre-configured processing rule includes processing function and logical relationship between processing functions, and the preset data field is processed to generate the derivative variable according to the pre-configured processing rule, specifically including: According to a logical relationship between the processing functions, the preset data fields are processed by using the processing functions, and the target derived variable is obtained, wherein the processing functions are abstract functions obtained by respectively abstracting program codes corresponding to each processing step; and the logical relationship between the processing functions is a logical relationship between all the processing steps.

4. The method according to claim 1 or 2, characterized in that, After the preset data fields are processed according to the preconfigured processing rules to generate the derived variable, the method further comprises: According to a preset encryption rule, the target derived variable is encrypted and stored in a derived variable pool.

5. The method of claim 1, wherein, After the parsed data fields are stored in the preset storage path, the method further comprises: The format of the parsed data fields is verified. When it is determined that the format is abnormal, an alarm information is sent so that a staff member corrects the format of the parsed data fields.

6. A derivative variable generation apparatus characterized by comprising: The device comprises: An obtaining unit is configured to obtain target derived variable information to be generated. A matching unit is configured to match, according to the target derived variable information, at least one preset data field information and a preconfigured processing rule required for generating a target derived variable from a preconstructed logic pool. A calling unit is configured to call, according to each preset data field information, a preset data field corresponding to the preset data field information from a preset storage path. A processing unit is configured to process the preset data fields according to the preconfigured processing rules to generate the target derived variable, wherein the preset data fields are data fields included in at least one credit report, and the parsed data fields are stored in the preset storage path after the at least one credit report is parsed. The device further comprises an analyzing unit. The obtaining unit is further configured to obtain at least one credit report and identify a format of the at least one credit report. The analyzing unit is configured to generate a credit report in a corresponding format into an ordinary object file according to a preset object generation tool, perform deserialization processing on the ordinary object file, obtain parsed data fields, and store the parsed data fields in a preset storage path in the ordinary object file, wherein the preset object generation tool is obtained by learning and training a credit label dictionary or multiple real credit samples. The preset data field information includes original path information, and the calling unit is specifically configured to: According to the original path information and a relationship mapping table between the preset storage path and original storage paths corresponding to the parsed data fields, a first storage path in which the preset data fields are stored is found in the preset storage path, and the preset data fields are called from the first storage path. The relationship mapping table between the preset storage path and the original storage paths corresponding to the parsed data fields is a relationship mapping table generated after the at least one credit report is parsed and the parsed data fields are stored in the preset storage path.

7. A terminal device, characterized by comprising: The terminal device comprises at least one processor and a memory; The processor is configured to execute a derivative variable generation program stored in the memory to implement the derivative variable generation method in any one of claims 1-5.

8. A computer storage medium, characterized in that, The computer storage medium stores one or more programs, and the one or more programs can be executed by the terminal device to implement the derivative variable generation method in any one of claims 1-5.

Citation Information

Patent Citations

  • Data processing method and device

    CN104077128A

  • Log file processing method and device, computer device and storage medium

    CN109324996A

  • Form data processing method, terminal device, and computer readable storage medium

    CN109376162A

  • Business data processing method, device and equipment

    CN110781165A