Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a data recommendation method according to an embodiment of the present application.
And S110, determining a flow distribution interval corresponding to the online flow based on a preset distribution algorithm and distribution parameters.
It should be understood that, in the embodiment of the present application, the online traffic may be classified based on a preset flow splitting algorithm and flow splitting parameters of the traffic.
The offloading parameters may include, for example, at least one of a user identification, a location, a timestamp, an internet protocol, IP, media access control, MAC, address, a timestamp, etc. of the online traffic. Of course, the use of other parameters of the on-line flow as a shunt parameter is not excluded.
The preset shunting algorithm may, for example, include at least one of: hash seed split algorithm, AB test split algorithm, etc.
In the following, the Hash seed splitting algorithm is taken as the splitting algorithm, and the user identifier is taken as the splitting parameter for example. If there are no A, B, C, D four traffic flows, hash operations are performed according to the user identifiers to obtain four values of 0, 1, 0, and 1, respectively, then A, C may be divided into one traffic flow splitting interval, and B, D may be divided into another traffic flow splitting interval. For convenience of distinction, the flow dividing section of A, C is designated as section 1, and the flow dividing section of B, D is designated as section 2.
And S120, acquiring data characteristics corresponding to the flow distribution intervals from the characteristic library.
The data characteristics corresponding to the flow distribution intervals in the characteristic library are data characteristics obtained by data mining of the offline flow distributed to the flow distribution intervals based on the preset distribution algorithm and the distribution parameters.
It should be understood that, in the embodiment of the present application, for the offline traffic, the same flow splitting algorithm and flow splitting parameters as those in step S110 are also used for performing flow splitting, and data mining is performed based on the split traffic, so as to obtain data characteristics corresponding to each traffic splitting section.
For example, the offline traffic also uses a Hash seed flow splitting algorithm as a flow splitting algorithm and uses the user identifier as a flow splitting parameter, so as to obtain a traffic flow splitting interval (interval 1 and interval 2), and further obtain the data characteristics of interval 1 and the data characteristics of interval 2 through data mining.
At this time, according to the traffic split section after the online traffic division, the data characteristics corresponding to the traffic split section can be obtained.
And S130, acquiring recommended data corresponding to the flow distribution interval based on the data characteristics of the flow distribution interval.
In the embodiment of the application, based on the data characteristics, recommendation data corresponding to the data characteristics can be acquired from the recommendation content database.
And S140, pushing the recommended data corresponding to the flow distribution interval to the online flow belonging to the flow distribution interval.
After the recommended data corresponding to the traffic diversion interval is obtained in step S130, the recommended data can be pushed to the online traffic belonging to the traffic diversion interval.
In the embodiment of the application, the online flow is shunted, the recommendation data are determined based on the offline data characteristics corresponding to the shunted shunting intervals, and then the recommendation data corresponding to the shunting intervals are pushed to the online flow corresponding to the shunting intervals, so that the calculated amount caused by online analysis of the data characteristics can be reduced, and the recommendation efficiency is improved.
It should be understood that there may be only one or a plurality of flow splitting sections where the online flow is split.
Optionally, if the traffic splitting interval corresponding to the online traffic includes a first traffic splitting interval and a second traffic splitting interval, step S120 may specifically be implemented as:
acquiring a first data characteristic corresponding to a first flow splitting interval;
and acquiring a second data characteristic corresponding to the second flow splitting interval.
Further, step S130 may be implemented as:
determining first recommended data based on first data characteristics corresponding to the first flow diversion interval;
and determining second recommendation data based on second data characteristics corresponding to the second flow splitting interval.
Still further, step S140 may be implemented as:
feeding back first recommendation data to the online flow of the first flow distribution interval;
and feeding back second recommendation data to the online flow of the second flow splitting interval.
Of course, it should be understood that prior to step S110, the method may further include:
determining a flow distribution interval corresponding to the off-line flow based on the preset distribution algorithm and the distribution parameters;
and performing data mining based on the offline flow in the flow distribution section to obtain data characteristics corresponding to the flow distribution section.
It should be understood that when the online traffic is split, only one splitting algorithm may be used for the first-stage splitting, and multiple algorithms may also be used for the multi-stage splitting.
Optionally, step S110 may be specifically implemented as:
determining a first flow splitting interval to which the online flow belongs based on a first splitting algorithm and a first splitting parameter;
and based on a second flow splitting algorithm and a second flow splitting parameter, carrying out re-flow splitting on the online flow in the first flow splitting interval so as to determine a second flow splitting interval to which the online flow in the first flow splitting interval belongs.
Of course, it should be understood that for a flow splitting algorithm, the flow splitting parameter may include one attribute of the flow, and may also include multiple attributes of the flow. The method of the embodiments of the present application will be further described with reference to specific embodiments.
FIG. 2 is an interaction flow diagram of data recommendation according to an embodiment of the present application. As shown in fig. 2, in the data recommendation process, an online traffic processing part and an offline traffic processing part may be included.
In the offline traffic processing part, the method can comprise the following steps:
1.1 offline data import
The step may specifically be to import the user data of the offline flow to the offline offloading module, so that the offline offloading module offloads the user data of the offline flow.
The user data may include, for example, user identification, web page content accessed by the user, keywords entered, current location and terminal device information, and the like.
1.2 reading the preset shunting algorithm and shunting parameters
The step may specifically be to read a preset shunting algorithm and shunting parameters from the shunting synchronization module.
Preferably, as an embodiment, the preset shunting algorithm read in step 1.2 is a shunting algorithm for an AB test, and the read shunting parameter is a user identifier.
1.3 offline flow splitting
The method includes the steps that user data of offline flow are shunted based on the read preset shunting algorithm and shunting parameters, in the embodiment, the user data of offline flow can be specifically divided into a first flow shunting interval and a second flow shunting interval, and a data mining A module can perform data feature mining on the first flow shunting interval; the data mining B module can perform data characteristic mining on the second flow splitting interval.
1.4 data feature derivation
Specifically, the data mining A module performs data feature mining on the first traffic distribution interval to obtain the features of the version A; the data mining B module performs data feature mining on the second traffic split section to obtain a feature of the version B, and the feature of the version a and the feature of the version B are specifically, for example, features that can reflect the income condition of a user. In addition, the step can also import the features of the version A and the features of the version B into the feature library.
The online flow processing part can comprise:
2.1 traffic retrieval
The step may specifically import the user data of the online traffic to the online shunting module, so that the online shunting module shunts the user data of the online traffic to determine a traffic shunting interval corresponding to the online traffic.
The user data may include, for example, user identification, web page content accessed by the user, input keywords, current location and terminal device information, etc., similar to the offline traffic processing section.
2.2 reading the Preset Split Algorithm and Split parameters
This step corresponds to 1.2 of the offline traffic processing section, and may specifically read a preset splitting algorithm and splitting parameters from the splitting synchronization module, where the preset splitting algorithm and the splitting parameters are the same as those read by the offline traffic processing section, for example, the preset splitting algorithm is a splitting algorithm for an AB test, and the read splitting parameters are user identifiers.
2.3 Online flow splitting
The user data of the online traffic is shunted based on the read preset shunting algorithm and the read shunting parameters, in this embodiment, the user data of the online traffic may be specifically divided into a first traffic shunting interval and a second traffic shunting interval, where the online logic a module corresponds to the first traffic shunting interval, and the online logic B module corresponds to the second traffic shunting interval.
2.4 obtaining data characteristics corresponding to the flow distribution interval from the characteristic library
In this step, the online logic A module reads the characteristics of the version A correspondingly, and the online logic B module reads the characteristics of the version B correspondingly.
2.5 push recommendation data
Specifically, in this step, the online logic a module obtains first recommendation data based on the feature of the version a of the first traffic splitting interval, and pushes the first recommendation data to the online traffic belonging to the first traffic splitting interval; and the online logic B module acquires second recommendation data based on the characteristics of the version B of the second traffic diversion interval and pushes the second recommendation data to the online traffic belonging to the second traffic diversion interval.
In this embodiment, for example, if the features of the version a and the features of the version B are features that can reflect the income condition of the user, the recommended data in this place, for example, in the first traffic diversion interval, recommend a travel route with a large consumption amount to a high-income user, recommend a travel route with a small consumption amount to a low-income user, and the like; and recommending the travel routes with similar consumption amount to the high-income users and the low-income users in the second flow diversion interval, and the like.
In addition, the embodiment may also evaluate the advantages and disadvantages of the recommended data in the first traffic splitting interval and the recommended data in the second traffic splitting interval according to the feedback result after the recommended data is pushed.
In the embodiment of the application, the online flow is shunted, the recommendation data are determined based on the offline data characteristics corresponding to the shunted shunting intervals, and then the recommendation data corresponding to the shunting intervals are pushed to the online flow corresponding to the shunting intervals, so that the calculated amount caused by online analysis of the data characteristics can be reduced, and the recommendation efficiency is improved.
By shunting the user data of the offline flow, the user data of all the offline flow does not need to be processed, and the user data shunted out of the offline flow is far smaller than the user data of all the offline flow, so that the data processing efficiency is improved.
The data recommendation method according to the embodiment of the present application is described in detail above with reference to fig. 1 and 2. An electronic device according to an embodiment of the present application will be described in detail below with reference to fig. 3. Referring to fig. 3, at a hardware level, the electronic device includes a processor, optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware needed to implement other services.
The processor, the network interface, and the memory may be interconnected by an internal bus, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form a device for forwarding the chat information on a logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
determining a flow distribution interval corresponding to the on-line flow based on a preset distribution algorithm and distribution parameters;
acquiring data characteristics corresponding to a flow distribution interval from a characteristic library, wherein the data characteristics corresponding to the flow distribution interval in the characteristic library are data characteristics obtained by data mining of off-line flow distributed to the flow distribution interval based on the preset distribution algorithm and the distribution parameters;
acquiring recommended data corresponding to a flow distribution interval based on data characteristics of the flow distribution interval;
and pushing the recommended data corresponding to the flow distribution interval to the online flow belonging to the flow distribution interval.
The method performed by the data recommendation method disclosed in the embodiment of fig. 1 and 2 of the present application may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may also execute the method shown in fig. 1 and fig. 2, and implement the functions of the data recommendation method in the embodiments shown in fig. 1 and fig. 2, which are not described herein again in this embodiment of the application.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present application also propose a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method of the embodiment shown in fig. 1 and 2, and in particular to perform the following method:
determining a flow distribution interval corresponding to the on-line flow based on a preset distribution algorithm and distribution parameters;
acquiring data characteristics corresponding to a flow distribution interval from a characteristic library, wherein the data characteristics corresponding to the flow distribution interval in the characteristic library are data characteristics obtained by data mining of off-line flow distributed to the flow distribution interval based on the preset distribution algorithm and the distribution parameters;
acquiring recommended data corresponding to a flow distribution interval based on data characteristics of the flow distribution interval;
and pushing the recommended data corresponding to the flow distribution interval to the online flow belonging to the flow distribution interval.
Fig. 4 is a schematic structural diagram of a data recommendation device according to an embodiment of the present application, and as shown in fig. 4, the device includes:
the determining unit 401 determines a flow splitting interval corresponding to the online flow based on a preset splitting algorithm and a splitting parameter;
an obtaining unit 402, configured to obtain data characteristics corresponding to a traffic diversion interval from a feature library, where the data characteristics corresponding to the traffic diversion interval in the feature library are data characteristics obtained by data mining of offline traffic diverted to the traffic diversion interval based on the preset diversion algorithm and the diversion parameter;
the obtaining unit 402 further obtains recommended data corresponding to a traffic diversion interval based on data characteristics of the traffic diversion interval;
the pushing unit 403 is configured to push the recommended data corresponding to the traffic splitting interval to the online traffic belonging to the traffic splitting interval.
According to the data recommendation device provided by the embodiment of the invention, the online flow is shunted, the recommendation data is determined based on the offline data characteristics corresponding to the shunted shunting interval, and then the recommendation data corresponding to the shunting interval is pushed to the online flow corresponding to the shunting interval, so that the calculated amount caused by online analysis of the data characteristics can be reduced, and the recommendation efficiency is further improved.
Optionally, as an embodiment, the data recommendation apparatus may further include a data feature processing module (not shown), and the data feature nursing module may be configured to:
determining a flow distribution interval corresponding to the off-line flow based on the preset distribution algorithm and the distribution parameters;
data mining is carried out on the basis of the offline flow in the flow distribution interval, and data characteristics corresponding to the flow distribution interval are obtained;
and storing the flow distribution interval and the corresponding data characteristics into the characteristic library.
Optionally, as an embodiment, if the traffic splitting section corresponding to the online traffic includes a first traffic splitting section and a second traffic splitting section, the acquiring unit 402 acquires the data feature corresponding to the traffic splitting section includes:
acquiring a first data characteristic corresponding to a first flow splitting interval;
and acquiring a second data characteristic corresponding to the second flow splitting interval.
Optionally, as an embodiment, the obtaining unit 402 obtains, based on the data feature of the traffic diversion interval, recommended data corresponding to the traffic diversion interval, where the obtaining includes:
determining first recommended data based on first data characteristics corresponding to the first flow diversion interval;
and determining second recommendation data based on second data characteristics corresponding to the second flow splitting interval.
Optionally, as an embodiment, the pushing unit 403 pushes the recommended data corresponding to the traffic splitting interval to the online traffic belonging to the traffic splitting interval, which includes:
the pushing unit 403 feeds back the first recommendation data to the online traffic of the first traffic splitting interval;
and feeding back second recommendation data to the online flow of the second flow splitting interval.
Optionally, as an embodiment, the determining unit 401 determines, based on a preset splitting algorithm and a splitting parameter, a traffic splitting interval to which the online traffic belongs, including:
the determining unit 401 determines, based on the first splitting algorithm and the first splitting parameter, a first traffic splitting interval to which the online traffic belongs;
and based on a second flow splitting algorithm and a second flow splitting parameter, carrying out re-flow splitting on the online flow in the first flow splitting interval so as to determine a second flow splitting interval to which the online flow in the first flow splitting interval belongs.
Optionally, as an embodiment, the offloading parameter includes at least one of a user identifier, a location, an internet protocol IP address, a media access control MAC address, and a timestamp of the traffic.
Optionally, as an embodiment, the preset splitting algorithm includes at least one of:
hash seed shunting algorithm and AB test shunting algorithm.
The data recommendation device according to the embodiment of the present invention may refer to the flow corresponding to the data recommendation method according to the foregoing embodiment of the present invention, and each unit/module and the other operations and/or functions in the data recommendation device are respectively for implementing the corresponding flow in the data recommendation method, and are not described herein again for brevity.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.