CN114138772A - Derivative variable generation method and device, terminal equipment and storage medium - Google Patents

Derivative variable generation method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN114138772A
CN114138772A CN202010925755.8A CN202010925755A CN114138772A CN 114138772 A CN114138772 A CN 114138772A CN 202010925755 A CN202010925755 A CN 202010925755A CN 114138772 A CN114138772 A CN 114138772A
Authority
CN
China
Prior art keywords
data field
preset
processing
information
storage path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010925755.8A
Other languages
Chinese (zh)
Inventor
刘帅朝
黄乐乐
彭南博
张德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202010925755.8A priority Critical patent/CN114138772A/en
Publication of CN114138772A publication Critical patent/CN114138772A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention relates to a method, a device, terminal equipment and a storage medium for generating a derivative variable, wherein the method comprises the following steps: acquiring target derivative variable information to be generated; according to the target derived variable information, matching at least one piece of preset data field information required by generating the target derived variable from the pre-constructed logic pool, and pre-configured processing rules; calling a preset data field corresponding to the preset data field information from a preset storage path according to each piece of preset data field information; and processing the preset data field according to a preset processing rule to generate a target derivative variable. By the mode, the situation that the analysis module cannot work normally or the processing module cannot execute work due to the change of the original message format or the change of the data structure is prevented. The generation process of the derivative variable is greatly accelerated, and the working efficiency is improved.

Description

