Business data acquisition method and device and computer readable storage medium

By building an execution tree and acquiring business data based on policy information, the problem of low efficiency in the existing technology of business data acquisition is solved, and efficient business data acquisition is achieved.

CN119166323APending Publication Date: 2024-12-20XIAOHONGSHU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410378491.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing business data acquisition method requires writing database query code for each business, resulting in low efficiency in business data acquisition.

Method used

By obtaining the data of the target business, acquiring policy information, describing the logical relationship between factor expressions, building an execution tree, including expression nodes and logical nodes, and setting execution order information to efficiently obtain business data.

Benefits of technology

It realizes convenient and efficient acquisition of business data of target services, and improves the efficiency of business data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166323A_ABST
    Figure CN119166323A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a business data acquisition method and device and a computer readable storage medium. Data acquisition strategy information corresponding to a target service is acquired, the data acquisition strategy information describes a logic relationship between factor expressions, the factor expressions describe related data selection logic for user published contents under feature factors, and the feature factors describe attribute information related to the user published contents; an execution tree corresponding to the target service is constructed based on the data acquisition strategy information, the execution tree comprises a plurality of nodes, the nodes comprise expression nodes corresponding to the factor expression and logic nodes connected with at least two nodes, the logic nodes indicate the logic relation between the nodes connected with the logic nodes, and execution sequence information is set in the nodes; and performing related data selection based on the execution sequence information and the execution tree, and obtaining service data corresponding to the target service based on the selected data. Therefore, the business data can be conveniently and efficiently acquired, and the business data acquisition efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, device and computer-readable storage medium for acquiring business data. Background Art

[0002] With the rapid development of Internet technology, a huge amount of data is generated on the Internet every day. In order to ensure the normal execution of the business, it is necessary to supervise and analyze various types of business data generated by the business platform to determine whether the business is executed normally. In the existing business data acquisition method, the corresponding database query code is often written for each business, and the corresponding business data is obtained according to the database query code.

[0003] In the process of research and practice of the prior art, it is found that in the existing business data acquisition method of acquiring corresponding business data by writing database query code, it is necessary to write corresponding database query code for each business, which makes the business data acquisition efficiency low. Summary of the invention

[0004] The embodiments of the present application provide a business data acquisition method, device and computer-readable storage medium, which can conveniently and efficiently acquire business data of a target business and improve the efficiency of business data acquisition.

[0005] The present application provides a method for acquiring business data, including:

[0006] Acquire data acquisition strategy information corresponding to the target business, wherein the data acquisition strategy information is used to describe the logical relationship between factor expressions, wherein the factor expressions are used to describe the logic of selecting relevant data for user-published content under characteristic factors, wherein the characteristic factors are used to describe attribute information related to user-published content;

[0007] constructing an execution tree corresponding to the target business based on the data acquisition strategy information, wherein the execution tree includes a plurality of nodes, the nodes including an expression node corresponding to the factor expression and a logic node connected to at least two nodes, the logic node indicating a logical relationship between the nodes connected thereto, and the execution tree is provided with execution order information between the nodes;

[0008] Relevant data is selected based on the execution sequence information and the execution tree, and business data corresponding to the target business is obtained based on the selected data.

[0009] Accordingly, an embodiment of the present application provides a business data acquisition device, including:

[0010] An information acquisition unit, used to acquire data acquisition strategy information corresponding to a target business, wherein the data acquisition strategy information is used to describe a logical relationship between factor expressions, wherein the factor expressions are used to describe a logic for selecting relevant data for user-published content under a characteristic factor, wherein the characteristic factor is used to describe attribute information related to user-published content;

[0011] a construction unit, configured to construct an execution tree corresponding to the target business based on the data acquisition strategy information, wherein the execution tree includes a plurality of nodes, the nodes including an expression node corresponding to the factor expression and a logic node connected to at least two nodes, the logic node indicating a logical relationship between the nodes connected thereto, and the execution tree is provided with execution order information between the nodes;

[0012] A data acquisition unit is used to select relevant data based on the execution order information and the execution tree, and obtain business data corresponding to the target business based on the selected data.

[0013] In one embodiment, the construction unit comprises:

[0014] A factor parsing subunit, configured to perform factor parsing processing based on the factor expressions in the data acquisition strategy information and the logical relationship between the factor expressions, to obtain at least one condition factor under at least one strategy group and the logical relationship between the condition factors, wherein one condition factor corresponds to one factor expression;

[0015] A node creation subunit, used to create nodes corresponding to each of the policy groups based on the condition factors and the logical relationships between the condition factors, and determine execution order information of each of the nodes;

[0016] The execution tree construction subunit is used to construct an execution tree corresponding to the target business based on the nodes and the execution order information.

[0017] In one embodiment, the factor analysis subunit is used to:

[0018] Performing data conversion on the data acquisition strategy information to obtain strategy group models of multiple strategy groups and strategy group logical relationships between the strategy groups;

[0019] Performing feature factor splitting on the strategy group model to obtain at least one condition factor corresponding to the strategy group and the intra-group logical relationship between the condition factors;

[0020] The logical relationship between the condition factors is determined based on the policy group logical relationship and the intra-group logical relationship.

[0021] In one embodiment, the node creation subunit includes:

[0022] An information acquisition module, used to acquire factor attribute information of condition factors in the strategy group;

[0023] A priority determination module, used to determine the policy group priority of each policy group based on the factor attribute information;

[0024] The node creation module is used to create nodes corresponding to each of the policy groups according to the policy group priority and the logical relationship between the condition factors, and determine the execution order information of each of the nodes.

[0025] In one embodiment, the factor attribute information includes data source information corresponding to the condition factor in the policy group, and the priority determination module is used to:

[0026] Obtaining target data source information corresponding to the target business;

[0027] Based on the matching relationship between the target data source information and the data source information of the conditional factors in each of the policy groups, the policy group priority corresponding to each of the policy groups is determined.

[0028] In one embodiment, the factor attribute information further includes the number of condition factors and the type of logical relationship of the condition factors in the policy group, and the priority determination module is used to:

[0029] Determine the first priority corresponding to each of the policy groups based on the matching relationship between the target data source information and the data source information of the condition factor in each of the policy groups;

[0030] determining a second priority of each of the policy groups based on the number of condition factors;

[0031] Determining a third priority of each of the policy groups based on a logical relationship type of the conditional factors;

