CN109271160B - Activity rule establishing method, activity rule establishing device, computer system and medium - Google Patents

Activity rule establishing method, activity rule establishing device, computer system and medium Download PDF

Info

Publication number
CN109271160B
CN109271160B CN201811148790.2A CN201811148790A CN109271160B CN 109271160 B CN109271160 B CN 109271160B CN 201811148790 A CN201811148790 A CN 201811148790A CN 109271160 B CN109271160 B CN 109271160B
Authority
CN
China
Prior art keywords
rule
tree
rule tree
activity
component
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
CN201811148790.2A
Other languages
Chinese (zh)
Other versions
CN109271160A (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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN201811148790.2A priority Critical patent/CN109271160B/en
Publication of CN109271160A publication Critical patent/CN109271160A/en
Application granted granted Critical
Publication of CN109271160B publication Critical patent/CN109271160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Abstract

The present disclosure provides an activity rule establishing method, including: determining a required rule according to the activity scheme; acquiring a rule component identifier of the required rule; constructing a front-end rule tree at least based on the rule component identification and the logic relation of the rule required by the activity scheme to obtain the front-end rule tree and a front-end rule tree identification, wherein at least part of nodes of the front-end rule tree comprise the rule component identification; and sending the front-end rule tree and the corresponding front-end rule tree identification to a server for storage. The present disclosure also provides an activity rule construction apparatus, a computer system, and a computer-readable storage medium.

Description

Activity rule establishing method, activity rule establishing device, computer system and medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an activity rule establishing method, apparatus, computer system, and medium.
Background
The online marketing campaign is the most common marketing promotion mode, so that the marketing promotion of merchants can be completed while the users participate in the interaction of the campaign, and the conflict emotion of the users on the marketing promotion can be reduced.
The marketing campaign goes through several stages from start to finish: determining a marketing target- > planning a marketing scheme- > making an activity rule- > realizing the activity rule- > promoting a marketing activity- > analyzing marketing data; in the stage of implementing the campaign rules, different campaigns for different marketing purposes often need to be customized according to marketing objectives, and then developers customize the development system to implement different campaign rules to support the marketing campaign.
That is to say, the core of the implementation of the marketing campaign in the prior art is the campaign rules, and when the research and development staff develop the marketing campaign, the method for supporting the implementation of the marketing campaign by using different campaign rules is as follows: each marketing campaign is individually customized to develop a set of interface services.
In the course of implementing the disclosed concept, the inventors found that there are at least the following problems in the prior art: because the marketing campaigns are different in rules, in order to ensure that the marketing campaigns do not affect each other, a set of interface services needs to be customized and developed for each marketing campaign individually, which results in an average development period of about 2 weeks for one marketing campaign. However, a single marketing campaign is generally a short-term promotion, and each marketing campaign has a relatively high research and development cost, a relatively high time cost, and a relatively high server cost in terms of investment. In addition, in the stage of large promotion activities, the marketing activities are very many, and a plurality of cases of marketing activities popularization at the same time exist, under the condition, customized development activity rules have higher dependence on developers; and under the condition that research personnel are limited, a plurality of marketing activities cannot be supported in parallel to be carried out simultaneously, and the development efficiency is obviously insufficient.
Disclosure of Invention
In view of the above, the present disclosure provides an activity rule building method, apparatus, computer system, and medium for solving the problem of excessive research and development labor cost and time cost in the research and development of marketing activities.
One aspect of the present disclosure provides an activity rule establishing method, applied to a first client, the method including: firstly, determining a required rule according to an activity scheme, then obtaining a rule component identifier of the required rule, then constructing a front-end rule tree at least based on a logical relation between the rule component identifier and the required rule of the activity scheme to obtain the front-end rule tree and a front-end rule tree identifier, wherein at least part of nodes of the front-end rule tree comprise the rule component identifier, and then sending the front-end rule tree and the corresponding front-end rule tree identifier to a server for storage. Therefore, developers do not need to individually customize and develop a set of interface services for each marketing campaign, only need to construct a front-end rule tree at a first client side as a development end at least based on the rule component identification and the logical relationship of the required rules of the campaign scheme to obtain the front-end rule tree and the front-end rule tree identification, and then send the front-end rule tree and the corresponding front-end rule tree identification to a server side to complete development tasks, if the front-end rule tree is converted into a rule tree capable of running by a server, the development time of the developers is greatly shortened.
According to an embodiment of the present disclosure, the building of the front-end rule tree based on at least the logical relationship of the rule component identification and the rule required by the activity scheme may include the operations of: firstly, adding an icon corresponding to a rule component identifier of a required rule on the canvas function of a GoJs front-end framework, then constructing a visual front-end rule tree at least based on the icon and the logical relationship of the required rule of the activity scheme, wherein the visual front-end rule tree has a unique visual front-end rule tree identifier, and then sending the front-end rule tree and the corresponding front-end rule tree identifier to a server for storage comprises sending the visual front-end rule tree and the corresponding visual front-end rule tree identifier to the server for storage in a JSON form. Therefore, visual front-end development can be realized, the development efficiency is further improved, and the method is more intuitive.
According to an embodiment of the present disclosure, the method may further include the operations of: firstly, after the front-end rule tree and the corresponding front-end rule tree identification are sent to a server side for storage, at least one activity is created, each activity has a unique activity identification, and then at least one activity identification associated with the front-end rule tree identification is sent to the server side for binding, so that the corresponding relation between the front-end rule tree identification and the activity identification is obtained. Therefore, one rule tree can correspond to a plurality of activities, namely when the rule tree used in the activities is similar to other activities, repeated development is not needed, only one activity needs to be created, and the activity identification of the activity is bound with the corresponding rule tree identification.
Another aspect of the present disclosure provides an activity rule establishing method, applied to a server, the method including: firstly, receiving a front-end rule tree, wherein at least part of nodes of the front-end rule tree comprise rule component identifications, traversing the front-end rule tree according to the sequence of the ordered tree to obtain rule component identifications, then querying a rule base by using the rule component identifications to obtain rule components, then converting the rule components into rule nodes, then, stringing the rule nodes into the rule tree according to the relationship among the nodes of the front-end rule tree, and then, storing the rule tree and the corresponding front-end rule tree identifications. Therefore, the server side can automatically construct the rule tree which can be operated by the server side according to the rule component identification in each node of the received front-end rule tree, developers are replaced to carry out related part of work, and the labor cost and the development time of development are greatly reduced.
According to an embodiment of the present disclosure, the rule base may be obtained by: firstly, obtaining rules, then componentizing the rules based on component standards to obtain rule components, and then storing the rule components in a rule base, wherein each rule component has a unique rule component identifier. This allows the formation of rule components such as rules based on historical usage and to build libraries for easy querying or use.
According to an embodiment of the present disclosure, the component standard may include: ginseng input, correct ginseng output, wrong ginseng output and abnormal ginseng output.
According to an embodiment of the present disclosure, the method may further include the operations of: after the rule tree is obtained, serializing the rule tree into a JSON string, and accordingly, storing the rule tree and the corresponding front-end rule tree identifier may include associating and storing the JSON string and the corresponding front-end rule tree identifier, which is convenient for storage.
According to the embodiment of the present disclosure, when the correspondence between the front-end rule tree identifier and the activity identifier is received, the storing of the rule tree and the corresponding front-end rule tree identifier may include storing the rule tree and the corresponding activity identifier, so that the rule tree may be determined according to the input activity identifier when in use.
According to an embodiment of the present disclosure, the method may further include the operations of: firstly, receiving a request instruction, wherein the request instruction is an instruction which is sent by a second client and comprises user identification information and front-end rule tree identification information, then, responding to the received request instruction, determining a rule tree according to the front-end rule tree identification information, traversing the rule tree in the order of the ordered tree based on the user identification information to obtain an output result of the rule tree corresponding to the user identification information, and then, sending the output result to the second client. Therefore, the output result of the rule tree corresponding to the user identification information can be obtained in a mode of traversing the rule tree and fed back to the user.
According to an embodiment of the present disclosure, the rule tree is stored in a serialized JSON string form, and accordingly, the determining the rule tree according to the front-end rule tree identification information may include the following operations: firstly, determining a serialized JSON string according to the front-end rule tree identification information, and then performing deserialization processing on the serialized JSON string to obtain a rule tree.
According to an embodiment of the present disclosure, the request instruction is an instruction including user identification information and activity identification information sent by a second client, and accordingly, determining a rule tree according to the front-end rule tree identification information includes determining a rule tree according to the activity identification information. Therefore, the user can determine the applicable rule tree by the server only by inputting the user identification information on the activity interface, and the corresponding output result of the user is determined based on the rule tree.
According to an embodiment of the present disclosure, traversing the rule tree in the order of the ordered tree based on the user identification information to obtain an output result of the rule tree corresponding to the user identification information may include the following operations: firstly, a root node is extracted from a rule tree, if the root node is a rule component, a result corresponding to the user identification information is output by the root node, a child node corresponding to the result is extracted, if the child node is a rule component, the result corresponding to the user identification information is output by the child node, the operations are repeated until the deep traversal of the rule tree is finished, the output result of the last child node is obtained, and then the output result of the last child node is sent to the second client. And obtaining the output result corresponding to the user through the traversal process.
Another aspect of the present disclosure provides an activity rule establishing apparatus, which includes a rule obtaining module, a first rule component identifier obtaining module, a establishing module, and a first sending module. The rule obtaining module is used for determining a required rule according to an activity scheme, the first rule component identifier obtaining module is used for obtaining a rule component identifier of the required rule, the constructing module is used for constructing a front-end rule tree at least based on a logical relation between the rule component identifier and the required rule of the activity scheme to obtain the front-end rule tree and a front-end rule tree identifier, at least part of nodes of the front-end rule tree comprise rule component identifiers, and the first sending module is used for sending the front-end rule tree and the corresponding front-end rule tree identifier to a server for storage.
According to an embodiment of the present disclosure, the building module may include: drawing unit and construction unit. The drawing unit is used for adding an icon corresponding to the rule component identification of the required rule on the canvas function of a GoJs front-end framework, the building unit is used for building a visual front-end rule tree at least based on the icon and the logical relation of the required rule of the activity scheme, the visual front-end rule tree is provided with a unique visual front-end rule tree identification, and the first sending module is specifically used for sending the visual front-end rule tree and the corresponding visual front-end rule tree identification to a server in a JSON form for storage.
According to an embodiment of the present disclosure, the apparatus may further include: the device comprises a creating module and a second sending module. The creating module is configured to create at least one activity after the front-end rule tree and the corresponding front-end rule tree identifier are sent to a server for storage, each activity having a unique activity identifier, and the second sending module is configured to send at least one activity identifier associated with the front-end rule tree identifier to the server for binding, so as to obtain a correspondence between the front-end rule tree identifier and the activity identifier.
Another aspect of the present disclosure provides an activity rule creating apparatus, which includes a first receiving module, a second rule component identifier obtaining module, a rule component obtaining module, a rule node converting module, a rule tree obtaining module, and a first storage module. The system comprises a first receiving module, a second receiving module, a rule component identification obtaining module, a rule component obtaining module and a first storage module, wherein the first receiving module is used for receiving a front-end rule tree, at least part of nodes of the front-end rule tree comprise rule component identifications, the second rule component identification obtaining module is used for traversing the front-end rule tree according to the sequence of the ordered tree to obtain rule component identifications, the rule component obtaining module is used for inquiring a rule base by using the rule component identifications to obtain rule components, the rule node converting module is used for converting the rule components into rule nodes, the rule tree obtaining module is used for stringing the rule nodes into the rule tree according to the relation between the nodes of the front-end rule tree, and the first storage module is used for storing the rule tree and the corresponding front-end rule tree identifications.
According to an embodiment of the present disclosure, the rule base may be obtained by: the system comprises a rule acquisition unit, a componentization unit and a storage unit. The rule obtaining unit is used for obtaining a rule, the componentizing unit is used for componentizing the rule based on a component standard to obtain rule components, and the storage unit is used for storing the rule components in a rule base, wherein each rule component has a unique rule component identification.
According to an embodiment of the present disclosure, the component standard may include: ginseng input, correct ginseng output, wrong ginseng output and abnormal ginseng output.
According to an embodiment of the present disclosure, the apparatus may further include: and a serialization module. The serialization module is used for serializing the rule tree into a JSON string after the rule tree is obtained, and correspondingly, the first storage module is specifically used for establishing association and storage of the JSON string and the corresponding front-end rule tree identifier.
According to an embodiment of the present disclosure, when receiving a correspondence between a front-end rule tree identifier and an activity identifier, the first storage module may be specifically configured to store the rule tree and the corresponding activity identifier.
According to an embodiment of the present disclosure, the apparatus may further include: the device comprises a second receiving module, a rule tree determining module, an output module and a third sending module. The second receiving module is configured to receive a request instruction, where the request instruction is an instruction that includes user identification information and front-end rule tree identification information and is sent by a second client, the rule tree determining module is configured to determine a rule tree according to the front-end rule tree identification information in response to receiving the request instruction, the output module is configured to traverse the rule tree in an order of an ordered tree based on the user identification information to obtain an output result of the rule tree corresponding to the user identification information, and the third sending module is configured to send the output result to the second client.
According to an embodiment of the present disclosure, the rule tree is stored in the form of a serialized JSON string, and accordingly, the rule tree determining module may include: the device comprises an deserializing unit and a rule tree acquisition unit. The deserializing unit is used for determining a serialized JSON string according to the front-end rule tree identification information, and the rule tree obtaining unit is used for deserializing the serialized JSON string to obtain a rule tree.
According to an embodiment of the present disclosure, the request instruction is an instruction that includes user identification information and activity identification information and is sent by a second client, and accordingly, the rule tree determining module is specifically configured to determine a rule tree according to the activity identification information.
According to an embodiment of the present disclosure, the output module may include: the device comprises a root node acquisition unit, a traversal unit and a sending unit. The root node obtaining unit is configured to extract a root node from a rule tree, the traversal unit is configured to, if the root node is a rule component, output a result corresponding to the user identification information by the root node, extract a child node corresponding to the result, if the child node is a rule component, output a result corresponding to the user identification information by the child node, repeat the above operations until the rule tree is deeply traversed to end, and obtain an output result of a last child node, and the sending unit is configured to send the output result of the last child node to the second client.
Another aspect of the present disclosure provides a computer system comprising: one or more processors and storage for storing executable instructions that, when executed by the processors, implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the problems of high development labor cost and time cost caused by different marketing activity rules and the need of individually customizing and developing a set of interface service for each marketing activity in order to ensure that the marketing activities do not respond to each other can be at least partially solved, and therefore, a developer can construct a front-end rule tree only on the development end based on the rule component identification and the logical relationship among the rules in the activities and send the front-end rule tree to the server to complete the development work, and the server can automatically analyze the front-end rule tree into an executable rule tree subsequently, so that the technical effects of greatly shortening the development time and reducing the labor cost are greatly reduced.
According to the embodiment of the disclosure, the intuitiveness is increased through visual development, and the development cost is further reduced.
According to the embodiment of the disclosure, one rule tree can correspond to a plurality of activities, and when the plurality of activities can adopt the same rule tree, development is not required to be repeated, only one activity needs to be created, and the development can be completed by binding the activity identifier and the corresponding rule tree identifier.
According to the embodiment of the disclosure, the rule tree is convenient to store after being serialized.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario of an activity rule construction method, apparatus, computer system, and medium according to an embodiment of the disclosure;
FIG. 2A schematically illustrates a flow diagram for an activity rule building method according to an embodiment of the present disclosure;
FIG. 2B schematically illustrates a structural diagram of a front-end rule tree according to an embodiment of the present disclosure;
FIG. 2C schematically illustrates a structural diagram of a front-end rule tree according to another embodiment of the present disclosure;
FIG. 2D schematically illustrates a structural schematic of a rule component according to an embodiment of the present disclosure;
FIG. 3A schematically illustrates an activity rule building method according to another embodiment of the present disclosure;
FIG. 3B schematically illustrates a rule tree transformation process according to an embodiment of the disclosure;
FIG. 3C schematically illustrates an activity rule building method according to another embodiment of the present disclosure;
FIG. 3D schematically illustrates a rule tree usage method flow diagram according to an embodiment of the present disclosure;
FIG. 4A schematically illustrates a block diagram of an activity rule building apparatus according to an embodiment of the present disclosure;
FIG. 4B schematically illustrates a block diagram of an activity rule building apparatus according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a computer system suitable for implementing an activity rule set-up method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides an activity rule building method, an activity rule building device, a computer system and a medium. The method comprises an activity rule establishing process and an activity rule analyzing process, wherein in the activity rule establishing process, the following operations are required to be carried out at a development end, firstly, a required rule is determined according to an activity scheme, then, a rule component identification of the required rule is obtained, then, a front-end rule tree is established at least based on the rule component identification and the logical relation of the required rule of the activity scheme, a front-end rule tree identification and a front-end rule tree identification are obtained, at least part of nodes of the front-end rule tree comprise rule component identifications, and the front-end rule tree and the corresponding front-end rule tree identification are sent to a server end for storage. In the process of analyzing the active rule, firstly, a front-end rule tree is received, at least part of nodes of the front-end rule tree comprise rule component identifications, then the front-end rule tree is traversed according to the sequence of the ordered tree to obtain rule component identifications, then a rule base is inquired by using the rule component identifications to obtain rule components, then the rule components are converted into rule nodes, then the rule nodes are concatenated into the rule tree according to the relationship among the nodes of the front-end rule tree, and the rule tree and the corresponding front-end rule tree identifications are stored, so that the rule tree can be automatically generated at a server side for use.
Fig. 1 schematically illustrates an application scenario of an activity rule building method, apparatus, computer system, and medium according to an embodiment of the present disclosure. The exemplary system architecture 100 in fig. 1. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Developers and users may use the terminal devices 101, 102, 103 to interact with the server 105 over the network 104 to receive or send messages and the like. Various development applications and web applications, such as GoJs, may be installed on the terminal devices 101, 102, 103, and various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (for example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server parsing a front-end rule tree constructed by the user using the terminal devices 101, 102, 103 to generate a rule tree, or a background management server providing support for a website browsed by the user using the terminal devices 101, 102, 103 or a requested service (for example only). The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the activity rule establishing method provided by the embodiment of the present disclosure may be generally executed by the server 105 or by the terminal devices 101, 102, and 103. Accordingly, the activity rule establishing device provided by the embodiment of the present disclosure may be generally disposed in the server 105, or may be disposed in the terminal devices 101, 102, 103. The activity rule set-up method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the activity rule establishing device provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 2A schematically illustrates a flow diagram for an activity rule building method according to an embodiment of the disclosure. The flowchart is suitable for a development end used by a developer, and specifically may be the terminal devices 101, 102, 103, etc. as shown above.
As shown in fig. 2A, the method may include operations S201 to 204.
First, in operation S201, a required rule is determined according to an activity scheme.
In this embodiment, the operation is used to determine the rules to be used in the marketing campaign, e.g., rule a, rule B, and rule C.
In one embodiment, the following rules are required for marketing campaign A: rule A (whether it is a regular member), rule B (whether it is a platinum member), and rule C (whether it is a black member).
In another embodiment, the following rules are required for marketing campaign A: rule D (whether it is a real-name user) and rule E (whether it is a real-name non-financially active user). These rules may be used to determine what operation to perform next.
Then, in operation S202, a rule component identification of the required rule is obtained.
In this embodiment, the rule component identifier of the required rule may be obtained by interacting with the server, for example, by querying a rule base in the server to determine the rule component and the rule component identifier corresponding to the required rule, where the rule base may be a rule component corresponding to each used rule that is constructed in advance for storage, and the rule component may be a rule abstracted according to a component standard and then componentized for use by all activities. Each rule component has a unique rule component identification. For example, the rule component identifies 1 a rule component abstracted from rule A (whether it is a common membership).
Next, in operation S203, a front-end rule tree is constructed at least based on the rule component identifier and the logical relationship of the rule required by the activity scheme, so as to obtain a front-end rule tree and a front-end rule tree identifier, where at least a part of nodes of the front-end rule tree include the rule component identifier.
In this embodiment, the rule component identifiers (e.g., rule component identifier a, rule component identifier B, and rule component identifier C) corresponding to the rule components (e.g., rule component a, rule component identifier B, and rule component identifier C) to be used in the marketing campaign may be concatenated in a tree structure according to the planned marketing scheme to form a front-end rule tree, a final-stage node of the tree, a campaign prize pool or a custom document may be set according to the campaign requirements, and after the system is saved, the campaign rule definition of the marketing campaign may be stored in the form of a tree structure.
Optionally, the building of the front-end rule tree based on at least the rule component identification and the logical relationship of the rules required by the activity scheme may include the operations of: firstly, adding an icon corresponding to the rule component identifier of the required rule on the canvas function of the GoJs front end framework, and then constructing a visual front end rule tree at least based on the icon and the logical relationship of the required rule of the activity scheme, wherein the visual front end rule tree has a unique visual front end rule tree identifier. GoJs is a JS library that implements interaction class diagrams (e.g., flowcharts, tree diagrams, relational diagrams, force diagrams, etc.).
Fig. 2B schematically illustrates a structural diagram of a front-end rule tree according to an embodiment of the present disclosure. As shown in FIG. 2B, marketing campaign A includes three rule components: rule component of whether it is a general member, rule component of whether it is a platinum member, and rule component of whether it is a black member. The logic relation of the rule needed by the marketing activity A is that whether the user is a common member is judged firstly, if so, the user enters a common member prize pool, and if the data is abnormal, prompt information (if not winning a prize) is output; if not, judging whether the user is a platinum member, if so, entering a platinum member prize pool, and if the data is abnormal, outputting a non-prize; if not, judging whether the user is a blackcurrant member, if so, entering a blackcurrant member prize pool, if abnormal, outputting a loser, and if not, outputting the loser. After entering the common member prize pool, the platinum member prize pool or the black member prize pool, the corresponding interface of the lottery can be called to obtain whether the user wins the prize, the prize and the like, and then the result is fed back to the user.
Fig. 2C schematically shows a structural diagram of a front-end rule tree according to another embodiment of the present disclosure. As shown in FIG. 2C, marketing campaign B includes two rule components: a rules component of whether a real-named user and a rules component of whether a real-named non-financially active user. The logical relationship of the rule required by marketing campaign B is shown in fig. 2C, and reference may be made to the related description in fig. 2B, which is not described herein again.
Fig. 2D schematically illustrates a structural schematic of a rule component according to an embodiment of the disclosure.
As shown in FIG. 2D, the rule component abstracts the rule according to the component standard and then componentizes the rule, so that the rule can be used by all activities. The component implementation can adopt IF-ELSE logic, component standard: incoming calls (e.g., user information), outgoing calls (which may include TRUE outgoing calls/FALSE outgoing calls ERROR), and component checking logic may be a custom interface service or a third party interface service.
Optionally, a visualization front-end rule tree is constructed based at least on the logical relationship of the icon and the rule required by the activity scheme, the visualization front-end rule tree having a unique visualization front-end rule tree identifier. Correspondingly, the step of sending the front-end rule tree and the corresponding front-end rule tree identification to a server for storage comprises the step of sending the visual front-end rule tree and the corresponding visual front-end rule tree identification to the server for storage in a JSON form. The JSON is called JavaScript Object notification, is a lightweight data exchange format, is easy to read and write by people, and is easy to analyze and generate by a machine.
In one embodiment, first, a front-end rule tree is built and organized on a canvas, and the rule component identification of the rule component required for the marketing campaign is obtained from a rule base (where the rule component is by default already formed as a usable component at the system runtime stage). For example, by using a JS framework at the front end of GoJs, icons corresponding to each rule component identifier are organized in an ordered tree structure, as shown in fig. 2C and fig. 2D, at this time, the front-end rule tree structure in the canvas is the front-end structure standard of GoJs, is only used for displaying the canvas, and cannot be directly identified by the activity parsing module, and is referred to as a front-end rule tree fronttree.
Then, in operation S204, the front-end rule tree and the corresponding front-end rule tree identifier are sent to the server for storage.
Specifically, the front-end rule tree built by the page is stored in a database of the server in a JSON form, the front-end rule tree FrontRouleTreeID generated by the server is obtained, and the front-end rule tree and the corresponding front-end rule tree FrontRotreeID are bound and stored. This makes it possible to find the corresponding front rule tree fronttretretreetree and the corresponding data in the server when the front rule tree fronttreetreed is entered.
In other embodiments, the method may further include operation S205.
In operation S205, after the front-end rule tree and the corresponding front-end rule tree identifier are sent to the server for storage, at least one activity is created, where each activity has a unique activity identifier.
Correspondingly, at least one activity identifier associated with the front-end rule tree identifier is sent to the server side for binding, and the corresponding relation between the front-end rule tree identifier and the activity identifier is obtained.
Specifically, an activity is created, an activity unique identifier ActKey is generated, then the ActKey and the created frontend rule tree identifier FrontRauleTreeID are bound, and an association ActRauleAp is established.
This allows one front rule tree to correspond to multiple activities. For example, when the front rule trees adopted by the multiple activities are the same, only one activity can be created, and the development task can be completed by binding the activity identifiers of the multiple activities with the front rule tree identifier of the corresponding front rule tree, so that the development cost is greatly reduced.
FIG. 3A schematically illustrates an activity rule building method according to another embodiment of the disclosure.
As shown in fig. 3A, the method is applicable to a server, and specifically may be the server 105, the server cluster, and the like shown in fig. 1. The embodiment is mainly used for converting the front rule tree fronttreuletree into a rule tree RuleTree which can be resolved at the service end. The method may include operations S301 to 306.
In operation S301, a front-end rule tree is received, at least some nodes of the front-end rule tree including rule component identifications. For example, the front-end rule tree sent by the first client is received through a network.
In operation S302, the front-end rule tree is traversed according to the order of the ordered tree to obtain a rule component identifier.
In this embodiment, a frontend rule tree frontend treeid can be used to query a corresponding frontend rule tree frontend tree from a database, traverse the frontend tree according to the order of the ordered tree, and extract the rule component identifier in the frontend tree. This allows the server to obtain the rule component ID corresponding to the rule required for the current marketing campaign.
In operation S303, a rule base is queried using the rule component identifier to obtain a rule component.
Specifically, the rule component information RuleComInfo may be obtained by querying the rule base through the rule component identifier.
Wherein the rule base is obtained by: first, the acquisition rule may be a rule used in history, a rule prepared by a developer, or the like.
The rules are then componentized based on component standards to obtain rule components. Wherein the component criteria may include: reference may be made to fig. 2D for specific reference, including entry, correct entry, incorrect entry, and abnormal entry.
The rule components are then stored in a rule base, each rule component having a unique rule component identification.
In operation S304, the rule component is converted into a rule node.
Specifically, the rule component information RuleComInfo may be converted into a rule tree node RuleNode.
In operation S305, the rule nodes are concatenated into a rule tree according to the relationship between the nodes of the front-end rule tree.
Specifically, while generating the rule tree node RuleNode, the RuleNode may be strung into a structure tree RuleTree according to the ordered tree structure of fronttree tree. Thus, a rule tree which can be run by the server can be obtained.
After the active rules are stored in the tree structure at the development end, the active rules are only statically defined in a pile, and the rules in the tree structure must be validated according to the standard execution of the rule definition through analysis.
FIG. 3B schematically shows a rule tree transformation process according to an embodiment of the disclosure. As shown in fig. 3B, the conversion process can convert the front-end rule tree that cannot be run by the server into the front-end rule tree that can be run by the server.
In operation S306, the rule tree and the corresponding front-end rule tree identifier are stored.
According to the activity rule building method provided by the disclosure, the front-end rule tree sent by the first client can be automatically analyzed into the rule tree which can be operated by the server, so that the task amount of developers in the development process is greatly reduced, the development cost is saved, and the development time can be shortened.
In another embodiment, the method may further include operation S307.
In operation S307, after the rule tree is obtained, the rule tree is serialized into a JSON string.
Specifically, the converted RuleTree is serialized into a Json string: RuleTreeJSON and storing the RuleTreeJSON into an association ActRauleMap. This facilitates storing the rule tree.
Correspondingly, the storing the rule tree and the corresponding front-end rule tree identifier includes associating and storing the JSON string and the corresponding front-end rule tree identifier.
In addition, when the correspondence between the front-end rule tree identifier and the activity identifier is received, the storing the rule tree and the corresponding front-end rule tree identifier includes storing the rule tree and the corresponding activity identifier. By establishing the association relationship between the rule tree and the corresponding activity identifier, the server can obtain the activity identifier of the marketing activity when using the rule tree, for example, when a user inputs user information in a page of a certain marketing activity at the user side, and can obtain the corresponding rule tree through the activity identifier, so as to obtain an output result of the user relative to the rule tree.
FIG. 3C schematically illustrates an activity rule building method according to another embodiment of the disclosure. The embodiment is mainly used for explaining how to obtain the output result corresponding to the user by using the rule tree.
As shown in fig. 3C, the method may further include operations S308 to S311.
In operation S308, a request instruction is received, where the request instruction is an instruction sent by the second client and includes user identification information and front-end rule tree identification information.
In this embodiment, the second client may be a terminal used by a user participating in a marketing campaign, and specifically may be a terminal device 101, 102, or 103, etc. as shown in fig. 1. For example, when a user clicks a page on which a certain activity is opened, the server may obtain user identification information of the current user and front-end rule tree identification information corresponding to the page of the activity.
Optionally, the request instruction is an instruction that includes user identification information and activity identification information and is sent by a second client, and accordingly, determining a rule tree according to the front-end rule tree identification information includes determining a rule tree according to the activity identification information. Since the user or the server does not easily know the front rule tree identifier corresponding to the current active page, in the previous embodiment, the active identifier and the corresponding rule tree can be bound, and the active identifier is easily obtained through the active page, so that the active identifier can be conveniently obtained through the active page, and then the corresponding rule tree can be obtained.
In operation S309, in response to receiving the request instruction, a rule tree is determined according to the front-end rule tree identification information.
Specifically, the rule tree corresponding to the front-end rule tree identification information may be obtained by querying a database.
In operation S310, the rule tree is traversed in an order of the ordered tree based on the user identification information, and an output result of the rule tree corresponding to the user identification information is obtained.
Specifically, traversing the rule tree in the order of the ordered tree based on the user identification information to obtain an output result of the rule tree corresponding to the user identification information may include the following operations: firstly, extracting a root node from a rule tree, then, if the root node is a rule component, outputting a result corresponding to the user identification information by the root node, extracting a child node corresponding to the result, if the child node is the rule component, outputting the result corresponding to the user identification information by the child node, repeating the operation until the depth traversal of the rule tree is finished, obtaining an output result of the last child node, and sending the output result of the last child node to the second client.
In operation S311, the output result is transmitted to the second client.
In another embodiment, the rule tree is stored in a serialized JSON string form, and accordingly, the determining the rule tree according to the front-end rule tree identification information may include the following operations: firstly, determining a serialized JSON string according to the front-end rule tree identification information, and then performing deserialization processing on the serialized JSON string to obtain a rule tree.
The activity rule building method provided by the disclosure can obtain the output result corresponding to the current user by utilizing the rule tree automatically analyzed by the server.
FIG. 3D schematically illustrates a rule tree usage method flow diagram according to an embodiment of the disclosure.
Referring to fig. 3D, a data interaction between the second client and the server is described as a specific embodiment.
In operation 1, a user participates in an activity on an activity page in a login state, and a carousel lottery is used as an example in the following description, a system obtains a user identifier UserId unique to the current user and an activity identifier ActKey unique to the current activity, and then the page takes two parameters of the UserId and the ActKey to initiate an Http lottery request to a server.
And 2, after the server receives the lottery drawing request, extracting a parameter ActKey from the Http lottery drawing request, and inquiring a rule tree JSON structure (RuleTreeJSON) corresponding to the activity from a database ActRauleAp through the ActKey, wherein if the operation has a requirement on performance, the rule tree can be synchronized into a cache in advance, and the query cache is used for replacing the query database.
And operation 3, performing deserialization on the RuleTreeJSON, wherein the deserialization is a ruled tree RuleTree object.
And operation 4, after the server acquires the rule tree RuleTree, extracting the user identification parameter UserId unique to the user from the Http lottery request Http parameter, and starting to judge whether the user meets the rule in the rule tree, for example, extracting the root node RuleNode from the RuleTree, and transmitting the UserId and the RuleNode together to the next traversal flow.
And operation 5, analyzing the rule tree node RuleNode, and taking out the node type NodeType from the rule tree node RuleNode object.
Operation 6, judging whether the current RuleNode is a rule component or not according to the NodeType, and if the NodeType of the RuleNode is the rule component, performing operation 7; if not, operation 10 is performed.
Operation 7, if the node type of the current RuleNode is a rule component, performing rule checking according to the implementation manner of the RuleNode, where the implementation manner of the rule checking may be as follows: one is to customize the interface or call a third-party interface (e.g. a new user identity interface), and one is to set a threshold class (e.g. the number of activity participation times), and of course, there may be other rule checking modes according to the requirement, which is not limited herein.
Operation 8, after the rule check is executed, according to the component output standard, a result is returned: and the TRUE, FALSE or ERROR results are obtained, and then the next rule tree sub-node SubRoleNode of the result corresponding to the current rule tree node RoleNode is taken out from the rule tree according to the three result types.
Operation 9 repeats operations 5 through 8, and continues to parse SubRoleNode.
Operation 10, if the nodeType is not the rule component type, continuously judging whether the current RuleNode is the prize pool type, if the current RuleNode is the prize pool type, carrying out prize pool lottery, terminating traversal, and returning lottery results; if not, operation 11 continues.
Operation 11, if the RoleNode is not a rule component nor a prize pool, determine whether the RoleNode is the last type: and if the type of the customized file is the type of the customized file, the traversal is terminated at the moment, and the customized file is returned, and if the type of the customized file is not the type of the customized file, the abnormal result is indicated, the traversal is terminated at the moment, and the customized file is returned.
And operation 12, encapsulating the rule analysis and verification result into a standard return type, outputting the standard return type to a page browsed by the user, and performing corresponding user interaction on the page according to different results.
After the activity is popularized, the user participates in the activity once, and then the rule tree corresponding to the activity needs to be analyzed. In the rule analysis process, a depth-first traversal principle of the ternary tree is adopted, and after the whole rule tree is traversed, the reward which is to be issued to the user can be obtained. The rulenodes in the rule tree are of only three types: when the rule component, the prize pool and the user-defined file are traversed and analyzed, if the RuleNode is the type of the rule component, the next RuleNode in the rule tree is continuously traversed; if the RuleNode is the prize pool type or the custom file type, the rule tree traversal is stopped, and the prize pool lottery result or the custom file is returned. The ternary tree is a data storage structure in a computer science department, and is an ordered tree which is divided into a left sub-tree, a middle sub-tree and a right sub-tree. A depth-first traversal is a traversal of a node of the tree along the depth of the tree, traversing the branches of the tree as deeply as possible.
Fig. 4A schematically illustrates a block diagram of an activity rule building apparatus according to an embodiment of the present disclosure.
As shown in fig. 4A, the apparatus 400 may include a rule acquisition module 410, a first rule component identification acquisition module 420, a construction module 430, and a first sending module 440.
The rule obtaining module 410 is used to determine the required rules according to the activity scheme.
The first rule component identification obtaining module 420 is configured to obtain a rule component identification of the required rule.
The building module 430 is configured to build a front-end rule tree based on at least the rule component identifier and the logical relationship of the rule required by the activity scheme, to obtain a front-end rule tree and a front-end rule tree identifier, where at least a part of nodes of the front-end rule tree include the rule component identifier.
The first sending module 440 is configured to send the front-end rule tree and the corresponding front-end rule tree identifier to a server for storage.
Wherein the building module 430 comprises: drawing unit and construction unit.
And the drawing unit is used for adding an icon corresponding to the rule component identification of the required rule on the canvas function of the GoJs front end frame.
The construction unit is configured to construct a visual front-end rule tree based on at least a logical relationship between the icon and the rule required by the activity scheme, the visual front-end rule tree having a unique visual front-end rule tree identifier.
Correspondingly, the first sending module 440 is specifically configured to send the visual front-end rule tree and the corresponding visual front-end rule tree identifier to a server in a JSON form for storage.
The apparatus 400 may further include a creation module 450 and a second sending module 460.
The creating module 450 is configured to create at least one activity after sending the front-end rule tree and the corresponding front-end rule tree identifier to the server for storage, where each activity has a unique activity identifier.
The second sending module 460 is configured to send at least one activity identifier associated with the front-end rule tree identifier to a server for binding, so as to obtain a corresponding relationship between the front-end rule tree identifier and the activity identifier.
The activity rule establishing device provided by the disclosure can enable developers to construct the front-end rule tree without individually customizing and developing a set of interface service for each marketing activity, and only needs to construct the module 430 to obtain the front-end rule tree and the front-end rule tree identifier at least based on the rule component identifier and the logical relationship of the rules required by the activity scheme, and then sends the front-end rule tree and the corresponding front-end rule tree identifier to the server to complete the development task, if the front-end rule tree is converted into the rule tree capable of running by the server, the development time of the developers is greatly shortened.
FIG. 4B schematically shows a block diagram of an activity rule building apparatus according to another embodiment of the present disclosure
As shown in fig. 4B, the apparatus 500 may include a first receiving module 510, a second rule component identification obtaining module 520, a rule component obtaining module 530, a rule node converting module 540, a rule tree obtaining module 550, and a first storing module 560.
The first receiving module 510 is configured to receive a front-end rule tree, where at least some nodes of the front-end rule tree include rule component identifications.
The second rule component identifier obtaining module 520 is configured to traverse the front-end rule tree according to the order of the ordered tree to obtain a rule component identifier.
The rule component obtaining module 530 is configured to query a rule base by using the rule component identifier to obtain a rule component.
The rule node conversion module 540 is used to convert the rule component into a rule node.
The rule tree obtaining module 550 is configured to string the rule nodes into a rule tree according to the relationship between the nodes of the front-end rule tree.
The first storage module 560 is configured to store the rule tree and a corresponding front-end rule tree identifier.
Wherein the rule base can be obtained by: the system comprises a rule acquisition unit, a componentization unit and a storage unit.
The rule obtaining unit is used for obtaining a rule.
The componentization unit is used for componentizing the rule based on a component standard to obtain a rule component. The component standard includes: ginseng input, correct ginseng output, wrong ginseng output and abnormal ginseng output.
The storage unit is used for storing the rule components in a rule base, and each rule component has a unique rule component identification.
The apparatus 500 may further include a serialization module 570.
The serialization module 570 is configured to serialize the rule tree into JSON strings after obtaining the rule tree.
Correspondingly, the first storage module 560 is specifically configured to associate and store the JSON string and the corresponding front-end rule tree identifier.
When the corresponding relationship between the front-end rule tree identifier and the activity identifier is received, the first storage module 560 is specifically configured to store the rule tree and the corresponding activity identifier.
Further, the apparatus 600 may further include: a second receiving module 580, a rule tree determining module 590, an outputting module 610, and a third transmitting module 620.
The second receiving module 580 is configured to receive a request instruction, where the request instruction is an instruction that is sent by a second client and includes user identification information and front-end rule tree identification information.
The rule tree determining module 590 is configured to determine, in response to receiving the request instruction, a rule tree according to the front-end rule tree identification information.
The output module 610 is configured to traverse the rule tree in an order of the ordered tree based on the user identification information, and obtain an output result of the rule tree corresponding to the user identification information.
The third sending module 620 is configured to send the output result to the second client.
Optionally, the rule tree is stored in a serialized JSON string, wherein the rule tree determining module 590 comprises: the device comprises an deserializing unit and a rule tree acquisition unit.
And the deserializing unit is used for determining a serialized JSON string according to the front-end rule tree identification information.
And the rule tree acquisition unit is used for performing deserialization processing on the serialized JSON string to obtain a rule tree.
If the request instruction is an instruction including user identification information and activity identification information sent by the second client, correspondingly, the rule tree determining module 590 is specifically configured to determine a rule tree according to the activity identification information.
In one embodiment, the output module 610 includes: the device comprises a root node acquisition unit, a traversal unit and a sending unit.
The root node obtaining unit is used for extracting a root node from the rule tree.
And the traversal unit is used for outputting a result corresponding to the user identification information by the root node if the root node is a rule component, extracting a child node corresponding to the result, outputting the result corresponding to the user identification information by the child node if the child node is the rule component, and repeating the operation until the deep traversal of the rule tree is finished to obtain the output result of the last child node.
And the sending unit is used for sending the output result of the last child node to the second client.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the rule obtaining module 410, the first rule component identification obtaining module 420, the constructing module 430, the first sending module 440, the creating module 450, the second sending module 460, the first receiving module 510, the second rule component identification obtaining module 520, the rule component obtaining module 530, the rule node converting module 540, the rule tree obtaining module 550, the first storing module 560, the serializing module 570, the second receiving module 580, the rule tree determining module 590, the outputting module 610, and the third sending module 620 may be combined into one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the rule obtaining module 410, the first rule component identification obtaining module 420, the building module 430, the first sending module 440, the creating module 450, the second sending module 460, the first receiving module 510, the second rule component identification obtaining module 520, the rule component obtaining module 530, the rule node converting module 540, the rule tree obtaining module 550, the first storing module 560, the serializing module 570, the second receiving module 580, the rule tree determining module 590, the outputting module 610, and the third sending module 620 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuit, or in any one of three implementations, software, hardware and firmware, or in any suitable combination of any of them. Alternatively, at least one of the rule obtaining module 410, the first rule component identification obtaining module 420, the constructing module 430, the first sending module 440, the creating module 450, the second sending module 460, the first receiving module 510, the second rule component identification obtaining module 520, the rule component obtaining module 530, the rule node converting module 540, the rule tree obtaining module 550, the first storing module 560, the serializing module 570, the second receiving module 580, the rule tree determining module 590, the outputting module 610, and the third sending module 620 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
FIG. 5 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 5 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 5, a computer system 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the system 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The system 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 705 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 811. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (26)

1. An activity rule establishing method applied to a first client side, the method comprising:
determining a required rule according to the activity scheme;
acquiring a rule component identifier of the required rule;
constructing a front-end rule tree at least based on the rule component identification and the logic relation of the rule required by the activity scheme to obtain the front-end rule tree and a front-end rule tree identification, wherein at least part of nodes of the front-end rule tree comprise the rule component identification; and
and sending the front-end rule tree and the corresponding front-end rule tree identification to a server for storage.
2. The method of claim 1, wherein the building a front-end rule tree based at least on the rule component identification and the logical relationship of the rules required by the activity scheme comprises:
adding an icon corresponding to the rule component identification of the required rule on the canvas function of the GoJs front end frame;
constructing a visual front-end rule tree at least based on the logical relationship between the icon and the rule required by the activity scheme, wherein the visual front-end rule tree has a unique visual front-end rule tree identifier; and
and sending the front-end rule tree and the corresponding front-end rule tree identification to a server for storage comprises sending the visual front-end rule tree and the corresponding visual front-end rule tree identification to the server for storage in a JSON form.
3. The method of claim 1, further comprising:
after the front-end rule tree and the corresponding front-end rule tree identification are sent to a server side for storage, at least one activity is created, and each activity has a unique activity identification; and
and at least sending at least one activity identifier associated with the front-end rule tree identifier to a server for binding to obtain the corresponding relation between the front-end rule tree identifier and the activity identifier.
4. An activity rule establishing method is applied to a server side, and the method comprises the following steps:
receiving a front-end rule tree, wherein at least part of nodes of the front-end rule tree comprise rule component identifications;
traversing the front-end rule tree according to the order of the ordered tree to obtain a rule component identifier;
querying a rule base by using the rule component identifier to obtain a rule component;
converting the rule component into a rule node;
according to the relation among the nodes of the front-end rule tree, the rule nodes are strung into a rule tree; and
and storing the rule tree and the corresponding front-end rule tree identification.
5. The method of claim 4, the rule base being obtained by:
acquiring a rule;
componentizing the rule based on a component standard to obtain a rule component; and
storing the rule components in a rule base, each rule component having a unique rule component identification.
6. The method of claim 5, wherein the component criteria comprises: ginseng input, correct ginseng output, wrong ginseng output and abnormal ginseng output.
7. The method of claim 4, further comprising:
after the rule tree is obtained, serializing the rule tree into a JSON string; and
and the step of storing the rule tree and the corresponding front-end rule tree identification comprises the step of establishing association and storing the JSON string and the corresponding front-end rule tree identification.
8. The method of claim 4, wherein, upon receiving a correspondence of a front-end rule tree identification and an activity identification, said storing the rule tree and corresponding front-end rule tree identification comprises storing the rule tree and corresponding activity identification.
9. The method of claim 4, further comprising:
receiving a request instruction, wherein the request instruction is an instruction which is sent by a second client and comprises user identification information and front-end rule tree identification information;
in response to receiving the request instruction, determining a rule tree according to the front-end rule tree identification information;
traversing the rule tree in the order of the ordered tree based on the user identification information to obtain an output result of the rule tree corresponding to the user identification information; and
and sending the output result to the second client.
10. The method of claim 9, the rule tree is stored in the form of a serialized JSON string, wherein:
the determining a rule tree according to the front-end rule tree identification information includes:
determining a serialized JSON string according to the front-end rule tree identification information; and
and performing deserialization processing on the serialized JSON string to obtain a rule tree.
11. The method of claim 9, wherein:
the request instruction is an instruction which is sent by a second client and comprises user identification information and activity identification information; and
determining a rule tree based on the front-end rule tree identification information includes determining a rule tree based on the activity identification information.
12. The method of claim 9, wherein traversing the rule tree in an order of an ordered tree based on the user identification information, resulting in an output result for the respective rule tree for the user identification information comprises:
extracting a root node from the rule tree;
if the root node is a rule component, outputting a result corresponding to the user identification information by the root node, extracting a child node corresponding to the result, if the child node is a rule component, outputting the result corresponding to the user identification information by the child node, and repeating the operation until the deep traversal of the rule tree is finished to obtain an output result of the last child node; and
and sending the output result of the last child node to the second client.
13. An activity rule set-up device comprising:
the rule acquisition module is used for determining a required rule according to the activity scheme;
a first rule component identifier obtaining module, configured to obtain a rule component identifier of the required rule;
a building module, configured to build a front-end rule tree based on at least the rule component identifier and a logical relationship of the rule required by the activity scheme, to obtain the front-end rule tree and a front-end rule tree identifier, where at least part of nodes of the front-end rule tree include the rule component identifier; and
and the first sending module is used for sending the front-end rule tree and the corresponding front-end rule tree identification to a server for storage.
14. The apparatus of claim 13, wherein the building module comprises:
the drawing unit is used for adding an icon corresponding to the rule component identifier of the required rule on the canvas function of the GoJs front-end frame;
a construction unit, configured to construct a visual front-end rule tree based on at least a logical relationship between the icon and the rule required by the activity scheme, where the visual front-end rule tree has a unique visual front-end rule tree identifier; and
the first sending module is specifically configured to send the visual front-end rule tree and the corresponding visual front-end rule tree identifier to a server in a JSON form for storage.
15. The apparatus of claim 13, further comprising:
the creating module is used for creating at least one activity after the front-end rule tree and the corresponding front-end rule tree identification are sent to the server for storage, and each activity has a unique activity identification; and
and the second sending module is used for sending at least one activity identifier associated with the front-end rule tree identifier to the server for binding to obtain the corresponding relation between the front-end rule tree identifier and the activity identifier.
16. An activity rule set-up device comprising:
a first receiving module, configured to receive a front-end rule tree, where at least some nodes of the front-end rule tree include rule component identifiers;
the second rule component identifier acquisition module is used for traversing the front-end rule tree according to the order of the ordered tree to obtain a rule component identifier;
the rule component acquisition module is used for inquiring a rule base by using the rule component identifier to obtain a rule component;
the rule node conversion module is used for converting the rule components into rule nodes;
the rule tree acquisition module is used for stringing the rule nodes into a rule tree according to the relationship among the nodes of the front-end rule tree; and
and the first storage module is used for storing the rule tree and the corresponding front-end rule tree identifier.
17. The apparatus of claim 16, wherein the rule base is obtained by:
a rule obtaining unit configured to obtain a rule;
the componentization unit is used for componentizing the rule based on the component standard to obtain a rule component; and
a storage unit for storing the rule components in a rule base, each rule component having a unique rule component identification.
18. The apparatus of claim 17, the component standard comprising: ginseng input, correct ginseng output, wrong ginseng output and abnormal ginseng output.
19. The apparatus of claim 16, further comprising:
the serialization module is used for serializing the rule tree into a JSON string after the rule tree is obtained; and
the first storage module is specifically used for establishing association and storing the JSON string and the corresponding front-end rule tree identifier.
20. The apparatus according to claim 16, wherein when receiving a correspondence between a front-end rule tree identifier and an activity identifier, the first storage module is specifically configured to store the rule tree and the corresponding activity identifier.
21. The apparatus of claim 16, further comprising:
the second receiving module is used for receiving a request instruction, wherein the request instruction is an instruction which is sent by a second client and comprises user identification information and front-end rule tree identification information;
a rule tree determining module, configured to determine, in response to receiving the request instruction, a rule tree according to the front-end rule tree identification information;
the output module is used for traversing the rule tree in the order of the ordered tree based on the user identification information to obtain an output result of the rule tree corresponding to the user identification information; and
and the third sending module is used for sending the output result to the second client.
22. The apparatus of claim 21, the rule tree stored in a serialized JSON string, wherein the rule tree determination module comprises:
the deserializing unit is used for determining a serialized JSON string according to the front-end rule tree identification information; and
and the rule tree obtaining unit is used for performing deserialization processing on the serialized JSON string to obtain a rule tree.
23. The apparatus of claim 21, wherein:
the request instruction is an instruction which is sent by a second client and comprises user identification information and activity identification information; and
the rule tree determining module is specifically configured to determine a rule tree according to the activity identification information.
24. The apparatus of claim 21, wherein the output module comprises:
a root node obtaining unit, configured to extract a root node from the rule tree;
a traversal unit, configured to output, by a root node, a result corresponding to the user identification information if the root node is a rule component, extract a child node corresponding to the result, output, by the child node, the result corresponding to the user identification information if the child node is a rule component, and repeat the above operations until the end of the deep traversal of the rule tree, to obtain an output result of a last child node; and
and the sending unit is used for sending the output result of the last child node to the second client.
25. A computer system, comprising:
one or more processors;
a storage device for storing executable instructions which, when executed by the processor, implement the method of any one of claims 1 to 11.
26. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, implement a method according to any one of claims 1 to 11.
CN201811148790.2A 2018-09-29 2018-09-29 Activity rule establishing method, activity rule establishing device, computer system and medium Active CN109271160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811148790.2A CN109271160B (en) 2018-09-29 2018-09-29 Activity rule establishing method, activity rule establishing device, computer system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811148790.2A CN109271160B (en) 2018-09-29 2018-09-29 Activity rule establishing method, activity rule establishing device, computer system and medium

Publications (2)

Publication Number Publication Date
CN109271160A CN109271160A (en) 2019-01-25
CN109271160B true CN109271160B (en) 2022-04-26

Family

ID=65194860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811148790.2A Active CN109271160B (en) 2018-09-29 2018-09-29 Activity rule establishing method, activity rule establishing device, computer system and medium

Country Status (1)

Country Link
CN (1) CN109271160B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190657B (en) * 2020-01-07 2022-07-05 北京字节跳动网络技术有限公司 Activity configuration method and device, readable medium and electronic equipment
CN113312384B (en) * 2020-02-26 2023-12-26 阿里巴巴集团控股有限公司 Query processing method and device for graph data and electronic equipment
CN111563178A (en) * 2020-04-28 2020-08-21 深圳壹账通智能科技有限公司 Rule logic diagram comparison method, device, medium and electronic equipment
CN113988893A (en) * 2021-08-30 2022-01-28 北京百度网讯科技有限公司 Commodity information processing method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014049322A1 (en) * 2012-09-28 2014-04-03 Brainstorm Mobile Solutions Limited Method of processing data for marketing and advertising purposes

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120116868A1 (en) * 2010-11-10 2012-05-10 Wendy Tsyr-Wen Chin System and method for optimizing marketing effectiveness
US20140316841A1 (en) * 2013-04-23 2014-10-23 Kofax, Inc. Location-based workflows and services
EP2819346B1 (en) * 2013-06-28 2018-06-20 Kaspersky Lab, ZAO System and method for automatically configuring application control rules
CN104424211B (en) * 2013-08-22 2019-03-15 腾讯科技(北京)有限公司 A kind of dissemination method of the business datum based on microblogging, device and system
CN107678808A (en) * 2016-08-02 2018-02-09 阿里巴巴集团控股有限公司 Page info Choice generation method and device
CN106528129B (en) * 2016-10-27 2019-06-21 南京南瑞继保电气有限公司 A kind of Web application interface generation system and method
CN108170428B (en) * 2016-12-05 2021-05-28 阿里巴巴集团控股有限公司 Page construction processing method, device and system
CN107506181A (en) * 2017-07-17 2017-12-22 阿里巴巴集团控股有限公司 Business processing, data processing method, device and electronic equipment
CN107947968B (en) * 2017-11-14 2020-02-14 中国联合网络通信集团有限公司 Method and device for processing network quality complaint information
CN108228175A (en) * 2017-12-29 2018-06-29 深圳乐信软件技术有限公司 Movable backstage development approach, device, server and medium
CN108288181B (en) * 2018-02-10 2021-05-04 深圳壹账通智能科技有限公司 Preferential activity generation method and device, terminal equipment and storage medium
CN108363576A (en) * 2018-02-26 2018-08-03 成都步速者科技股份有限公司 Interaction realizing method, device, server and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014049322A1 (en) * 2012-09-28 2014-04-03 Brainstorm Mobile Solutions Limited Method of processing data for marketing and advertising purposes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
决策树与规则引擎;ckrule;《https://blog.csdn.net/ckrule/article/details/37739727》;20140713;第1-2页 *

Also Published As

Publication number Publication date
CN109271160A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN109271160B (en) Activity rule establishing method, activity rule establishing device, computer system and medium
KR102220127B1 (en) Method and apparatus for customized software development kit (sdk) generation
US10853108B2 (en) Method and apparatus for code virtualization and remote process call generation
CN106537426B (en) Automatically generating execution sequences for workflows
CN113987074A (en) Distributed service full-link monitoring method and device, electronic equipment and storage medium
CN107729139A (en) A kind of method and apparatus for concurrently obtaining resource
CN110543297B (en) Method and apparatus for generating source code
US20210194977A1 (en) Method and Apparatus for Generating Information
US11244153B2 (en) Method and apparatus for processing information
CN113032244B (en) Interface test method, device, computer system and computer readable storage medium
CN110781180B (en) Data screening method and data screening device
CN109298948A (en) Distributed computing method and system
CN115016784B (en) Low code application multiplexing method, application analysis system, equipment and storage medium
CN108694120A (en) The method and apparatus of testing service component
CN113448570A (en) Data processing method and device, electronic equipment and storage medium
CN112988600A (en) Service scene testing method and device, electronic equipment and storage medium
US20130283229A1 (en) Method for automatically generating and launching application software through a single entry point of a store platform
CN115033233A (en) Interface calling method and device, electronic equipment and storage medium
WO2020150009A1 (en) Profile data store automation via bots
CN111131354B (en) Method and apparatus for generating information
CN113032256A (en) Automatic test method, device, computer system and readable storage medium
CN113032257A (en) Automatic test method, device, computer system and readable storage medium
CN112035416A (en) Data blood margin analysis method and device, electronic equipment and storage medium
CN112818197B (en) Search method, search device, electronic equipment and storage medium
Shi et al. COSINEHUB: A New Software Development System in Collective Intelligence Environment

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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant