Disclosure of Invention
The embodiment of the application provides an information pushing method and device.
In a first aspect, an embodiment of the present application provides an information pushing method, where the method includes: receiving an article identification of an article to be placed on a shelf, which is sent by terminal equipment; searching article identification of an article to be shelved in a pre-generated article weighting graph, wherein the article weighting graph stores an article identification set, the article weighting graph is divided into a plurality of article weighting sub-graphs, each article weighting sub-graph stores a plurality of article identifications, and every two article weighting sub-graphs are not overlapped; in response to the found article identification of the article to be shelved, determining an article weighted subgraph where the article identification of the article to be shelved is located; acquiring a shelf identifier set corresponding to an item weighting subgraph where an item identifier of an item to be shelved is located; and pushing at least one shelf identifier in the acquired shelf identifier set to the terminal equipment.
In some embodiments, pushing at least one shelf identity of the acquired set of shelf identities to the terminal device comprises: obtaining the volume of an object to be placed on a shelf; acquiring the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set; matching the volume of the articles to be shelved with the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set, and selecting the shelf identifier of the shelf with the current storage space matched with the volume of the articles to be shelved from the obtained shelf identifier set; and pushing the selected shelf identification to the terminal equipment.
In some embodiments, the item weighting graph is generated by: acquiring the association degree between the items indicated by any two item identifications in the item identification set; and taking each article identifier in the article identifier set as each vertex, taking the association degree between the articles indicated by any two article identifiers in the article identifier set as the weight of a connecting edge between the vertices corresponding to any two article identifiers, and generating an article weighted graph.
In some embodiments, obtaining the association degree between the items indicated by any two item identifiers in the item identifier set includes: acquiring an order data set in a historical time period, wherein each order data comprises item identifications of a plurality of items; and carrying out statistical analysis on the item identifications in the order data set, determining the frequency of any two item identifications in the order data set belonging to the same order data, and taking the frequency as the association degree between the items indicated by any two item identifications.
In some embodiments, the item weighting graph is partitioned into a plurality of item weighting subgraphs by: generating an adjacency matrix of the item weighting graph; generating a Laplace matrix of the object weighted graph based on the adjacency matrix; obtaining a plurality of eigenvalues of a Laplace matrix; selecting a preset number of characteristic values from the plurality of characteristic values; acquiring eigenvectors corresponding to the preset number of eigenvalues; clustering the feature vectors corresponding to the feature values of the preset number based on the corresponding relation between the feature vectors and the article identifications to obtain a plurality of article identification classes; and based on a plurality of item identification classes, segmenting the item weighting graph to obtain a plurality of item weighting subgraphs, wherein one item weighting subgraph stores the item identification in one item identification class.
In some embodiments, generating the laplacian matrix of the item weighting graph based on the adjacency matrix comprises: generating a diagonal matrix of the adjacency matrix, wherein elements on a diagonal of the diagonal matrix are sums of elements on rows or columns of the adjacency matrix; and subtracting the adjacency matrix from the diagonal matrix to obtain a Laplace matrix of the object weighted graph.
In some embodiments, selecting a predetermined number of feature values from the plurality of feature values includes: sorting the plurality of eigenvalues according to the order of the magnitude of the eigenvalues; and selecting a preset number of characteristic values from the side with the smaller characteristic value.
In a second aspect, an embodiment of the present application provides an information pushing apparatus, where the apparatus includes: the article identification receiving unit is configured to receive the article identification of the article to be placed on the shelf, which is sent by the terminal equipment; the system comprises an article identification searching unit, a storage unit and a display unit, wherein the article identification searching unit is configured to search article identifications of articles to be shelved in a pre-generated article weighting graph, the article weighting graph stores an article identification set, the article weighting graph is divided into a plurality of article weighting subgraphs, each article weighting subgraph stores a plurality of article identifications, and every two article weighting subgraphs are not overlapped; the article weighting subgraph determining unit is configured for responding to the found article identification of the article to be placed on the shelf and determining the article weighting subgraph where the article identification of the article to be placed on the shelf is located; the shelf identifier set acquisition unit is configured to acquire a shelf identifier set corresponding to an item weighting subgraph where an item identifier of an item to be shelved is located; and the shelf identifier pushing unit is configured to push at least one shelf identifier in the acquired shelf identifier set to the terminal device.
In some embodiments, the shelf identification pusher comprises: the volume acquisition subunit is configured for acquiring the volume of the article to be shelved; the storage space acquisition subunit is configured to acquire the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set; the shelf identifier selecting subunit is configured to match the volume of the article to be shelved with the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set, and select the shelf identifier of the shelf with the current storage space matched with the volume of the article to be shelved from the obtained shelf identifier set; and the shelf identifier pushing subunit is configured to push the selected shelf identifier to the terminal device.
In some embodiments, the apparatus further comprises an item weighting graph generating unit, the item weighting graph generating unit comprising: the association degree acquisition subunit is configured to acquire the association degree between the items indicated by any two item identifiers in the item identifier set; and the item weighting graph generating subunit is configured to use each item identifier in the item identifier set as each vertex, use the association degree between the items indicated by any two item identifiers in the item identifier set as a weight of a connecting edge between the vertices corresponding to any two item identifiers, and generate the item weighting graph.
In some embodiments, the association obtaining subunit includes: the order data set acquisition module is configured to acquire an order data set in a historical time period, wherein each order data set comprises item identifications of a plurality of items; and the association degree determining module is configured to perform statistical analysis on the item identifiers in the order data set, determine the frequency of any two item identifiers in the order data set belonging to the same order data, and use the frequency as the association degree between the items indicated by any two item identifiers.
In some embodiments, the apparatus further comprises an item weighting graph splitting unit, the item weighting graph splitting unit comprising: an adjacency matrix generation subunit configured to generate an adjacency matrix of the item weighting graph; a laplacian matrix generation subunit configured to generate a laplacian matrix of the weighted graph of the article based on the adjacency matrix; an eigenvalue acquisition subunit configured to acquire a plurality of eigenvalues of the laplace matrix; the characteristic value selecting subunit is configured to select a preset number of characteristic values from the plurality of characteristic values; the characteristic vector acquisition subunit is configured to acquire characteristic vectors corresponding to a preset number of characteristic values; the characteristic vector clustering subunit is configured to cluster the characteristic vectors corresponding to the preset number of characteristic values based on the corresponding relationship between the characteristic vectors and the article identifiers to obtain a plurality of article identifier classes; and the item weighting graph dividing subunit is configured to divide the item weighting graph based on the plurality of item identification classes to obtain a plurality of item weighting subgraphs, wherein one item weighting subgraph stores the item identification in one item identification class.
In some embodiments, the laplacian matrix generating subunit includes: a diagonal matrix generation module configured to generate a diagonal matrix of the adjacency matrix, wherein elements on a diagonal of the diagonal matrix are sums of elements on rows or columns of the adjacency matrix; and the Laplace matrix generation module is configured for subtracting the adjacency matrix by using the diagonal matrix to obtain a Laplace matrix of the object weighted graph.
In some embodiments, the feature value selecting subunit includes: the characteristic value sorting module is configured to sort the plurality of characteristic values according to the size sequence of the characteristic values; and the characteristic value selection module is configured to select a preset number of characteristic values from the side with the smaller characteristic value.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; storage means 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 are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the information pushing method and the information pushing device, the received article identification of the article to be shelved is searched in the pre-generated article weighting graph, so that the article weighting subgraph where the article identification of the article to be shelved is located is determined; then, acquiring a shelf identifier set corresponding to the item weighting subgraph where the item identifier of the item to be shelved is located; and finally, pushing at least one shelf identifier in the acquired shelf identifier set to the terminal equipment. Therefore, the articles indicated by the article identifications belonging to the same article weighting subgraph are stored on a plurality of fixed shelves as much as possible, and when the articles indicated by a plurality of article identifications belonging to the same article weighting subgraph need to be picked simultaneously, the frequency of shelf delivery in the article picking process is reduced.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which the information push method or the information push apparatus according to the embodiment of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices including, but not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may provide various services, for example, the server 105 may analyze and process the received data such as the item identifier of the item to be shelved, and feed back the processing result (e.g., at least one shelf identifier) to the terminal devices 101, 102, 103.
It should be noted that the information pushing method provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the information pushing apparatus is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of an information push method according to the present application is shown. The information pushing method comprises the following steps:
step 201, receiving an article identifier of an article to be shelved sent by a terminal device.
In this embodiment, the electronic device (for example, the server 105 shown in fig. 1) on which the information push method operates may receive the item identifier of the item to be shelved from the terminal device (for example, the terminal devices 101, 102, 103 shown in fig. 1) to which the electronic device is communicatively connected. The article identifier may be composed of letters, numbers, symbols, and the like, and is used for uniquely identifying the article. For example, the item identifier may be a SKU (Stock Keeping Unit) number of the item, where the SKU number is short for a uniform serial number of the item, and each item corresponds to a unique SKU number.
Step 202, finding the item identification of the item to be shelved in the pre-generated item weighted graph.
In this embodiment, based on the item identifier of the to-be-shelved item received in step 201, the electronic device may search the item identifier of the to-be-shelved item in the item weighting graph. Specifically, the electronic device may compare the article identifier of the article to be shelved with each article identifier stored in the article weighting graph, respectively; if an article identifier is the same as the article identifier of the article to be placed on the shelf, the search is successful, and the step 203 is continuously executed; if the article identifier is not the same as that of the article to be placed on the shelf, the search is unsuccessful, and the process is ended, at this time, the worker can randomly select a shelf and store the article to be placed on the shelf on the selected shelf.
In this embodiment, the item weighting graph may store an item identifier set, the item weighting graph may be pre-divided into a plurality of item weighting subgraphs, each item weighting subgraph may store a plurality of item identifiers, and each two item weighting subgraphs are not overlapped.
In this embodiment, the electronic device may generate the item weighting graph in a variety of ways. For example, one skilled in the art may collect data by initiating a questionnaire on a large number of items and perform a collation analysis on the collected data to generate an item weighting graph. Specifically, those skilled in the art can ask the user in the questionnaire which of a large number of items the user will purchase at the same time, and different users can select different items according to their wishes. After a period of time, the electronic device may perform recovery, sorting and analysis on the questionnaire, determine the frequency of occurrence of any two of the large number of items in the same questionnaire, and use the frequency as the association degree between any two items, then use the item identifier of each item in the large number of items as each vertex, use the association degree between any two items in the large number of item sets as the weight of the connecting edge between the vertices corresponding to the item identifiers of any two items, and generate the item weighting graph.
Step 203, responding to the found article identification of the article to be shelved, and determining an article weighted subgraph where the article identification of the article to be shelved is located.
In this embodiment, the electronic device may determine the article weighted sub-graph where the article identifier of the article to be shelved is located, when the article identifier of the article to be shelved is found. Here, the article weighting graph is pre-divided into a plurality of article weighting subgraphs, and the article weighting subgraphs are not overlapped with each other, and the electronic device may find the position of the article identifier of the article to be shelved on the article weighting graph, so as to determine the specific article weighting subgraph on which the position of the article identifier of the article to be shelved falls, where the article weighting subgraph is the article weighting subgraph on which the article identifier of the article to be shelved is located.
In this embodiment, the electronic device may divide the item weighting graph into a plurality of item weighting subgraphs in a variety of ways. As an example, one skilled in the art may first determine the number of the sub-graphs to be divided, and then cut off some edges of the weighted graph through various division criteria, thereby implementing the division of the weighted graph. Common partition criteria may include, but are not limited to, a minimum cut set criterion, a canonical cut set criterion, a proportional cut set criterion, an average cut set criterion, a minimum maximum cut set criterion, a multipath canonical cut set criterion, and the like.
And 204, acquiring a shelf identifier set corresponding to the item weighting subgraph where the item identifier of the item to be shelved is located.
In this embodiment, based on the item weighting subgraph where the item identifier of the item to be shelved is located determined in step 203, the electronic device may obtain a shelf identifier set corresponding to the item weighting subgraph where the item identifier of the item to be shelved is located. The goods weighting subgraph can correspond to a shelf identification set, generally, shelf identifications in different shelf identification sets are different, and the distance between shelves indicated by two shelf identifications in the same shelf identification set is shorter.
Step 205, at least one shelf identifier in the acquired shelf identifier set is pushed to the terminal device.
In this embodiment, based on the shelf identifier set obtained in step 204, the electronic device may push at least one shelf identifier in the obtained shelf identifier set to the terminal device. At this time, the staff can search the shelf indicated by the displayed shelf identifier according to the shelf identifier displayed on the terminal device, and store the article to be placed on the shelf on the searched shelf.
As an example, the electronic device may first acquire the volume of the item to be shelved; then, acquiring the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set; then matching the volume of the articles to be shelved with the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set, and selecting the shelf identifier of the shelf with the current storage space matched with the volume of the articles to be shelved from the obtained shelf identifier set; and finally, pushing the selected shelf identification to the terminal equipment. Here, if the current storage space of one shelf is not less than the volume of the article to be shelved, it can be considered that the current storage space of the shelf matches the volume of the article to be shelved; if the current storage space of a shelf is smaller than the volume of the article to be shelved, the current storage space of the shelf and the volume of the article to be shelved can be considered to be mismatched.
As another example, the electronic device may push all shelf identifications in the acquired set of shelf identifications to the terminal device.
According to the information pushing method provided by the embodiment of the application, the received article identification of the article to be shelved is searched in the pre-generated article weighted graph, so that the article weighted subgraph where the article identification of the article to be shelved is located is determined; then, acquiring a shelf identifier set corresponding to the item weighting subgraph where the item identifier of the item to be shelved is located; and finally, pushing at least one shelf identifier in the acquired shelf identifier set to the terminal equipment. Therefore, the articles indicated by the article identifications belonging to the same article weighting subgraph are stored on a plurality of fixed shelves as much as possible, and when the articles indicated by a plurality of article identifications belonging to the same article weighting subgraph need to be picked simultaneously, the frequency of shelf delivery in the article picking process is reduced.
With further reference to FIG. 3, a flow 300 of one embodiment of an item weighting graph generation method is shown. The flow 300 of the method for generating the weighted graph of the article includes the following steps:
step 301, obtaining the association degree between the items indicated by any two item identifications in the item identification set.
In this embodiment, an electronic device (for example, the server 105 shown in fig. 1) on which the item weighting graph generating method operates may obtain a degree of association between items indicated by any two item identifiers in the item identifier set. For example, the item identification set may include item identifications "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", and the association degree between items indicated by any two item identifications in the item identification set may be as shown in table 1:
article identification 1
|
Article identification 2
|
Degree of association between article identifier 1 and article identifier 2
|
11
|
5
|
121
|
2
|
1
|
107
|
2
|
7
|
65
|
9
|
2
|
38
|
3
|
0
|
37
|
9
|
3
|
35
|
6
|
4
|
33
|
8
|
3
|
75
|
10
|
3
|
31
|
11
|
3
|
20
|
3
|
4
|
40
|
9
|
7
|
70
|
2
|
0
|
55
|
12
|
2
|
40 |
TABLE 1
In some optional implementations of this embodiment, the electronic device may first obtain an order data set over a historical period of time (e.g., the first two months, the first half year); then, the article identifications in the order data set are subjected to statistical analysis, the frequency that any two article identifications in the order data set belong to the same order data is determined, and the frequency is used as the correlation degree between the articles indicated by any two article identifications. Each order data may include item identifiers of a plurality of items, and the item identifier set may be composed of item identifiers in the order data set.
In some alternative implementations of the present embodiment, a person skilled in the art may collect data by initiating a questionnaire on a large number of items and perform a collation analysis on the collected data to generate an item weighting graph. Specifically, those skilled in the art can ask the user in the questionnaire which of a large number of items the user will purchase at the same time, and different users can select different items according to their wishes. After a period of time, the electronic device may perform a recycling, sorting, and analyzing on the questionnaire to determine how often any two of the plurality of items appear in the same questionnaire, and use the frequency as the relevancy between any two items. Wherein the set of item identifications may consist of item identifications of a large number of items.
Step 302, using each item identifier in the item identifier set as each vertex, using the association degree between the items indicated by any two item identifiers in the item identifier set as the weight of the connecting edge between the vertices corresponding to any two item identifiers, and generating an item weighted graph.
In this embodiment, based on the association degree between the items indicated by any two item identifiers in the item identifier set obtained in step 301, the electronic device may use each item identifier in the item identifier set as a vertex, and use the association degree between the items indicated by any two item identifiers in the item identifier set as a weight of a connecting edge between the vertices corresponding to any two item identifiers, thereby generating an item weighting graph. As an example, the weight of the connecting edge may be represented by the thickness of the line of the connecting edge, and specifically, as shown in fig. 4, a schematic diagram of a weighted graph of an article is shown; or, a number may be marked on the connecting edge, where the marked number is the weight of the connecting edge.
With further reference to FIG. 5, a flow 500 of one embodiment of a method of an item-weighting graph partitioned into a plurality of item-weighting subgraphs is illustrated. The process 500 of the method for partitioning an item-weighting graph into a plurality of item-weighting subgraphs, comprises the steps of:
in step 501, an adjacency matrix of an item weighting graph is generated.
In this embodiment, an electronic device (e.g., server 105 shown in FIG. 1) on which the method of partitioning an item-weighting graph into a plurality of item-weighting subgraphs operates may generate an adjacency matrix for the item-weighting graph from the item-weighting graph.
In this embodiment, the adjacency matrix may be further divided into a directed graph adjacency matrix and an undirected graph adjacency matrix, where the adjacency matrix is usually referred to as an undirected graph adjacency matrix. The adjacency matrix may be a matrix representing the adjacency relationship between vertices. For example, if G ═ V, E is an item weighting graph, where V is a vertex and E is a weight of a connecting edge of a vertex between any two vertices, then the adjacency matrix of item weighting graph G may be a square matrix of order n (n is the total number of vertices of item weighting graph G) with the following properties:
for an undirected graph, the adjacency matrix must be symmetric, and the major diagonal is zero and the minor diagonal is not necessarily 0.
Secondly, in the undirected graph, the degree of any vertex i (i is a positive integer, and i is more than or equal to 1 and less than or equal to n) is the number of all non-zero elements in the ith column (or ith row).
③ using the adjacent matrix method to represent the graph totally needs n
2Since the adjacent matrixes of the undirected graph have a symmetrical relation, the data of the upper triangle or the lower triangle only needs to be stored except for zero deduction of the diagonal line, and therefore, only the data of the upper triangle or the lower triangle needs to be stored
A space.
As an example, if the item weighting graph G is shown in fig. 4, the adjacency matrix H of the item weighting graph G is:
step 502, based on the adjacency matrix, a laplacian matrix of the article weighted graph is generated.
In this embodiment, based on the adjacency matrix generated in step 501, the electronic device may generate a laplacian matrix of the weighted graph of the article. Specifically, the electronic device may first generate a diagonal matrix of the adjacency matrix; and then subtracting the adjacency matrix by using the diagonal matrix to obtain a Laplace matrix of the object weighted graph. Wherein the elements on the diagonal of the diagonal matrix may be the sum of the elements on the rows or columns of the adjacent matrix. For example, if the article weighted graph G has n vertices, the laplacian matrix L of the article weighted graph G is:
L=D-H;
wherein, H is the adjacency matrix of the item weighting graph G, and D is the diagonal matrix of the adjacency matrix H.
Following the example in step 501, the diagonal matrix D is:
the laplacian matrix L of the article weighted graph G is:
step 503, obtaining a plurality of eigenvalues of the laplacian matrix.
In this embodiment, based on the laplacian matrix generated in step 502, the electronic device may obtain a plurality of eigenvalues of the laplacian matrix. Where a is an n-th order square matrix, if the number λ and the n-dimensional non-zero column vector x satisfy the relation Ax λ x, such a number λ is referred to as a matrix a eigenvalue.
Step 504, selecting a preset number of feature values from the plurality of feature values.
In this embodiment, based on the plurality of eigenvalues of the laplacian matrix obtained in step 503, the electronic device may select a preset number of eigenvalues from the plurality of eigenvalues. Typically, the number of feature values selected is equal to the number of segmented item-weighted sub-graphs.
As an example, the electronic device may first sort the plurality of eigenvalues in order of their magnitude; then, a predetermined number of feature values are selected from the side having the smaller feature value.
As another example, the electronic device may randomly select a preset number of feature values from the plurality of feature values.
Step 505, obtaining the eigenvectors corresponding to the preset number of eigenvalues.
In this embodiment, based on the preset number of feature values selected in step 503, the electronic device may obtain feature vectors corresponding to the preset number of feature values. Where a is an n-th order square matrix, if the number λ and the n-dimensional non-zero column vector x satisfy the relation Ax λ x, such number λ is referred to as a matrix a eigenvalue, and the non-zero vector x is referred to as an eigenvector of a corresponding to the eigenvalue λ.
Step 506, clustering the feature vectors corresponding to the feature values of the preset number based on the corresponding relationship between the feature vectors and the article identifiers to obtain a plurality of article identifier classes.
In this embodiment, based on the corresponding relationship between the feature vectors and the article identifiers, the electronic device may cluster the feature vectors corresponding to the feature values of the preset number, so as to obtain a plurality of article identifier classes. For example, the electronic device may arrange the K (K is a positive integer) eigenvectors together into an n × K matrix, treat each row as a vector in a dimensional space, and perform clustering using the K-means algorithm. The category to which each row in the clustering result belongs is the category to which the vertex of the original article weighted graph G belongs respectively. The basic idea of the K-means algorithm is as follows: for a given k, an initial grouping method is first given, and then the grouping is changed by iterative methods, so that the grouping scheme after each improvement is better than the previous one, and the so-called good criterion is: the closer the data records in the same group, the better, and the further the data records in different groups, the better. Here, the laplacian matrix of the weighted graph of the articles is used for feature decomposition, and then the obtained feature vectors are subjected to K-means clustering, so that the similarity between the article identifiers in the same article identifier class is as high as possible, and the similarity between the article identifiers in different article identifier classes is as low as possible.
And 507, dividing the item weighting graph based on the plurality of item identification classes to obtain a plurality of item weighting subgraphs.
In this embodiment, based on the plurality of item identifier classes obtained in step 506, the electronic device may segment the item weighting graph, so as to obtain a plurality of item weighting subgraphs, where one item weighting subgraph may store the item identifiers in one item identifier class. For example, if the item identification set is clustered into two item identification classes, the first item identification class comprising the item identifications "0", "1", "2", "7", "9", "12", and the second item identification class comprising the item identifications "3", "4", "5", "6", "8", "10", "11", the splitting of the item weighting graph into two item weighting subgraphs may be as shown in fig. 6, where 601 is the split line between the two item weighting subgraphs. In this way, the sum of the weights of the cut connecting edges can be minimized, so that the weights (similarity) of the connecting edges connecting different item-weighted sub-graphs are as low as possible, and the weights (similarity) of the connecting edges in the same item-weighted sub-graph are as high as possible.
With further reference to fig. 7, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of an information pushing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied in various electronic devices.
As shown in fig. 7, the information pushing apparatus 700 of the present embodiment may include: an item identifier receiving unit 701, an item identifier searching unit 702, an item weighted subgraph determining unit 703, a shelf identifier set acquiring unit 704 and a shelf identifier pushing unit 705. The article identifier receiving unit 701 is configured to receive an article identifier of an article to be shelved, which is sent by a terminal device; an item identifier searching unit 702, configured to search an item identifier of an item to be shelved in a pre-generated item weighting graph, where the item weighting graph stores an item identifier set, the item weighting graph is divided into multiple item weighting subgraphs, each item weighting subgraph stores multiple item identifiers, and every two item weighting subgraphs are not overlapped; an article weighted sub-graph determining unit 703 configured to determine, in response to finding the article identifier of the article to be shelved, an article weighted sub-graph in which the article identifier of the article to be shelved is located; the shelf identifier set acquisition unit 704 is configured to acquire a shelf identifier set corresponding to an item weighting subgraph where an item identifier of an item to be shelved is located; a shelf identifier pushing subunit 705 configured to push the selected shelf identifier to the terminal device.
In this embodiment, in the information pushing apparatus 700: the specific processing of the item identifier receiving unit 701, the item identifier searching unit 702, the item weighted sub-graph determining unit 703, the shelf identifier set obtaining unit 704, and the shelf identifier pushing unit 705 and the technical effects thereof may refer to the related descriptions of step 201, step 202, step 203, step 204, and step 205 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementations of this embodiment, the shelf identifier pushing unit 705 may include: a volume acquiring subunit (not shown in the figure) configured to acquire the volume of the article to be shelved; a storage space acquiring subunit (not shown in the figure), configured to acquire a current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set; a shelf identifier selecting subunit (not shown in the figure), configured to match the volume of the article to be shelved with the current storage space of the shelf indicated by each shelf identifier in the selected shelf identifier set, and select the shelf identifier of the shelf whose current storage space matches the volume of the article to be shelved from the obtained shelf identifier set; a shelf identifier pushing subunit (not shown in the figure) configured to push the selected shelf identifier to the terminal device.
In some optional implementations of this embodiment, the information pushing apparatus 700 may further include an item weighting graph generating unit (not shown in the figure), and the item weighting graph generating unit may include: an association obtaining subunit (not shown in the figure), configured to obtain an association between items indicated by any two item identifiers in the item identifier set; and an item weighting graph generating subunit (not shown in the figure) configured to generate an item weighting graph by using each item identifier in the item identifier set as each vertex, and using the association degree between the items indicated by any two item identifiers in the item identifier set as a weight of a connecting edge between the vertices corresponding to any two item identifiers.
In some optional implementation manners of this embodiment, the association degree obtaining subunit may include: an order data set obtaining module (not shown in the figure) configured to obtain an order data set in a historical time period, wherein each order data includes item identifiers of a plurality of items; and an association determining module (not shown in the figure) configured to perform statistical analysis on the item identifiers in the order data set, determine a frequency that any two item identifiers in the order data set belong to the same order data, and use the frequency as an association between items indicated by any two item identifiers.
In some optional implementations of this embodiment, the information pushing apparatus 700 may further include an item weighting graph dividing unit (not shown in the figure), and the item weighting graph dividing unit may include: an adjacency matrix generation subunit (not shown in the figure) configured to generate an adjacency matrix of the item weighting graph; a laplacian matrix generating subunit (not shown in the figure) configured to generate a laplacian matrix of the weighted graph of the article based on the adjacency matrix; an eigenvalue acquisition subunit (not shown in the figure) configured to acquire a plurality of eigenvalues of the laplacian matrix; a feature value selecting subunit (not shown in the figure) configured to select a preset number of feature values from the plurality of feature values; a feature vector obtaining subunit (not shown in the figure) configured to obtain feature vectors corresponding to a preset number of feature values; a feature vector clustering subunit (not shown in the figure) configured to cluster feature vectors corresponding to a preset number of feature values based on a corresponding relationship between the feature vectors and the article identifiers to obtain a plurality of article identifier classes; and an item weighting graph partitioning subunit (not shown in the figure) configured to partition the item weighting graph based on the plurality of item identification classes to obtain a plurality of item weighting subgraphs, wherein one item weighting subgraph stores the item identification in one item identification class.
In some optional implementations of this embodiment, the laplacian matrix generating subunit may include: a diagonal matrix generation module (not shown in the figure) configured to generate a diagonal matrix of the adjacency matrix, wherein elements on a diagonal of the diagonal matrix are sums of elements on rows or columns of the adjacency matrix; a laplacian matrix generation module (not shown) configured to subtract the adjacency matrix from the diagonal matrix to obtain a laplacian matrix of the weighted graph of the article.
In some optional implementations of this embodiment, the feature value selecting subunit may include: a eigenvalue sorting module (not shown in the figure) configured to sort the plurality of eigenvalues in order of magnitude of the eigenvalues; and a feature value selecting module (not shown) configured to select a preset number of feature values from the side with the smaller feature value.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 8 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. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 801. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present 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.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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 units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor comprises an item identification receiving unit, an item identification searching unit, an item weighting subgraph determining unit, a shelf identification set acquiring unit and a shelf identification pushing unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the item identification receiving unit may also be described as a "unit that receives an item identification of an item on shelf to be transmitted by the terminal device".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving an article identification of an article to be placed on a shelf, which is sent by terminal equipment; searching article identification of an article to be shelved in a pre-generated article weighting graph, wherein the article weighting graph stores an article identification set, the article weighting graph is divided into a plurality of article weighting sub-graphs, each article weighting sub-graph stores a plurality of article identifications, and every two article weighting sub-graphs are not overlapped; in response to the found article identification of the article to be shelved, determining an article weighted subgraph where the article identification of the article to be shelved is located; acquiring a shelf identifier set corresponding to an item weighting subgraph where an item identifier of an item to be shelved is located; and pushing at least one shelf identifier in the acquired shelf identifier set to the terminal equipment.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.