Derivative variable generation method and device, terminal equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a derivative variable generation method, a derivative variable generation device, terminal equipment and a storage medium.
Background
The analysis of the credit report and the processing of the derived variables are important for the use of the content of the credit report. Because the credit investigation report formats stored by different query organizations are different (such as XML, HTML or JSON formats), or even the credit investigation messages with the same format are different in structure (such as the credit investigation messages stored for the XML formats are greatly different in label level and label name); when the original credit investigation data is analyzed and the derived variable processing is carried out, the problem that the logic of the processed derived variable cannot be reused exists, and the individualized processing can be carried out only according to different projects, so that the investment of manpower and material resources is increased, and the development cost is increased.
In the prior art, there is a method that acquires corresponding field data in a DOM tree structure of XML format data according to a preset data acquisition format by using a preset parsing component, and further calculates corresponding feature data according to a logic processing rule. In the process, an analysis component needs to be preset in the data analysis process, the follow-up feature processing also needs to depend on the format, structure and the like of a credit investigation report, the method has strong dependence on the format and structure of credit investigation message metadata, and if the original message format is changed or the data structure is changed, the analysis module cannot work normally. The feature processing module also has the weak point of strong dependence, so that the generation speed of the derivative variable is reduced.
Disclosure of Invention
In view of this, to solve the above technical problems in the prior art, embodiments of the present invention provide a method and an apparatus for generating derived variables, a terminal device, and a storage medium.
In a first aspect, an embodiment of the present invention provides a method for generating a derived variable, where the method includes:
acquiring target derivative variable information to be generated;
according to the target derived variable information, matching at least one piece of preset data field information required by generating the target derived variable from the pre-constructed logic pool, and pre-configured processing rules;
calling a preset data field corresponding to the preset data field information from a preset storage path according to each piece of preset data field information;
and processing the preset data field according to a preset processing rule to generate a target derivative variable, wherein the preset data field is a data field included in at least one credit investigation report, and after the at least one credit investigation report is analyzed, the analyzed data field is stored in a preset storage path.
In one possible embodiment, the preset data field information includes tag information and/or original path information corresponding to the data field, and the retrieving, according to each piece of preset data field information, the preset data field corresponding to the preset data field information from the preset storage path specifically includes:
according to the label information, matching a preset data field corresponding to the label information in a pre-constructed object storage file;
and/or searching a first storage path in which the preset data field is stored in the preset storage path according to the original path information and a relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field, and calling the preset data field from the first storage path;
the relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field is as follows: and at least one credit investigation report is analyzed, and a relational mapping table is generated after the analyzed data field is stored into a preset storage path.
In a possible embodiment, the pre-configured processing rule includes a logic relationship between a processing function and the processing function, and the processing is performed on the preset data field according to the pre-configured processing rule to generate the derived variable, which specifically includes:
processing the preset data field by using the processing function according to the logical relation between the processing functions to obtain a target derivative variable, wherein the processing function is as follows: respectively abstracting the program code corresponding to each processing step to obtain an abstract function; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing steps are the method steps for processing one or more preset data fields.
In a possible embodiment, after the preset data field is processed according to the pre-configured processing rule and the derivative variable is generated, the method further includes:
and encrypting the target derivative variable according to a preset encryption rule, and storing the target derivative variable into a derivative variable pool.
In a possible embodiment, the analyzing at least one credit investigation report, and storing the analyzed data field into a preset storage path specifically includes:
acquiring at least one credit investigation report and identifying the format of the at least one credit investigation report;
and analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to a preset storage path.
In a possible embodiment, the method for analyzing the credit investigation report according to the analysis rule corresponding to the credit investigation report format, acquiring the analyzed data field, and storing the analyzed data field to the preset storage path specifically includes:
and according to a preset object generation tool, performing deserialization processing on the content in the credit investigation report, acquiring the analyzed data field, generating an object file corresponding to the credit investigation report format, and storing the analyzed data field to a preset storage path in the object file.
In a possible embodiment, after analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field in a preset storage path, the method further includes:
checking the format of the analyzed data field;
and when the abnormal format is determined, sending alarm information so that a worker can correct the analyzed format of the data field.
In a second aspect, an embodiment of the present invention provides a derived variable generation apparatus, including:
the acquisition unit is used for acquiring target derivative variable information to be generated;
the matching unit is used for matching at least one preset data field information required by generating the target derived variable from the pre-constructed logic pool according to the target derived variable information and the pre-configured processing rule;
the calling unit is used for calling the preset data field corresponding to the preset data field information from the preset storage path according to each piece of preset data field information;
and the processing unit is used for processing the preset data field according to the preset processing rule to generate a target derivative variable, wherein the preset data field is a data field included in at least one credit investigation report, and the analyzed data field is stored in a preset storage path after the at least one credit investigation report is analyzed.
In a third aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes:
at least one processor and memory;
the processor is configured to execute the derived variable generation program stored in the memory to implement the derived variable generation method as described in any embodiment of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, where one or more programs are stored, and the one or more programs are executable by the terminal device described in the third aspect to implement the derived variable generation method described in any of the embodiments of the first aspect.
According to the method for generating the derivative variable, provided by the embodiment of the invention, at least one credit investigation report is analyzed, and then the analyzed data field is stored to a preset storage path for subsequent use. The reason is to prevent the original credit report format from being different, and the subsequent calling is limited by the credit report format. And the data fields are analyzed uniformly no matter what format is adopted, and then the analyzed data fields are stored in a preset storage path after being acquired, so that the use is convenient. Similarly, the preset field information and the pre-configured processing rule are placed in the logic pool in advance, then the processing rule is directly called, the preset data field matched according to the preset field information is processed, the process does not have a coupling relation with the credit investigation report format, and the data field analysis process and the processing process are completely decoupled. The processing rule is not customized any more, and the customized processing rule is not generated depending on the format, structure and the like of the metadata of the credit investigation report, but the configured processing rule is stored in the logic pool and is repeatedly called according to actual needs. By the mode, the situation that the analysis module cannot work normally or the processing module cannot execute work due to the change of the original message format or the change of the data structure is prevented. The generation process of the derivative variable is greatly accelerated, and the working efficiency is improved.
Drawings
Fig. 1 is a schematic flow chart of a method for generating derived variables according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a derived variable generation apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flow chart of a method for generating derived variables according to an embodiment of the present invention, as shown in fig. 1, the method includes:
and step 110, acquiring target derivative variable information to be generated.
Specifically, the target derived variable information may refer to name information of the target derived variable, and obtain other information with a unique indication identifier. To determine what the target derived variables need to be generated.
And step 120, matching at least one preset data field information required for generating the target derived variable from the pre-constructed logic pool according to the target derived variable information, and the pre-configured processing rule.
Specifically, a certain target derivative variable needs to be generated, and preset data field information, processing rules and the like needed by the certain target derivative variable are configured in advance and stored in a pre-constructed logic pool.
Therefore, after step 110 is executed, at least one preset data field information required for matching the target derived variable from the pre-constructed logical pool, the pre-configured processing rule, and the like can be obtained according to the target derived variable information as described in step 110.
Step 130, according to each piece of preset data field information, calling a preset data field corresponding to the preset data field information from the preset storage path.
Specifically, the preset data field is a data field included in at least one credit investigation report, and after the at least one credit investigation report is analyzed, the analyzed data field is stored in a preset storage path.
Before describing the steps, how to parse at least one credit investigation report and store the parsed data fields to a preset storage path will be described. See specifically below:
1. at least one credit investigation report is obtained and the format of the at least one credit investigation report is identified.
Specifically, the target derivative variable that needs to be generated finally may be more than one, but multiple, depending on the actual application. The data fields required based on at least one target derived variable may be different, for example, target derived variable a requires data fields 1 through 5, target derived variable B requires data fields 6-8, and target derived variable C requires data fields 7-15 (the data fields are represented by numbers in this embodiment, only to illustrate that the data fields required for different target derived fields may not include only one, and the data fields required for different derived fields may be somewhat duplicative, but some may not be duplicative). The available data fields in each credit report are limited, so that in order to obtain more complete data fields, in the present embodiment, at least one credit report is obtained. Specifically, how many credit investigation reports are acquired is set according to actual conditions, and the description is not repeated here.
When specifically identifying the format of the credit report, it is considered that the format of the credit report may be, for example, an HTML format, a json format, an XML format, or the like. The report has corresponding identification information for indicating the format of the credit report, for example, some fields exist in the 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.
2. And analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to a preset storage path.
Specifically, different credit report formats have slightly different corresponding parsing rules, but the principle is basically the same.
The specific analysis process comprises the following steps:
the common object file is generated from the credit report in a specific format using a preset object generation tool, such as an automated POJO (Java common object) file generation tool. Specifically, the automatic POJO (Java common object) file generation tool is subjected to learning training in advance, for example, a credit investigation label dictionary (complete credit investigation label hierarchical dictionary) or multiple true credit investigation samples are adopted for learning training, so that the automatic POJO (Java common object) file generation tool can finally generate a common object file from a credit investigation report in a specific format, perform deserialization processing on the common object file, and acquire a data field from the common object file. The specific training process refers to the general machine learning algorithm principle, and is not described in detail here. And the content in the credit investigation report, namely the acquired analyzed data field, is stored in the preset storage path of the object file. The specific storage path may be configured in advance by a developer according to actual conditions, and will not be described in detail herein.
The reason why the credit investigation reports in different formats are analyzed into the common object file according to a certain rule is to prevent the metadata from having too strong dependence on the format and structure of the credit investigation report. The situation that the preset data field cannot be acquired subsequently due to the change of the format, the structure and the like of the original credit investigation report, the processing work of the data field and the like cannot be executed, and the derivative variable is generated is avoided.
Optionally, after step 2 is executed, step 3 may further be included to generate a mapping table between the preset storage path and the original storage path corresponding to the analyzed data field.
The specific use of the RelationMap table will be described in detail below.
Optionally, after step 2 is performed, step 4 and step 5 may be further included.
Step 4, checking the format of the analyzed data field;
and 5, when the abnormal format is determined, sending alarm information so that the staff can correct the analyzed format of the data field. The alarm information is defined herein as the first alarm information.
Specifically, the format check of the parsed data field mainly identifies whether the format of the content of the data field belongs to a field format pre-stored in the current system.
The field format pre-stored in the system is a field format added by a worker in advance according to experience or a field format determined according to a regular matching method. And if the data field format in the currently analyzed data field does not belong to one of the field formats acquired in the two modes, determining that the format is abnormal. And sending first alarm information so that the staff can correct the format of the analyzed data field. Of course, if the worker finds that the format of the current data field is correct when performing the comparison, and only does not fill the system, the worker may also fill the system with the current field format. In a specific example, the beanxpath function may be used to obtain specific contents in the credit investigation report. And modifying the parsed data fields (namely, the data fields in the credit report) by using a beacon modify function.
The check of the data field after the corresponding analysis is also used for preventing the data field used from having format errors when the derivative variable is generated subsequently, so that the execution of the derivative variable generation process fails.
Specifically, the preset data field information includes tag information and/or original path 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 preset data field information, and the method specifically includes:
according to the label information, matching a preset data field corresponding to the label information in a pre-constructed object storage file;
and/or searching a first storage path in which the preset data field is stored in the preset storage path according to the original path information and a relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field, and calling the preset data field from the first storage path;
the relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field is as follows: and at least one credit investigation report is analyzed, and a relational mapping table is generated after the analyzed data field is stored into a preset storage path. I.e. the relational mapping table mentioned above.
Specifically, the staff who needs to provide the analysis report can only know the original storage path of the data field needed to generate the target derived variable, but cannot know the current storage path of the analyzed data field. The original paths do not correspond to the preset storage paths one to one. Therefore, in the subsequent derived variable generation method, the required data field cannot be found directly from the preset storage path according to the original storage path. In view of this problem, a mapping table between the preset storage path and the original path corresponding to the parsed data field may be generated. The current preset storage path is conveniently matched according to the original path in the follow-up process, and the data field required by the target derivative variable to be generated at present is accurately searched.
And 140, processing the preset data field according to the preset processing rule to generate a target derivative variable.
Optionally, the pre-configured processing rule includes a processing function and a logical relationship between the processing functions. In a specific example, the specific implementation of step 140 may include:
and processing the preset data field by using the processing function according to the logical relation between the processing functions to obtain the target derivative variable.
Wherein the processing function is: respectively abstracting the program code corresponding to each processing step to obtain an abstract function; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing steps are the method steps for processing one or more preset data fields.
Specifically, the worker may configure different processing functions in the logic pool in advance, for example, for the data field 1 and the data field 2, the program code corresponding to the method 1 needs to be executed. However, it is considered that if the method performed by the data fields is the same for a plurality of data fields, i.e. the program code is written repeatedly once, the repeated process not only increases the workload and reduces the work efficiency, but also is prone to errors. Therefore, in this embodiment, the whole program code corresponding to all the processing steps is abstracted into one processing function. And then, when the processing operation is executed on the data field, the processing function is directly called.
In addition, to generate one target derivative variable, a processing method step may not include only one, and a plurality of method steps may be required. There are certain associations between method steps. Therefore, in this embodiment, after the program code corresponding to the processing steps is abstracted into the processing functions, the logical relationship between different processing steps is also mapped into the logical relationship between different processing functions.
Therefore, the target derivative variable can be obtained by calling the corresponding processing function to process the preset data field according to the logical relationship between the processing functions.
Optionally, when the credit investigation report is a sample report, after extracting all preset data fields from the first storage path, processing the preset data fields by using a preconfigured processing rule, and after obtaining the target derived variable, the method further includes:
checking the target derivative variable to obtain a checking result;
and when the checking result does not meet the preset requirement, sending second alarm information so that a worker can detect whether the path configuration and the pre-configured processing rule are correct or not according to the second alarm information.
In particular, if the credit report is sample data, it is naturally known what the derived variables generated should be. In this way, if the generated target derived variable cannot meet the preset requirement, for example, the difference between the generated target derived variable and the known derived variable result is large, the system may send out second warning information for reminding a worker to timely detect whether the path configuration and the preconfigured processing rule are correct or not, and take corresponding measures to adjust.
Optionally, after generating the target derivative variable, the method may further include:
and encrypting the target derivative variable according to a preset encryption rule, and storing the target derivative variable into a derivative variable pool.
Specifically, encrypting the target derived variable is a format in which the user can know the credit report when using the derived variable. It needs to be encrypted according to a preset rule. And then storing the derived variables into a derived variable pool so as to directly call the derived variables subsequently and not repeatedly execute the processing process of the derived variables.
The embodiment of the invention provides a method for generating a derivative variable, which comprises the steps of analyzing at least one credit investigation report, and then storing an analyzed data field to a preset storage path for subsequent use. The reason is to prevent the original credit report format from being different, and the subsequent calling is limited by the credit report format. And the data fields are analyzed uniformly no matter what format is adopted, and then the analyzed data fields are stored in a preset storage path after being acquired, so that the use is convenient. Similarly, the preset field information and the pre-configured processing rule are placed in the logic pool in advance, then the processing rule is directly called, the preset data field matched according to the preset field information is processed, the process does not have a coupling relation with the credit investigation report format, and the data field analysis process and the processing process are completely decoupled. The processing rule is not customized any more, and the customized processing rule is not generated depending on the format, structure and the like of the metadata of the credit investigation report, but the configured processing rule is stored in the logic pool and is repeatedly called according to actual needs. By the mode, the situation that the analysis module cannot work normally or the processing module cannot execute work due to the change of the original message format or the change of the data structure is prevented. The generation process of the derivative variable is greatly accelerated, and the working efficiency is improved.
Fig. 2 is a derived variable generating apparatus according to an embodiment of the present invention, where the apparatus includes: acquisition section 201, matching section 202, retrieval section 203, and processing section 204.
An obtaining unit 201, configured to obtain target derived variable information to be generated;
a matching unit 202, configured to match, according to the target derived variable information, at least one piece of preset data field information required for generating the target derived variable from the pre-constructed logic pool, and a pre-configured processing rule;
the retrieving unit 203 is configured to retrieve, according to each piece of preset data field information, a preset data field corresponding to the preset data field information from a preset storage path;
and the processing unit 204 is configured to process a preset data field according to a preconfigured processing rule to generate a target derived variable, where the preset data field is a data field included in at least one credit investigation report, and after the at least one credit investigation report is analyzed, the analyzed data field is stored in a preset storage path.
Optionally, the preset data field information includes tag information and/or original path information corresponding to the data field, and the invoking unit 203 is specifically configured to:
according to the label information, matching a preset data field corresponding to the label information in a pre-constructed object storage file;
and/or searching a first storage path in which the preset data field is stored in the preset storage path according to the original path information and a relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field, and calling the preset data field from the first storage path;
the relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field is as follows: and at least one credit investigation report is analyzed, and a relational mapping table is generated after the analyzed data field is stored into a preset storage path.
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 derivative variable, where the processing function is: respectively abstracting the program code corresponding to each processing step to obtain an abstract function; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing steps are the method steps for processing one or more preset data fields.
Optionally, the apparatus further comprises: and the encryption unit 205 is configured to encrypt the target derived variable according to a preset encryption rule, and store the encrypted target derived variable in the derived variable pool.
Optionally, the apparatus further comprises: the parsing unit 206.
The obtaining unit 201 is further configured to obtain at least one credit investigation report, and identify a format of the at least one credit investigation report;
the analyzing unit 206 is configured to analyze the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquire an analyzed data field, and store the analyzed data field to a preset storage path.
Optionally, the parsing unit 206 is specifically configured to perform deserialization on the content in the credit investigation report according to a preset object generation tool, acquire a parsed data field, generate an object file corresponding to the credit investigation report format, and store the parsed data field into a preset storage path in the object file.
Optionally, the apparatus further comprises: a verification unit 207 and an alarm unit 208.
A checking unit 207, configured to check a format of the parsed data field;
and the alarm unit 208 is configured to send alarm information when it is determined that the format is abnormal, so that a worker corrects the format of the analyzed data field.
The functions executed by each functional component in the derivative variable generating and processing apparatus provided in this embodiment have been described in detail in the embodiment corresponding to fig. 1, and therefore are not described herein again.
According to the device for generating and processing the derived variable, which is provided by the embodiment of the invention, at least one credit investigation report is analyzed, and then the analyzed data field is stored to a preset storage path for subsequent use. The reason is to prevent the original credit report format from being different, and the subsequent calling is limited by the credit report format. And the data fields are analyzed uniformly no matter what format is adopted, and then the analyzed data fields are stored in a preset storage path after being acquired, so that the use is convenient. Similarly, the preset field information and the pre-configured processing rule are placed in the logic pool in advance, then the processing rule is directly called, the preset data field matched according to the preset field information is processed, the process does not have a coupling relation with the credit investigation report format, and the data field analysis process and the processing process are completely decoupled. The processing rule is not customized any more, and the customized processing rule is not generated depending on the format, structure and the like of the metadata of the credit investigation report, but the configured processing rule is stored in the logic pool and is repeatedly called according to actual needs. By the mode, the situation that the analysis module cannot work normally or the processing module cannot execute work due to the change of the original message format or the change of the data structure is prevented. The generation process of the derivative variable is greatly accelerated, and the working efficiency is improved.
Fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device 300 shown in fig. 3 includes: at least one processor 301, memory 302, at least one network interface 303, and other user interfaces 304. The various components in the derivative variable generation and processing terminal 300 are coupled together by a bus system 305. It will be appreciated that the bus system 305 is used to enable communications among the components connected. The bus system 305 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 305 in fig. 3.
The user interface 304 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 302 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 302 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 302 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 3021 and application programs 3022.
The operating system 3021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs 3022 include various application programs such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. A program implementing the method of an embodiment of the present invention may be included in the application program 3022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 302, specifically, a program or an instruction stored in the application 3022, the processor 301 is configured to execute the method steps provided by the method embodiments, for example, including:
acquiring target derivative variable information to be generated;
according to the target derived variable information, matching at least one piece of preset data field information required by generating the target derived variable from the pre-constructed logic pool, and pre-configured processing rules;
calling a preset data field corresponding to the preset data field information from a preset storage path according to each piece of preset data field information;
and processing the preset data field according to a preset processing rule to generate a target derivative variable, wherein the preset data field is a data field included in at least one credit investigation report, and after the at least one credit investigation report is analyzed, the analyzed data field is stored in a preset storage path.
Optionally, the preset data field information includes tag information and/or original path 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 preset data field information, which specifically includes:
according to the label information, matching a preset data field corresponding to the label information in a pre-constructed object storage file;
and/or searching a first storage path in which the preset data field is stored in the preset storage path according to the original path information and a relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field, and calling the preset data field from the first storage path;
the relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field is as follows: and at least one credit investigation report is analyzed, and a relational mapping table is generated after the analyzed data field is stored into a preset storage path.
Optionally, the preconfigured machining rule includes a logic relationship between the machining function and the machining function, and the preset data field is machined according to the preconfigured machining rule to generate the derivative variable, which specifically includes:
processing the preset data field by using the processing function according to the logical relation between the processing functions to obtain a target derivative variable, wherein the processing function is as follows: respectively abstracting the program code corresponding to each processing step to obtain an abstract function; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing steps are the method steps for processing one or more preset data fields.
Optionally, after the preset data field is processed according to the preconfigured processing rule and the derivative variable is generated, the method further includes:
and encrypting the target derivative variable according to a preset encryption rule, and storing the target derivative variable into a derivative variable pool.
Optionally, the analyzing at least one credit investigation report, and storing the analyzed data field into a preset storage path specifically includes:
acquiring at least one credit investigation report and identifying the format of the at least one credit investigation report;
and analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to a preset storage path.
Optionally, the method includes analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to a preset storage path, and specifically includes:
and according to a preset object generation tool, performing deserialization processing on the content in the credit investigation report, acquiring the analyzed data field, generating an object file corresponding to the credit investigation report format, and storing the analyzed data field to a preset storage path in the object file.
Optionally, the format of the analyzed data field is checked;
and when the abnormal format is determined, sending alarm information so that a worker can correct the analyzed format of the data field.
The method disclosed in the above embodiments of the present invention may be applied to the processor 301, or implemented by the processor 301. The processor 301 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 301. The processor 301 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 302, and the processor 301 reads the information in the memory 302 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing unit 301 may be implemented 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, micro-controllers, microprocessors, other electronic units configured to perform the functions of the present application, or a combination thereof.
For a software implementation, the techniques herein may be implemented by means of units performing the functions herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The terminal device provided in this embodiment may be the terminal device shown in fig. 3, and may execute all the steps of the derived variable generation method shown in fig. 1, so as to achieve the technical effect of the derived variable generation method shown in fig. 1, and for brevity, please refer to related description of fig. 1, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the above-described derived variable generation method performed on the terminal device side is realized.
The processor is used for executing the derivative variable generation program stored in the memory so as to realize the following steps of the derivative variable generation method executed on the terminal equipment side:
acquiring target derivative variable information to be generated;
according to the target derived variable information, matching at least one piece of preset data field information required by generating the target derived variable from the pre-constructed logic pool, and pre-configured processing rules;
calling a preset data field corresponding to the preset data field information from a preset storage path according to each piece of preset data field information;
and processing the preset data field according to a preset processing rule to generate a target derivative variable, wherein the preset data field is a data field included in at least one credit investigation report, and after the at least one credit investigation report is analyzed, the analyzed data field is stored in a preset storage path.
Optionally, the preset data field information includes tag information and/or original path 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 preset data field information, which specifically includes:
according to the label information, matching a preset data field corresponding to the label information in a pre-constructed object storage file;
and/or searching a first storage path in which the preset data field is stored in the preset storage path according to the original path information and a relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field, and calling the preset data field from the first storage path;
the relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field is as follows: and at least one credit investigation report is analyzed, and a relational mapping table is generated after the analyzed data field is stored into a preset storage path.
Optionally, the preconfigured machining rule includes a logic relationship between the machining function and the machining function, and the preset data field is machined according to the preconfigured machining rule to generate the derivative variable, which specifically includes:
processing the preset data field by using the processing function according to the logical relation between the processing functions to obtain a target derivative variable, wherein the processing function is as follows: respectively abstracting the program code corresponding to each processing step to obtain an abstract function; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing steps are the method steps for processing one or more preset data fields.
Optionally, after the preset data field is processed according to the preconfigured processing rule and the derivative variable is generated, the method further includes:
and encrypting the target derivative variable according to a preset encryption rule, and storing the target derivative variable into a derivative variable pool.
Optionally, the analyzing at least one credit investigation report, and storing the analyzed data field into a preset storage path specifically includes:
acquiring at least one credit investigation report and identifying the format of the at least one credit investigation report;
and analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to a preset storage path.
Optionally, the method includes analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to a preset storage path, and specifically includes:
and according to a preset object generation tool, performing deserialization processing on the content in the credit investigation report, acquiring the analyzed data field, generating an object file corresponding to the credit investigation report format, and storing the analyzed data field to a preset storage path in the object file.
Optionally, the format of the analyzed data field is checked;
and when the abnormal format is determined, sending alarm information so that a worker can correct the analyzed format of the data field.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of generating derived variables, the method comprising:
acquiring target derivative variable information to be generated;
according to the target derived variable information, matching at least one piece of preset data field information required by generating a target derived variable from a pre-constructed logic pool, and a pre-configured processing rule;
calling a preset data field corresponding to the preset data field information from a preset storage path according to each piece of preset data field information;
and 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 investigation report, and the analyzed data field is stored in the preset storage path after the at least one credit investigation report is analyzed.
2. The method according to claim 1, wherein the preset data field information includes tag information and/or original path information corresponding to a data field, and the retrieving, according to each piece of the preset data field information, the preset data field corresponding to the preset data field information from a preset storage path specifically includes:
according to the label information, matching the preset data field corresponding to the label information in the pre-constructed object storage file;
and/or searching a first storage path in which the preset data field is stored in the preset storage path according to the original path information and a relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field, and calling the preset data field from the first storage path;
wherein, the relation mapping table between the preset storage path and the original storage path corresponding to the analyzed data field is: and the at least one credit investigation report is analyzed, and a relational mapping table is generated after the analyzed data field is stored into the preset storage path.
3. The method according to claim 1 or 2, wherein the preconfigured machining rule includes a machining function and a logical relationship between the machining functions, and the machining the preset data field according to the preconfigured machining rule to generate the derived variable specifically includes:
processing the preset data field by using the processing function according to the logical relationship among the processing functions to obtain the target derivative variable, wherein the processing function is as follows: respectively abstracting the program code corresponding to each processing step to obtain an abstract function; the logical relationship between the processing functions is the logical relationship between all processing steps, and the processing steps are method steps for processing one or more preset data fields.
4. The method according to claim 1 or 2, wherein after the processing the preset data field according to the preconfigured processing rule to generate the derived variable, the method further comprises:
and encrypting the target derivative variable according to a preset encryption rule, and storing the target derivative variable into a derivative variable pool.
5. The method according to claim 1, wherein analyzing at least one credit investigation report, and storing the analyzed data field in the preset storage path specifically comprises:
acquiring at least one credit investigation report and identifying the format of the at least one credit investigation report;
and analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format, acquiring an analyzed data field, and storing the analyzed data field to the preset storage path.
6. The method according to claim 5, wherein the analyzing the credit investigation report according to an analysis rule corresponding to the credit investigation report format to obtain an analyzed data field, and storing the analyzed data field to the preset storage path specifically includes:
and according to a preset object generation tool, performing deserialization processing on the content in the credit investigation report, acquiring the analyzed data field, generating an object file corresponding to the credit investigation report format, and storing the analyzed data field to a preset storage path in the object file.
7. The method according to claim 5 or 6, wherein after the credit report is parsed according to a parsing rule corresponding to the credit report format, and a parsed data field is obtained and stored in a preset storage path, the method further comprises:
checking the format of the analyzed data field;
and when the abnormal format is determined, sending alarm information so that a worker can correct the analyzed format of the data field.
8. An apparatus for generating derived variables, the apparatus comprising:
the acquisition unit is used for acquiring target derivative variable information to be generated;
the matching unit is used for matching at least one preset data field information required by generating the target derived variable from the pre-constructed logic pool according to the target derived variable information and a pre-configured processing rule;
the calling unit 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;
and the processing unit 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 investigation report, and the analyzed data field is stored in the preset storage path after the at least one credit investigation report is analyzed.
9. A terminal device, characterized in that the terminal device comprises: at least one processor and memory;
the processor is used for executing the derived variable generation program stored in the memory to realize the derived variable generation method of any one of claims 1 to 7.
10. A computer storage medium, characterized in that the computer storage medium stores one or more programs executable by the terminal device according to claim 9 to implement the derivative variable generation method according to any one of claims 1 to 7.
CN202010925755.8A 2020-09-04 2020-09-04 Derivative variable generation method and device, terminal equipment and storage medium Pending CN114138772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010925755.8A CN114138772A (en) 2020-09-04 2020-09-04 Derivative variable generation method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010925755.8A CN114138772A (en) 2020-09-04 2020-09-04 Derivative variable generation method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114138772A true CN114138772A (en) 2022-03-04