[0032] The policy group priority corresponding to each of the policy groups is determined according to the first priority, the second priority, and the third priority.

[0033] In one embodiment, the node creation module is used to:

[0034] Filtering out a target policy group from the policy groups according to the policy group priority;

[0035] Creating a shared node based on the target policy group, creating an expression node based on the condition factor, and creating a logical node based on the logical relationship, wherein the shared node is used to share the execution result of the target policy group in the policy group;

[0036] The node corresponding to the target business is determined according to the expression node, the logic node and the shared node, and the execution order information corresponding to the node is determined based on the policy group priority and the logical relationship between the condition factors.

[0037] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for loading by a processor to execute the steps in any business data acquisition method provided in the embodiment of the present application.

[0038] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the business data acquisition method provided in the embodiment of the present application.

[0039] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps in the business data acquisition method provided in the embodiment of the present application.

[0040] The embodiment of the present application obtains data acquisition strategy information corresponding to the target business, the data acquisition strategy information is used to describe the logical relationship between factor expressions, the factor expression is used to describe the relevant data selection logic for user-published content under the characteristic factor, and the characteristic factor is used to describe the attribute information related to the user-published content; based on the data acquisition strategy information, an execution tree corresponding to the target business is constructed, the execution tree includes multiple nodes, the nodes include expression nodes corresponding to the factor expression, and logical nodes connected to at least two nodes, the logical nodes indicate the logical relationship between the nodes connected to it, and the execution tree is provided with execution order information between the nodes; based on the execution order information and the execution tree, relevant data is selected, and the business data corresponding to the target business is obtained based on the selected data. In this way, by obtaining the data acquisition strategy information configured for the target business, the execution tree corresponding to the target business is constructed according to the data acquisition strategy information, and the nodes in the execution tree are executed according to the execution order information of the nodes in the execution tree, the business data corresponding to the target business can be obtained, and the business data of the target business can be obtained conveniently and efficiently, thereby improving the efficiency of business data acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 This is a schematic diagram of an implementation scenario of a business data acquisition method provided in an embodiment of the present application;

[0043] Figure 2 It is a flowchart of a method for obtaining business data provided by an embodiment of the present application;

[0044] Figure 3a It is a schematic diagram of a strategy configuration process of a business data acquisition method provided in an embodiment of the present application;

[0045] Figure 3b It is a schematic diagram of a strategy configuration of a business data acquisition method provided in an embodiment of the present application;

[0046] Figure 3c This is a schematic diagram of the overall process of a method for acquiring business data provided by an embodiment of the present application;

[0047] Figure 4a It is a schematic diagram of a node representation of a method for acquiring business data provided in an embodiment of the present application;

[0048] Figure 4b This is a specific flow chart of a method for acquiring business data provided by an embodiment of the present application;

[0049] Figure 4c It is a schematic diagram of an execution tree of a business data acquisition method provided in an embodiment of the present application;

[0050] Figure 5 It is a structural diagram of a business data acquisition device provided in an embodiment of the present application;

[0051] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of this application.

[0053] The embodiments of the present application provide a method, device and computer-readable storage medium for acquiring business data, wherein the business data acquisition device can be integrated in an electronic device, which can be a server, a terminal or other device.

[0054] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. Terminals may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Terminals and servers can be directly or indirectly connected via wired or wireless communications, and this application does not limit this.

[0055] See also Figure 1 , taking the business data acquisition device integrated into an electronic device as an example, Figure 1 A schematic diagram of an implementation scenario of the business data acquisition method provided in an embodiment of the present application, wherein the electronic device can be a server or a terminal, and the electronic device can obtain data acquisition strategy information corresponding to the target business, the data acquisition strategy information is used to describe the logical relationship between factor expressions, the factor expression is used to describe the relevant data selection logic for user-published content under the characteristic factor, and the characteristic factor is used to describe the attribute information related to the user-published content; based on the data acquisition strategy information, an execution tree corresponding to the target business is constructed, the execution tree includes multiple nodes, the nodes include expression nodes corresponding to the factor expression, and logical nodes connected to at least two nodes, the logical nodes indicate the logical relationship between the nodes connected to them, and the execution tree is provided with execution order information between the nodes; based on the execution order information and the execution tree, relevant data is selected, and the business data corresponding to the target business is obtained based on the selected data.

[0056] It should be noted that Figure 1 The implementation environment scenario diagram of the business data acquisition method shown is only an example. The implementation environment scenario of the business data acquisition method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.

[0057] The solutions provided by the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0058] This embodiment will be described from the perspective of a business data acquisition device. The business data acquisition device may be integrated into an electronic device, which may be a server. This application does not limit this.

[0059] See also Figure 2 , Figure 2 : is a flow chart of a method for acquiring business data provided by an embodiment of the present application. The method for acquiring business data includes:

[0060] In step 101, data acquisition strategy information corresponding to a target service is acquired.

[0061] The data acquisition strategy information can be used to describe the logical relationship between factor expressions, the factor expression can be used to describe the data selection logic for user-posted content under the characteristic factor, and the characteristic factor can be used to describe the attribute information related to the user-posted content.

[0062] Among them, the target business may be a transaction to be processed, the data acquisition strategy information may be information describing the data acquisition strategy, and the data acquisition strategy may be a strategy for acquiring business data required by the target business. For example, the target business may be acquiring content that has been viewed more than 100,000 times by users, and accordingly, the data acquisition strategy may be a strategy for acquiring content that has been viewed more than 100,000 times, and the content may include information of at least one modality among text, image, video, and audio. The logical relationship may include logical relationships such as AND logic and OR logic. The user-published content may be content generated based on the user's publishing behavior, and the user-published content may include multiple carriers, for example, it may include carriers such as content, comments, users, and advertisements corresponding to the user-published content. The factor expression may be information describing the logic of acquiring data from the user-published content under the dimension of characteristic factors, and the characteristic factor (CF for short) may describe the relevant attribute information of the carrier of the user-published content, for example, the relevant attribute information may include attribute information such as the body of the published content, title, content status, comment content, and publishing time, and correspondingly, the characteristic factor may be information such as the content of the published content, the title of the published content, the content of the comment, the publishing time of the content, the content status, the comment of the content, and the number of comments. Correspondingly, the factor expression (Factor-Expression, FE for short) can be information describing the logical number extraction using characteristic factors. For example, for the characteristic factor "number of content comments", its corresponding factor expression can be a factor expression describing the acquisition of user-posted content with a number of comments greater than 4, etc. For the characteristic factor "content status", its corresponding factor expression can be a factor expression describing the acquisition of user-posted content whose content status is off-shelf or visible only on personal pages, etc.

