Business data extraction method, device, storage medium and electronic device
By obtaining query requests and determining target business attributes, obtaining target business from reference business attributes and reference services, filtering and extracting business data from target log files, the problem of low efficiency of business data query in the existing technology is solved, flexibility and scalability are achieved, and query efficiency is improved.
Patent Information
- Application Number
- CN202210737128.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-06-27
AI Technical Summary
In the prior art, the query efficiency of business data is low, resulting in high maintenance costs and poor scalability of query programs.
By obtaining the query request, the target business attribute is determined, and the target business is obtained from the reference business attributes and reference services with corresponding relationships. Then, filter the target log file from the log file collection and extract the target business data from the log file.
It realizes the flexibility and scalability of business data query, improves the query efficiency of business data, and reduces the maintenance cost of query programs.
Smart Images

Figure CN115098738B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data, and more specifically, to a method, device, storage medium and electronic device for extracting business data. Background Art
[0002] With the rapid development of Internet technology, more and more enterprises or service organizations provide business services to users through the Internet, and more and more business data are generated randomly. In this case, promoting data value mining and promoting data business service support have become the key tasks of enterprises or service organizations. At present, enterprises often use the method of building data query programs for querying different data, that is, building query programs for querying specific business data, and hard-coding the program information for executing the business in the data query program, so that when querying business data, the business data can be queried by running the corresponding query program. However, this method has strong limitations and is not conducive to the flexible expansion of data query. For example, when adding statistical logic or adding business functions, it is necessary to rewrite new query programs, resulting in problems such as high maintenance costs and poor scalability of program query programs.
[0003] There is no effective solution yet for problems such as low query efficiency of business data in related technologies. Summary of the invention
[0004] The main purpose of the present application is to provide a method, device, storage medium and electronic device for extracting business data to solve the problem of low query efficiency of business data in related technologies.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for extracting business data is provided. The method comprises: obtaining a query request, wherein the query request is used to request to query business data having target business attributes; obtaining a target business corresponding to the target business attribute from a reference business attribute and a reference business having a corresponding relationship; screening a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing a business; extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes.
[0006] Optionally, obtaining the target business corresponding to the target business attribute from the reference business attributes and reference businesses having a corresponding relationship includes: matching a target sub-attribute set with each reference sub-attribute set in a reference sub-attribute set and a reference program identifier having a corresponding relationship, wherein the reference sub-attribute set includes multiple reference business sub-attributes, and the multiple reference business sub-attributes are used to divide the business type of the business from multiple dimensions, and the target business attribute includes the target sub-attribute set; obtaining a target program identifier corresponding to the reference sub-attribute set that successfully matches the target sub-attribute set, wherein the target program identifier is used to uniquely identify the target business.
[0007] Optionally, matching the target sub-attribute set with a reference sub-attribute set having a corresponding relationship and each reference sub-attribute set in a reference program identifier includes: determining whether a target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with a reference attribute value of a reference business sub-attribute of a corresponding dimension in each of the reference sub-attribute sets; and determining a reference sub-attribute set whose reference attribute values are all consistent with the target attribute values as a reference sub-attribute set that successfully matches the target sub-attribute set.
[0008] Optionally, the determining whether the target attribute value of each target business subattribute in one or more target business subattributes included in the target subattribute set is consistent with the reference attribute value of the reference business subattribute of the corresponding dimension in each of the reference subattribute sets includes: when the one or more target business subattributes include a target department type identifier, obtaining from the reference subattribute set a candidate subattribute set having a reference identifier value of the reference department type identifier that is consistent with the target identifier value of the target department type identifier; determining whether each target identification bit in the target business identification string included in the target business subattribute is consistent with the corresponding candidate identification bit on the candidate business identification string included in each of the candidate subattribute sets. Whether they are consistent, wherein the target business identification string includes at least one of the following: a login business identification, an account activation business identification, a business account activation business identification, a thread business identification, an interface business identification, and a logout business identification; when the one or more target business sub-attributes do not include a target department type identification, determine whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with the corresponding reference identification bit on the reference business identification string included in each of the reference sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identification, an account activation business identification, a business account activation business identification, a thread business identification, an interface business identification, and a logout business identification.
[0009] Optionally, extracting business data from the target log file to obtain target business data includes: generating a target data extraction script based on a target field corresponding to the target business attribute, wherein the target data extraction script is used to run a program to extract data corresponding to the target field; and running the target data extraction script on the target log file to obtain the target business data.
[0010] Optionally, generating a target data extraction script according to a target field corresponding to the target business attribute includes: obtaining an initial data extraction script, wherein the initial data extraction script records a program template for extracting data; and editing the target field to a corresponding position in the initial data extraction script to obtain the target data extraction script.
[0011] Optionally, before generating a target data extraction script based on the target field corresponding to the target business attribute, the method also includes one of the following: extracting the target field of the target business attribute from the query request; extracting the field of the reference business attribute corresponding to the target business attribute from reference business attributes and reference businesses having a corresponding relationship as the target field.
[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for extracting business data is provided. The device includes: a first acquisition module, used to obtain a query request, wherein the query request is used to request to query business data with target business attributes; a second acquisition module, used to obtain a target business corresponding to the target business attribute from a reference business attribute and a reference business with a corresponding relationship; a screening module, used to screen a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; a first extraction module, used to extract business data from the target log file to obtain target business data, wherein the target business data is business data with the target business attributes.
[0013] In order to achieve the above object, according to another aspect of the present application, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the above methods.
[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided. The electronic device includes: one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned methods.
[0015] Through the present application, the following steps are adopted: obtaining a query request, wherein the query request is used to request a query of business data having a target business attribute; obtaining a target business corresponding to the target business attribute from a reference business attribute and a reference business having a corresponding relationship; screening a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing a business; extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attribute, that is, the reference business attribute and the reference business have a corresponding relationship, and the query request is used to request a query of business data having the target business attribute, and the target business attribute of the business data to be queried can be known through the query request, and then the target business to be corresponding to the target business attribute can be obtained from the reference business attribute and the reference business having a corresponding relationship, that is, the target business generating the business data to be queried is determined through the target business attribute, and then the target business data is extracted from the target log file of the target business, so that only the target business attribute of the business data to be queried is needed to be known during the query, and the business is queried through the target business attribute, and then the target business data corresponding to the business is extracted, thereby achieving flexibility and scalability of business data query. The above technical solution solves the problem of low query efficiency of business data in related technologies and achieves the technical effect of improving the query efficiency of business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 is a flowchart of a method for extracting business data provided in an embodiment of the present application;
[0018] Figure 2 is a schematic diagram of an optional query request selection interface according to an embodiment of the present application;
[0019] Figure 3 This is an optional reference service sub-attribute set comparison diagram according to an embodiment of the present application.
[0020] Figure 4 is an optional flow chart for extracting business data according to an embodiment of the present application;
[0021] Figure 5 is a schematic diagram of a device for extracting business data according to an embodiment of the present application;
[0022] Figure 6 It is a hardware environment diagram of a method for extracting business data according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0027] This solution can be applied to enterprises or service agencies that have statistical needs for user data, such as banks, hospitals, insurance companies, etc. These enterprises have business data of different users, which involve different businesses, and the business types of enterprises are variable, so the statistical needs are also variable when performing data statistics.
[0028] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a method for extracting business data according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0029] Step S102, obtaining a query request, wherein the query request is used to request a query for business data having a target business attribute;
[0030] Step S104, acquiring a target service corresponding to the target service attribute from reference service attributes and reference services having a corresponding relationship;
[0031] Step S106, screening the target log file corresponding to the target business from the log file set, wherein the log file set includes the log files generated by executing the business;
[0032] Step S108, extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes.
[0033] In the technical solution provided in the above step S102, the query request carries relevant information of the target business attribute. The query request may carry, but is not limited to, the name of the target business attribute and the corresponding attribute value, and identification information corresponding to the target business attribute (such as a character string, in which different character positions in the character string represent the attribute value of the attribute).
[0034] Optionally, in this embodiment, the target service attribute may include one or more sub-attributes, and different service attributes are used to classify service types of services from different dimensions.
[0035] Optionally, in this embodiment, the query request may also carry a data query time condition, that is, querying business data for a certain period of time. When performing data query, log files may be filtered according to the data query time condition.
[0036] Optionally, in this embodiment, the query request may be generated based on the business attribute selected by the data query personnel on the front-end interface. The corresponding business attribute will be marked on the front-end interface. The user selects the target business attribute by checking the data he needs on the front-end interface. Figure 2 is a schematic diagram of an optional query request selection interface according to an embodiment of the present application, such as Figure 2 As shown, it can include but is not limited to the sub-business attribute identifiers such as login business identifier, account activation business identifier, business account activation business identifier, thread business identifier, interface business identifier, logout business identifier, etc. The operator selects the corresponding attribute identifier according to the data query requirements.
[0037] In the technical solution provided in the above step S104, the reference business attributes and reference businesses with a corresponding relationship may be a correspondence between the reference business attributes and the reference business names, or may be a correspondence between the reference business attributes and the reference program identifiers, where the reference program identifiers are used to indicate information about the program that executes the corresponding reference business, or may be a correspondence between a plurality of reference sub-attribute sets included in the reference business attributes and the reference business names.
[0038] Optionally, in this embodiment, the method for obtaining the target business corresponding to the target business attribute can be to determine whether each reference business attribute matches the target business attribute, and determine the reference business corresponding to the reference business attribute that matches the target business attribute as the target business. For example, determine the reference business attribute that matches the attribute name of the target business attribute among multiple reference business attributes, or determine the reference business attribute that matches the attribute value of the dimensional attribute corresponding to the target business attribute among multiple reference business attributes. This scheme is not limited to this.
[0039] Optionally, in this embodiment, when a new service is added, the correspondence between the reference service attributes and the reference service needs to be maintained according to the service attributes of the service, that is, the correspondence between the newly added service attributes and the service is updated to the correspondence between the reference service attributes and the reference service with the corresponding relationship.
[0040] In the technical solution provided in the above step S106, the method of filtering out the target log file in the log file collection may be by searching for identification information corresponding to the target business. For example, the identification information may be identification information used to indicate the business name, or may also be an identification used to indicate an identification of a program corresponding to the execution of the business. For example, the log file may carry the business name of the target business (such as keywords such as transfer, data sending, etc.), and the target log file may be obtained by searching the log file collection for the log file containing the business name. Alternatively, the log file may also carry program information of the program (such as program name, program serial number, etc.), and the target log file may be obtained by searching the log file collection for the log file containing the program information.
[0041] Optionally, in this embodiment, when the log files of the program are stored again, they will be classified and stored according to the name of the program or the function of the program. For example, programs with different names are stored in the same storage space, and programs with different functions are stored in the same storage space. When filtering the target log files, the corresponding storage space can also be called according to the name of the program and the function of the program, and all log files stored in the storage space can be used as target log files.
[0042] In the technical solution provided in the above step S108, the way to extract business data can be by using a script program with a data extraction function. The script program can be pre-built, or it can also be generated according to the target business attributes. For example, the keywords for the target business attributes are input into the initial script program. The initial script program is a program with the basic function of data extraction, and the keywords of the target business attributes are inserted into the corresponding positions in the initial script program to obtain the script program for extracting the target business data.
[0043] It should be noted that in the related art, a method of constructing a data query program for querying different data, that is, constructing a query program for querying specific business data, hard-codes the program information for executing the business in the data query program, so that when querying business data, the business data can be queried by running the corresponding query program. However, this method has strong limitations and is not conducive to the flexible expansion of data queries.
[0044] Through the above steps, the reference business attribute and the reference business have a corresponding relationship, and the query request is used to request to query the business data with the target business attribute. Through the query request, the target business attribute of the business data to be queried can be known, and then the target business to be corresponding to the target business attribute can be obtained from the reference business attribute and the reference business with a corresponding relationship, that is, the target business that generates the business data to be queried is determined through the target business attribute, and then the target business data is extracted from the target log file of the target business, so that only the target business attribute of the business data to be queried is needed to be known during the query, and the business is queried through the target business attribute, and then the target business data corresponding to the business is extracted, thereby realizing the flexibility and scalability of business data query. The above technical solution solves the problems of low query efficiency of business data in related technologies, and achieves the technical effect of improving the query efficiency of business data.
[0045] As an optional embodiment, acquiring the target service corresponding to the target service attribute from the reference service attribute and the reference service having a corresponding relationship includes:
[0046] Matching a target sub-attribute set with a reference sub-attribute set having a corresponding relationship and each reference sub-attribute set in a reference program identifier, wherein the reference sub-attribute set includes a plurality of reference business sub-attributes, the plurality of reference business sub-attributes are used to classify business types of a business from a plurality of dimensions, and the target business attribute includes the target sub-attribute set;
[0047] A target program identifier corresponding to a reference sub-attribute set that successfully matches the target sub-attribute set is obtained, wherein the target program identifier is used to uniquely identify the target service.
[0048] Optionally, in this embodiment, the program identifier is information that identifies the program. The program identifier may include, but is not limited to, a program name, a program serial number, etc. The program is marked by the program identifier so that the program is unique, that is, one program identifier uniquely corresponds to one program, that is, a corresponding program can be intelligently found through a program identifier, and then a target business can be uniquely identified through a target program identifier.
[0049] Optionally, in this embodiment, in order to ensure the uniqueness of the program identifier, the program identifier can be generated by using, but not limited to, a program identifier generation model. When the program of the newly added service is built, the program needs to be registered and launched, and the program construction requirements (and business attributes) when building the program are imported into the program identifier generation model. The program identifier generation model will query the sequence table, obtain the current sequence value of the program identifier, and add 1 on this basis and return the program identifier. The sequence table pub_sequence has the following structure: SEQNAME: sequence name; SEQVALUE: current sequence value; MINVALUE: minimum value; MAXVALUE: maximum value; STEP: step length of each value. The minimum value of the program identifier starts from 100001 and the maximum value is 999999. The step length increases by 1 each time, that is, if a new program identifier is added this time and the current sequence value is 100001, the newly generated program identifier is 100002, and the current sequence value is updated to 100002. Finally, the corresponding relationship table of the reference business attribute and the reference business is maintained according to the returned program identifier and the imported business attributes.
[0050] Optionally, in this embodiment, the program corresponding to the program identifier is used to execute a service with corresponding service attributes.
[0051] Optionally, in this embodiment, a business may have business sub-attributes of multiple dimensions. For example, taking bank transfer business as an example, it can be divided into online business and offline business according to the handling method, divided into head office business and branch business according to the handling location, and divided into large-value business and small-value business according to the amount.
[0052] Optionally, in this embodiment, for each target sub-attribute in the target sub-attribute set, there is a reference sub-attribute in the reference attribute set that matches it, then it can be determined that the target sub-attribute set and the reference sub-attribute set match successfully, and the number of reference sub-attributes in the reference sub-attribute set that successfully matches the target sub-attribute set can be equal to the number of target sub-attributes in the target sub-attribute set, or can be more than the number of target sub-attributes in the target sub-attribute set, and this solution does not limit this.
[0053] As an optional embodiment, matching the target sub-attribute set with the reference sub-attribute set having a corresponding relationship and each reference sub-attribute set in the reference program identifier includes:
[0054] Determine whether a target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with a reference attribute value of a reference business sub-attribute of a corresponding dimension in each of the reference sub-attribute sets;
[0055] A reference sub-attribute set whose reference attribute values are all consistent with the target attribute values is determined as a reference sub-attribute set that successfully matches the target sub-attribute set.
[0056] Optionally, in this embodiment, the attribute value is used to indicate whether the attribute is present, and the attribute value can be, but is not limited to, "0", "1" or a null value, where "0" indicates that the attribute is not present, "1" indicates that the attribute is present, and a null value indicates that the attribute can be present or not present. For example, if the target attribute value of the target business sub-attribute is controlled, the target business sub-attribute can match the reference business sub-attribute with a value of "0" or "1" in the corresponding dimension, or the attribute value can also be a specific numerical value. For example, when the business sub-attribute is used to indicate the department that handles the business, the attribute value can be the department number of the department.
[0057] As an optional embodiment, determining whether a target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with a reference attribute value of a reference business sub-attribute of a corresponding dimension in each of the reference sub-attribute sets includes:
[0058] In the case where the one or more target business sub-attributes include a target department type identifier, a candidate sub-attribute set having a reference identification value of a reference department type identifier that is consistent with a target identification value of the target department type identifier is obtained from the reference sub-attribute set; determining whether each target identification bit in a target business identification string included in the target business sub-attribute is consistent with a corresponding candidate identification bit on a candidate business identification string included in each of the candidate sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identifier, an account activation business identifier, a business account activation business identifier, a thread business identifier, an interface business identifier, and a logout business identifier;
[0059] In the case that the one or more target business sub-attributes do not include the target department type identifier, determine whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with the corresponding reference identification bit on the reference business identification string included in each of the reference sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identifier, an account activation business identifier, a business account activation business identifier, a thread business identifier, an interface business identifier, and a logout business identifier.
[0060] Optionally, in this embodiment, the department type identifier is used to indicate the business processing department information. Taking the business as banking business as an example, the department type identifier can be used to indicate whether the business is handled by the head office or the branch, or whether it is a loan department business or a wealth management department business. At this time, the identifier value can be "0", "1", empty value or a specific department number.
[0061] Optionally, in this embodiment, the login service identifier is used to identify whether it is an account login service, for example, the user logs in to the program corresponding to the service using the account registered by the user.
[0062] Optionally, in this embodiment, the dynamic account service identifier is used to indicate whether the service involves conversion of virtual resources. For example, taking a bank transfer service as an example, a user's initiation of a transfer transaction or acceptance of a transfer from another user can become a dynamic account service.
[0063] Optionally, in this embodiment, the business account activation service identifier is used to indicate whether there is a new user account, for example, a user opens an account in a bank or registers an account on an application.
[0064] Optionally, in this embodiment, the thread-type service identifier is used to indicate whether the service triggers a preset thread program service. For example, when a user makes a purchase or transfers money, the thread program of SMS notification will be triggered as the virtual resources increase or decrease, so the service is a thread-type service.
[0065] Optionally, in this embodiment, the interface type business identifier is used to indicate whether there are interface calls to other programs when the business is executed. For example, taking bank transfer as an example, when a user makes a transfer, user identity authentication will be performed. At this time, it is necessary to call the interface of the user identity authentication program. This business is an interface type business.
[0066] The reference service attribute set and the reference service with corresponding relationship include a reference service sub-attribute set and a reference program identifier with corresponding relationship. The reference service sub-attribute set includes multiple reference service sub-attributes and attribute values of the reference service sub-attributes. When comparing, the attribute values of the target service sub-attribute and the corresponding reference service sub-attribute are compared. Figure 3is an optional reference service sub-attribute set comparison representation according to an embodiment of the present application, such as Figure 3 As shown, the table stores the attribute values of the reference business sub-attributes and the reference program identifiers, the reference program identifiers are used to execute the programs for executing the corresponding business, the attribute values of the reference business sub-attributes are used to classify the business types of the business from multiple dimensions, the reference business sub-attributes may include but are not limited to reference department type identifiers, login business identifiers, account activation business identifiers, business account activation business identifiers, thread business identifiers, interface business identifiers, and logout business identifiers, in addition, the reference business sub-attributes may also include business column identifiers, the business column identifiers are used to indicate the columns described in the business (such as transfer business, financial management business, etc.), in this table, the characters "0" and "1" represent the values of the attributes, "0" indicates that the attribute is not present, and "1" indicates that the attribute is present, when adding a new business or a new program, it is necessary to maintain the reference business sub-attribute set comparison table, add the program identifier of the newly added program to the table, and add the business attributes of the business executed by the program to the table accordingly.
[0067] As an optional embodiment, extracting the business data from the target log file to obtain the target business data includes:
[0068] Generate a target data extraction script according to the target field corresponding to the target business attribute, wherein the target data extraction script is used to run a program to extract data corresponding to the target field;
[0069] The target data extraction script is run on the target log file to obtain the target business data.
[0070] Optionally, in this embodiment, the target field is information used to indicate the target business attribute. The target field may be the attribute name of the target business attribute or the encoding of the target business attribute. The field is carried in the log file of the corresponding business, and the corresponding business data can be found in the log file through the target field.
[0071] Optionally, in this embodiment, the target data extraction script may be a pre-built data extraction script, or may be a target data extraction script based on a target field.
[0072] As an optional embodiment, generating a target data extraction script according to a target field corresponding to the target business attribute includes:
[0073] Obtaining an initial data extraction script, wherein the initial data extraction script records a program template for extracting data;
[0074] The target field is edited to a corresponding position in the initial data extraction script to obtain the target data extraction script.
[0075] Optionally, in this embodiment, the initial data extraction script may be, but is not limited to, a query statement with a data query function.
[0076] Optionally, in this embodiment, the initial data extraction script may be pre-stored, or may be obtained by editing a target data extraction script having the same data extraction function.
[0077] As an optional embodiment, before generating a target data extraction script according to a target field corresponding to the target business attribute, the method further includes one of the following:
[0078] Extracting a target field of the target business attribute from the query request;
[0079] A field of the reference service attribute corresponding to the target service attribute is extracted from the reference service attributes and the reference service having a corresponding relationship as the target field.
[0080] Optionally, in this embodiment, the query request may be a target field carrying target business attributes, or may be a character string carrying attribute values of business attributes, where each character position in the character string corresponds to an attribute value of an attribute, and there are corresponding reference business attributes and fields of reference business attributes in the reference business and corresponding attribute values, and the field of the reference business attributes corresponding to the character position is found as the target field according to the characters in the character string.
[0081] In order to facilitate accurate screening of users' business data and obtain business information of related columns, this solution can also use the data lake method, by constructing the correspondence between reference business attributes and reference business, and sinking the correspondence between reference business attributes and reference business into the data lake, and also sinking the business logs of users using the program to handle business into the data lake, thereby automatically generating data query strategies based on the business attributes of the business data to be queried, determining the corresponding business based on the business attributes, and retrieving the log files corresponding to the business, and querying data from the log files. Figure 4 is an optional business data extraction flow chart according to an embodiment of the present application, and the process can be applied to, but not limited to, statistics of banking business data, such as Figure 4 As shown, the steps may include but are not limited to:
[0082] S401, constructing a correspondence between a reference business attribute and a reference business, the correspondence may be a reference program identifier and a reference sub-attribute set having a correspondence, the reference sub-attribute set including a plurality of reference business sub-attributes, used to classify the business type of the business from a plurality of dimensions, the reference business sub-attributes including a branch characteristic business identifier (1-branch characteristic transaction, 0-head office transaction), a transaction identifier string (FLAGS, the first digit is a login business identifier 1-yes, 0-no; the second digit is a dynamic account business identifier 1-yes, 0-no; the third digit is a business dynamic account business identifier 1-yes, 0-no; the fourth digit is a thread dynamic account business identifier 1-yes, 0-no; the fifth digit is an interface dynamic account business identifier 1-yes, 0-no; the sixth digit is a logout dynamic account business identifier 1-yes, 0-no).
[0083] S402, the personal transaction log table B is transferred to the data lake. Table B contains the following fields: LOGSERIALNO: log serial number; LOGDATE: log date and time; TRANCODE: transaction code; USERID: user ID / account number; AREACODE: area code; INACCTNO: transfer-in account number; OUTACCTNO: transfer-out account number; NETCODE: branch number; AMOUNT: transaction amount; CURRTYPE: currency; FMENUID: first-level column number; MENUID: last-level column number; FEEFAVER: hand Renewal discount rate; RATEFAVER: transaction exchange rate; INCURRTYPE: transfer-in currency; SESSIONID: customer; TRADEDATE: online banking transaction date; RATEFLAG: exchange rate positive and negative flag; TRANSERIALNO: transaction number; OUTPRODUCTID: transfer-out product type; OUTPRODUCTNO: transfer-out product serial number; OUTSUBPRODUCTID: transfer-out sub-product type; OUTSUBPRODUCTNO: transfer-out sub-product serial number; INPRODUCTID: transfer-in product type; INP RODUCTNO: transfer product number; INSUBPRODUCTID: transfer sub-product type; INSUBPRODUCTNO: transfer sub-product number; SUBMENUID: column branch number; IPADDR: IP address IPADDR; MACADDR: MAC address; USERAGENT: user agent; TRADECOUNT: transaction count; LANGCODE: language identifier; SUBEBANKFLAG: branch identifier; SUMMARY: description; CUSTTYPE: authentication medium type; CHANNEL ID: unique channel identifier; CURRTYPE_PRCETYP: currency rate type; INCURRTYPE_PRCETYP: transfer-in currency rate type; TEMP: spare field; TEMP1: spare field 1; TEMP2: spare field 2; TEMP3: spare field 3; ATTESTWAY: authentication method; MSCOUNTRYCODE: SMS authentication country code; MSPHONE: SMS authentication mobile phone number; SERVERIP: server IP; PODNAME: PAAS container name; SERVERTYPE: server type.
[0084] S403: Acquire target business attributes of the business data requested to be queried carried in the data query request.
[0085] S404, matching the target business attribute with multiple reference business attributes, taking the reference program identifier corresponding to the matched reference business attribute as the target program identifier, thereby finding the target business corresponding to the target program identifier, and retrieving the target log file corresponding to the target business.
[0086] S405: extract target data from the target log file using a target data extraction script.
[0087] In the above process, the data query method uses direct query into the data lake, and the data lake and the business database are not the same database instance. The database that generates business data is synchronized with the data in the data lake through the daily end-of-day batch. That is, through the program, the corresponding relationship between the reference business attributes and the reference business added that day or the data of the business log file is generated into a file, and the file is sent to the data lake for updating. This operation can not only ensure that the data information of the data lake and the business database is consistent, but also avoid the problem of too many read and write tasks occupying too many server resources due to statistical reports, and avoid affecting normal business.
[0088] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0089] The embodiment of the present application also provides a device for extracting business data. It should be noted that the device for extracting business data in the embodiment of the present application can be used to execute the method for extracting business data provided in the embodiment of the present application. The device for extracting business data provided in the embodiment of the present application is introduced below.
[0090] Figure 5 Schematic diagram of a device for extracting business data according to an embodiment of the present application. Figure 5 As shown, the device includes: a first acquisition module 502, a second acquisition module 504, a screening module 506, and a first extraction module 508, wherein:
[0091] The first acquisition module 502 is used to obtain a query request, wherein the query request is used to request a query for business data having target business attributes; the second acquisition module 504 is connected to the above-mentioned first acquisition module 502, and is used to obtain a target business corresponding to the target business attribute from a reference business attribute and a reference business having a corresponding relationship; the screening module 506 is connected to the above-mentioned second acquisition module 504, and is used to screen a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; the first extraction module 508 is connected to the above-mentioned screening module 506, and is used to extract business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes.
[0092] Optionally, in the business data extraction device provided in the embodiment of the present application, the reference business attribute and the reference business have a corresponding relationship, and the query request is used to request to query the business data with the target business attribute. The target business attribute of the business data to be queried can be known through the query request, and then the target business to be corresponding to the target business attribute can be obtained from the reference business attribute and the reference business with a corresponding relationship, that is, the target business that generates the business data to be queried is determined through the target business attribute, and then the target business data is extracted from the target log file of the target business, so that only the target business attribute of the business data to be queried is needed to be known during the query, and the business is queried through the target business attribute, and then the target business data corresponding to the business is extracted, thereby achieving the flexibility and scalability of business data query. The above technical solution solves the problems of low query efficiency of business data in related technologies, and achieves the technical effect of improving the query efficiency of business data.
[0093] Optionally, the second acquisition module includes: a matching unit, used to match the target sub-attribute set with each reference sub-attribute set in a corresponding reference sub-attribute set and a reference program identifier, wherein the reference sub-attribute set includes multiple reference business sub-attributes, and the multiple reference business sub-attributes are used to divide the business type of the business from multiple dimensions, and the target business attribute includes the target sub-attribute set; an acquisition unit, used to acquire a target program identifier corresponding to the reference sub-attribute set that successfully matches the target sub-attribute set, wherein the target program identifier is used to uniquely identify the target business.
[0094] Optionally, the matching unit is used to: determine whether the target attribute value of each target business subattribute in the one or more target business subattributes included in the target subattribute set is consistent with the reference attribute value of the reference business subattribute of the corresponding dimension in each of the reference subattribute sets; and determine the reference subattribute set whose reference attribute values are all consistent with the target attribute values as the reference subattribute set that successfully matches the target subattribute set.
[0095] Optionally, the matching unit is used to: when the one or more target business sub-attributes include a target department type identifier, obtain from the reference sub-attribute set a candidate sub-attribute set whose reference identifier value of the reference department type identifier is consistent with the target identifier value of the target department type identifier; determine whether each target identifier bit in the target business identifier string included in the target business sub-attribute is consistent with a corresponding candidate identifier bit on the candidate business identifier string included in each of the candidate sub-attribute sets, wherein the target business identifier string includes at least one of the following: a login business identifier, an account activation business identifier, a business account activation business identifier, a thread business identifier, an interface business identifier, and a logout business identifier; when the one or more target business sub-attributes do not include a target department type identifier, determine whether each target identifier bit in the target business identifier string included in the target business sub-attribute is consistent with a corresponding reference identifier bit on the reference business identifier string included in each of the reference sub-attribute sets, wherein the target business identifier string includes at least one of the following: a login business identifier, an account activation business identifier, a business account activation business identifier, a thread business identifier, an interface business identifier, and a logout business identifier.
[0096] Optionally, the first extraction module includes: a generation unit, used to generate a target data extraction script according to the target field corresponding to the target business attribute, wherein the target data extraction script is used to run a program for extracting data corresponding to the target field; and an operation unit, used to run the target data extraction script on the target log file to obtain the target business data.
[0097] Optionally, according to the generating unit, it is used to: obtain an initial data extraction script, wherein the initial data extraction script records a program template for extracting data; edit the target field to a corresponding position in the initial data extraction script to obtain the target data extraction script.
[0098] Optionally, the device includes one of the following: a second extraction module, used to extract the target field of the target business attribute from the query request before generating a target data extraction script based on the target field corresponding to the target business attribute; a third extraction module, used to extract the field of the reference business attribute corresponding to the target business attribute from the reference business attributes and reference businesses having a corresponding relationship as the target field.
[0099] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein when the program is run, any of the above-mentioned business data extraction methods is executed.
[0100] Optionally, in this embodiment, the above-mentioned storage medium can be configured to store program codes for executing the following steps: obtaining a query request, wherein the query request is used to request a query for business data having target business attributes; obtaining a target business corresponding to the target business attributes from reference business attributes and reference businesses having a corresponding relationship; screening a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes.
[0101] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned business data extraction method embodiments.
[0102] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0103] Optionally, in this embodiment, the above-mentioned processor can be configured to perform the following steps through a computer program: obtain a query request, wherein the query request is used to request a query for business data having target business attributes; obtain a target business corresponding to the target business attributes from reference business attributes and reference businesses having a corresponding relationship; filter a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; extract business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes.
[0104] The business data extraction device includes a processor and a memory. The above units are stored in the memory as program units, and the processor executes the above program units stored in the memory to realize corresponding functions.
[0105] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the query efficiency of business data can be improved by adjusting the kernel parameters.
[0106] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0107] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for extracting business data is implemented.
[0108] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for extracting business data is executed when the program is running.
[0109] Figure 6 is a schematic diagram of the hardware environment of a method for extracting business data according to an embodiment of the present application, such as Figure 6 As shown, an embodiment of the invention provides an electronic device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: obtaining a query request, wherein the query request is used to request a query for business data having target business attributes; obtaining a target business corresponding to the target business attributes from reference business attributes and reference businesses having a corresponding relationship; screening a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes.
[0110] Optionally, obtaining the target business corresponding to the target business attribute from the reference business attributes and reference businesses having a corresponding relationship includes: matching a target sub-attribute set with each reference sub-attribute set in a reference sub-attribute set and a reference program identifier having a corresponding relationship, wherein the reference sub-attribute set includes multiple reference business sub-attributes, and the multiple reference business sub-attributes are used to divide the business type of the business from multiple dimensions, and the target business attribute includes the target sub-attribute set; obtaining a target program identifier corresponding to the reference sub-attribute set that successfully matches the target sub-attribute set, wherein the target program identifier is used to uniquely identify the target business.
[0111] Optionally, matching the target sub-attribute set with a reference sub-attribute set having a corresponding relationship and each reference sub-attribute set in a reference program identifier includes: determining whether a target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with a reference attribute value of a reference business sub-attribute of a corresponding dimension in each of the reference sub-attribute sets; and determining a reference sub-attribute set whose reference attribute values are all consistent with the target attribute values as a reference sub-attribute set that successfully matches the target sub-attribute set.
[0112] Optionally, the determining whether the target attribute value of each target business subattribute in one or more target business subattributes included in the target subattribute set is consistent with the reference attribute value of the reference business subattribute of the corresponding dimension in each of the reference subattribute sets includes: when the one or more target business subattributes include a target department type identifier, obtaining from the reference subattribute set a candidate subattribute set having a reference identifier value of the reference department type identifier that is consistent with the target identifier value of the target department type identifier; determining whether each target identification bit in the target business identification string included in the target business subattribute is consistent with the corresponding candidate identification bit on the candidate business identification string included in each of the candidate subattribute sets. Whether they are consistent, wherein the target business identification string includes at least one of the following: a login business identification, an account activation business identification, a business account activation business identification, a thread business identification, an interface business identification, and a logout business identification; when the one or more target business sub-attributes do not include a target department type identification, determine whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with the corresponding reference identification bit on the reference business identification string included in each of the reference sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identification, an account activation business identification, a business account activation business identification, a thread business identification, an interface business identification, and a logout business identification.
[0113] Optionally, extracting business data from the target log file to obtain target business data includes: generating a target data extraction script based on a target field corresponding to the target business attribute, wherein the target data extraction script is used to run a program to extract data corresponding to the target field; and running the target data extraction script on the target log file to obtain the target business data.
[0114] Optionally, generating a target data extraction script according to a target field corresponding to the target business attribute includes: obtaining an initial data extraction script, wherein the initial data extraction script records a program template for extracting data; and editing the target field to a corresponding position in the initial data extraction script to obtain the target data extraction script.
[0115] Optionally, before generating a target data extraction script based on the target field corresponding to the target business attribute, the method also includes one of the following: extracting the target field of the target business attribute from the query request; extracting the field of the reference business attribute corresponding to the target business attribute from reference business attributes and reference businesses having a corresponding relationship as the target field.
[0116] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0117] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a query request, wherein the query request is used to request a query for business data having a target business attribute; obtaining a target business corresponding to the target business attribute from a reference business attribute and a reference business having a corresponding relationship; screening a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing a business; extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attribute. .
[0118] Optionally, the above-mentioned computer program product is also suitable for executing a program initialized with the following method steps: matching a target sub-attribute set with a reference sub-attribute set having a corresponding relationship and each reference sub-attribute set in a reference program identifier, wherein the reference sub-attribute set includes multiple reference business sub-attributes, and the multiple reference business sub-attributes are used to divide the business type of the business from multiple dimensions, and the target business attributes include the target sub-attribute set; obtaining a target program identifier corresponding to the reference sub-attribute set that successfully matches the target sub-attribute set, wherein the target program identifier is used to uniquely identify the target business.
[0119] Optionally, the above-mentioned computer program product is also suitable for executing a program initialized with the following method steps: determining whether the target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with the reference attribute value of the reference business sub-attribute of the corresponding dimension in each of the reference sub-attribute sets; and determining the reference sub-attribute set whose reference attribute values are all consistent with the target attribute values as the reference sub-attribute set that successfully matches the target sub-attribute set.
[0120] Optionally, the computer program product is further adapted to execute a program initialized with the following method steps: when the one or more target business sub-attributes include a target department type identifier, obtaining a candidate sub-attribute set having a reference identification value of the reference department type identifier that is consistent with a target identification value of the target department type identifier from the reference sub-attribute set; determining whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with a corresponding candidate identification bit on the candidate business identification string included in each of the candidate sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business ID, account activation service ID, business account activation service ID, thread service ID, interface service ID, and logout service ID; when the one or more target service sub-attributes do not include the target department type ID, determine whether each target identification bit in the target service identification string included in the target service sub-attribute is consistent with the corresponding reference identification bit on the reference service identification string included in each of the reference sub-attribute sets, wherein the target service identification string includes at least one of the following: login service ID, account activation service ID, business account activation service ID, thread service ID, interface service ID, and logout service ID.
[0121] Optionally, the above-mentioned computer program product is also suitable for executing an initialized program having the following method steps: generating a target data extraction script according to the target field corresponding to the target business attribute, wherein the target data extraction script is used to run a program for extracting data corresponding to the target field; running the target data extraction script on the target log file to obtain the target business data.
[0122] Optionally, the above-mentioned computer program product is also suitable for executing an initialization program having the following method steps: obtaining an initial data extraction script, wherein the initial data extraction script records a program template for extracting data; editing the target field to a corresponding position in the initial data extraction script to obtain the target data extraction script.
[0123] Optionally, the above-mentioned computer program product is also suitable for executing a program initialized with the following method steps: extracting the target field of the target business attribute from the query request; extracting the field of the reference business attribute corresponding to the target business attribute from the reference business attributes and reference businesses having a corresponding relationship as the target field.
[0124] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0125] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0128] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0129] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0130] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0131] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0133] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for extracting business data, characterized in that: include: Obtaining a query request, wherein the query request is used to request a query for business data having a target business attribute; Acquire a target service corresponding to the target service attribute from reference service attributes and reference services having a corresponding relationship; Filtering a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; Extracting business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attributes; Wherein, the step of acquiring the target business corresponding to the target business attribute from the reference business attribute and the reference business having a corresponding relationship comprises: matching the target sub-attribute set with each reference sub-attribute set in the reference sub-attribute set and the reference program identifier having a corresponding relationship, wherein the reference sub-attribute set comprises a plurality of reference business sub-attributes, the plurality of reference business sub-attributes are used to classify the business type of the business from a plurality of dimensions, and the target business attribute comprises the target sub-attribute set; acquiring the target program identifier corresponding to the reference sub-attribute set that successfully matches the target sub-attribute set, wherein the target program identifier is used to uniquely identify the target business; The matching of the target sub-attribute set with the reference sub-attribute set having a corresponding relationship and each reference sub-attribute set in the reference program identifier includes: determining whether a target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with a reference attribute value of a reference business sub-attribute of a corresponding dimension in each of the reference sub-attribute sets; determining a reference sub-attribute set whose reference attribute values are all consistent with the target attribute values as a reference sub-attribute set that successfully matches the target sub-attribute set; The step of determining whether the target attribute value of each target business subattribute in one or more target business subattributes included in the target subattribute set is consistent with the reference attribute value of the reference business subattribute of the corresponding dimension in each of the reference subattribute sets, comprising: when the one or more target business subattributes include a target department type identifier, obtaining a candidate subattribute set having a reference identifier value of the reference department type identifier that is consistent with the target identifier value of the target department type identifier from the reference subattribute set; determining whether each target identification bit in the target business identification string included in the target business subattribute is consistent with the corresponding candidate identification bit on the candidate business identification string included in each of the candidate subattribute sets. consistent, wherein the target business identification string includes at least one of the following: a login business identification, an account activation business identification, a business account activation business identification, a thread business identification, an interface business identification, and a logout business identification; in the case that the one or more target business sub-attributes do not include a target department type identification, determining whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with the corresponding reference identification bit on the reference business identification string included in each of the reference sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identification, an account activation business identification, a business account activation business identification, a thread business identification, an interface business identification, and a logout business identification.
2. The method according to claim 1, characterized in that The extracting the business data from the target log file to obtain the target business data includes: Generate a target data extraction script according to the target field corresponding to the target business attribute, wherein the target data extraction script is used to run a program to extract data corresponding to the target field; The target data extraction script is run on the target log file to obtain the target business data.
3. The method according to claim 2, characterized in that The step of generating a target data extraction script according to the target field corresponding to the target business attribute includes: Obtaining an initial data extraction script, wherein the initial data extraction script records a program template for extracting data; The target field is edited to a corresponding position in the initial data extraction script to obtain the target data extraction script.
4. The method according to claim 2, characterized in that: Before generating a target data extraction script according to the target field corresponding to the target business attribute, the method further includes one of the following: Extracting a target field of the target business attribute from the query request; A field of the reference service attribute corresponding to the target service attribute is extracted from the reference service attributes and the reference service having a corresponding relationship as the target field.
5. A device for extracting business data, characterized in that: include: A first acquisition module is used to acquire a query request, wherein the query request is used to request to query business data having a target business attribute; A second acquisition module, used for acquiring a target service corresponding to the target service attribute from reference service attributes and reference services having a corresponding relationship; A screening module, used to screen a target log file corresponding to the target business from a log file set, wherein the log file set includes log files generated by executing the business; A first extraction module, configured to extract business data from the target log file to obtain target business data, wherein the target business data is business data having the target business attribute; The second acquisition module further includes: a matching unit, configured to match the target sub-attribute set with each reference sub-attribute set in the reference sub-attribute set and the reference program identifier having a corresponding relationship, wherein the reference sub-attribute set includes a plurality of reference business sub-attributes, the plurality of reference business sub-attributes are used to divide the business type of the business from multiple dimensions, and the target business attribute includes the target sub-attribute set; an acquisition unit, configured to acquire a target program identifier corresponding to the reference sub-attribute set that successfully matches the target sub-attribute set, wherein the target program identifier is used to uniquely identify the target business; The matching unit is used to: determine whether a target attribute value of each target business sub-attribute in one or more target business sub-attributes included in the target sub-attribute set is consistent with a reference attribute value of a reference business sub-attribute of a corresponding dimension in each of the reference sub-attribute sets; determine a reference sub-attribute set whose reference attribute values are all consistent with the target attribute values as a reference sub-attribute set that successfully matches the target sub-attribute set; The matching unit is used to: when the one or more target business sub-attributes include a target department type identifier, obtain a candidate sub-attribute set having a reference identification value of the reference department type identifier that is consistent with the target identification value of the target department type identifier from the reference sub-attribute set; determine whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with the corresponding candidate identification bit on the candidate business identification string included in each of the candidate sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identification, an account-activating business identification, a business account-activating business identification, a thread-type business identification, an interface-type business identification, and a logout business identification; when the one or more target business sub-attributes do not include a target department type identifier, determine whether each target identification bit in the target business identification string included in the target business sub-attribute is consistent with the corresponding reference identification bit on the reference business identification string included in each of the reference sub-attribute sets, wherein the target business identification string includes at least one of the following: a login business identification, an account-activating business identification, a business account-activating business identification, a thread-type business identification, an interface-type business identification, and a logout business identification.
6. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 4 when running.
7. An electronic device, characterized in that: The invention comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Monitoring method for service data, storage medium and server
CN108847977A
Method for extracting next candidate activity in multi-angle business process
CN112052273A