Family

ID=80438806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010925755.8A Pending CN114138772A (en) 2020-09-04 2020-09-04 Derivative variable generation method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114138772A (en)

Similar Documents

Publication Publication Date Title
US10108535B2 (en) Web application test script generation to test software functionality
US7475286B2 (en) System and method for updating end user error reports using programmer defect logs
CN110704297B (en) Code review method, device, computer equipment and storage medium
CN110688307B (en) JavaScript code detection method, device, equipment and storage medium
US11314503B2 (en) Software development documentation using machine learning
KR20150042877A (en) Managing record format information
CN111459495A (en) Unit test code file generation method, electronic device and storage medium
US11347619B2 (en) Log record analysis based on log record templates
US20190122124A1 (en) System and method for cognitive troubleshooting assistance
CN115827895A (en) Vulnerability knowledge graph processing method, device, equipment and medium
CN112540924A (en) Interface automation test method, device, equipment and storage medium
US10782942B1 (en) Rapid onboarding of data from diverse data sources into standardized objects with parser and unit test generation
CN112817935A (en) Data processing method, device and equipment based on field type and storage medium
US20070245313A1 (en) Failure tagging
CN115186274A (en) IAST-based security test method and device
CN114416481A (en) Log analysis method, device, equipment and storage medium
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
CN110688315A (en) Interface code detection report generation method, electronic device, and storage medium
CN113296752A (en) Method, system, device and storage medium for generating API document
US20160292067A1 (en) System and method for keyword based testing of custom components
CN114138772A (en) Derivative variable generation method and device, terminal equipment and storage medium
CN110688823A (en) XML file verification method and device
CN111400245B (en) Art resource migration method and device
CN114443004A (en) Branch merging method, computer device and computer storage medium
CN113722191A (en) Page monitoring method, device, equipment and computer readable storage medium

Legal Events

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