[0063] Optionally, a group of factor expressions can form a strategy, i.e., a data acquisition strategy, and at least one data acquisition strategy can constitute a strategy group, wherein the strategy can be used to describe the logical relationship of a group of factor expressions, and the strategy can implement a more specific data acquisition method by aggregating a group of factor expressions. The strategy group can be used to describe the direct logical relationship of the strategy. A feature factor can be configured with a corresponding feature factor descriptor (Factor-Descriptor), and the feature factor descriptor can be used to define the data acquisition logic of a feature factor. Each feature factor has a namespace (Factor-Namespace, abbreviated as FN), i.e., the data source of the feature factor. The namespace can be used to carry the business carrier to which the feature factor belongs. For example, for the feature factor "content status", its corresponding namespace can be a namespace for storing content, for example, it can be a data source for storing content. For the feature factor "comment data", its corresponding namespace can be a namespace for storing comments on content. Each namespace can have a corresponding namespace descriptor, which can be used to define the namespace and describe the relevant information of the namespace, for example, it can include the actual storage location of the namespace, the type it belongs to, the primary key of the document under the namespace, the relationship with other namespaces and other related information.

[0064] In one embodiment, the data acquisition strategy of the target business can be configured through a visual interface. For example, taking the content posted by the user as a note type, the note can be content posted by the user including at least one modal information such as text, image, video, audio, etc. Figure 3a , Figure 3aIt is a schematic diagram of a policy configuration process of a business data acquisition method provided by an embodiment of the present application. A visual interface for configuring the data acquisition policy of the target business can be provided in the policy configuration platform. The policy configuration platform can be a platform for configuring the data acquisition policy of the target business. It can include a data source management component and a factor feature management component. The data source management component can be used to manage multiple data sources. For example, it can include namespaces such as note namespaces, comment namespaces, and user namespaces. The note namespace can be a data source for storing note content, the comment namespace can be a data source for storing comments on notes, and the user namespace can be a data source for storing information of the publishing user. The factor feature management component can be used to manage multiple feature factors. For example, it can include feature factors such as note content factors, note title factors, and note comment factors. The note content factor can be a "note content" feature factor, the note title factor can be a "note title" feature factor, and the note comment factor can be a "note comment" feature factor. Based on the visual interface, the user can select the feature factors required for the business, so that these feature factors can be registered through the policy configuration platform, and their corresponding namespaces can be bound. Therefore, the user can drag the characteristic factors displayed in the visualization interface according to the business needs to combine into at least one policy group required to realize the target business, and through the submission operation, the user-configured policy group can be submitted to the policy execution engine provided in the embodiment of the present application, so that the policy execution engine obtains the data acquisition policy information corresponding to the target business. In this way, the user can configure the data acquisition policy of the target business through the visualization interface by using simple interactive methods such as dragging components, which can greatly reduce the threshold of policy configuration, improve the efficiency of business policy configuration, and thus improve the efficiency of business data acquisition.

[0065] Optionally, there are many ways for users to configure policies through the visual interface. For example, please refer to Figure 3b , Figure 3bThis is a strategy configuration diagram of a business data acquisition method provided in an embodiment of the present application. Assuming that the carrier of the business data required by the target business is note comments, the visual interface for strategy configuration may include multiple strategy configuration areas, each strategy configuration area is used to configure a strategy, for example, feature package 1, feature package 2 and feature package 3 are respectively a strategy, feature package 1, feature package 2 and feature package 3 constitute a strategy group with a logical relationship with logic, wherein feature package 1 may include two note abnormal word strategy factors and a release time factor with a logical relationship with, wherein the note abnormal word strategy factor may be a functional factor, the functional factor may be a factor of the data acquisition logic that combines at least two feature factors, a functional factor may be split into at least two factor expressions with a logical relationship, and each factor expression corresponds to a feature factor. The note abnormal word policy factors include the characteristic factors "note content", "note title" and "note OCR (text in the picture)", and also include the keyword "note test" and the condition "belongs to a certain set" as the data extraction conditions of these characteristic factors. The preset data extraction logic can also be configured at the bottom of these configuration items. For example, the configuration of the note abnormal word policy factors can be expressed as obtaining note comments that belong to a certain set and have the keyword "note test" in the data sources corresponding to the note content, note title, and note OCR. The release time factor can be a factor expression of the characteristic factor "release time", which can be expressed as obtaining note comments with a release time between 2023-10-01 and 2023-10-11. Similarly, feature package 2 and feature package 3 can be configured with policies, or more or fewer feature packages can be configured, so that the required business data can be recalled through the execution of the policy execution engine.

[0066] In one embodiment, please refer to Figure 3c , Figure 3cIt is a schematic diagram of the overall process of a business data acquisition method provided by an embodiment of the present application. The required feature factors can be registered and managed through the real-time strategy platform, so that the feature list and strategy configuration can be queried through the offline strategy configuration platform, so that the evaluation / online strategy can be submitted to the operation aggregation service. The operation aggregation service can obtain the data acquisition strategy information in the JS key-value pair data (Json) format, and query the feature metadata configuration such as the feature factor, so that the configured data acquisition strategy information can be parsed and encapsulated into a database query language (sql), so that the business data acquisition task can be submitted to the data platform. The data platform can call the required method in the user-defined function (UDF), and then execute the task corresponding to the target business. The data platform can notify the task status and results to the operation traffic service to update the task status to the operation data field service, and can also add the online strategy to the review queue and the disposal center for data processing. At the same time, the data can be synchronized to the query detail database (ES) for the operation data field service to query the details. The strategy configuration platform can view the execution results through the operation aggregation service.

[0067] In step 102, an execution tree corresponding to the target business is constructed based on the data acquisition strategy information.

[0068] The execution tree may include multiple nodes, which may include expression nodes corresponding to factor expressions and logic nodes connected to at least two nodes, the logic nodes indicate the logical relationship between the nodes connected to them, and the execution tree is provided with execution order information between the nodes.

[0069] The execution tree may be a logical-state-tree (LST), which may be used to describe the combination relationship of a set of policies. The LST may be annotated with information such as relevant data acquisition policies, policy relationships, and acquisition methods of factors under policies. The business data required by the target business may be acquired according to the execution result through depth-first traversal of the execution tree. The logical node may represent the logical relationship between at least two nodes connected under the logical node. The execution order information may be information indicating the execution order of nodes in the execution tree.

[0070] There are many ways to construct an execution tree corresponding to the target business based on the data acquisition strategy information. For example, factor parsing can be performed based on the factor expressions in the data acquisition strategy information and the logical relationship between the factor expressions to obtain at least one condition factor under at least one strategy group and the logical relationship between the condition factors, wherein one condition factor corresponds to one factor expression, and based on the condition factors and the logical relationship between the condition factors, nodes corresponding to each strategy group are created, and the execution order information of each node is determined, and the execution tree corresponding to the target business is constructed based on the nodes and the execution order information.

[0071] The condition factor may be an expression factor corresponding to a characteristic factor, or may be an expression factor corresponding to a characteristic factor extracted from the data acquisition strategy information.

[0072] There are many ways to perform factor parsing based on the factor expressions in the data acquisition strategy information and the logical relationship between the factor expressions to obtain at least one condition factor under at least one strategy group and the logical relationship between the condition factors. For example, data conversion can be performed on the data acquisition strategy information to obtain a strategy group model of multiple strategy groups and the strategy group logical relationship between the strategy groups. The strategy group model can be feature-factored to obtain at least one condition factor corresponding to the strategy group and the intra-group logical relationship between the condition factors. The logical relationship between the condition factors can be determined based on the strategy group logical relationship and the intra-group logical relationship.

[0073] The policy group model may be a model obtained by performing data conversion on the policy group based on a preset model structure. The preset model structure may be a predefined data structure. The data acquisition policy information is converted into a policy group model in the form of the data structure so that the policy execution engine can recognize the data acquisition policy information. The policy group logical relationship may be a logical relationship between policy groups, for example, it may include an or logical relationship and an and logical relationship. The intra-group logical relationship may be a logical relationship between conditional factors within a policy group.

[0074] There are many ways to perform data conversion on the data acquisition policy information to obtain the policy group models of multiple policy groups. For example, the data acquisition policy information can be converted according to the data structure of a predefined model to obtain the policy group models of multiple policy groups. The data structure of the model can be expressed as:

[0075]

[0076] Correspondingly, for each characteristic factor, its corresponding model structure can also be defined. For example, for a functional factor containing the data acquisition logic of multiple characteristic factors, the functional factor can be split into multiple factor expressions according to the characteristic factors. The model definition of the functional factor can be expressed as:

[0077]

[0078]

[0079] Correspondingly, the model definition of the feature factor descriptor can be expressed as:

[0080]

[0081] Among them, the specific data structure of the model definition of the policy group and characteristics such as characteristic factors, factor expressions and namespaces can be defined according to actual conditions, so that the policy execution engine provided in the embodiment of the present application can identify the information described by the policy group and characteristics such as characteristic factors, factor expressions and namespaces through the data structure.

[0082] After data conversion is performed on the data acquisition strategy information, the strategy group model can be split into characteristic factors to obtain at least one condition factor corresponding to the strategy group and the intra-group logical relationship between the condition factors. There are many ways to split the characteristic factors of the strategy group model. For example, the model can be split according to the characteristic factors and the definition of the factor expression contained in the strategy group model, so as to obtain the condition factors corresponding to each characteristic factor contained in each strategy group. Optionally, when the strategy group model contains a factor expression with only one characteristic factor, the splitting can be omitted and the factor expression can be directly used as the condition factor. When the strategy group model contains a functional factor composed of at least two characteristic factors, the functional factor can be split according to the characteristic factors contained in the functional factor to obtain the factor expression corresponding to each characteristic factor, and the factor expression can be used as the split condition factor.

[0083] After the policy group model is split into characteristic factors, the logical relationship between the condition factors can be determined based on the policy group logical relationship and the logical relationship within the group. There are many ways to determine the logical relationship between the condition factors based on the policy group logical relationship and the logical relationship within the group. For example, according to the policy group logical relationship, the policy groups with a logical relationship of and can be divided into one group. When building the execution tree, one group can create a logical node, and the logical node of the group can be connected to the nodes of the policy groups with a logical relationship of and within the group as the child nodes of the logical node. Correspondingly, the policy groups with a logical relationship of or can be divided into one group. When building the execution tree, one group can create a logical node, and the logical node of the group can be connected to the nodes of the policy groups with a logical relationship of or within the group as the child nodes of the logical node. The condition factors in each policy group can also be grouped. For example, the condition factors in the policy group can be grouped according to the namespace (data source) to which the condition factors in the policy group belong. Specifically, the condition factors belonging to the same namespace in the policy group can be divided into one group. When constructing the execution tree, a group in the same namespace can create a node, and the node of the group can be connected to the nodes of the condition factors in the group belonging to the same namespace as the child nodes of the node.

[0084] After factor parsing the data acquisition strategy information, the nodes corresponding to each strategy group can be created based on the condition factors and the logical relationship between the condition factors, and the execution order information of each node can be determined. There are many ways to create the nodes corresponding to each strategy group based on the condition factors and the logical relationship between the condition factors, and to determine the execution order information of each node. For example, the factor attribute information of the condition factors in the strategy group can be obtained, the strategy group priority of each strategy group can be determined based on the factor attribute information, and the nodes corresponding to each strategy group can be created based on the strategy group priority and the logical relationship between the condition factors, and the execution order information of each node can be determined.

[0085] The factor attribute information may be information describing the properties of the condition factors in the policy group and the relationship between the condition factors. For example, the factor attribute information may include the number of condition factors in the policy group, the namespace to which they belong, the logical relationship between the condition factors, etc. The policy group priority may be information describing the execution priority of the policy group. The higher the policy group priority, the higher the priority of the policy group and the higher the execution order.

[0086] There may be multiple ways to determine the policy group priority of each policy group based on factor attribute information. For example, the factor attribute information includes data source information corresponding to the conditional factor in the policy group, and the target data source information corresponding to the target business can be obtained. Based on the matching relationship between the target data source information and the data source information of the conditional factor in each policy group, the policy group priority corresponding to each policy group is determined.

[0087] The data source information may be information indicating the data source to which the condition factor belongs, that is, information indicating the namespace to which the condition factor belongs, and the target data source information may be information indicating the data source to which the business data required by the target business belongs.

