Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable medium for generating a common access path of a node, which can generate the common access path of the node based on a subsequent behavior of a node-retained user, so that an access path of a functional node of a website or software can be optimized based on the common access path, and thus the user viscosity is improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of generating a common access path of a node, the method including:
acquiring each access path of all reserved users of a given node accessing the given node in a first time period, and generating an access path list, wherein every two nodes adjacent to each other in the access paths are defined as an access pair, and in one access pair, the former node is the former node of the access pair, and the latter node is the latter node of the access pair;
counting the occurrence times of the first access pair of each access path in the access path list in the list, sorting the first access pair of each access path according to the occurrence times from large to small, and selecting the first n access pairs, wherein n is a set positive integer;
for each access pair of the selected n access pairs, performing the following steps:
step a, taking the access pair as a current access pair and storing the current access pair;
b, counting the occurrence times of each access pair in the access path list, which takes the rear node of the current access pair as the front node, in the list, and taking the access pair with the maximum occurrence times as an intermediate access pair and storing the access pair;
step c, when the rear node of the intermediate access pair is not the given node, the intermediate access pair is taken as the current access pair, and the step b is switched to;
and d, connecting all the stored access pairs in series to generate a common access path of the given node.
Further, the step d further includes: and performing path optimization on the common access path.
Further, the surviving user visited the given node for a second time period prior to the first time period, and visited the given node again for the first time period, the first time period and the second time period not overlapping.
Further, the access path is configured with a session label, when the time interval between two consecutive accesses of a retention user to the given node is not greater than a predetermined time, the access paths of the two consecutive accesses are configured with the same session label,
in the step of counting the number of occurrences in the list of first accesses to each access path in the list of access paths, comprising:
and carrying out re-counting on the occurrence times in the list according to the first access of the session label to each access path.
Further, the step of counting the number of occurrences in the access path list of each access pair having the succeeding node of the current access pair as the preceding node comprises:
and according to the session label, carrying out re-counting on the occurrence times of each access pair taking the rear node of the current access pair as the front node in the list.
Optionally, the step of performing path optimization on the common access path includes:
and removing unnecessary nodes in the common access path to shorten the distance of the common access path.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for generating a common access path of a node, the apparatus including:
a list generating module, configured to obtain each access path for all persistent users of a given node to access the given node within a first time period, and generate an access path list, where every two nodes adjacent to each other in front of and behind the given node in one access path are defined as an access pair, in one access pair, a previous node is a previous node of the access pair, and a next node is a subsequent node of the access pair,
the access pair selection module is used for counting the occurrence times of the first access pair of each access path in the access path list in the list, sequencing the first access pair of each access path according to the occurrence times from large to small and selecting the first n access pairs, wherein n is a set positive integer;
a frequent path generation and optimization module for performing the following steps for each of the selected n access pairs:
step a, taking the access pair as a current access pair and storing the current access pair;
b, counting the occurrence times of each access pair in the access path list, which takes the rear node of the current access pair as the front node, in the list, and taking the access pair with the maximum occurrence times as an intermediate access pair and storing the access pair;
step c, when the rear node of the intermediate access pair is not the given node, the intermediate access pair is taken as the current access pair, and the step b is switched to;
and d, connecting all the stored access pairs in series to generate a common access path of the given node.
Further, the common path generating and optimizing module is further configured to perform path optimization on the common access path in step d.
Further, the surviving user visited the given node within a second time period prior to the first time period, and visited the given node again within the first time period, the first time period and the second time period not overlapping.
Further, the access path is configured with a session label, when the time interval between two consecutive accesses of a retention user to the given node is not greater than a predetermined time, the access paths of the two consecutive accesses are configured with the same session label,
the access pair selection module comprises: the first re-ranking counting submodule is used for re-ranking and counting the occurrence times of the first access pair of each access path in the list according to the session label;
the common path generation and optimization module comprises: and the second re-ranking counting submodule is used for re-ranking and counting the occurrence times of each access pair in the list, wherein the access pair takes the rear node of the current access pair as the front node, according to the session label.
Optionally, the common path generating and optimizing module is further configured to remove unnecessary nodes in the common access path in step d, so as to shorten the common access path distance.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an access path optimization electronic device including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a common access path of a node provided by the embodiment of the present invention.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program, when executed by a processor, implementing the method for generating a common access path of a node provided by the embodiments of the present invention.
According to the method, the device, the electronic equipment and the computer readable medium for generating the common access path of the node, the reserved user of the given node is determined, the access path of the reserved user for accessing the given node is further obtained, then the access path of the reserved user is analyzed, the most common access path of the reserved user is obtained, and the access path of the given node can be optimized based on the most common access path. The subsequent access behaviors of the reserved users of the functional nodes of the website and the software are fully mined, and the access path of the specific functional node is simplified according to the access habits of the reserved users, so that the reserved users can access the specific functional node more quickly, the user stickiness of the website and the software is improved, the reserved users can continuously reserve the specific functional node, greater value is brought, and the fine operation of the website and the software is realized.
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.
The embodiment of the invention provides a method for generating a common access path of a node, which comprises the steps of generating the common access path of the given node by analyzing the subsequent access behavior of the reserved user of the given node, and optimizing the access path of the given node through the common access path. The node in the embodiment of the invention refers to a function node in software such as a website or an APP.
As shown in fig. 1, the method for generating a common access path of a node provided by the present invention includes: step 101 to step 103. Instep 101, each access path of all the remaining users of a given node in a first time period to access the given node is obtained, and an access path list is generated.
In the invention, the reserved user is a user who accesses the given node in the second time period and accesses the given node again in the first time period, and the first time period and the second time period are not overlapped. The given node is a pre-designated basic node for counting user retention, a first time period and a second time period are predefined time intervals, the time of the second time period is before the first time period, and if a user visits the given node in the second time period and visits the given node again in the first time period, the user is defined as the user retention of the given node. The first time period and the second time period may be one week, one month, one quarter, or even longer if computing resources allow, and are not limited herein.
For example, the method provided by the invention is used for optimizing the access path of the 'guess-you-like' function node of the APP, and the 'guess-you-like' function node is the given node. In this step, firstly determining the remaining users of the "guess you like" functional node, if the second time period is the first quarter of 2016 and the first time period is the second quarter of 2016, determining the access user group of the functional node in the first quarter of 2016 according to the user identifier of the APP access user, and then, if there is a behavior of accessing or clicking again in the user group, and the user still using the "guess you like" module is the remaining user of the "guess you like" functional node.
In this step, an access path for each persistent user to access the given node in the second time period is obtained, where the access path also includes multiple access paths for the persistent user to access the given node multiple times in the second time period. In the invention, every two nodes adjacent to each other in front and back of an access path are defined as an access pair, and in one access pair, the former node is the former node of the access pair, and the latter node is the latter node of the access pair.
For example, one access path is: a1-a2-a3-a4-a5, wherein a1, a2, a3, a4 and a5 are nodes in the path, and the access pairs of the path are a1-a2, a2-a3, a3-a4, a4-a5, and a1 and a2 are front nodes and back nodes of a1-a2 respectively.
In step 102, counting the number of occurrences of the first access pair of each access path in the access path list in the list, sorting the first access pair of each access path according to the number of occurrences from large to small, and selecting the first n access pairs, where n is a set positive integer.
For example, the access path list generated in onestep 101 includes four access paths for user 1 to user 4 to access a given node a 5:
the access path for user 1 is a1-a2-a3-a4-a5,
the access path foruser 2 is a1-a2-a4-a5,
the access path foruser 3 is a1-a3-a4-a5,
the access path for user 4 is a1-a2-a4-a5,
the first access pair of the access paths for user 1,user 2 anduser 3 are all a1-a2, and the first access pair of the access path foruser 3 are a1-a 3. The number of occurrences in the list of access pair a1-a2 is 3 and the number of occurrences in the list of access pair a1-a3 is 1, so the access pairs obtained by step 102 are sorted as a1-a2, a1-a 3.
In the invention, the access path is configured with a session label, and when the time interval between two consecutive accesses of a retention user to a given node is not more than a preset time, the access paths of the two consecutive accesses are configured as the same session label. That is, from the time when the user enters the website to the time when the user leaves the website, the interval between two consecutive visits to the node does not exceed a predetermined time (generally defined as 30 minutes in the practical application process, which is not limited in the present invention), the two visits of the user are counted as one session, and the two visits with the time interval exceeding the predetermined time are counted as two sessions respectively. The session label configured for the access path in the invention indicates the session to which the access path belongs, all the access paths corresponding to the access behavior in one session have the same session label, and the session labels of the access paths corresponding to the access behaviors of different sessions are different.
In step 102, counting the number of occurrences of the first access pair in the list for each access path in the access path list specifically includes: and counting the occurrence times in the list according to the first access pair of each access path of the session label, counting the occurrence times in the list through the rearrangement when one access pair appears in a plurality of paths with the same session label, and counting the occurrence times directly without performing the rearrangement when the access pair appears in a plurality of paths with different session labels.
As shown in fig. 1 and fig. 2, instep 103, sequentially performing the following steps a to d for each of the selected n access pairs, by which n access paths starting from the selected n access pairs are obtained through analysis, where the n access paths are the paths with the most accesses of the remaining user group of the given node, and after further performing path optimization on the n access paths, the optimization of the access path for the given node in the website or software can be achieved.
Instep 103, step a is first executed, and the access pair is taken as the current access pair and stored, that is, each access pair in the access pair sequence obtained in step 102 is taken as the current access pair in turn. As illustrated in step 102, the access pairs are ordered as a1-a2 and a1-a3, so the access pair a1-a2 is now taken as the current access pair and saved, then the subsequent steps b to d are performed, and after step d is completed, the access pair a1-a3 is taken as the current access pair, and the subsequent steps c to d are performed again.
And b, counting the occurrence times of each access pair taking the rear node of the current access pair as the front node in the access path list, and taking the access pair with the maximum occurrence times as an intermediate access pair and storing the intermediate access pair. As in the above example, the access path list is:
a1-a2-a3-a4-a5,
a1-a2-a4-a5,
a1-a3-a4-a5,
a1-a2-a4-a5,
the current access pair is a1-a2, the following node is a2, the access pair with the following node of the current access pair as the preceding node, i.e. the access pair with a2 as the preceding node, is: a2-a3 and a2-a4, counting a2-a3 and a2-a4, the occurrence frequency of the access pair a2-a3 is 1, the occurrence frequency of the access pair a2-a4 is 2, so that the access pair a2-a4 is taken as an intermediate access pair and saved, and then step c is performed.
In the present invention, step b, counting the number of occurrences of each access pair in the access path list, which takes the rear node of the current access pair as the front node, includes: and according to the session label, carrying out re-counting on the occurrence times of each access pair taking the rear node of the current access pair as the front node in the list. In the same manner as the rearrangement counting in step 102, if an access pair appears in a plurality of paths having the same session label, the number of occurrences in the above path in the access pair is rearranged to 1, and conversely, if the access pair appears in a plurality of paths having different session labels, the number of occurrences is counted without performing the rearrangement.
And c, when the rear node of the intermediate access pair is not the given node, taking the intermediate access pair as the current access pair, and executing the step b. As in the example above, the middle access pair a2-a 4's successor node is not the given node a5, so step b is performed with a2-a4 as the current access pair.
In step b, the number of occurrences in the access path list of each access pair with the rear node a4 of the current access pair a2-a4 as the front node is counted, in the example, the access pair with the front node a4 is only a4-a5, and a4-a5 is taken as an intermediate access pair and saved by counting sorting, and then step c is executed.
In step c, the intermediate access is a given node to the rear node a5 of a4-a5, so step d is performed without going to step b.
Step d, concatenating all the access pairs saved in steps a to c to generate a common access path of the given node, as in the above example, the access pairs are saved in the execution process of steps a to c: a1-a2, a2-a4 and a4-a5, and the saved access pairs are connected in series to generate a common access path a1-a2-a4-a5 of a given node a 5.
Step d also comprises path optimization of the common access path. In the present invention, the path optimization of the common access path in step d includes: unnecessary nodes in the common access path are removed to shorten the distance of the common access path. The obtained common access path is analyzed, and because the access path is fixed after the user uses the specific function node, the fixed access path can be analyzed, whether the access path can be simplified or not is considered, whether a single node in the analysis path can be removed or not is analyzed, so that the previous node can directly reach the next node, the user can reach the final given node at the fastest speed, and therefore, enough stay time is kept at the final given node, and the effect of optimizing the access path of the given node is achieved.
And d, after the step d is executed, returning to the step a to repeatedly execute the steps a to d for the next access pair in the sequence. As in the example above, access pairs are ordered as a1-a2, a1-a3, and after steps a through d have been performed for access pair a1-a2, steps a through d are performed for access pair a1-a 3. And d, after all the first n access pairs in the list are subjected to the steps a to d, obtaining n common access paths of the given node, and optimizing the n common access paths. In the actual application process, after 10 access paths are optimized generally, the optimization of the remaining user access path of a given functional node can be considered to be optimal, and certainly, according to the method provided by the invention, more access paths can be continuously analyzed and optimized.
According to the method for generating the common access path of the node, the reserved user of the given node is determined, the access path of the reserved user for accessing the given node is further obtained, then the access path of the reserved user is analyzed, the most frequent access path of the reserved user is obtained, and the access path of the given node is optimized based on the most frequent access path. The subsequent access behaviors of the reserved users of the functional nodes of the website and the software are fully mined, and the access path of the specific functional node is simplified according to the access habits of the reserved users, so that the reserved users can access the specific functional node more quickly, the user stickiness of the website and the software is improved, the reserved users can continuously reserve the specific functional node, greater value is brought, and the fine operation of the website and the software is realized.
An embodiment of the present invention further provides a device for generating a common access path of a node, as shown in fig. 3, the device includes: the system comprises a list generation module 1, an accesspair selection module 2 and a common path generation andoptimization module 3.
The list generating module 1 is configured to obtain each access path through which all remaining users of a given node access the given node within a first time period, and generate an access path list, where every two nodes adjacent to each other in the access path are defined as an access pair, in one access pair, a previous node is a previous node of the access pair, a subsequent node is a subsequent node of the access pair,
the accesspair selection module 2 is used for counting the occurrence times of the first access pair of each access path in the access path list in the list, sorting the first access pair of each access path according to the occurrence times from large to small and selecting the first n access pairs, wherein n is a set positive integer;
the usual path generation andoptimization module 3 is adapted to perform the following steps for each access pair of the selected n access pairs:
step a, taking the access pair as a current access pair and storing the current access pair;
b, counting the occurrence times of each access pair in the access path list, which takes the rear node of the current access pair as the front node, and taking the access pair with the maximum occurrence times as an intermediate access pair and storing the access pair;
step c, when the rear node of the intermediate access pair is not the given node, the intermediate access pair is taken as the current access pair, and the step b is switched to;
and d, concatenating all the stored access pairs to generate a common access path of the given node.
In the present invention, the common path generating and optimizing module is further configured to perform path optimization on the common access path in step d.
In the invention, the retention user visits the given node in a second time period before the first time period, and visits the given node again in the first time period, and the first time period and the second time period do not overlap.
In the invention, the access path is configured with a session label, when the time interval between two successive accesses of a given node by a reserved user is not more than a preset time length, the access paths of the two successive accesses are configured as the same session label,
the accesspair selection module 2 includes: the first re-ranking counting submodule is used for re-ranking and counting the occurrence times of the first access pair in each access path in the list according to the session label;
the common path generation andoptimization module 3 includes: and the second re-ranking counting submodule is used for re-ranking and counting the occurrence times of each access pair taking the rear node of the current access pair as the front node in the list according to the session label.
In the invention, the common path generation and optimization module is further used for removing unnecessary nodes in the common access path so as to shorten the distance of the common access path.
The device for generating the common access path of the node obtains the access path of the retention user for accessing the given node by determining the retention user of the given node, analyzes the access path of the retention user, obtains the most frequent access path of the retention user, and optimizes the access path of the given node based on the most frequent access path. The subsequent access behaviors of the reserved users of the functional nodes of the website and the software are fully mined, and the access path of the specific functional node is simplified according to the access habits of the reserved users, so that the reserved users can access the specific functional node more quickly, the user stickiness of the website and the software is improved, the reserved users can continuously reserve the specific functional node, the higher value is brought, and the fine operation of the website and the software is realized.
Referring now to FIG. 4, shown is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the computer system includes a Central Processing Unit (CPU)601, which 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 theRAM 603, various programs and data necessary for system operation are also stored. The CPU601,ROM 602, andRAM 603 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 portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; 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, the processes described in the above flowcharts may be implemented as computer software programs, according to the disclosed embodiments of the present invention. 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 above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present application may 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 application, 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 this application, 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 application. 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 application 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 a list generation module, an access pair selection module, and a frequent path generation and optimization module. For example, the access pair selection module may be further described as "counting the occurrence number of the first access pair in the list of each access path in the access path list, sorting the first access pair of each access path according to the occurrence number from large to small, and selecting the top n access pairs".
As another aspect, the present application also provides a computer-readable medium, which 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 comprise:
acquiring each access path of all reserved users of a given node accessing the given node in a first time period, and generating an access path list, wherein every two nodes adjacent to each other in the access paths are defined as an access pair, and in one access pair, the former node is the former node of the access pair, and the latter node is the latter node of the access pair;
counting the occurrence times of the first access pair of each access path in the access path list in the list, sorting the first access pair of each access path according to the occurrence times from large to small, and selecting the first n access pairs, wherein n is a set positive integer;
for each access pair of the selected n access pairs, performing the following steps:
step a, taking the access pair as a current access pair and storing the current access pair;
b, counting the occurrence times of each access pair in the access path list, which takes the rear node of the current access pair as the front node, and taking the access pair with the maximum occurrence times as an intermediate access pair and storing the access pair;
step c, when the rear node of the intermediate access pair is not the given node, the intermediate access pair is taken as the current access pair, and the step b is switched to;
and d, concatenating all the stored access pairs to generate a common access path of the given node.
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.