A real-time marketing rule query method and device based on an LSM tree
By adopting a real-time marketing rule query method based on LSM trees, this method obtains and identifies marketing strategy types, generates storage key values, constructs strategy query copies, locates query nodes, and calculates resource allocation, thus solving the problem of low efficiency in marketing rule queries and achieving efficient real-time queries.
Patent Information
- Application Number
- CN202310847773.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-07-11
AI Technical Summary
In existing technologies, the efficiency of real-time querying of marketing rules is low, which causes the marketing system to be unable to respond quickly during peak hours, affecting the performance of the business system.
A real-time marketing rule query method based on LSM tree is adopted. By acquiring and identifying marketing strategy types, generating storage key values, constructing strategy query copies, locating query nodes and calculating resource allocation, and executing query operations, the query efficiency is improved.
This improves the efficiency of real-time marketing rule querying using LSM trees, reduces computational latency, and enables efficient querying of real-time marketing rules.
Smart Images

Figure CN116860785B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marketing strategy query technology, and in particular to a real-time marketing rule query method and apparatus based on LSM tree. Background Technology
[0002] With the rapid development of the internet, various marketing methods have emerged to meet diverse and precise marketing needs. Enterprise marketing systems must support a large number of marketing rules, and different organizational levels, such as headquarters, regional offices, and provincial offices, will customize different marketing rules. The content of these rules also varies widely, for example, setting discount rates based on customers' cumulative transaction volume or capping discounts for specific activities. This results in marketing systems needing to process massive amounts of marketing rules in real time during peak marketing campaigns to meet the demands of the business systems.
[0003] Currently, the method for calculating marketing rules involves periodically aggregating and calculating based on rule conditions from the traditional business database, storing the results in a result table, and then querying them. This calculation method consumes a large amount of computing resources from the business database, which affects the performance of the business system and results in high latency in the calculation results. It cannot calculate marketing rules in real time, which leads to low query efficiency for real-time marketing rules. Therefore, a method is needed to improve the query efficiency of real-time marketing rules using LSM trees. Summary of the Invention
[0004] This invention provides a method and apparatus for querying real-time marketing rules based on LSM trees, the main purpose of which is to improve the query efficiency of real-time marketing rules based on LSM trees.
[0005] To achieve the above objectives, this invention provides a real-time marketing rule query method based on an LSM tree, comprising:
[0006] Obtain real-time marketing strategies, identify the marketing strategy types of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies;
[0007] The data attributes of the sequential marketing strategy are queried, and the storage key value of the sequential marketing strategy is generated based on the data attributes. The sequential marketing strategy is then stored in a pre-configured storage node based on the storage key value to obtain the stored marketing data.
[0008] Receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource ratio of the strategy query instruction in the strategy data corresponding to the stored marketing data.
[0009] Based on the strategy query node and the storage resource ratio, the query operation of the strategy query instruction is executed to obtain the query result of the real-time marketing strategy.
[0010] Optionally, identifying the marketing strategy type of the real-time marketing strategy includes:
[0011] Obtain the market environment for each strategy in the real-time marketing strategy, and query the marketing target corresponding to the market environment;
[0012] The marketing target's consumption products in each strategy are scheduled in real time, and the functions of the consumption products are analyzed to obtain the product functions;
[0013] Calculate the weight of each function in the product functions to obtain the function weight, and filter the product functions according to the function weight to obtain the target functions;
[0014] The target function is identified by type to obtain the function type, and the function type is used as the marketing strategy type of the real-time marketing strategy.
[0015] Optionally, sorting the marketing strategy types to obtain sequential marketing strategies includes:
[0016] Extract the type tag for each type of the marketing strategy type, and parse the type tag to obtain the tag element;
[0017] Perform a linear transformation on the tag element to obtain a linear element, and then perform a vector transformation on the linear element to obtain a linear vector;
[0018] Calculate the average value of the linear vectors to obtain the linear mean. Sort the marketing strategy types according to the linear mean to obtain the sequential marketing strategy.
[0019] Optionally, generating the storage key-value pair of the sequential marketing strategy based on the data attributes includes:
[0020] Feature extraction is performed on the data attributes to obtain feature attributes, and the data architecture of each strategy in the sequential marketing strategy is determined based on the feature attributes;
[0021] Extract the metadata corresponding to each architecture in the data architecture, and construct the identifier corresponding to the metadata;
[0022] Identify the mapping relationship between the metadata and the identifier, and generate the storage key-value pair of the sequential marketing strategy based on the mapping relationship.
[0023] Optionally, the step of extracting features from the data attributes to obtain feature attributes includes:
[0024] Obtain the attribute dimension corresponding to each attribute in the data attributes, and perform dimensionality reduction processing on the data attributes based on the attribute dimensions to obtain dimensionality-reduced attributes;
[0025] Construct the attribute matrix corresponding to the dimensionality reduction attribute, and perform a weighted summation on each matrix in the attribute matrix to obtain the target matrix;
[0026] Based on the target matrix, the feature values of the data attributes are calculated, and the feature attributes of the data attributes are obtained based on the feature values.
[0027] Optionally, constructing the attribute matrix corresponding to the dimensionality-reduced attribute includes:
[0028] The attribute matrix corresponding to the dimensionality-reduced attribute is constructed using the following formula:
[0029]
[0030] Where D represents the attribute matrix corresponding to the dimension reduction attribute, Z represents the number of attributes of the dimension reduction attribute, c represents the initial value of the dimension reduction attribute, a represents the dimension coefficient of the dimension reduction attribute, B represents the independent variable in the dimension reduction attribute, ! represents the factorial of the independent variable in the dimension reduction attribute, and A represents the spectral radius of the matrix corresponding to the dimension reduction attribute.
[0031] Optionally, storing the sequential marketing strategy in a pre-configured storage node according to the storage key value to obtain stored marketing data includes:
[0032] Based on the storage key value, calculate the data memory of each strategy in the sequential marketing strategy, and query the source code corresponding to each strategy;
[0033] The sequential marketing strategies are classified to obtain classification strategies;
[0034] Based on the classification strategy, the data memory, and the source code, a storage area is created in the pre-configured storage node;
[0035] The sequential marketing strategy is stored in the storage area to obtain stored marketing data.
[0036] Optionally, constructing a strategy query copy of the real-time marketing strategy according to the strategy query instruction includes:
[0037] Query the binary code of the query command for the aforementioned strategy;
[0038] Extract the opcode from the binary code, and identify the query information of the strategy query instruction based on the opcode;
[0039] Based on the query information, construct a strategy query copy of the real-time marketing strategy.
[0040] Optionally, the step of querying the copy according to the strategy to locate the query node storing the marketing data includes:
[0041] Identify the replica characters in the query replicas using the strategy, and extract the key characters from the replica characters;
[0042] Calculate the similarity between the key characters and the data characters in the query marketing data to obtain the character similarity.
[0043] When the character similarity is greater than a preset threshold, the data characters are marked to obtain marked characters;
[0044] The marked characters are then used to locate nodes, thereby obtaining the query nodes for the stored marketing data.
[0045] To address the aforementioned problems, the present invention also provides a real-time marketing rule query device based on an LSM tree, the device comprising:
[0046] The marketing strategy sorting module is used to acquire real-time marketing strategies, identify the marketing strategy type of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies.
[0047] The marketing strategy storage module is used to query the data attributes of the sequential marketing strategy and generate the storage key value of the sequential marketing strategy according to the data attributes, so as to store the sequential marketing strategy in a pre-configured storage node according to the storage key value, thereby obtaining stored marketing data;
[0048] The resource proportion calculation module is used to receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource proportion of the strategy query instruction in the strategy data corresponding to the stored marketing data.
[0049] The marketing strategy query module is used to execute the query operation of the strategy query instruction based on the strategy query node and the storage resource ratio, and obtain the query results of the real-time marketing strategy.
[0050] This invention, by acquiring real-time marketing strategies and identifying their marketing strategy types, can understand the categories and types of real-time marketing strategies, providing a guarantee for subsequent sorting of these strategies. The invention queries the data attributes of the sequential marketing strategies and generates storage key-value pairs based on these attributes, facilitating subsequent storage processing of the sequential marketing strategies. Specifically, the invention receives strategy query instructions from the real-time marketing strategies and constructs a strategy query copy based on these instructions, enabling the location of query nodes for the stored marketing data through this copy. The invention executes the query operation of the strategy query instructions based on the strategy query nodes and the proportion of storage resources to obtain the query results for the real-time marketing strategies. Therefore, the real-time marketing rule query method and apparatus based on LSM trees provided by this invention can improve the query efficiency of real-time marketing rules using LSM trees. Attached Figure Description
[0051] Figure 1 A flowchart illustrating a real-time marketing rule query method based on an LSM tree, provided as an embodiment of the present invention;
[0052] Figure 2 A functional module diagram of a real-time marketing rule query device based on an LSM tree provided in an embodiment of the present invention;
[0053] Figure 3 This is a schematic diagram of the structure of an electronic device that implements the real-time marketing rule query method based on an LSM tree, according to an embodiment of the present invention.
[0054] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0055] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0056] This application provides a real-time marketing rule query method based on an LSM tree. In this application, the executing entity of the real-time marketing rule query method based on an LSM tree includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the real-time marketing rule query method based on an LSM tree can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0057] Reference Figure 1 The diagram shown is a flowchart illustrating a real-time marketing rule query method based on an LSM tree according to an embodiment of the present invention. In this embodiment, the real-time marketing rule query method based on an LSM tree includes steps S1-S4:
[0058] S1. Obtain real-time marketing strategies, identify the marketing strategy types of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies.
[0059] This invention, by acquiring real-time marketing strategies and identifying their marketing strategy types, can understand the types and categories of real-time marketing strategies, thus providing a basis for subsequent sorting of these marketing strategy types.
[0060] The real-time marketing strategy refers to the different marketing rules formulated by the company's marketing system according to different organizational levels. For example, the marketing rules of the headquarters company, regional company, and provincial company are different. The marketing strategy type refers to the type of marketing strategy, such as emotional marketing and experiential marketing. Furthermore, the real-time marketing strategy can be obtained by querying the company's marketing department.
[0061] As an embodiment of the present invention, identifying the marketing strategy type of the real-time marketing strategy includes: obtaining the market environment of each strategy in the real-time marketing strategy, querying the marketing object corresponding to the market environment, and scheduling the consumer products of the marketing object in each strategy in real time, performing functional analysis on the consumer products to obtain product functions, calculating the weight of each function in the product functions to obtain function weights, filtering the product functions according to the function weights to obtain target functions, identifying the type of the target functions to obtain function types, and using the function type as the marketing strategy type of the real-time marketing strategy.
[0062] The market environment refers to the external environment corresponding to each strategy in the real-time marketing strategy, such as the political, legal, economic, and technological environment. The marketing target refers to the consumer group in the market environment, such as male, female, and consumers of different age groups. The consumer product refers to the product purchased by the marketing target. The product function refers to the functional purpose of the consumer product. The function weight indicates the importance of each function in the product function. The target function is the function selected based on the value of the function weight. The function type is the category corresponding to the target function.
[0063] Furthermore, the market environment for each strategy in the real-time marketing strategy can be collected and uploaded by marketing personnel; the target audience for marketing can be queried by statistically analyzing the foot traffic in the market environment; the functional analysis of the consumer products can be performed using the functional analysis method; the weight of each function in the product functions can be calculated using the Analytic Hierarchy Process (AHP); the product functions can be filtered using the FILTER function; and the target functions can be identified using the typeof function.
[0064] This invention sorts the marketing strategy types and assigns them to corresponding sequences to facilitate subsequent processing of the marketing strategies. The sequence marketing strategy is obtained by sorting the marketing strategy types.
[0065] As an embodiment of the present invention, sorting the marketing strategy types to obtain sequential marketing strategies includes: extracting type tags for each type of marketing strategy type, parsing the type tags to obtain tag elements, performing linear transformation on the tag elements to obtain linear elements, performing vector transformation on the linear elements to obtain linear vectors, calculating the average value of the linear vectors to obtain a linear mean, and sorting the marketing strategy types according to the linear mean to obtain sequential marketing strategies.
[0066] Wherein, the type label is the identification information corresponding to each type in the marketing strategy type, the label element is the component element of each label in the type label, the linear element is the linear relationship of each element in the label element, the linear vector is the vector expression form corresponding to the linear element, and the linear mean is the vector average value of the linear vector.
[0067] Furthermore, the type tags for each type of marketing strategy can be extracted using a tag extractor, and the element parsing of the type tags can be performed using an element parsing algorithm compiled by a scripting language. The linear transformation of the tag elements can be performed using a linear function, and the vector transformation of the linear elements can be performed using the word2vec algorithm. The average value of the linear vectors can be calculated using the AVERAGE function, and the sorting of the marketing strategy types can be performed using the bubble sort algorithm.
[0068] S2. Query the data attributes of the sequential marketing strategy, and generate the storage key value of the sequential marketing strategy according to the data attributes, so as to store the sequential marketing strategy in the pre-configured storage node according to the storage key value, and obtain the stored marketing data.
[0069] This invention queries the data attributes of the sequential marketing strategy and generates storage key values for the sequential marketing strategy based on the data attributes, so as to facilitate subsequent storage processing of the sequential marketing strategy. The data attributes are the original data features in the sequential marketing strategy, and the storage key values are the storage format corresponding to the sequential marketing strategy when it is stored. Furthermore, querying the data attributes of the sequential marketing strategy can be achieved through an attribute viewer compiled by the Java language.
[0070] As an embodiment of the present invention, generating the storage key value of the sequential marketing strategy based on the data attributes includes: performing feature extraction on the data attributes to obtain feature attributes; determining the data architecture of each strategy in the sequential marketing strategy based on the feature attributes; extracting the metadata corresponding to each architecture in the data architecture and constructing the identifier corresponding to the metadata; identifying the mapping relationship between the metadata and the identifier; and generating the storage key value of the sequential marketing strategy based on the mapping relationship.
[0071] Wherein, the feature attribute is a representative attribute among the data attributes, the data architecture is the data composition form of each strategy in the sequence marketing strategy, the metadata is the data key corresponding to the data architecture, the identifier is the tag symbol corresponding to the metadata, for example, in a computer programming language, the identifier is a code used by the user in programming, and the mapping relationship is the correspondence between the metadata and the identifier.
[0072] Furthermore, as an optional embodiment of the present invention, the data architecture of each strategy in the sequential marketing strategy can be determined by the logical relationship of the feature attributes, the metadata corresponding to each architecture in the data architecture can be extracted by a metadata extractor, the identifier can be constructed by the string corresponding to the metadata, the mapping relationship between the metadata and the identifier can be identified by a mapping function, and the storage key-value of the sequential marketing strategy can be generated by SQL statement programming.
[0073] Furthermore, as an optional embodiment of the present invention, the step of extracting features from the data attributes to obtain feature attributes includes: obtaining the attribute dimension corresponding to each attribute in the data attributes; performing dimensionality reduction processing on the data attributes according to the attribute dimension to obtain dimensionality-reduced attributes; constructing an attribute matrix corresponding to the dimensionality-reduced attributes; performing weighted summation on each matrix in the attribute matrix to obtain a target matrix; calculating the feature value of the data attributes according to the target matrix; and obtaining the feature attributes of the data attributes according to the feature value.
[0074] Wherein, the attribute dimension is the dimension corresponding to the data attribute, such as two-dimensional or three-dimensional, the dimension reduction attribute is the attribute obtained by reducing the attribute from a high dimension to a low dimension, the attribute matrix is a square matrix composed of the dimension reduction attributes, the target matrix is a matrix obtained by weighted summation of the values in each matrix in the attribute matrix, and the eigenvalue is the eigenvector corresponding to the data attribute.
[0075] Furthermore, the attribute dimension corresponding to each attribute in the data attributes can be obtained through a dimension recognizer, which is compiled by a scripting language. Dimensionality reduction of the data attributes can be achieved through the LDA dimensionality reduction algorithm. Weighted summation of each matrix in the attribute matrix can be performed through the weighted average method. The eigenvalues of the data attributes can be calculated through characteristic equations.
[0076] Furthermore, as an optional embodiment of the present invention, constructing the attribute matrix corresponding to the dimensionality reduction attribute includes:
[0077] The attribute matrix corresponding to the dimensionality-reduced attribute is constructed using the following formula:
[0078]
[0079] Where D represents the attribute matrix corresponding to the dimension reduction attribute, Z represents the number of attributes of the dimension reduction attribute, c represents the initial value of the dimension reduction attribute, a represents the dimension coefficient of the dimension reduction attribute, B represents the independent variable in the dimension reduction attribute, ! represents the factorial of the independent variable in the dimension reduction attribute, and A represents the spectral radius of the matrix corresponding to the dimension reduction attribute.
[0080] This invention allows the sequential marketing strategy to be stored in a pre-configured storage node according to the storage key value, thereby facilitating subsequent parallel computation processing of the sequential marketing strategy. The stored marketing data is the data obtained after the sequential marketing strategy is stored according to the storage key value.
[0081] As an embodiment of the present invention, the step of storing the sequential marketing strategy in a pre-configured storage node according to the storage key value to obtain stored marketing data includes: calculating the data memory of each strategy in the sequential marketing strategy according to the storage key value, querying the source code corresponding to each strategy, classifying the sequential marketing strategy to obtain a classification strategy, creating a storage area in the pre-configured storage node according to the classification strategy, the data memory and the source code, and storing the sequential marketing strategy in the storage area to obtain stored marketing data.
[0082] Wherein, the data memory is the data size corresponding to each strategy in the sequential marketing strategy, the source code is the computer language corresponding to each strategy, the classification strategy is the strategy obtained after classifying the sequential marketing strategy, and the storage area is the area in the storage node used to store data. Furthermore, the data memory of each strategy in the sequential marketing strategy can be obtained by calculating the byte length of the data, querying the source code corresponding to each strategy can be achieved by code crawling, the classification processing of the sequential marketing strategy can be achieved by decision tree classification algorithm, and the storage area can be created by storage driver.
[0083] S3. Receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource ratio of the strategy query instruction in the strategy data corresponding to the stored marketing data.
[0084] This invention receives a strategy query instruction from the real-time marketing strategy and constructs a strategy query copy of the real-time marketing strategy based on the strategy query instruction. This allows for the location of the query node storing marketing data through the strategy query copy. The strategy query instruction is the query command of the real-time marketing strategy, and the strategy query copy is the copy information corresponding to the requirements of the instruction in the strategy query instruction. Furthermore, receiving the strategy query instruction of the real-time marketing strategy can be implemented through an instruction receiver, which is compiled by a code language.
[0085] As an embodiment of the present invention, constructing a strategy query copy of the real-time marketing strategy according to the strategy query instruction includes: querying the binary code of the strategy query instruction, extracting the operation code in the binary code, identifying the query information of the strategy query instruction according to the operation code, and constructing a strategy query copy of the real-time marketing strategy according to the query information.
[0086] Wherein, the binary code is the binary number corresponding to the strategy query instruction when it is executed in the computer, the opcode is the code in the binary code used to perform a certain operation, and the query information is the query content corresponding to the strategy query instruction.
[0087] Furthermore, as an optional embodiment of the present invention, the binary code of the strategy query instruction can be queried using the C++ programming language, the opcode in the binary code can be extracted using the Java Virtual Machine, the query information of the strategy query instruction can be obtained by running the opcode using a code runner, and the strategy query copy of the real-time marketing strategy can be constructed by copying the query information.
[0088] This invention locates the query node of the stored marketing data by querying the copy according to the strategy, thereby facilitating rapid querying of the real-time marketing strategy and improving calculation speed. The query node is the query association point of the stored marketing data.
[0089] As an embodiment of the present invention, the step of querying the copy according to the strategy and locating the query node of the stored marketing data includes: identifying the copy characters in the strategy query copy, extracting the key characters in the copy characters, calculating the similarity between the key characters and the data characters in the query marketing data to obtain the character similarity, marking the data characters when the character similarity is greater than a preset threshold to obtain the marked characters, and locating the node of the stored marketing data by the marked characters.
[0090] Wherein, the copy character is a string in the strategy query copy, the key character is a more important string among the copy characters, the character similarity is the degree of similarity between the key character and the data characters in the query marketing data, the preset threshold is the basis for judging the character similarity, which can be 0.8 or can be set according to the actual business scenario, and the marked character is the character obtained after marking when the character similarity is greater than the preset threshold.
[0091] Furthermore, identifying the duplicate characters in the strategy query duplicate can be achieved using OCR text recognition technology; extracting key characters from the duplicate characters can be achieved using a keyword extractor; calculating the similarity between the key characters and the data characters in the query marketing data can be achieved using a cosine similarity algorithm; marking the data characters can be achieved using a marking tool, such as a color marking tool; and locating the marked characters can be achieved using a dynamic node positioning algorithm.
[0092] This invention calculates the proportion of storage resources allocated to the strategy data corresponding to the strategy query instruction in the stored marketing data. This allows for understanding the proportion of data allocated to the strategy query instruction, facilitating subsequent execution of the query operation. The proportion of storage resources is the percentage of data allocated to the strategy query instruction. Furthermore, the proportion of storage resources can be obtained by calculating the ratio of the strategy data corresponding to the strategy query instruction to the stored marketing data.
[0093] S4. Based on the strategy query node and the storage resource ratio, execute the query operation of the strategy query instruction to obtain the query result of the real-time marketing strategy.
[0094] This invention executes the query operation of the strategy query instruction based on the strategy query node and the storage resource ratio, so as to obtain the query result of the real-time marketing strategy. The query result is obtained after querying the real-time marketing strategy. Furthermore, the query operation of executing the strategy query instruction can be implemented by decoding the instruction controller, which is compiled by a scripting language.
[0095] This invention, by acquiring real-time marketing strategies and identifying their marketing strategy types, can understand the categories and types of real-time marketing strategies, providing a guarantee for subsequent sorting of these strategies. The invention queries the data attributes of the sequential marketing strategies and generates storage key-value pairs based on these attributes, facilitating subsequent storage processing of the sequential marketing strategies. Specifically, the invention receives strategy query instructions from the real-time marketing strategies and constructs a strategy query copy based on these instructions, enabling the location of query nodes for the stored marketing data through this copy. The invention executes the query operation of the strategy query instructions based on the strategy query nodes and the proportion of storage resources to obtain the query results for the real-time marketing strategies. Therefore, the real-time marketing rule query method based on LSM trees provided by this invention can improve the query efficiency of real-time marketing rules using LSM trees.
[0096] like Figure 2 The diagram shown is a functional block diagram of a real-time marketing rule query device based on an LSM tree provided in an embodiment of the present invention.
[0097] The real-time marketing rule query device 100 based on LSM tree described in this invention can be installed in an electronic device. Depending on the functions implemented, the real-time marketing rule query device 100 based on LSM tree may include a marketing strategy sorting module 101, a marketing strategy storage module 102, a resource proportion calculation module 103, and a marketing strategy query module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0098] In this embodiment, the functions of each module / unit are as follows:
[0099] The marketing strategy sorting module 101 is used to acquire real-time marketing strategies, identify the marketing strategy type of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies.
[0100] The marketing strategy storage module 102 is used to query the data attributes of the sequential marketing strategy and generate the storage key value of the sequential marketing strategy according to the data attributes, so as to store the sequential marketing strategy in a pre-configured storage node according to the storage key value, thereby obtaining stored marketing data.
[0101] The resource proportion calculation module 103 is used to receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource proportion of the strategy query instruction in the strategy data corresponding to the stored marketing data.
[0102] The marketing strategy query module 104 is used to execute the query operation of the strategy query instruction according to the strategy query node and the storage resource ratio, and obtain the query result of the real-time marketing strategy.
[0103] In detail, the modules in the real-time marketing rule query device 100 based on LSM tree described in this application embodiment adopt the same approach as described above when in use. Figure 1 The method uses the same technical means as the real-time marketing rule query method based on LSM tree described in the article, and can produce the same technical effect, so it will not be repeated here.
[0104] like Figure 3 The diagram shown is a structural schematic of an electronic device 1 that implements a real-time marketing rule query method based on an LSM tree, according to an embodiment of the present invention.
[0105] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a real-time marketing rule query method program based on an LSM tree.
[0106] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device 1, connecting various components of the electronic device via various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing a real-time marketing rule query method program based on an LSM tree) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0107] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of a real-time marketing rule query method program based on an LSM tree, but also to temporarily store data that has been output or will be output.
[0108] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0109] The communication interface 13 is used for communication between the electronic device 1 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0110] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0111] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0112] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0113] The memory 11 in the electronic device 1 stores a real-time marketing rule query method program based on an LSM tree, which is a combination of multiple instructions. When run in the processor 10, it can achieve the following:
[0114] Obtain real-time marketing strategies, identify the marketing strategy types of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies;
[0115] The data attributes of the sequential marketing strategy are queried, and the storage key value of the sequential marketing strategy is generated based on the data attributes. The sequential marketing strategy is then stored in a pre-configured storage node based on the storage key value to obtain the stored marketing data.
[0116] Receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource ratio of the strategy query instruction in the strategy data corresponding to the stored marketing data.
[0117] Based on the strategy query node and the storage resource ratio, the query operation of the strategy query instruction is executed to obtain the query result of the real-time marketing strategy.
[0118] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.
[0119] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0120] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:
[0121] Obtain real-time marketing strategies, identify the marketing strategy types of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies;
[0122] The data attributes of the sequential marketing strategy are queried, and the storage key value of the sequential marketing strategy is generated based on the data attributes. The sequential marketing strategy is then stored in a pre-configured storage node based on the storage key value to obtain the stored marketing data.
[0123] Receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource ratio of the strategy query instruction in the strategy data corresponding to the stored marketing data.
[0124] Based on the strategy query node and the storage resource ratio, the query operation of the strategy query instruction is executed to obtain the query result of the real-time marketing strategy.
[0125] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0126] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0127] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0128] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0129] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0130] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0131] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A real-time marketing rule query method based on LSM tree, characterized in that, The method includes: Obtain real-time marketing strategies, identify the marketing strategy types of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies; The data attributes of the sequential marketing strategy are queried, and the storage key value of the sequential marketing strategy is generated based on the data attributes. The sequential marketing strategy is then stored in a pre-configured storage node based on the storage key value to obtain the stored marketing data. Receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource ratio of the strategy query instruction in the strategy data corresponding to the stored marketing data. Based on the query node and the storage resource ratio, execute the query operation of the strategy query instruction to obtain the query result of the real-time marketing strategy; The step of identifying the marketing strategy type of the real-time marketing strategy includes: obtaining the market environment of each strategy in the real-time marketing strategy, querying the marketing object corresponding to the market environment; scheduling the consumer products of the marketing object in each strategy in real time, performing functional analysis on the consumer products to obtain product functions; calculating the weight of each function in the product functions to obtain function weights, filtering the product functions according to the function weights to obtain target functions; identifying the type of the target functions to obtain function types, and using the function types as the marketing strategy type of the real-time marketing strategy. The step of storing the sequential marketing strategy in a pre-configured storage node according to the storage key value to obtain stored marketing data includes: calculating the data memory of each strategy in the sequential marketing strategy according to the storage key value, and querying the source code corresponding to each strategy; classifying the sequential marketing strategy to obtain a classification strategy; creating a storage area in the pre-configured storage node according to the classification strategy, the data memory, and the source code; and storing the sequential marketing strategy in the storage area to obtain stored marketing data.
2. The real-time marketing rule query method based on LSM tree as described in claim 1, characterized in that, The step of sorting the marketing strategy types to obtain a sequential marketing strategy includes: Extract the type tag for each type of the marketing strategy type, and parse the type tag to obtain the tag element; Perform a linear transformation on the tag element to obtain a linear element, and then perform a vector transformation on the linear element to obtain a linear vector; Calculate the average value of the linear vectors to obtain the linear mean. Sort the marketing strategy types according to the linear mean to obtain the sequential marketing strategy.
3. The real-time marketing rule query method based on LSM tree as described in claim 1, characterized in that, The step of generating the storage key-value pair of the sequential marketing strategy based on the data attributes includes: Feature extraction is performed on the data attributes to obtain feature attributes, and the data architecture of each strategy in the sequential marketing strategy is determined based on the feature attributes; Extract the metadata corresponding to each architecture in the data architecture, and construct the identifier corresponding to the metadata; Identify the mapping relationship between the metadata and the identifier, and generate the storage key-value pair of the sequential marketing strategy based on the mapping relationship.
4. The real-time marketing rule query method based on LSM tree as described in claim 3, characterized in that, The step of extracting features from the data attributes to obtain feature attributes includes: Obtain the attribute dimension corresponding to each attribute in the data attributes, and perform dimensionality reduction processing on the data attributes based on the attribute dimensions to obtain dimensionality-reduced attributes; Construct the attribute matrix corresponding to the dimensionality reduction attribute, and perform a weighted summation on each matrix in the attribute matrix to obtain the target matrix; Based on the target matrix, the feature values of the data attributes are calculated, and the feature attributes of the data attributes are obtained based on the feature values.
5. The real-time marketing rule query method based on LSM tree as described in claim 4, characterized in that, The construction of the attribute matrix corresponding to the dimensionality reduction attribute includes: The attribute matrix corresponding to the dimensionality-reduced attribute is constructed using the following formula: in, This represents the attribute matrix corresponding to the dimensionality reduction attribute. The number of attributes indicating the dimensionality reduction attribute. This represents the starting value of the dimensionality reduction attribute. The dimension coefficient represents the dimension reduction attribute. This represents the independent variable in the dimension reduction attribute. This represents the factorial of the independent variable in the dimension reduction attribute. This represents the spectral radius of the matrix corresponding to the dimensionality reduction attribute.
6. The real-time marketing rule query method based on LSM tree as described in claim 1, characterized in that, The step of constructing a strategy query copy of the real-time marketing strategy according to the strategy query instruction includes: Query the binary code of the query command for the aforementioned strategy; Extract the opcode from the binary code, and identify the query information of the strategy query instruction based on the opcode; Based on the query information, construct a strategy query copy of the real-time marketing strategy.
7. The real-time marketing rule query method based on LSM tree as described in claim 1, characterized in that, The step of querying the copy according to the strategy and locating the query node storing the marketing data includes: Identify the replica characters in the query replicas using the strategy, and extract the key characters from the replica characters; Calculate the similarity between the key characters and the data characters in the stored marketing data to obtain the character similarity. When the character similarity is greater than a preset threshold, the data characters are marked to obtain marked characters; The marked characters are then used to locate nodes, thereby obtaining the query nodes for the stored marketing data.
8. A real-time marketing rule query device based on LSM tree, characterized in that, The device includes: The marketing strategy sorting module is used to acquire real-time marketing strategies, identify the marketing strategy type of the real-time marketing strategies, sort the marketing strategy types, and obtain sequential marketing strategies. The marketing strategy storage module is used to query the data attributes of the sequential marketing strategy and generate the storage key value of the sequential marketing strategy according to the data attributes, so as to store the sequential marketing strategy in a pre-configured storage node according to the storage key value, thereby obtaining stored marketing data; The resource proportion calculation module is used to receive the strategy query instruction of the real-time marketing strategy, construct a strategy query copy of the real-time marketing strategy according to the strategy query instruction, locate the query node of the stored marketing data according to the strategy query copy, and calculate the storage resource proportion of the strategy query instruction in the strategy data corresponding to the stored marketing data. The marketing strategy query module is used to execute the query operation of the strategy query instruction based on the query node and the storage resource ratio, and obtain the query results of the real-time marketing strategy. The step of identifying the marketing strategy type of the real-time marketing strategy includes: obtaining the market environment of each strategy in the real-time marketing strategy, querying the marketing object corresponding to the market environment; scheduling the consumer products of the marketing object in each strategy in real time, performing functional analysis on the consumer products to obtain product functions; calculating the weight of each function in the product functions to obtain function weights, filtering the product functions according to the function weights to obtain target functions; identifying the type of the target functions to obtain function types, and using the function types as the marketing strategy type of the real-time marketing strategy. The step of storing the sequential marketing strategy in a pre-configured storage node according to the storage key value to obtain stored marketing data includes: calculating the data memory of each strategy in the sequential marketing strategy according to the storage key value, and querying the source code corresponding to each strategy; classifying the sequential marketing strategy to obtain a classification strategy; creating a storage area in the pre-configured storage node according to the classification strategy, the data memory, and the source code; and storing the sequential marketing strategy in the storage area to obtain stored marketing data.
Citation Information
Patent Citations
Method and system for quickly matching marketing activity products meeting user conditions
CN112613907A
Transaction processing method and device
CN112819619A