[0088] There are multiple ways to determine the policy group priority corresponding to each policy group based on the matching relationship between the target data source information and the data source information of the condition factors in each policy group. For example, the target data source information can be compared with the data source information of the condition factors in each policy group to determine whether there is a condition factor in the policy group whose data source is consistent with the data source corresponding to the target business. When there is a condition factor in the policy group whose data source matches the data source corresponding to the target business, the policy group can be given a higher policy group priority. Optionally, the policy group priority of the policy group can also be adjusted according to the number of condition factors in the policy group whose data source matches the data source corresponding to the target business. For example, assuming that the number of condition factors in policy group 1 whose data source matches the data source corresponding to the target business is 2, the number of condition factors in policy group 2 whose data source matches the data source corresponding to the target business is 0, and the number of condition factors in policy group 3 whose data source matches the data source corresponding to the target business is 3, then the policy group priority of policy group 3 can be greater than that of policy group 1, and the policy group priority of policy group 1 can be greater than that of policy group 2.

[0089] Optionally, there may be multiple ways to determine the policy group priority corresponding to each policy group based on the matching relationship between the target data source information and the data source information of the condition factors in each policy group. For example, the factor attribute information may also include the number of condition factors and the logical relationship type of the condition factors in the policy group. The first priority corresponding to each policy group may be determined based on the matching relationship between the target data source information and the data source information of the condition factors in each policy group, the second priority of each policy group may be determined based on the number of condition factors, the third priority of each policy group may be determined based on the logical relationship type of the condition factors, and the policy group priority corresponding to each policy group may be determined according to the first priority, the second priority and the third priority.

[0090] Among them, the first priority may be the priority corresponding to the policy group determined according to the data source information, the second priority may be the priority of the policy group determined according to the number of condition factors, and the third priority may be the priority determined according to the logical relationship type of the condition factors.

[0091] There are many ways to determine the second priority of each policy group based on the number of conditional factors. For example, the more conditional factors a policy group has, the higher the first priority of the policy group. For example, assuming that the number of conditional factors of policy group 4 is 3 and the number of conditional factors of policy group 5 is 2, the second priority of policy group 4 can be greater than that of policy group 5. Optionally, the specific value of the second priority can be set according to actual conditions, and the embodiment of the present application is not limited here.

[0092] There are many ways to determine the third priority of each policy group based on the logical relationship type of the conditional factor. For example, the third priority of each policy group can be determined according to the number of logical relationships of the policy group with the logical relationship type of AND logic. For example, assuming that there are 3 logical relationships of AND logic in policy group 6 and 2 logical relationships of AND logic in policy group 7, the third priority of policy group 6 is greater than the third priority of policy group 7. Optionally, the specific value of the third priority can be set according to actual conditions, and the embodiment of the present application is not limited here.

[0093] There may be multiple ways to determine the policy group priority corresponding to each policy group based on the first priority, the second priority and the third priority. For example, the first priority, the second priority and the third priority corresponding to each policy group may be fused to obtain the policy group priority corresponding to each policy group. There may be multiple ways of fusion processing, for example, accumulation or multiplication may be performed.

[0094] After determining the policy group priority of each policy group based on the factor attribute information, the node corresponding to the policy group can be created and the execution order information of the node can be determined according to the policy group priority and the logical relationship between the condition factors. There are many ways to create the node corresponding to the policy group and determine the execution order information of the node according to the policy group priority and the logical relationship between the condition factors. For example, the target policy group can be screened out from the policy group according to the policy group priority, a shared node can be created based on the target policy group, an expression node can be created based on the condition factors, a logical node can be created based on the logical relationship, the node corresponding to the target business can be determined according to the expression node, the logical node and the shared node, and the execution order information corresponding to the node can be determined based on the policy group priority and the logical relationship between the condition factors.

[0095] Among them, the target policy group can be the policy group with the highest policy group priority among the policy groups. The expression node can be a node corresponding to the condition factor, which can represent a factor expression of a characteristic factor. The logic node can be a node indicating the logical relationship between the condition factors, which can be used to construct a combination relationship of expression nodes or a combination relationship between execution nodes. The execution node can be a node for executing data acquisition tasks under each policy group, which is used to translate into a policy execution engine expression that can be recognized by a specific policy execution engine according to the logic of the sub-node (logic node / expression node), and then submit a specific warehouse query. The shared node can be a node for sharing the execution results between policy groups. The shared node can be used to share the execution results of the target policy group in the policy group, that is, the shared node has multiple copies in the entire execution tree, but it shares the internal attribute state and execution results of the target policy group. For example, after a certain attribute of the target policy group changes, all copies also change accordingly.

[0096] In one embodiment, for the case of a time-effective combined query of data sources, when there is a need for data transmission between nodes of different data sources in the created execution tree, a transfer node for data transmission can be added between the two nodes. For example, assuming that the two nodes are node 1 and node 2, the data obtained by node 1 that performs the query operation after logical calculation can be transmitted to node 2 of another data source through the transfer node. Node 2 of another data source performs a query operation on the current data source based on the data transmitted by the transfer node, thereby realizing a combined query of different data sources. In addition, different data sources can also perform calculations on corresponding nodes in the execution tree respectively, so as to obtain the data obtained by the execution nodes in the execution tree in the corresponding data sources. In this way, a target warehouse can be specified, and a transfer node can be added to the execution tree whose final execution result is not in the target warehouse. The execution result is imported into the target warehouse through the transfer node. In this way, data aggregation of heterogeneous data sources can be realized. For example, please refer to Figure 4a , Figure 4a It is a schematic diagram of a node representation of a business data acquisition method provided in an embodiment of the present application. By transferring the node, the data acquired by the execution tree in the heterogeneous data source can be transferred to the node used as the target storage to perform subsequent data acquisition operations.

