Disclosure of Invention
In view of this, embodiments of the present invention provide a transaction processing method and apparatus, which can solve the problem that the existing transaction configuration is difficult to maintain and expand.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a transaction processing method, including receiving an order processing request, extracting order information in the request, and acquiring a marketing activity template of a current platform configuration; calling a preset rule filter, and screening out a corresponding rule subset from a preset transaction rule complete set based on order information and a marketing activity template; and executing the rule subset, generating and outputting the order processing result.
Optionally, before obtaining the marketing campaign template of the current platform configuration, the method includes:
and receiving a marketing activity configuration request, acquiring configuration information in the request, calling a preset marketing activity commonality characteristic set, and matching to obtain corresponding characteristic information so as to generate a marketing activity template.
Optionally, before receiving the marketing campaign configuration request, the method includes:
and acquiring marketing activity information corresponding to each scene in the historical data, extracting each attribute value in each marketing activity information to call a preset clustering model, and generating a marketing activity commonality characteristic set with attribute dimensionality.
Optionally, the attribute dimensions included in the marketing campaign commonality feature set are campaign basic information, offer conditions, offer types, offer modes, entry objects, entry commodities, and offer channels.
Optionally, comprising:
the marketing activity commonality characteristic set stores the mapping relation between each attribute dimension and the attribute value in the form of key value pairs.
Optionally, extracting order information in the request includes:
and extracting the order type, the commodity information and the identity information of both transaction parties in the request.
Optionally, based on the order information and the marketing campaign template, screening out a corresponding subset of rules from a preset transaction rule corpus, including:
inputting the order type, the commodity information, the identity information of both transaction parties and the marketing activity template into the rule filter, and outputting a corresponding rule subset based on a preset transaction rule complete set; wherein each rule in the transaction rule corpus comprises a rule condition, a calculation logic, a rule run result processing logic, and a rule priority.
Optionally, the method further comprises:
and calling a preset rule actuator, executing the rule subset, generating and outputting the order processing result.
In addition, the invention also provides a transaction processing device, which comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for receiving the order processing request, extracting the order information in the request and acquiring the marketing activity template configured by the current platform; the processing module is used for calling a preset rule filter and screening out a corresponding rule subset from a preset transaction rule complete set based on order information and a marketing activity template; and executing the rule subset, generating and outputting the order processing result.
Optionally, before the obtaining module obtains the marketing activity template of the current platform configuration, the obtaining module includes: and receiving a marketing activity configuration request, acquiring configuration information in the request, calling a preset marketing activity commonality characteristic set, and matching to obtain corresponding characteristic information so as to generate a marketing activity template.
Optionally, before the obtaining module receives the marketing campaign configuration request, the obtaining module includes: and acquiring marketing activity information corresponding to each scene in the historical data, extracting each attribute value in each marketing activity information to call a preset clustering model, and generating a marketing activity commonality characteristic set with attribute dimensionality.
Optionally, the attribute dimensions included in the marketing campaign commonality feature set are campaign basic information, offer conditions, offer types, offer modes, entry objects, entry commodities, and offer channels.
Optionally, the marketing campaign commonality feature set stores the mapping relationship between each attribute dimension and the attribute value in the form of a key-value pair.
Optionally, the obtaining module extracts order information in the request, including: and extracting the order type, the commodity information and the identity information of both transaction parties in the request.
Optionally, the processing module screens out a corresponding rule subset from a preset transaction rule corpus based on the order information and the marketing campaign template, including: inputting the order type, the commodity information, the identity information of both transaction parties and the marketing activity template into the rule filter, and outputting a corresponding rule subset based on a preset transaction rule complete set; wherein each rule in the transaction rule corpus comprises a rule condition, a calculation logic, a rule run result processing logic, and a rule priority.
Optionally, the processing module is further configured to: and calling a preset rule actuator, executing the rule subset, generating and outputting the order processing result.
One embodiment of the above invention has the following advantages or benefits: the invention can realize business processing such as order price calculation, coupon stock reduction, point increase and the like by carrying out building block arrangement on the member identity, the order type, the pricing strategy, the coupon and other factor conditions and result behaviors. Building block type transaction configuration information is built, so that the separation of business logic and technical logic of an application developer is facilitated, and frequent change based on requirements is complied with. Meanwhile, aiming at complicated e-commerce marketing activities, by abstracting marketing activities, the commonality characteristics of the marketing activities are divided, and by setting the characteristics of the marketing activities, activity templates in various forms are customized, so that the method is suitable for different application scenes, the process from the input of orders to the placement of the orders becomes logical and clear, the interpretability of transactions is realized, the expansibility and maintainability of the transactions are enhanced, flexible transaction configuration is provided, and unified management is facilitated.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a transaction processing method according to a first embodiment of the present invention, as shown in fig. 1, the transaction processing method includes:
step S101, receiving an order processing request, extracting order information in the request, and acquiring a marketing activity template configured by a current platform.
In some embodiments, obtaining the marketing campaign template for the current platform configuration comprises: and receiving a marketing activity configuration request, acquiring configuration information in the request, calling a preset marketing activity commonality characteristic set, and matching to obtain corresponding characteristic information so as to generate a marketing activity template. Therefore, the marketing activity template with various forms can be customized (for example, the marketing activity template comprises time-limited benefits, full benefits, new customer benefits and the like), and can adapt to different application scenarios.
It should be noted that, if the configuration information of the marketing campaign configuration request includes feature information that cannot be obtained by matching the marketing campaign commonality feature set, the feature information may be customized and stored in the marketing campaign commonality feature set.
Additionally, if the current platform is configured with multiple marketing campaign templates, then a selection may be made from the multiple marketing campaign templates.
In a further embodiment, before receiving the marketing campaign configuration request, acquiring marketing campaign information corresponding to each scene in the historical data, extracting each attribute value in each marketing campaign information, and calling a preset clustering model (for example, a hierarchical clustering algorithm, a k-means clustering algorithm, and the like) to generate a marketing campaign commonality feature set with attribute dimensions.
It is worth to be noted that the attribute dimensions included in the marketing campaign commonality feature set may be basic information of a campaign, offer conditions, offer types, offer ways, entry objects, entry commodities, and offer channels.
In a preferred embodiment, the basic information of the activity may include a name, a description, a time (start and end time), an entry time (start and end time), and the like. The offer condition may include an offer condition by order amount or an offer condition by total amount of goods. The offer types may include one-item offers (i.e., no offer condition is displayed, the offer mode is a time-limited discount) and full offers (i.e., offer conditions are displayed, the offer mode is a price offer). The offer may include a time-limited discount (e.g., a second discount and a bite price) and a price advantage (e.g., a reduced cash and price discount). The entry objects may include all merchants (i.e., all merchants qualify as entries) and some merchants (i.e., merchants within a specified white list are designated to be available for entry and need to be selected for addition to the active white list). The entry items may include all items (i.e., merchant items are not restricted) as well as some items (i.e., merchant item categories are restricted, items participating in the event are restricted by selecting multiple item categories). The preferential channels may include cell phones, computers, TVs, etc. Therefore, by configuring the attribute dimensions, marketing activity templates of various forms (such as time-limited batch preemption, full preference and the like) can be customized.
In addition, the marketing activity commonality characteristic set stores the mapping relation between each attribute dimension and the attribute value in the form of key value pairs. Wherein, KEY is attribute dimension, and VALUE is attribute VALUE.
And S102, calling a preset rule filter, and screening out a corresponding rule subset from a preset transaction rule complete set based on order information and a marketing activity template.
In some embodiments, extracting the order information in the request includes extracting an order type, commodity information, and transaction party identity information in the request. And then inputting the order type, the commodity information, the identity information of both transaction parties and the marketing activity template into the rule filter, and outputting a corresponding rule subset based on a preset transaction rule complete set. That is, the input of the rule filter is the order type, commodity information, identity information of both parties (such as member identity) and marketing activity template (such as various marketing activities, full and decreasing, exclusive sharing price of mobile phone, etc.) of the e-commerce transaction, and the output is the rule subset adapted to the e-commerce transaction.
It is worth noting that each rule in the transaction rule corpus includes a rule condition, a calculation logic, a rule run result processing logic, and a rule priority. And the rule operation result processing logic comprises rule operation success ending processing logic and rule operation failure ending processing logic. The rule priority is the execution level of the rule. Preferably, multiple threads can be executed in parallel for the same level of rules.
And step S103, executing the rule subset, generating and outputting the order processing result.
In some embodiments, a preset rule executor is called, the rule subset is executed, and the order processing result is generated and output. That is, the rule executor is invoked to execute each rule in the rule subset output by the rule filter, thereby obtaining and outputting the result of the order processing.
In summary, the present invention configures a transaction rule complete set in the ordering transaction process for the e-commerce platform, defines the execution conditions of each rule, executes logic, and performs post-processing after execution. When an order is placed, a rule subset needing to be executed is screened out through information such as order types, commodity information, identity information of both transaction parties, marketing activity templates and the like of the order, a rule actuator is further called to execute the rule subset, and finally the order placement is completed. Therefore, the invention realizes the building of the building block type business rule, simultaneously decouples the business logic from the application development logic, and has interpretability. In addition, the invention manages the complicated rules through the configuration rules, and the application development code has expansibility and maintainability in the face of increasing transaction rules and marketing activity scenes.
Fig. 2 is a schematic main flow chart of a transaction processing method according to a second embodiment of the present invention, as shown in fig. 2, the transaction processing method includes:
step S201, receiving an order processing request, and extracting the order type, the commodity information and the identity information of both parties of the transaction in the request.
Step S202, a marketing activity template configured by the current platform is obtained. The specific implementation process comprises the following steps:
and acquiring marketing activity information corresponding to each scene in the historical data, extracting each attribute value in each marketing activity information to call a preset clustering model, and generating a marketing activity commonality characteristic set with attribute dimensionality. And then, receiving a marketing activity configuration request, acquiring configuration information in the request, calling a preset marketing activity commonality characteristic set, and matching to obtain corresponding characteristic information so as to generate a marketing activity template.
Step S203, a preset rule filter is called, and the order type, the commodity information, the identity information of both transaction parties and the marketing activity template are input into the rule filter.
And step S204, outputting a corresponding rule subset based on a preset transaction rule complete set.
Wherein each rule in the transaction rule corpus comprises a rule condition, a calculation logic, a rule run result processing logic, and a rule priority.
Step S205, a preset rule executor is called to execute the rule subset, and the order processing result is generated and output.
Fig. 3 is a schematic main flow chart of a transaction processing method according to a third embodiment of the present invention, as shown in fig. 3, the transaction processing method includes:
step S301, marketing activity information corresponding to each scene in the historical data is obtained, each attribute value in each marketing activity information is extracted, a preset clustering model is called, and a marketing activity commonality characteristic set with attribute dimensionality is generated.
Step S302, a marketing activity configuration request is received, configuration information in the request is obtained, a preset marketing activity commonality characteristic set is called, and corresponding characteristic information is obtained through matching so as to generate a marketing activity template.
Step S303, receiving an order processing request, and extracting the order type, the commodity information and the identity information of both parties of the transaction in the request.
And step S304, acquiring a marketing activity template configured by the current platform.
Step S305, a preset rule filter is called, and the order type, the commodity information, the identity information of both transaction parties and the marketing activity template are input into the rule filter.
And step S306, outputting a corresponding rule subset based on the preset transaction rule complete set.
Wherein each rule in the transaction rule corpus comprises a rule condition, a calculation logic, a rule run result processing logic, and a rule priority.
And step S307, calling a preset rule actuator, executing the rule subset, generating and outputting the order processing result.
Fig. 4 is a schematic diagram of main modules of a transaction processing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the transaction processing apparatus includes anacquisition module 401 and aprocessing module 402. The obtainingmodule 401 receives an order processing request, extracts order information in the request, and obtains a marketing activity template configured by a current platform; theprocessing module 402 invokes a preset rule filter to filter out a corresponding rule subset from a preset transaction rule corpus based on order information and a marketing activity template; and executing the rule subset, generating and outputting the order processing result.
In some embodiments, before the obtainingmodule 401 obtains the marketing campaign template of the current platform configuration, it includes: and receiving a marketing activity configuration request, acquiring configuration information in the request, calling a preset marketing activity commonality characteristic set, and matching to obtain corresponding characteristic information so as to generate a marketing activity template.
In some embodiments, before the obtainingmodule 401 receives the marketing campaign configuration request, it includes: and acquiring marketing activity information corresponding to each scene in the historical data, extracting each attribute value in each marketing activity information to call a preset clustering model, and generating a marketing activity commonality characteristic set with attribute dimensionality.
In some embodiments, the marketing campaign commonality feature set comprises attribute dimensions of basic information of a campaign, offer conditions, offer types, offer ways, entry objects, entry goods, and offer channels.
In some embodiments, the marketing campaign commonality feature set stores a mapping between each attribute dimension and attribute value in the form of a key-value pair.
In some embodiments, the obtainingmodule 401 extracts the order information in the request, including: and extracting the order type, the commodity information and the identity information of both transaction parties in the request.
In some embodiments,processing module 402 screens out a corresponding subset of rules from a pre-set corpus of transaction rules based on order information and marketing campaign templates, including: inputting the order type, the commodity information, the identity information of both transaction parties and the marketing activity template into the rule filter, and outputting a corresponding rule subset based on a preset transaction rule complete set; wherein each rule in the transaction rule corpus comprises a rule condition, a calculation logic, a rule run result processing logic, and a rule priority.
In some embodiments, theprocessing module 402 is further configured to: and calling a preset rule actuator, executing the rule subset, generating and outputting the order processing result.
It should be noted that the transaction processing method and the transaction processing apparatus of the present invention have corresponding relation in the specific implementation contents, and therefore, the repeated contents are not described again.
Fig. 5 illustrates anexemplary system architecture 500 of a transaction processing method or transaction processing device to which embodiments of the invention may be applied.
As shown in fig. 5, thesystem architecture 500 may includeterminal devices 501, 502, 503, anetwork 504, and aserver 505. Thenetwork 504 serves to provide a medium for communication links between theterminal devices 501, 502, 503 and theserver 505.Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use theterminal devices 501, 502, 503 to interact with aserver 505 over anetwork 504 to receive or send messages or the like. Theterminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
Theterminal devices 501, 502, 503 may be various electronic devices having transaction processing screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Theserver 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using theterminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the transaction processing method provided by the embodiment of the present invention is generally executed by theserver 505, and accordingly, the computing device is generally disposed in theserver 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of acomputer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, thecomputer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from astorage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of thecomputer system 600 are also stored. The CPU501, ROM602, and RAM603 are connected to each other via abus 604. An input/output (I/O)interface 605 is also connected tobus 604.
The following components are connected to the I/O interface 605: aninput portion 606 including a keyboard, a mouse, and the like; anoutput section 607 including a display such as a Cathode Ray Tube (CRT), a liquid crystal transaction processor (LCD), and the like, and a speaker and the like; astorage section 608 including a hard disk and the like; and acommunication section 609 including a network interface card such as a LAN card, a modem, or the like. Thecommunication section 609 performs communication processing via a network such as the internet. Thedriver 610 is also connected to the I/O interface 605 as needed. Aremovable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on thedrive 610 as necessary, so that a computer program read out therefrom is mounted in thestorage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts 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 medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through thecommunication section 609, and/or installed from theremovable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, 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 invention, 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module and a processing module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to receive an order processing request, extract order information in the request, and obtain a marketing campaign template for a current platform configuration; calling a preset rule filter, and screening out a corresponding rule subset from a preset transaction rule complete set based on order information and a marketing activity template; and executing the rule subset, generating and outputting the order processing result.
According to the technical scheme of the embodiment of the invention, the problem that the existing transaction configuration is difficult to maintain and expand can be solved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.