CN115082119B - Data feedback method, device, electronic equipment, storage medium and program product - Google Patents

Data feedback method, device, electronic equipment, storage medium and program product Download PDF

Info

Publication number
CN115082119B
CN115082119B CN202210743329.1A CN202210743329A CN115082119B CN 115082119 B CN115082119 B CN 115082119B CN 202210743329 A CN202210743329 A CN 202210743329A CN 115082119 B CN115082119 B CN 115082119B
Authority
CN
China
Prior art keywords
factor
redemption
feedback
variable
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210743329.1A
Other languages
Chinese (zh)
Other versions
CN115082119A (en
Inventor
孔祥鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Meiyun Zhishu Technology Co ltd
Original Assignee
Guangdong Meiyun Zhishu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Meiyun Zhishu Technology Co ltd filed Critical Guangdong Meiyun Zhishu Technology Co ltd
Priority to CN202210743329.1A priority Critical patent/CN115082119B/en
Publication of CN115082119A publication Critical patent/CN115082119A/en
Application granted granted Critical
Publication of CN115082119B publication Critical patent/CN115082119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0222During e-commerce, i.e. online transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0208Trade or exchange of goods or services in exchange for incentives or rewards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0234Rebates after completed purchase
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of data processing, and provides a data feedback method, a device, electronic equipment, a storage medium and a program product, wherein the method comprises the following steps: acquiring a feedback rule of current activity; determining a value variable in the feedback rule, and determining a redemption factor based on the value variable; determining a variable value of the valued variable at the current activity based on the redemption factor; determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule; and determining the feedback result of the current activity based on the judging result and the redemption result. The invention can flexibly configure the feedback policy, define different feedback policies in different feedback activities, improve the feedback operation efficiency and reduce the feedback operation cost.

Description

Data feedback method, device, electronic equipment, storage medium and program product
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data feedback method, apparatus, electronic device, storage medium, and program product.
Background
Along with the rapid development of social economy, the demand for the intellectualization of electronic commerce systems is increasing. Merchants often use rebate means to increase sales in order to increase sales of their products, or to clear inventory, or to update, etc., which are implemented in electronic commerce systems using data feedback techniques.
At present, the determination of feedback results is realized by configuring various feedback rules built in the system. However, various feedback rules are preset, and the value logic of the value variable in the feedback rules is limited, so that the service scene supported by the feedback rules is limited; in particular, when feedback policies vary, redemption conditions in feedback rules and redemption content results may be different, resulting in difficulty in meeting various types of feedback policies, which are often different in different feedback activities, resulting in failure to define different feedback policies in different feedback activities.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the invention provides a data feedback method, which can flexibly configure feedback policies, define different feedback policies in different feedback activities, improve the feedback operation efficiency and reduce the feedback operation cost.
The invention also provides a data feedback device, an electronic device, a storage medium and a program product.
According to an embodiment of the first aspect of the present invention, a data feedback method includes:
acquiring a feedback rule of current activity;
determining a value variable in the feedback rule, and determining a redemption factor based on the value variable;
determining a variable value of the valued variable at the current activity based on the redemption factor;
determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule;
and determining the feedback result of the current activity based on the judging result and the redemption result.
According to the data feedback method provided by the embodiment of the invention, the value variable in the feedback rule is abstracted into the redemption factor, and then the variable value of the value variable under the current activity is obtained through the redemption factor, so that different variable values of the same value variable under different activities are realized, namely, the value logic of the value variable can be different according to different feedback activities, and further, the judgment result of redemption conditions and the judgment result of redemption content are different according to different feedback activities, so that various feedback policies are satisfied, the feedback policies can be flexibly configured, different feedback policies are defined in different feedback activities, the feedback operation efficiency is improved, and the feedback operation cost is reduced.
According to one embodiment of the invention, said determining a redemption factor based on said value variable includes:
determining a first character string based on the valued variable, wherein the first character string is used for representing the name of the redemption factor;
acquiring a redemption factor from a name-factor mapping relationship based on the first string;
the name-factor mapping relation is used for acquiring a redemption factor of an object type corresponding to the name of the character string type.
According to one embodiment of the invention, the name-factor mapping relationship is determined based on the following steps:
determining a factor type corresponding to the valued variable, and determining a factor constructor corresponding to the factor type;
performing instance construction based on the factor constructor, the current active feedback policy definition and the current active feedback object to obtain a factor instance;
and mapping the factor name of the valued variable with the factor instance to obtain the name-factor mapping relation.
According to one embodiment of the present invention, the determining the factor constructor corresponding to the factor type includes:
determining a factor constructor from a set of constructors based on the factor type;
Wherein the constructor set comprises an order constructor and a structured query language SQL constructor;
the order constructor is used for carrying out instance construction based on the feedback policy definition and the feedback object to obtain a factor instance object associated with the order;
the SQL constructor is used for carrying out instance construction based on key value pairs determined by SQL sentences to obtain factor instance objects associated with the SQL sentences, and the SQL sentences comprise fields corresponding to feedback policy definitions and fields corresponding to feedback objects.
According to one embodiment of the invention, the SQL statement is determined based on the following steps:
acquiring a table selection instruction, and determining a target table based on the table selection instruction;
acquiring a field selection instruction, and determining a target field based on the field selection instruction;
acquiring an association table selection instruction, and determining an association table based on the association table selection instruction;
acquiring a query condition selection instruction, and determining a query condition based on the query condition selection instruction;
the SQL statement is determined based on the target table, the target field, the association table, and the query condition.
According to one embodiment of the invention, the redemption factor stores field values corresponding to fields of the redemption factor in a key-value-to-map manner.
According to one embodiment of the present invention, the determining the decision result of the redemption condition in the feedback rule based on the variable value of the valued variable under the current activity includes:
determining a first variable in the redemption condition;
determining a variable value of the first variable based on the variable value of the valued variable under the current activity;
and determining a judgment result of the redemption condition based on the variable value of the first variable.
According to one embodiment of the invention, the determining redemption results for redemption content in the feedback rules includes:
determining that the redemption content includes an expression, determining a second variable in the redemption content;
determining a variable value of the second variable based on the variable value of the valued variable under the current activity;
determining redemption results for the redemption content based on the variable values of the second variable;
determining that the redemption content does not include an expression, determining the redemption content as a redemption result.
According to an embodiment of the second aspect of the present invention, a data feedback device includes:
the rule acquisition module is used for acquiring a feedback rule of the current activity;
the factor determining module is used for determining a value variable in the feedback rule and determining a redemption factor based on the value variable;
The variable determining module is used for determining a variable value of the valued variable under the current activity based on the redemption factor;
the result determining module is used for determining the judging result of the redemption condition in the feedback rule based on the variable value of the valued variable under the current activity and determining the redemption result of the redemption content in the feedback rule;
and the feedback determination module is used for determining the feedback result of the current activity based on the judging result and the redemption result.
An electronic device according to an embodiment of the third aspect of the present invention comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a data feedback method as described in any of the above when executing the program.
A non-transitory computer readable storage medium according to an embodiment of the fourth aspect of the present invention has stored thereon a computer program which, when executed by a processor, implements a data feedback method as described in any of the above.
A computer program product according to an embodiment of the fifth aspect of the invention comprises a computer program which, when executed by a processor, implements a data feedback method as described in any of the above.
The above technical solutions in the embodiments of the present invention have at least one of the following technical effects:
the value variable in the feedback rule is abstracted into the redemption factor, and then the variable value of the value variable under the current activity is obtained through the redemption factor, so that different variable values of the same value variable under different activities are realized, namely the value logic of the value variable can be different according to different feedback activities, further the judgment result of the redemption condition and the judgment result of the redemption content are different according to different feedback activities, thereby meeting various feedback policies, further flexibly configuring the feedback policies, defining different feedback policies in different feedback activities, improving the feedback operation efficiency and reducing the feedback operation cost.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a data feedback method according to an embodiment of the present invention;
FIG. 2 is a second flowchart of a data feedback method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data feedback device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Along with the rapid development of social economy, the demand for intellectualization of electronic commerce systems is increasing, and based on this, flexible configuration of feedback policies is required to be realized. Merchants often adopt various sales promotion modes in order to increase sales of products, clear stock, update, and the like, and a rebate mode is one of the main sales promotion modes. The return means is often employed to increase sales and thus, support of feedback functions on electronic commerce systems is required.
At present, various feedback rules are configured in the system according to the investigated operation strategy, so that the feedback result is determined. However, various feedback rules are preset, and the value logic of the value variable in the feedback rules is limited, so that the service scene supported by the feedback rules is limited; specifically, when the feedback policy changes, redemption conditions in the feedback rules and the result of redemption content may be different, resulting in difficulty in meeting various feedback policies; if each feedback policy is customized and developed when it changes, the feedback policy will change frequently because the sales promotion purpose of the merchant in different operation stages is different, and based on this, if each feedback policy is customized and developed, this presents challenges to the system responsible for support. Thus, in one system, the feedback policy cannot be flexibly configured, i.e., different feedback policies cannot be defined in different feedback activities.
In view of the above problems, the present invention proposes the following embodiments. The following describes a data feedback method provided in the embodiments of the present application with reference to the accompanying drawings. The execution main body of the data feedback method can be a data feedback device, a server, an electronic commerce system or a terminal of a user, including but not limited to a mobile phone, a tablet computer, a PC (personal computer) terminal, a vehicle-mounted terminal, a household intelligent electrical appliance and the like.
The data feedback method provided by the embodiment of the invention can be applied to various feedback scenes, such as a return scene, an information feedback scene, a result query scene and the like. When the method is applied to a rebate scene, the feedback activity is rebate activity, the feedback rule is rebate rule, the redemption content is rewarded content, the redemption result is rewarded result, the feedback result is rebate result, the feedback policy is defined as rebate policy definition, and the feedback object is rebate object.
Fig. 1 is a schematic flow chart of a data feedback method according to an embodiment of the present invention, as shown in fig. 1, the data feedback method includes:
step 110, a feedback rule is obtained that is currently active.
Here, the current activity is a current feedback activity, which has a corresponding feedback policy definition. The feedback policy definition may be user-defined configured, in particular, by a user entering the feedback policy definition.
When the method is applied to a rebate scenario, the rebate policy definition may include, but is not limited to: commodity information, order information, time information, statistical dimension information, and the like.
The commodity information is used for characterizing selected commodities in the feedback policy, namely, characterizing which commodities need to be counted, and the commodity information can be generally characterized through commodity id. The order information is used to characterize the selected orders in the feedback policy, i.e. to characterize which orders need to be counted, which can typically be characterized by an order id. The time information is used to characterize the selected time range in the feedback policy, i.e. to characterize which time period needs to be counted, e.g. the validity period of the current activity is counted for the current time range and the year is counted for the time range. The statistical dimension information is used to characterize the statistical dimension selected in the feedback policy, i.e., to characterize the amount of sales or sales, etc. that need to be counted.
Here, feedback rules are used to define what redemption content is obtained under what conditions are met. The feedback rules include redemption conditions and redemption content. The redemption conditions are used to define a conditional formula that the value variable needs to satisfy, for example, the current sales amount is >5000, and the current sales amount is the value variable. The redemption content is used to define feedback content in the event that redemption conditions are met, which feedback content may be characterized by a formula, such as 0.05 of the current sales, or a constant, such as coupons, items, etc.
It should be noted that one current activity may correspond to one or more feedback rules.
Step 120, determining a value variable in the feedback rule, and determining a redemption factor based on the value variable.
Here, the value variable is a parameter whose value can be changed, that is, a parameter which can be changed under different policy definitions (under different activities). For example, the value variable is sales, current sales, annual sales, total orders, target sales, current orders, and the like.
For example, if the redemption condition in the feedback rule is that the total order amount is >100000 and the redemption content in the feedback rule is that the total order amount is 0.1, the value variable in the feedback rule is determined to be the total order amount. And if the redemption condition in the feedback rule is that the total amount of the order is greater than the target sales amount and the redemption content in the feedback rule is (total amount of the order-target sales amount) 0.1, determining that the value variables in the feedback rule are the total amount of the order and the target sales amount. And if the redemption condition in the feedback rule is sales volume > =10000 =sales volume <100000 and the redemption content in the feedback rule is sales volume 0.1, determining that the value variable in the feedback rule is sales volume. And if the redemption condition in the feedback rule is sales volume > =100000 and the redemption content in the feedback rule is sales volume 0.2, determining that the value variable in the feedback rule is sales volume.
It should be noted that a feedback rule may include 1 or more value variables. One value variable corresponds to one redemption factor.
Here, the redemption factor is a factor corresponding to the current activity, and the redemption factor is an instance object corresponding to the valued variable. Specifically, the value variable is abstracted into class (class), then the class is instantiated to obtain the redemption factor, the class corresponds to a plurality of instantiation objects, namely the class corresponds to a plurality of redemption factors, and the plurality of redemption factors belong to the class, namely the class corresponds to different redemption factors under different policy definitions (under different activities). For example, the value variable is sales, the class corresponding to the value variable is a factor class, but the factor class is abstract, and it is not known what sales are by the factor class, based on this, the factor class is instantiated to obtain a specific redemption factor, where the redemption factor is a sales object, and the sales object may represent a specific feature of the sales, for example, the sales object is a sales order of the commodity a in 2022, 4 months, 1 to 4 months, 20 days, or the sales object is a sales order of the commodity B in 2022, 5 months, 1 to 5 months, 20 days.
In a specific embodiment, a value variable in the feedback rule is determined, a declaration variable is declared for the value variable, then the declaration variable is assigned, and then the assigned declaration variable is determined as a redemption factor. For example, the value variable is a product a prime order, where the product a prime order is declared to limit the type thereof to be a Factor class, that is, a Factor product a prime order, and then the declaration variable is assigned, that is, a Factor product a prime order=context.
Step 130, determining the variable value of the valued variable under the current activity based on the redemption factor.
Here, the redemption factor is the instance object corresponding to the current activity, based on which the variable value corresponding to the valued variable at the current activity may be determined.
In one embodiment, a field corresponding to a value variable in the redemption factor is determined, and then a variable value is obtained from the field. For example, if the redemption factor is factor_01 and the field corresponding to the value variable is the sales volume of commodity A in the period, the value of the variable can be obtained by the factor_01.
It should be noted that a redemption factor determines the variable value of a valued variable at the current activity.
And 140, determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining a redemption result of redemption contents in the feedback rule.
Specifically, substituting the variable value into the redemption condition to obtain a judgment result, substituting the variable value into the redemption content to obtain a redemption result if the value variable exists in the redemption content, and directly determining the redemption content as the redemption result if the value variable does not exist in the redemption content.
For example, if the redemption condition in the feedback rule is that the total amount of the order is more than 100000 and the redemption content in the feedback rule is that the total amount of the order is 0.1, substituting the variable value of the total amount of the order under the current activity into the redemption condition to obtain the judgment result of the redemption condition, substituting the variable value of the total amount of the order under the current activity into the redemption content to obtain the redemption result of the redemption content. And substituting the variable value of the total amount of the order under the current activity and the variable value of the target sales under the current activity into the redemption condition to obtain a judgment result of the redemption condition, and substituting the variable value of the total amount of the order under the current activity and the variable value of the target sales under the current activity into the redemption content to obtain a redemption result of the redemption content. And substituting the variable value of the sales volume under the current activity into the redemption condition to obtain the judgment result of the redemption condition, substituting the variable value of the sales volume under the current activity into the redemption content to obtain the redemption result of the redemption content. If the redemption content in the feedback rule is 1 coupon, the coupon 1 is determined to be the redemption result.
It should be noted that one feedback rule includes 1 redemption condition, and one feedback rule includes 1 redemption content or a plurality of redemption contents.
In one embodiment, a combination of redemption conditions and redemption results may be configured in an activity to achieve the effect of ladder feedback.
In one embodiment, redemption conditions and redemption content may be characterized by expressions.
Among the operators that can be supported by the expression of redemption conditions include, but are not limited to: ++, -,/, < =, +.! =, > =, > +.! . The expression to the left is generally a certain attribute of the redemption factor, and the right is generally a number, or another attribute of the redemption factor, and the expression of the redemption condition is as follows: product a current period order, sales >50000, or product a year order, sales + product B year order, sales > product a year order, sales x 2.
And step 150, determining the feedback result of the current activity based on the judging result and the redemption result.
Here, the feedback result includes 1 or more redemption results, the number of which is determined according to the determination result.
Specifically, if the current activity corresponds to only 1 feedback rule, determining a feedback result based on a judgment result and a plurality of redemption results; if the current activity corresponds to a plurality of feedback rules, determining a feedback result based on a plurality of judging results and a plurality of redemption results.
More specifically, if the judgment result is that the condition is satisfied, determining a redemption result corresponding to the satisfaction condition, and then adding the redemption result to the feedback result. For example, if the redemption condition in the feedback rule is that the total amount of the order is >100000, the redemption content in the feedback rule is that the total amount of the order is 0.1, the variable value of the total amount of the order under the current activity is 200000, the judgment result of the redemption condition is that the condition is satisfied, the redemption content is 20000, and at this time 20000 is added to the feedback result.
In a specific embodiment, the feedback results are characterized in the form of a List, i.e., the redemption results are stored in the form of a List (List). In addition, the feedback result may be obtained through the context object. Further, the feedback results may be stored in a database.
The data feedback method provided by the embodiment of the invention acquires the feedback rule of the current activity; determining a value variable in the feedback rule, and determining a redemption factor based on the value variable; determining a variable value of the valued variable under the current activity based on the redemption factor; determining a judgment result of redemption conditions in the feedback rule based on a variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule; and determining a feedback result of the current activity based on the judging result and the redemption result. Through the mode, the value variable in the feedback rule is abstracted into the redemption factor, and then the variable value of the value variable under the current activity is obtained through the redemption factor, so that different variable values of the same value variable under different activities are realized, namely, the value logic of the value variable can be different according to different feedback activities, and further, the judgment result of redemption conditions and the judgment result of redemption content are different according to different feedback activities, so that various feedback policies are met, the feedback policies can be flexibly configured, different feedback policies are defined in different feedback activities, the feedback operation efficiency is improved, and the feedback operation cost is reduced.
Based on the above embodiment, in the method, in the step 120, determining the redemption factor based on the value variable includes:
determining a first character string based on the valued variable, wherein the first character string is used for representing the name of the redemption factor;
based on the first string, a redemption factor is obtained from the name-factor mapping.
The name-factor mapping relation is used for acquiring a redemption factor of an object type corresponding to the name of the character string type.
Here, the first character string is a character string type, and for example, the first character string may be a product a prime order, a commodity a prime order, a prime sales amount, an annual sales amount, a current sales amount, an annual sales amount, a sales total amount, an order total amount, a target sales amount, a sales order amount, a prime order, or the like.
Specifically, a first character string corresponding to a value variable is determined from the character string set. The character string set may be set according to actual requirements, and the character string set may include, but is not limited to: the product A prime order, the commodity A prime order, the prime sales volume, the annual sales volume, the current sales volume, the annual sales volume, the total order volume, the target sales volume, the prime order, and the like. It will be appreciated that all strings in the set of strings may determine the corresponding redemption factor in the name-factor mapping.
For example, if the value variable is the product A prime order, the first string may be determined to be the product A prime order. The value variable is the sales order quantity of the commodity A in the activity period, and the first character string can be determined as the current-period order of the commodity A.
Here, the name-factor mapping relationship includes redemption factors corresponding to the respective factor names, that is, redemption factors corresponding to the respective character strings.
In a specific embodiment, the name-factor mapping relationship may be characterized by Mqp (String, object), i.e., the factor name is characterized by a String (String), and the redemption factor is characterized by an Object (Object).
In one embodiment, the name-factor mapping may be obtained by a context object.
According to the data feedback method provided by the embodiment of the invention, the redemption factors are determined from the name-factor mapping relation, and the name-factor mapping relation is predetermined, so that compared with the case that instantiation is performed when the redemption factors are needed, the case construction step of the redemption factors can be performed before, the time and the resources required by the case are reduced, and the feedback efficiency is improved.
Based on any of the above embodiments, fig. 2 is a second flow chart of a data feedback method according to an embodiment of the present invention, as shown in fig. 2, in which the name-factor mapping relationship is determined based on the following steps:
Step 210, determining a factor type corresponding to the valued variable, and determining a factor constructor corresponding to the factor type.
Here, one factor type corresponds to one factor constructor. The type of the factor type and the type of the factor constructor can be set according to actual needs. It should be noted that one valued variable corresponds to one factor type, and different valued variables may correspond to the same factor type.
For example, the factor type is an order factor type, and the factor constructor is an order constructor. The order constructor is used for carrying out instance construction to obtain a factor instance object associated with the order based on the feedback policy definition and the feedback object. The factor type is SQL (Structured Query Language ) factor type, then the factor constructor is SQL constructor. The SQL constructor is used for carrying out instance construction based on key value pairs determined by an SQL sentence to obtain a factor instance object associated with the SQL sentence, and the SQL sentence comprises fields corresponding to the feedback policy definition and fields corresponding to the feedback object. Of course, other factor types may also be included, and will not be described in detail herein.
Step 220, performing instance construction based on the factor constructor, the currently active feedback policy definition and the currently active feedback object to obtain a factor instance.
Specifically, the currently active feedback policy definition and the currently active feedback object are taken as the input parameters of the factor constructor, and then the factor instance is obtained by instance construction based on the factor constructor. More specifically, a factor instance construction method of a factor constructor is called, a currently active feedback policy definition and a currently active feedback object are transmitted to the factor instance construction method, and an instance construction is carried out to obtain a factor instance.
In one embodiment, assume that a factor fetcher is a factor constructor, which is a factory class that is used to construct factor instances. The FactorFetcher class may include two methods, the first being List < Parameter > configParams (), the second being FactorFetch (Map parameters, context ctx).
Where different factor constructors may require different parameters in constructing factor instances, all parameters (including parameter names and parameter types) required by the factor constructors are defined in the first method. Parameter is used to characterize the Parameter metadata that is required by FactorFetcher in constructing factor instances, and contains fields for both name (Parameter name) and type (Parameter type) string types.
Wherein the second method is used to obtain factor instances. The method receives two parameters, params is a parameter supported by the factor constructor configured by a user at the front end, the parameter can be characterized by a mapping relation, and in particular can be characterized by a key-value mode, ctx is a current context object, and the context object ctx comprises a current active feedback policy definition and a current active feedback object.
Here, the currently active feedback policy definitions may include, but are not limited to: commodity information, order information, time information, statistical dimension information, and the like.
The commodity information is used to characterize selected commodities in the feedback policy, i.e. to characterize which commodities need to be counted, and can be generally characterized by commodity ids, for example, can be characterized by a character string array.
Wherein the order information is used to characterize the selected orders in the feedback policy, i.e. to characterize which orders need to be counted, which may typically be characterized by an order id, e.g. it may be characterized by an array of strings.
The time information is used to characterize a selected time range in the feedback policy, i.e. to characterize which time period needs to be counted, for example, the time range is the current period and the validity period of the current activity is counted, and the time range is the year and the year is counted, for example, the time range can be characterized by a character string.
The statistical dimension information is used to characterize the statistical dimension selected in the feedback policy, that is, to characterize the required statistical sales or sales, etc., and may be, for example, characterized by a string array.
Here, the currently active feedback object may include, but is not limited to, dealer information, organization information of the current user, etc. for which feedback is currently to be calculated.
In one embodiment, a FactorFetcherRegistries class is built that serves as a registry for factor constructors, registering and retrieving each type of factor constructor. The FactorFetcherRegistrict class may include a register (type, clazz) method for registering each type of factor constructor, a getFetcher (type) method for retrieving each type of factor constructor, a type for characterizing a factor type, and a getFetcher (type) method, clazz for characterizing a factor constructor.
And 230, mapping the factor name of the valued variable with the factor instance to obtain the name-factor mapping relation.
Here, the factor name is a character string type, and for example, the factor name may be a product a prime order, a commodity a prime order, a prime sales amount, a annual sales amount, a current sales amount, an annual sales amount, a sales total amount, an order total amount, a target sales amount, a sales order amount, a prime order, or the like.
Specifically, a factor name corresponding to the valued variable is determined from the name set. The name set may be set according to actual requirements, and the name set may include, but is not limited to: the product A prime order, the commodity A prime order, the prime sales volume, the annual sales volume, the current sales volume, the annual sales volume, the total order volume, the target sales volume, the prime order, and the like.
For example, if the value variable is the product A prime order, the factor name may be determined to be the product A prime order. The value variable is the sales order quantity of the commodity A in the activity period, and the factor name can be determined as the commodity A current period order.
Here, the name-factor mapping relationship includes factor instances (redemption factors) corresponding to the respective factor names, that is, factor instances corresponding to the respective character strings.
In a specific embodiment, the name-factor mapping relationship may be characterized by Mqp (String, object), i.e., the factor name is characterized by a String (String), and the factor instance (redemption factor) is characterized by an Object (Object). In an embodiment, the factor name and the factor instance may be plugged into the context object to obtain the name-factor mapping relationship through the context object, for example, the factor name and the factor instance are plugged into the context object with put (key, value), that is, the factor name is used as the key, the factor instance is used as the value, and the factor instance corresponding to the factor name is obtained with get (key).
According to the data feedback method provided by the embodiment of the invention, different factor types have different factor constructors in the mode, so that factor instances are constructed based on different factor constructors, more personalized requirements can be met, and the flexibility of feedback policy configuration is further improved.
Based on any one of the foregoing embodiments, in the method, in step 210, the determining a factor constructor corresponding to the factor type includes:
determining a factor constructor from a set of constructors based on the factor type;
wherein the constructor set comprises an order constructor and a structured query language SQL constructor;
the order constructor is used for carrying out instance construction based on the feedback policy definition and the feedback object to obtain a factor instance object associated with the order;
the SQL constructor is used for carrying out instance construction based on key value pairs determined by SQL sentences to obtain factor instance objects associated with the SQL sentences, and the SQL sentences comprise fields corresponding to feedback policy definitions and fields corresponding to feedback objects.
Here, the order constructor is responsible for calculating statistics related to the order, such as sales, etc.
In one embodiment, assume that a factor fetcher is a factor constructor, which is a factory class that is used to construct factor instances. The FactorFetcher class may include two methods, the first being List < Parameter > configParams (), the second being FactorFetch (Map parameters, context ctx). Where different factor constructors may require different parameters in constructing factor instances, all parameters (including parameter names and parameter types) required by the factor constructors are defined in the first method. Parameter is used to characterize the Parameter metadata that is required by FactorFetcher in constructing factor instances, and contains fields for both name (Parameter name) and type (Parameter type) string types. Wherein the second method is used to obtain factor instances. The method receives two parameters, params is a parameter supported by the factor constructor configured by a user at the front end, the parameter can be characterized by a mapping relation, and in particular can be characterized by a key-value mode, ctx is a current context object, and the context object ctx comprises a current active feedback policy definition and a current active feedback object.
Based on the FactorFetcher class, the order constructor may be an OrderFetcher class that inherits the FactorFetcher class.
The Factor fetch () method of the OrderFetcher class may include, but is not limited to, the following parameters: string [ ] products ids, string range, string [ ] dimensions, and the like.
Wherein String [ ] products are used to characterize the selected commodity in the feedback policy, i.e., to characterize which commodities need to be counted, which can typically be characterized by commodity id. String [ ] products are also used to characterize selected orders in the feedback policy, i.e., to characterize which orders need to be counted, which can typically be characterized by an order id. String range is used to characterize the time range selected in the feedback policy, i.e. to characterize which time period needs to be counted, e.g. the time range is the current period and the validity period of the current activity is counted, and the time range is the year and the year is counted, which is optionally the activity or year. String [ ] dimensions are used to characterize the statistical dimensions selected in the feedback policy, i.e., the characterization requires statistics of sales or sales, etc., e.g., dimensions = [ "count" ], the key is valued, "sales" is null, only dimensions = [ "count", "count" ], the key is valued, and the key is also valued.
Based on the FactorFetcher class, the SQL constructor may be an SqlSourceFetcher class that inherits the FactorFetcher class.
The Factor fetch () method of the SQL sourcefilter class can determine an input parameter through a key-value pair (key-value) determined by an SQL statement, and then perform instance construction to obtain a Factor instance object.
The SQL sentence comprises a field corresponding to the feedback policy definition and a field corresponding to the feedback object, and further a plurality of key value pairs are determined and obtained, wherein the plurality of key value pairs comprise field values corresponding to the fields.
In one embodiment, a placeholder is supported in the SQL statement, e.g., the placeholder is # { ctx }, which represents the current context object through which other fields, such as activity and customer, can be reached. Wherein any field in the feedback policy definition, such as activity start time, end time, participating merchandise, etc., may be accessed through activity. The customer is used to characterize feedback of which customer is currently being calculated, through which any field of the customer can be accessed, such as customer id, customer level, etc.
Here, the SQL statement may be input by a user definition, or an SQL statement selected by a user.
In an embodiment, the constructor set may further include more custom constructors, so that secondary development can be performed to expand new factor constructors, and the custom factor constructors are implemented, so as to meet more individual requirements.
According to the data feedback method provided by the embodiment of the invention, the factor constructor comprises an order constructor and an SQL constructor so as to respectively realize different instantiation requirements; meanwhile, SQL sentences can be flexibly defined, so that the value-taking logic of the value-taking variable can be flexibly defined, different variable values of the same value-taking variable under different activities are realized, namely, the value-taking logic of the value-taking variable can be different along with different feedback activities, and further, the judging result of redemption conditions and the judging result of redemption contents are different along with different feedback activities, so that various feedback policies are met, the feedback policies can be flexibly configured, different feedback policies are defined in different feedback activities, the feedback operation efficiency is improved, and the feedback operation cost is reduced.
Based on any of the above embodiments, in the method, the SQL statement is determined based on the following steps:
Acquiring a table selection instruction, and determining a target table based on the table selection instruction;
acquiring a field selection instruction, and determining a target field based on the field selection instruction;
acquiring an association table selection instruction, and determining an association table based on the association table selection instruction;
acquiring a query condition selection instruction, and determining a query condition based on the query condition selection instruction;
the SQL statement is determined based on the target table, the target field, the association table, and the query condition.
Here, considering that the general user is not familiar with the syntax of the SQL and the structure of the data table of the database, a more friendly function can be designed at the front end for the user to operate, namely, the SQL statement is determined through the table selection instruction, the field selection instruction, the association table selection instruction and the query condition selection instruction.
Here, the table selection instruction may be triggered by the user to cause the user to select the target table. The target table is a target data table, i.e. a data table which needs to be queried is determined.
Here, the field selection instruction may be triggered by the user to cause the user to select the target field. The target field is used to determine the fields that need to be queried, and may include 1 or more.
Here, the association table selection instruction may be triggered by the user to cause the user to select the association table. The association table is an associated data table, i.e. an association table which determines that a query is still required, and may include 0, 1 or more.
Here, the query condition selection instruction may be triggered by the user to cause the user to select the query condition.
According to the data feedback method provided by the embodiment of the invention, through the mode, a user can perform self-definition on an interface to obtain the SQL sentence, meanwhile, the user does not need to be familiar with SQL grammar, more friendly operation can be provided through selecting the instruction, the use cost of the user is further reduced, and the use experience of the user is improved.
Based on any of the above embodiments, the redemption factor stores field values corresponding to fields of the redemption factor in a key-value-to-map manner.
Here, the key value pair mapping may be Map mapping. In a specific embodiment, the key-value pair mapping may be in the form of key-value pairs of Map < String, object >, i.e. the field of the redemption factor is a String type and the field value is an Object type.
It should be noted that, based on the fact that the redemption factor is an Object type, the redemption factor may have its own field, so that the class corresponding to the redemption factor may implement a Map interface, specifically, may implement a Map < String, object > interface, so that the corresponding field value may be queried through the specified field, that is, the field value corresponding to the field may be obtained through a get ("field") method.
According to the data feedback method provided by the embodiment of the invention, the redemption factors store the field values corresponding to the fields of the redemption factors in a key value pair mapping mode, so that the field values corresponding to the fields can be quickly obtained, the variable values of the value variable can be quickly obtained, and finally the feedback efficiency is further improved.
Based on any of the foregoing embodiments, in the method, in the step 140, determining a determination result of the redemption condition in the feedback rule based on the variable value of the valued variable under the current activity includes:
determining a first variable in the redemption condition;
determining a variable value of the first variable based on the variable value of the valued variable under the current activity;
and determining a judgment result of the redemption condition based on the variable value of the first variable.
Here, the first variable is a parameter whose value can be changed, that is, a parameter which can be changed under different policy definitions (under different activities). For example, the first variable is sales, current sales, annual sales, total orders, target sales, current orders, and the like.
For example, if the redemption condition in the feedback rule is that the order total is >100000, then the first variable is determined to be the order total. And if the redemption condition in the feedback rule is that the total amount of the order is greater than the target sales amount, determining that the first variable is the total amount of the order and the target sales amount.
It should be noted that a redemption condition may include 1 or more first variables. A first variable corresponds to a redemption factor, based on which the valued variable must include the variable value to which the first variable corresponds in the variable value at the current activity.
Specifically, the variable value of the first variable is substituted into the first variable in the redemption condition to obtain the judgment result.
The data feedback method provided by the embodiment of the invention provides support for determining the judgment result of the redemption condition by the mode, so that the judgment result of the redemption condition is different along with different feedback activities, thereby meeting various feedback policies, flexibly configuring the feedback policies, defining different feedback policies in different feedback activities, improving the feedback operation efficiency and reducing the feedback operation cost.
Based on any of the foregoing embodiments, in the method, in step 140, determining a redemption result of redemption content in the feedback rule includes:
Determining that the redemption content includes an expression, determining a second variable in the redemption content;
determining a variable value of the second variable based on the variable value of the valued variable under the current activity;
determining redemption results for the redemption content based on the variable values of the second variable;
determining that the redemption content does not include an expression, determining the redemption content as a redemption result.
Here, redemption content may be categorized into various types, such as monetary return points, customer points, coupons, goods, and the like. Note that not all redemption content of a redemption type includes an expression, e.g., redemption content of a coupon type does not require an expression.
Specifically, for redemption content requiring an expression, determining a second variable in the expression, and further determining a variable value of the second variable; for redemption content that does not require an expression, the redemption content may be determined directly as redemption results without determining a variable value.
For example, the expression may be product A annual order, sales 10, or product A current order, sales 0.01+product B current order, sales 0.02.
Here, the second variable is a parameter whose value can be changed, that is, a parameter which can be changed under different policy definitions (under different activities). For example, the second variable is sales, current sales, annual sales, total orders, target sales, current orders, and the like.
It should be noted that one redemption content may include 1 or more second variables. A second variable corresponds to a redemption factor, based on which the valued variable must include the variable value corresponding to the second variable in the variable values currently active.
Specifically, substituting the variable value of the second variable into the second variable in the redemption content results in a redemption result.
In one embodiment, redemption content of certain redemption types requires additional information, such as the redemption of the item, requiring additional designation of the item's id, name; redemption of the coupon type requires specifying the coupon id.
According to the data feedback method provided by the embodiment of the invention, the support is provided for determining the redemption result of the redemption content, so that the redemption result of the redemption content is different along with different feedback activities, various feedback policies are met, the feedback policies can be flexibly configured, different feedback policies are defined in different feedback activities, the feedback operation efficiency is improved, and the feedback operation cost is reduced.
In the practical application scene, when a customer has personalized feedback policy requirements, the feedback policy requirements can be configured in the system by the customer, and the feedback activities can be rapidly performed on line on the premise of not passing through a system provider, so that the feedback operation efficiency is improved, and the feedback operation cost is reduced.
The data feedback device provided by the invention is described below, and the data feedback device described below and the data feedback method described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a data feedback device according to an embodiment of the present invention, as shown in fig. 3, where the data feedback device includes:
a rule acquisition module 310, configured to acquire a feedback rule that is currently active;
a factor determination module 320, configured to determine a value variable in the feedback rule, and determine a redemption factor based on the value variable;
a variable determination module 330 for determining a variable value of the valued variable at the current activity based on the redemption factor;
a result determining module 340, configured to determine a determination result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determine a redemption result of redemption content in the feedback rule;
And a feedback determination module 350, configured to determine a feedback result of the current activity based on the determination result and the redemption result.
The data feedback device provided by the embodiment of the invention acquires the feedback rule of the current activity; determining a value variable in the feedback rule, and determining a redemption factor based on the value variable; determining a variable value of the valued variable under the current activity based on the redemption factor; determining a judgment result of redemption conditions in the feedback rule based on a variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule; and determining a feedback result of the current activity based on the judging result and the redemption result. Through the mode, the value variable in the feedback rule is abstracted into the redemption factor, and then the variable value of the value variable under the current activity is obtained through the redemption factor, so that different variable values of the same value variable under different activities are realized, namely, the value logic of the value variable can be different according to different feedback activities, and further, the judgment result of redemption conditions and the judgment result of redemption content are different according to different feedback activities, so that various feedback policies are met, the feedback policies can be flexibly configured, different feedback policies are defined in different feedback activities, the feedback operation efficiency is improved, and the feedback operation cost is reduced.
Based on any of the above embodiments, the factor determination module 320 is configured to:
determining a first character string based on the valued variable, wherein the first character string is used for representing the name of the redemption factor;
acquiring a redemption factor from a name-factor mapping relationship based on the first string;
the name-factor mapping relation is used for acquiring a redemption factor of an object type corresponding to the name of the character string type.
Based on any of the above embodiments, the apparatus further comprises:
the type determining module is used for determining a factor type corresponding to the valued variable and determining a factor constructor corresponding to the factor type;
the example construction module is used for constructing examples based on the factor constructor, the current active feedback policy definition and the current active feedback object to obtain factor examples;
and the mapping processing module is used for carrying out mapping processing on the factor name of the valued variable and the factor instance to obtain the name-factor mapping relation.
Based on any of the above embodiments, the type determination module is further configured to:
determining a factor constructor from a set of constructors based on the factor type;
wherein the constructor set comprises an order constructor and a structured query language SQL constructor;
The order constructor is used for carrying out instance construction based on the feedback policy definition and the feedback object to obtain a factor instance object associated with the order;
the SQL constructor is used for carrying out instance construction based on key value pairs determined by SQL sentences to obtain factor instance objects associated with the SQL sentences, and the SQL sentences comprise fields corresponding to feedback policy definitions and fields corresponding to feedback objects.
Based on any of the above embodiments, the apparatus further comprises:
the instruction acquisition module is used for acquiring a table selection instruction and determining a target table based on the table selection instruction;
the instruction acquisition module is also used for acquiring a field selection instruction and determining a target field based on the field selection instruction;
the instruction acquisition module is also used for acquiring an association table selection instruction and determining an association table based on the association table selection instruction;
the instruction acquisition module is also used for acquiring a query condition selection instruction and determining a query condition based on the query condition selection instruction;
and the statement determining module is used for determining the SQL statement based on the target table, the target field, the association table and the query condition.
Based on any of the above embodiments, the redemption factor stores field values corresponding to fields of the redemption factor in a key-value-to-map manner.
Based on any of the above embodiments, the result determination module 340 is further configured to:
determining a first variable in the redemption condition;
determining a variable value of the first variable based on the variable value of the valued variable under the current activity;
and determining a judgment result of the redemption condition based on the variable value of the first variable.
Based on any of the above embodiments, the result determination module 340 is further configured to:
determining that the redemption content includes an expression, determining a second variable in the redemption content;
determining a variable value of the second variable based on the variable value of the valued variable under the current activity;
determining redemption results for the redemption content based on the variable values of the second variable;
determining that the redemption content does not include an expression, determining the redemption content as a redemption result.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. The processor 410 may invoke logic instructions in the memory 430 to perform a data feedback method comprising: acquiring a feedback rule of current activity; determining a value variable in the feedback rule, and determining a redemption factor based on the value variable; determining a variable value of the valued variable at the current activity based on the redemption factor; determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule; and determining the feedback result of the current activity based on the judging result and the redemption result.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing a data feedback method provided by the methods as described above, the method comprising: acquiring a feedback rule of current activity; determining a value variable in the feedback rule, and determining a redemption factor based on the value variable; determining a variable value of the valued variable at the current activity based on the redemption factor; determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule; and determining the feedback result of the current activity based on the judging result and the redemption result.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a data feedback method provided by the above methods, the method comprising: acquiring a feedback rule of current activity; determining a value variable in the feedback rule, and determining a redemption factor based on the value variable; determining a variable value of the valued variable at the current activity based on the redemption factor; determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule; and determining the feedback result of the current activity based on the judging result and the redemption result.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
The above embodiments are only for illustrating the present invention, and are not limiting of the present invention. While the invention has been described in detail with reference to the embodiments, those skilled in the art will appreciate that various combinations, modifications, or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and it is intended to be covered by the scope of the claims of the present invention.

Claims (8)

1. A method of data feedback, comprising:
obtaining a feedback rule of the current activity, the feedback rule comprising at least one value variable, the feedback rule being determined based on at least one redemption condition and at least one redemption content;
determining a value variable in the feedback rule, and determining a redemption factor based on the value variable, wherein any value variable corresponds to one redemption factor;
determining a variable value of the value variable under the current activity based on a value field corresponding to the value variable in the redemption factor;
determining a judgment result of redemption conditions in the feedback rule based on the variable value of the valued variable under the current activity, and determining redemption results of redemption contents in the feedback rule;
Determining a feedback result of the current activity based on the determination result and the redemption result;
the determining a redemption factor based on the value variable includes:
determining a first character string based on the valued variable, wherein the first character string is used for representing the name of the redemption factor;
acquiring a redemption factor from a name-factor mapping relationship based on the first string;
the name-factor mapping relation is used for acquiring a redemption factor of an object type corresponding to the name of the character string type, and the name-factor mapping relation is a mapping relation between the character string and the redemption factor;
the name-factor mapping relationship is determined based on the following steps:
determining a factor type corresponding to the valued variable, and determining a factor constructor corresponding to the factor type;
performing instance construction based on the factor constructor, the current active feedback policy definition and the current active feedback object to obtain a factor instance;
mapping the factor name of the valued variable with the factor instance to obtain the name-factor mapping relation;
the factor constructor for determining the factor type comprises the following steps:
determining a factor constructor from a set of constructors based on the factor type;
Wherein the constructor set comprises an order constructor and a structured query language SQL constructor;
the order constructor is used for carrying out instance construction based on the feedback policy definition and the feedback object to obtain a factor instance object associated with the order;
the SQL constructor is used for carrying out instance construction based on key value pairs determined by SQL sentences to obtain factor instance objects associated with the SQL sentences, and the SQL sentences comprise fields corresponding to feedback policy definitions and fields corresponding to feedback objects.
2. The data feedback method of claim 1, wherein the SQL statement is determined based on the steps of:
acquiring a table selection instruction, and determining a target table based on the table selection instruction;
acquiring a field selection instruction, and determining a target field based on the field selection instruction;
acquiring an association table selection instruction, and determining an association table based on the association table selection instruction;
acquiring a query condition selection instruction, and determining a query condition based on the query condition selection instruction;
the SQL statement is determined based on the target table, the target field, the association table, and the query condition.
3. A data feedback method according to any of claims 1 to 2, wherein the redemption factor stores field values corresponding to fields of the redemption factor in a key-value-to-map manner.
4. The data feedback method according to claim 1, wherein the determining a decision of redemption conditions in the feedback rule based on the variable value of the valued variable at the current activity comprises:
determining a first variable in the redemption condition;
determining a variable value of the first variable based on the variable value of the valued variable under the current activity;
and determining a judgment result of the redemption condition based on the variable value of the first variable.
5. The data feedback method of claim 1, wherein the determining redemption results for redemption content in the feedback rules comprises:
determining that the redemption content includes an expression, determining a second variable in the redemption content;
determining a variable value of the second variable based on the variable value of the valued variable under the current activity;
determining redemption results for the redemption content based on the variable values of the second variable;
determining that the redemption content does not include an expression, determining the redemption content as a redemption result.
6. A data feedback device, comprising:
a rule acquisition module for acquiring a feedback rule currently active, the feedback rule including at least one value variable, the feedback rule being determined based on at least one redemption condition and at least one redemption content;
The factor determining module is used for determining a value variable in the feedback rule and determining a redemption factor based on the value variable, wherein any value variable corresponds to one redemption factor;
the variable determining module is used for determining the variable value of the value variable under the current activity based on the value field corresponding to the value variable in the redemption factor;
the result determining module is used for determining the judging result of the redemption condition in the feedback rule based on the variable value of the valued variable under the current activity and determining the redemption result of the redemption content in the feedback rule;
the feedback determining module is used for determining the feedback result of the current activity based on the judging result and the redemption result;
the factor determination module is further to:
determining a first character string based on the valued variable, wherein the first character string is used for representing the name of the redemption factor;
acquiring a redemption factor from a name-factor mapping relationship based on the first string;
the name-factor mapping relation is used for acquiring a redemption factor of an object type corresponding to the name of the character string type, and the name-factor mapping relation is a mapping relation between the character string and the redemption factor;
The apparatus further comprises:
the type determining module is used for determining a factor type corresponding to the valued variable and determining a factor constructor corresponding to the factor type;
the example construction module is used for constructing examples based on the factor constructor, the current active feedback policy definition and the current active feedback object to obtain factor examples;
the mapping processing module is used for carrying out mapping processing on the factor name of the valued variable and the factor instance to obtain the name-factor mapping relation;
the type determination module is further configured to:
determining a factor constructor from a set of constructors based on the factor type;
wherein the constructor set comprises an order constructor and a structured query language SQL constructor;
the order constructor is used for carrying out instance construction based on the feedback policy definition and the feedback object to obtain a factor instance object associated with the order;
the SQL constructor is used for carrying out instance construction based on key value pairs determined by SQL sentences to obtain factor instance objects associated with the SQL sentences, and the SQL sentences comprise fields corresponding to feedback policy definitions and fields corresponding to feedback objects.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data feedback method of any of claims 1 to 5 when the program is executed by the processor.
8. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the data feedback method according to any of claims 1 to 5.
CN202210743329.1A 2022-06-27 2022-06-27 Data feedback method, device, electronic equipment, storage medium and program product Active CN115082119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210743329.1A CN115082119B (en) 2022-06-27 2022-06-27 Data feedback method, device, electronic equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210743329.1A CN115082119B (en) 2022-06-27 2022-06-27 Data feedback method, device, electronic equipment, storage medium and program product

Publications (2)

Publication Number Publication Date
CN115082119A CN115082119A (en) 2022-09-20
CN115082119B true CN115082119B (en) 2023-05-30

Family

ID=83254898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210743329.1A Active CN115082119B (en) 2022-06-27 2022-06-27 Data feedback method, device, electronic equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN115082119B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090150217A1 (en) * 2007-11-02 2009-06-11 Luff Robert A Methods and apparatus to perform consumer surveys
US10373066B2 (en) * 2012-12-21 2019-08-06 Model N. Inc. Simplified product configuration using table-based rules, rule conflict resolution through voting, and efficient model compilation
CA3037391A1 (en) * 2015-12-04 2017-06-08 10353744 Canada Ltd. Method and device for disseminating product information
US20200134090A1 (en) * 2018-10-26 2020-04-30 Ca, Inc. Content exposure and styling control for visualization rendering and narration using data domain rules
CN112085536B (en) * 2020-09-16 2022-01-25 广州威尔森信息科技有限公司 Rebate policy management method and device
CN113947443A (en) * 2021-11-03 2022-01-18 北京小药药人工智能科技有限公司 Rebate generation method and rebate device
CN114155032A (en) * 2021-12-06 2022-03-08 多点(深圳)数字科技有限公司 Calculation scheme for retailer to collect commodity sale rebate fee from supplier

Also Published As

Publication number Publication date
CN115082119A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN107704265B (en) Configurable rule generation method for service flow
US9875505B2 (en) Hierarchical transaction filtering
US8768976B2 (en) Operational-related data computation engine
US20190272261A1 (en) Performing logical validation on loaded data in a database
CN103678365B (en) The dynamic acquisition method of data, apparatus and system
US20230148285A1 (en) Generating context tree data based on a tailored data model
CN110852559A (en) Resource allocation method and device, storage medium and electronic device
CN112434015A (en) Data storage method and device, electronic equipment and medium
CN111930366A (en) Rule engine implementation method and system based on JIT real-time compilation
CN108960672A (en) The air control method, apparatus and computer readable storage medium of limit limit time
CN105045576A (en) Management method and apparatus for calculation formulae in business document
CN115082119B (en) Data feedback method, device, electronic equipment, storage medium and program product
CN112559524A (en) Index database establishing method and device and storage medium
US20190197168A1 (en) Contextual engine for data visualization
US7991727B2 (en) Mechanism to abstract fact types from a rule engine
US9213979B2 (en) Array attribute configurator
CN106506661A (en) Method, server and system for dynamically returning data
CN106874327B (en) Counting method and device for business data
US9230022B1 (en) Customizable result sets for application program interfaces
US10713016B1 (en) Method of implementing rules on visual language using visual blocks
CN114693358A (en) Data processing method and device, electronic equipment and storage medium
US9916373B2 (en) Dynamic data partitioning extension
CN108537654B (en) Rendering method and device of customer relationship network graph, terminal equipment and medium
US20150347573A1 (en) Information Processing Device and Method Therefor, and Non-Transitory Computer Readable Medium
CN112613762A (en) Knowledge graph-based group rating method and device and electronic equipment

Legal Events

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