[0097] In one embodiment, please refer to Figure 4b , Figure 4bIt is a specific flow chart of a business data acquisition method provided by an embodiment of the present application. The data acquisition policy information in Json format corresponding to the target business can be obtained through the policy execution engine provided by the embodiment of the present application, so that the Json string corresponding to the data acquisition policy information can be converted into a policy group model. The policy group model can include at least one factor expression and a functional factor. It can be determined whether the policy group model contains a functional factor, and the functional factor is split into a factor expression corresponding to each characteristic factor, that is, a conditional factor, so that multiple factor expressions can be split in the policy group model. Then, the policy groups can be grouped according to the policy group logical relationship between the policy groups. For the policy groups divided into or logical groups and having only one conditional factor in the policy group, they can be divided into and logical groups. The namespace to which the conditional factor in the policy group belongs can also be queried, and the conditional factors in the policy group can be grouped according to the namespace. Then, the target data source information corresponding to the target business can be matched with the data source information corresponding to the conditional factor in the policy group, and the policy group with the conditional factor matching the target data source information corresponding to the target business can be used as the target For target policy groups, when there are policy groups that match multiple data sources, the policy groups can be further prioritized according to the number of conditional factors contained in the policy groups, so that the policy group with the highest priority can be determined as the target policy group. The policy groups can also be sorted again according to the AND logic and OR logic between the conditional factors in the policy groups. For example, the priority of AND logic can be greater than that of OR logic, because AND logic can more accurately determine the data to be obtained, thereby reducing the amount of data and speeding up the data acquisition rate. Therefore, policy groups with more AND logic can be given a higher policy group priority, so that the policy groups can be sorted to obtain the target policy group with the best logic and the highest policy group priority as a shared group to create a shared node in the execution tree. Since the optimal target policy group is often executed first, the shared group can be the first policy group in the execution tree. Then, the shared group can be assigned to other policy groups to achieve data sharing between multiple policy groups. In this way, an execution tree corresponding to the target business can be constructed to obtain the business data corresponding to the target business through the execution tree, thereby improving data acquisition efficiency.

[0098] In one embodiment, please refer to Figure 4c , Figure 4cIt is an execution tree diagram of a business data acquisition method provided by an embodiment of the present application. The execution tree can be constructed by the data acquisition strategy information corresponding to the target business. The execution tree may include multiple connected nodes, each node may carry node type, execution order information and logical relationship of the connected sub-nodes, and the node type may include expression node (EXP), logic node (LOG), execution node (EXE) and other types. AND can represent AND logic, that is, AND operation, and OR can represent OR logic, that is, OR operation. 1, 2, 3, ..., 18 in the node can be represented as the node identifier of the node, or can represent the execution order information of the node. For example, the execution order of node 1 is the first, and the execution order of node 18 is the last. It should be noted that the execution order information can represent the execution priority of the node. In the actual execution process of the execution tree, it is not necessary to strictly follow the execution order information of the node for sequential execution. For example, nodes 1, 2, and 3 can be executed at the same time, and nodes 6, 7, and 8 can also be executed at the same time. The specific execution process can be set according to the actual business situation, and the embodiment of the present application is not limited here.

[0099] In step 103, relevant data is selected based on the execution sequence information and the execution tree, and business data corresponding to the target business is obtained based on the selected data.

[0100] The business data may be data required by the target business.

[0101] There are many ways to select relevant data based on the execution order information and the execution tree, and obtain the business data corresponding to the target business based on the selected data. For example, the execution tree can be executed according to the execution order information of the nodes in the execution tree. For example, please continue to refer to Figure 4c, you can first execute expression node 1, expression node 2, and expression node 3, and then execute logic node 4 based on the execution results of expression nodes 1, 2, and 3, perform AND logic processing on the execution results of nodes 1, 2, and 3 based on logic node 4, and then jump to execution node 5, execute logic node 4 through execution node 5, and obtain the result of AND logic processing on the execution results of nodes 1, 2, and 3, that is, obtain the execution result of the policy group corresponding to execution node 5. At the same time, you can execute expression nodes 6, 7, and 8, and based on the execution results of expression nodes 6, 7, and 8, execute logic node 9, and perform OR logic processing on the execution results of expression nodes 6, 7, and 8 through logic node 9, so as to obtain logic The execution result of the logic node 9 can be processed by logic node 10, and then the execution result of the shared node 5 and the execution result of the logic node 9 can be processed by logic node 10, and then the execution node 11 can be jumped to, and the execution result of the policy group corresponding to the execution node 11 can be obtained by executing the execution node 11, and the execution result of the policy group corresponding to the execution node 16 can be obtained by analogy, so as to jump to the logic node 17 according to the logical relationship of the nodes, and the execution results of the execution nodes 5, 11 and 16 can be processed by logic node 17, and then the execution can be performed by execution node 18 to obtain the result of the logical processing of the execution results of the nodes 5, 11 and 16, that is, the business data corresponding to the target business can be obtained.

[0102] In this way, the business data acquisition method provided by the embodiment of the present application, by defining multiple conceptual models such as feature factor models, feature factor descriptors, namespaces, and policy groups, and providing a front-end drag-and-drop method through a visual interface to configure the data acquisition strategy for the target business, can effectively reduce the access cost of business review and the cost of operating configuration strategy, thereby improving the configuration and application efficiency of the strategy, further improving the front-line risk response capabilities, and improving the platform risk control capabilities. In addition, by defining the expression node, logic node, execution node and other node types of the execution tree to parse the data acquisition strategy information, by adding a specific translation program for the execution node, the data acquisition strategy information is translated into information that can be recognized by the data execution engine, so that query interaction with different big data platforms can be achieved, and data acquisition efficiency can be improved. At the same time, through the combination of the AND or relationship of the logical node, the relevant query conditions can be customized, thereby supporting the configuration capability of the strategy. In addition, the embodiment of the present application can realize the interaction between different data sources by adding a new node type, for example, a transfer node can be added to realize data transfer between different data warehouses, and then the logic is combined on a certain logical node, and the data is executed on the execution node, further improving the acquisition efficiency of business data.

[0103] As can be seen from the above, the embodiment of the present application obtains the data acquisition strategy information corresponding to the target business, the data acquisition strategy information is used to describe the logical relationship between factor expressions, the factor expression is used to describe the relevant data selection logic for the user's published content under the characteristic factor, and the characteristic factor is used to describe the attribute information related to the user's published content; based on the data acquisition strategy information, an execution tree corresponding to the target business is constructed, and the execution tree includes multiple nodes, the nodes include expression nodes corresponding to the factor expression, and logical nodes connected to at least two nodes, the logical nodes indicate the logical relationship between the nodes connected to it, and the execution tree is provided with execution order information between nodes; based on the execution order information and the execution tree, relevant data is selected, and the business data corresponding to the target business is obtained based on the selected data. In this way, by obtaining the data acquisition strategy information configured for the target business, the execution tree corresponding to the target business is constructed according to the data acquisition strategy information, and the nodes in the execution tree are executed according to the execution order information of the nodes in the execution tree, and the business data corresponding to the target business can be obtained, so as to achieve convenient and efficient acquisition of the business data of the target business and improve the efficiency of business data acquisition.

[0104] In order to better implement the above method, an embodiment of the present invention further provides a business data acquisition device, which can be integrated in an electronic device, and the electronic device can be a server / terminal.

[0105] For example, Figure 5 As shown, it is a schematic diagram of the structure of the business data acquisition device provided in an embodiment of the present application. The business data acquisition device may include an information acquisition unit 201, a construction unit 202 and a data acquisition unit 203, as follows:

[0106] The information acquisition unit 201 is used to acquire data acquisition strategy information corresponding to the target business. The data acquisition strategy information is used to describe the logical relationship between factor expressions. The factor expression is used to describe the logic of selecting relevant data for user-published content under the characteristic factor. The characteristic factor is used to describe the attribute information related to the user-published content.

[0107] A construction unit 202 is used to construct an execution tree corresponding to the target business based on the data acquisition strategy information, wherein the execution tree includes a plurality of nodes, the nodes include expression nodes corresponding to the factor expressions, and logic nodes connected to at least two nodes, the logic nodes indicate the logical relationship between the nodes connected thereto, and the execution tree is provided with execution order information between the nodes;

[0108] The data acquisition unit 203 is used to select relevant data based on the execution order information and the execution tree, and obtain business data corresponding to the target business based on the selected data.

[0109] In one embodiment, the construction unit 202 includes:

[0110] A factor parsing subunit, configured to perform factor parsing based on the factor expressions in the data acquisition strategy information and the logical relationship between the factor expressions, to obtain at least one condition factor under at least one strategy group and the logical relationship between the condition factors, wherein one condition factor corresponds to one factor expression;

[0111] The node creation subunit is used to create nodes corresponding to each policy group based on condition factors and logical relationships between condition factors, and determine execution order information of each node;

[0112] The execution tree construction subunit is used to construct an execution tree corresponding to the target business based on the nodes and execution order information.

[0113] In one embodiment, the factor analysis subunit is used to:

[0114] Performing data conversion on the data acquisition strategy information to obtain strategy group models of multiple strategy groups and strategy group logical relationships between the strategy groups;

[0115] Perform characteristic factor splitting on the strategy group model to obtain at least one condition factor corresponding to the strategy group and the intra-group logical relationship between the condition factors;

[0116] The logical relationship between conditional factors is determined based on the logical relationship of the strategy group and the logical relationship within the group.

[0117] In one embodiment, the node creates a subunit, including:

[0118] An information acquisition module is used to obtain factor attribute information of condition factors in a strategy group;

[0119] A priority determination module, used to determine the policy group priority of each policy group based on factor attribute information;

[0120] The node creation module is used to create nodes corresponding to each policy group according to the policy group priority and the logical relationship between the condition factors, and to determine the execution order information of each node.

[0121] In one embodiment, the factor attribute information includes data source information corresponding to the condition factor in the policy group, and the priority determination module is used to:

[0122] Obtain target data source information corresponding to the target business;

[0123] Based on the matching relationship between the target data source information and the data source information of the condition factors in each policy group, the policy group priority corresponding to each policy group is determined.

[0124] In one embodiment, the factor attribute information also includes the number of condition factors and the type of logical relationship of the condition factors in the policy group, and the priority determination module is used to:

[0125] Determine the first priority corresponding to each policy group based on the matching relationship between the target data source information and the data source information of the condition factor in each policy group;

[0126] Determining a second priority for each strategy group based on the number of conditional factors;

[0127] Determine the third priority of each strategy group based on the logical relationship type of the condition factor;

[0128] The policy group priority corresponding to each policy group is determined according to the first priority, the second priority, and the third priority.

[0129] In one embodiment, the node creation module is used to:

[0130] Filter out the target policy group from the policy groups according to the policy group priority;

[0131] Create a shared node based on the target policy group, create an expression node based on the condition factor, and create a logical node based on the logical relationship. The shared node is used to share the execution result of the target policy group in the policy group;

[0132] The node corresponding to the target business is determined according to the expression node, the logic node and the shared node, and the execution order information corresponding to the node is determined based on the policy group priority and the logical relationship between the condition factors.

[0133] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0134] As can be seen from the above, the embodiment of the present application obtains the data acquisition strategy information corresponding to the target business through the information acquisition unit 201, the data acquisition strategy information is used to describe the logical relationship between the factor expressions, the factor expression is used to describe the relevant data selection logic for the user's published content under the characteristic factor, and the characteristic factor is used to describe the attribute information related to the user's published content; the construction unit 202 constructs the execution tree corresponding to the target business based on the data acquisition strategy information, and the execution tree includes multiple nodes, the nodes include expression nodes corresponding to the factor expression, and logical nodes connected to at least two nodes, the logical nodes indicate the logical relationship between the nodes connected to it, and the execution tree is provided with the execution order information between the nodes; the data acquisition unit 203 selects the relevant data based on the execution order information and the execution tree, and obtains the business data corresponding to the target business based on the selected data. In this way, by obtaining the data acquisition strategy information configured for the target business, the execution tree corresponding to the target business is constructed according to the data acquisition strategy information, and the nodes in the execution tree are executed according to the execution order information of the nodes in the execution tree, and the business data corresponding to the target business can be obtained, so as to achieve convenient and efficient acquisition of the business data of the target business and improve the efficiency of business data acquisition.

[0135] The present application also provides an electronic device, such as Figure 6 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, and the electronic device may be a server / terminal. Specifically:

[0136] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0137] The processor 301 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.

[0138] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0139] The electronic device also includes a power supply 303 for supplying power to each component. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 303 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0140] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0141] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following computer program, and the processor 301 will run the application programs stored in the memory 302, thereby realizing various functions, as follows:

[0142] Acquire data acquisition strategy information corresponding to the target business, the data acquisition strategy information is used to describe the logical relationship between factor expressions, the factor expression is used to describe the relevant data selection logic for user-published content under the characteristic factor, and the characteristic factor is used to describe the attribute information related to the user-published content; build an execution tree corresponding to the target business based on the data acquisition strategy information, the execution tree includes multiple nodes, the nodes include expression nodes corresponding to the factor expression, and logic nodes connected to at least two nodes, the logic nodes indicate the logical relationship between the nodes connected to it, and the execution tree is provided with execution order information between the nodes; select relevant data based on the execution order information and the execution tree, and obtain the business data corresponding to the target business based on the selected data.

[0143] The specific implementation of each of the above operations can be found in the previous embodiments, which will not be described in detail here. It should be noted that the electronic device provided in the embodiment of the present application and the method for obtaining business data in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above method embodiment, which will not be described in detail here.

[0144] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0145] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any of the business data acquisition methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0146] Acquire data acquisition strategy information corresponding to the target business, the data acquisition strategy information is used to describe the logical relationship between factor expressions, the factor expression is used to describe the relevant data selection logic for user-published content under the characteristic factor, and the characteristic factor is used to describe the attribute information related to the user-published content; build an execution tree corresponding to the target business based on the data acquisition strategy information, the execution tree includes multiple nodes, the nodes include expression nodes corresponding to the factor expression, and logic nodes connected to at least two nodes, the logic nodes indicate the logical relationship between the nodes connected to it, and the execution tree is provided with execution order information between the nodes; select relevant data based on the execution order information and the execution tree, and obtain the business data corresponding to the target business based on the selected data.

[0147] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0148] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the business data acquisition methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the business data acquisition methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0149] Among them, according to one aspect of the present application, a computer program product is provided, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the methods provided in the various optional implementations provided in the above embodiments.

[0150] The above is a detailed introduction to a business data acquisition method, device and computer-readable storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for acquiring business data, characterized in that: include: Acquire data acquisition strategy information corresponding to the target business, wherein the data acquisition strategy information is used to describe the logical relationship between factor expressions, wherein the factor expressions are used to describe the logic of selecting relevant data for user-published content under characteristic factors, wherein the characteristic factors are used to describe attribute information related to user-published content; constructing an execution tree corresponding to the target business based on the data acquisition strategy information, wherein the execution tree includes a plurality of nodes, the nodes including an expression node corresponding to the factor expression and a logic node connected to at least two nodes, the logic node indicating a logical relationship between the nodes connected thereto, and the execution tree is provided with execution order information between the nodes; Relevant data is selected based on the execution sequence information and the execution tree, and business data corresponding to the target business is obtained based on the selected data.

2. The method for acquiring business data according to claim 1, characterized in that: The step of constructing the execution tree corresponding to the target business based on the data acquisition strategy information includes: Performing factor parsing based on the factor expressions in the data acquisition strategy information and the logical relationship between the factor expressions to obtain at least one condition factor under at least one strategy group and the logical relationship between the condition factors, wherein one condition factor corresponds to one factor expression; Based on the condition factors and the logical relationships between the condition factors, creating nodes corresponding to each of the policy groups, and determining execution order information of each of the nodes; An execution tree corresponding to the target business is constructed based on the nodes and the execution order information.

3. The method for acquiring business data according to claim 2, characterized in that: The factor parsing process is performed based on the factor expressions in the data acquisition strategy information and the logical relationship between the factor expressions to obtain at least one condition factor under at least one strategy group and the logical relationship between the condition factors, including: Performing data conversion on the data acquisition strategy information to obtain strategy group models of multiple strategy groups and strategy group logical relationships between the strategy groups; Decomposing the strategy group model into characteristic factors to obtain at least one condition factor corresponding to the strategy group and the intra-group logical relationship between the condition factors; The logical relationship between the condition factors is determined based on the policy group logical relationship and the intra-group logical relationship.

4. The method for acquiring business data according to claim 2, characterized in that: The creating nodes corresponding to each of the policy groups based on the condition factors and the logical relationships between the condition factors, and determining execution order information of each of the nodes, includes: Obtaining factor attribute information of condition factors in the strategy group; Determining the policy group priority of each of the policy groups based on the factor attribute information; According to the priority of the policy group and the logical relationship between the condition factors, nodes corresponding to each of the policy groups are created, and execution sequence information of each of the nodes is determined.

5. The method for acquiring business data according to claim 4, characterized in that: The factor attribute information includes data source information corresponding to the condition factor in the policy group, and determining the policy group priority of each policy group based on the factor attribute information includes: Obtaining target data source information corresponding to the target business; Based on the matching relationship between the target data source information and the data source information of the conditional factors in each of the policy groups, the policy group priority corresponding to each of the policy groups is determined.

6. The method for acquiring business data according to claim 5, characterized in that: The factor attribute information also includes the number of condition factors and the type of logical relationship of the condition factors in the policy group. The determining of the policy group priority corresponding to each policy group based on the matching relationship between the target data source information and the data source information of the condition factors in each policy group includes: Determine the first priority corresponding to each of the policy groups based on a matching relationship between the target data source information and the data source information of the conditional factors in each of the policy groups; determining a second priority of each of the policy groups based on the number of condition factors; Determining a third priority of each of the policy groups based on the logical relationship type of the conditional factors; The policy group priority corresponding to each of the policy groups is determined according to the first priority, the second priority, and the third priority.

7. The method for acquiring business data according to claim 4, characterized in that: The step of creating a node corresponding to the policy group according to the policy group priority and the logical relationship between the condition factors, and determining execution order information of the node, includes: Filtering out a target policy group from the policy groups according to the policy group priority; Creating a shared node based on the target policy group, creating an expression node based on the condition factor, and creating a logical node based on the logical relationship, wherein the shared node is used to share the execution result of the target policy group in the policy group; The node corresponding to the target business is determined according to the expression node, the logic node and the shared node, and the execution order information corresponding to the node is determined based on the policy group priority and the logical relationship between the condition factors.

8. A business data acquisition device, characterized in that: include: An information acquisition unit, used to acquire data acquisition strategy information corresponding to a target business, wherein the data acquisition strategy information is used to describe a logical relationship between factor expressions, wherein the factor expressions are used to describe a logic for selecting relevant data for user-published content under a characteristic factor, wherein the characteristic factor is used to describe attribute information related to user-published content; a construction unit, configured to construct an execution tree corresponding to the target business based on the data acquisition strategy information, wherein the execution tree includes a plurality of nodes, the nodes including an expression node corresponding to the factor expression and a logic node connected to at least two nodes, the logic node indicating a logical relationship between the nodes connected thereto, and the execution tree is provided with execution order information between the nodes; A data acquisition unit is used to select relevant data based on the execution order information and the execution tree, and obtain business data corresponding to the target business based on the selected data.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: It comprises a computer program. When the computer program is run on an electronic device, the computer program is used to make the electronic device execute the steps of any one of the methods of claims 1 to 7.