Method, device, equipment, storage medium and product for sorting historical records
By generating and comparing feature vectors of historical documents, it solves the problem of cumbersome operations for users when browsing historical records, and achieves the effect of finding documents of interest more quickly.
Patent Information
- Application Number
- CN202011561390.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-12-25
AI Technical Summary
When users browse historical records, historical record documents sorted by time are not necessarily the documents that users are most interested in. As a result, users need to browse a large number of records, which is cumbersome and time-consuming.
By obtaining the collection of historical documents to be sorted, a document feature vector corresponding to each document is formed, including browsing time description information, and sorted according to the similarity between these feature vectors and the unified feature vector to ensure that the documents that the user is interested in Be in the front position.
It reduces the user's operation steps and time, and improves the user's search efficiency and user experience for historical records documents.
Smart Images

Figure CN112559886B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to, but not limited to, the field of artificial intelligence and intelligent search technology, and specifically to a method, device, equipment, storage medium and product for sorting historical record documents. Background Art
[0002] When users use related products with search functions, such as navigation applications, shopping applications, browsers or websites, when retrieval or click actions occur, these products usually record the user's operation actions and store them in the history in chronological order, making it convenient for people to quickly find history documents.
[0003] However, when people browse historical records, the document that is at the front in time order is sometimes not the document that the user is most interested in. When the historical record document the user needs is at the back of the historical record, the user's step length for browsing the historical records increases, the operation is cumbersome and time-consuming. Summary of the invention
[0004] The present invention provides a method, device, equipment, storage medium and product for sorting historical record documents.
[0005] According to one aspect of the present disclosure, a method for sorting history record documents is provided, comprising:
[0006] Acquire a set of historical record documents to be sorted, and form a document feature vector corresponding to each historical record document, wherein the document feature vector carries browsing time description information of the historical record document;
[0007] According to the document feature vectors of the historical record documents, a unified feature vector is formed, wherein the unified feature vector carries the document features of all the historical record documents;
[0008] The historical record documents are sorted according to the similarity between the document feature vectors and the unified feature vector.
[0009] According to another aspect of the present disclosure, there is provided a device for sorting history record documents, comprising:
[0010] A document feature vector generation module is used to obtain a set of historical record documents to be sorted and form a document feature vector corresponding to each historical record document, wherein the document feature vector carries browsing time description information of the historical record document;
[0011] A unified feature vector generation module, used to form a unified feature vector according to the document feature vectors of each of the historical record documents, wherein the unified feature vector carries the document features of all the historical record documents;
[0012] The historical record document sorting module is used to sort the historical record documents according to the similarity between the feature vectors of each document and the unified feature vector.
[0013] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for sorting history records documents described in any embodiment of the present disclosure.
[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method for sorting history record documents described in any embodiment of the present disclosure.
[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the method for sorting history record documents according to any embodiment of the present disclosure.
[0019] According to the technical solution disclosed in the present invention, when a user browses historical records, the user's operation steps can be reduced and time can be saved.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0022] Figure 1 is a schematic diagram of a method for sorting historical record documents according to an embodiment of the present disclosure;
[0023] Figure 2 is a schematic diagram of another method for sorting historical record documents according to an embodiment of the present disclosure;
[0024] Figure 3 is a schematic diagram of another method for sorting historical record documents according to an embodiment of the present disclosure;
[0025] Figure 4 is a schematic diagram of another method for sorting historical record documents according to an embodiment of the present disclosure;
[0026] Figure 5 is a network structure diagram of a method for sorting historical record documents according to an embodiment of the present disclosure;
[0027] Figure 6 is a structural schematic diagram of a historical record document sorting device according to an embodiment of the present disclosure;
[0028] Figure 7 It is a block diagram of an electronic device used to implement the method for sorting history records documents according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0030] Figure 1 This is a schematic diagram of a method for sorting historical records according to an embodiment of the present disclosure. This embodiment is applicable to the case of sorting historical records contained in historical records. This method can be performed by a historical records document sorting device, which can be implemented by software and / or hardware and integrated in an electronic device. The electronic device involved in this embodiment can be a server, a computer, a smart phone or a tablet computer. Specifically, refer to Figure 1 , the method specifically includes the following:
[0031] S110 , obtaining a set of historical record documents to be sorted, and forming a document feature vector corresponding to each historical record document.
[0032] Among them, the document feature vector carries the browsing time description information of the history record document; wherein, the browsing time description information of the history record document can be the historical time when the user browses the target history record document; or it can be the time interval between the time when the user views the history record document and the historical time when the target history record is browsed, which is not limited in this embodiment; wherein, the target history record document can be any history record document in the history record document set, which is not limited in this embodiment.
[0033] Exemplarily, the document feature vector corresponding to history record document A may include the historical time when the user browsed history record document A (for example, Saturday, December 12, 2020 15:06); it may also include the time interval between the time when the user viewed the history record (for example, Saturday, December 12, 2020 16:06) and the historical time when the history record document A was browsed (for example, Saturday, December 12, 2020 15:06) (for example, 16:06-15:06=1 hour).
[0034] It should be noted that the historical record document involved in this embodiment can be the uniform resource locator (URL) corresponding to each product involved in a shopping application, for example, the URL corresponding to book A; it can also be the path information between each departure point and each destination in a navigation application, for example, the three optional paths between destination A and destination B; it can also be the URL corresponding to each information queried by a user in a query application, etc., which is not limited in this embodiment.
[0035] In an optional implementation of this embodiment, when a user views a history record document, multiple history record documents included in the history record can be formed into a history record document set, and then a document feature vector corresponding to each history record document can be generated based on the browsing time description information of each history record document.
[0036] For example, when a user views the history records of a shopping application A, the history records contain 100 history records documents, and the 100 history records documents can be formed into a history record document set; further, a document feature vector corresponding to each history record document can be generated based on the browsing time description information of each history record document. In an example of this embodiment, if the user views the history records at 8 a.m., and the user browses history record document A at 6 a.m., a document feature vector corresponding to history record document A can be generated based on the time interval between the time when the user views the history records and the time when the user browses history record document A (8-6=2 hours).
[0037] It is understandable that the document feature vector corresponding to the history record document may include document feature information of the history record document. Further, the document feature information may include browsing time description information of the history record document and index information of the history record document, for example, the serial number of the history record document.
[0038] S120: Form a unified feature vector based on the document feature vectors of each historical record document.
[0039] The unified feature vector carries the document features of all historical record documents.
[0040] In an optional implementation of this embodiment, after forming a document feature vector corresponding to each historical record document in the historical record document set, a unified feature vector containing document feature information of all historical record documents may be further generated based on the document feature vectors of each historical record document.
[0041] In an optional implementation of this embodiment, after forming a document feature vector corresponding to each historical record document in the historical record document set, each document feature vector can be further input into a deep learning model in sequence to obtain a unified feature vector containing the document feature information of all historical record documents.
[0042] S130 , sorting the history record documents according to the similarity between the feature vectors of each document and the unified feature vector.
[0043] In an optional implementation of the present embodiment, after obtaining the document feature vector corresponding to each historical record document in the historical record document set and the unified feature vector containing the document feature information of all historical record documents, the similarity between each document feature vector and the unified feature vector can be calculated respectively, and then the historical record documents can be sorted according to the similarities; for example, the historical record document corresponding to the maximum value in the calculation result can be placed at the front position in the historical record.
[0044] In an optional implementation of this embodiment, after obtaining the document feature vector corresponding to each historical record document in the historical record document set and the unified feature vector containing the document feature information of all historical record documents, the cosine similarity between each document feature vector and the unified feature vector can be calculated respectively; for example, if the document feature vector corresponding to the historical record document A is vector a, and the unified feature vector is vector b, the cosine similarity c between vector a and vector b can be calculated by the following formula;
[0045]
[0046] Furthermore, after obtaining the cosine similarity between all document feature vectors and the unified feature vector, each historical record document can be sorted according to the size of the pre-similarity. For example, if the historical record document set includes three historical record documents (historical record document A, historical record document B, and historical record document C), and the similarities between the document feature vectors of these three historical record documents and the unified feature vector are 0.9, 0.85, and 0.88, respectively, then the arrangement order of these three historical record documents in the historical record is historical record document A, historical record document C, and historical record document B.
[0047] The solution of this embodiment obtains a set of historical record documents to be sorted, and forms a document feature vector corresponding to each historical record document, wherein the document feature vector carries the browsing time description information of the historical record document; forms a unified feature vector based on the document feature vector of each historical record document, wherein the unified feature vector carries the document features of all historical record documents; and sorts each historical record document based on the similarity between each document feature vector and the unified feature vector. This can solve the problem that when the historical record document required by the user is at the back of the historical record, the user's operation step length for flipping through the historical record increases, and the operation is cumbersome and time-consuming. This realizes the sorting of each historical record document in the historical record, and can reduce the user's operation step length and save time during the user's browsing of the historical record.
[0048] Figure 2 1 is a schematic diagram of another method for sorting historical records according to an embodiment of the present disclosure. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with each optional solution in one or more of the above embodiments. Figure 2 As shown, the sorting methods of the history records include the following:
[0049] S210 . In response to a historical record document viewing request, obtain each historical record document generated within a preset time, and add each historical record document to a historical record document collection.
[0050] The preset time may be a time period such as one day, one week or one month, which is not limited in this embodiment.
[0051] In an optional implementation of this embodiment, when a user's request to view a history document is received, each history document generated within a month based on the request time may be obtained and added to a history document collection.
[0052] For example, if the time when the user's request to view the historical record document is received is December 12, 2020, all historical record documents generated between November 12, 2020 and December 12, 2020 can be obtained. For example, 1,000 historical record documents can be obtained, and these 1,000 historical record documents can be added to the historical record document collection.
[0053] The advantage of this setting is that there is no need to perform subsequent processing on all the historical record documents generated, which can improve the processing efficiency of the algorithm and avoid processing a large number of redundant historical record documents.
[0054] S220: Form document feature vectors corresponding to each historical record document.
[0055] In an optional implementation of this embodiment, after each historical record document generated within a preset time is added to the historical record document set, a document feature vector corresponding to each historical record document may be further generated.
[0056] Optionally, forming a document feature vector corresponding to each historical record document may include: calculating the time interval corresponding to each historical record document based on the sending time of the historical record document viewing request and the historical browsing time of each historical record document; and forming a document feature vector corresponding to each historical record document based on the time interval between each historical record document.
[0057] In an optional implementation of the present embodiment, after each historical record document generated within a preset time is added to a historical record document collection, the time interval corresponding to each historical record document can be calculated based on the time when the historical record document viewing request sent by the user is received and the browsing time of each historical record document; further, a document feature vector corresponding to each historical record document can be generated based on the time interval between each historical record document and the present.
[0058] For example, if the user viewed the history document at 16:00 and the browsing time of history document B was 15:00, then the time interval corresponding to history document B is 1 hour; further, a document feature vector corresponding to history document B can be formed according to the time interval corresponding to history document B. It should be noted that the document feature vector corresponding to history document B can be a 32-dimensional vector or a 64-dimensional vector, which is not limited in this embodiment. It should also be noted that the dimensions of each document feature vector corresponding to each history document are the same.
[0059] S230 , inputting each document feature vector into the same long short-term memory model respectively to obtain an intermediate vector corresponding to each document feature vector.
[0060] Among them, the long short-term memory model can be an LSTM model or a GRU model, which is not limited in this embodiment.
[0061] In an optional implementation of this embodiment, after obtaining the document feature vector corresponding to each historical record document in the historical record document set, each document feature vector can be further input into the same long short-term memory model to obtain an intermediate vector corresponding to each document feature vector.
[0062] It should be noted that, in addition to the document feature information corresponding to the target historical document, the intermediate vector corresponding to the target document feature vector may also include document feature information of one or more historical record documents related to the target historical record document.
[0063] Exemplarily, if the document feature vectors input into the long short-term memory model are document feature vector A, document feature vector B, and document feature vector C in sequence (wherein document feature vector A corresponds to historical record document A, document feature vector B corresponds to historical record document B, and document feature vector C corresponds to historical record document C), then the output intermediate vector corresponding to document feature vector C includes both the document feature information of historical record document C and the document feature information of both historical record document A and historical record document B.
[0064] The advantage of such a setting is that it can provide a basis for generating a unified feature vector containing document feature information of all historical record documents.
[0065] S240: Perform a pooling operation on each intermediate vector to generate a unified feature vector.
[0066] In an optional implementation of this embodiment, after obtaining the intermediate vectors corresponding to the feature vectors of each document, each intermediate vector may be further subjected to a pooling operation, such as maximum pooling or mean pooling, to generate a unified feature vector.
[0067] For example, if the number of historical record documents is 10, after obtaining the intermediate vectors corresponding to the document feature vectors of all historical record documents, where the dimension of each intermediate vector is 64, the 10 intermediate vectors can be maximum pooled to obtain a unified feature vector, where the dimension of the unified feature vector is also 64.
[0068] It can be understood that, in addition to the document feature information corresponding to the target historical document, each intermediate vector can also include document feature information of one or more historical record documents related to the target historical record document. Then, after performing the maximum pooling operation on each intermediate vector, the unified feature vector obtained can include the document feature information of all historical record documents.
[0069] The advantage of such a setting is that the document feature information of all historical record documents can be uniformly represented, providing a basis for the subsequent sorting of each historical record document.
[0070] S250 , sorting the history record documents according to the similarity between the feature vectors of each document and the unified feature vector.
[0071] S260: Display the sorted historical record documents.
[0072] In an optional implementation of this embodiment, after sorting the historical record documents according to the similarity between the document feature vector of each historical record document and the unified feature vector, the sorted historical record documents may be further displayed.
[0073] The advantage of such a setting is that it allows users to view the sorted historical records documents, making it convenient for users to select the historical records documents they need.
[0074] The solution of this embodiment obtains each historical record document generated within a preset time by responding to a historical record document viewing request, and adds each historical record document to a historical record document collection; calculates the time interval corresponding to each historical record document according to the sending time of the historical record document viewing request and the historical browsing time of each historical record document; forms a document feature vector corresponding to each historical record document according to the time interval between each historical record document; inputs each document feature vector into the same long short-term memory model to obtain an intermediate vector corresponding to each document feature vector; performs a pooling operation on each intermediate vector to generate a unified feature vector; sorts each historical record document according to the similarity between each document feature vector and the unified feature vector, and displays each sorted historical record document; each historical record document can be sorted according to the document information of each historical record document, so that users can quickly find the required historical record document, reduce the user's operation step length, and can reduce a lot of user operation time, thereby improving the user's experience of using each application.
[0075] Figure 3is a schematic diagram of another method for sorting historical record documents according to an embodiment of the present disclosure. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the sorting methods of the history records include the following:
[0076] S310: Obtain a set of historical record documents to be sorted.
[0077] S320: Calculate the time intervals from now corresponding to each historical record document according to the sending time of the historical record document viewing request and the historical browsing time of each historical record document.
[0078] S330: Generate identification indexes corresponding to the respective historical record documents in the historical record document set according to a set order.
[0079] The generation order may be set to be the order of adding each history record document into the history record document set, or the order of browsing time of each history record document, which is not limited in this embodiment.
[0080] In an optional implementation of this embodiment, after the time interval corresponding to each historical record document is calculated, identification indexes corresponding to each historical record document in the historical record document set may be generated according to a set order.
[0081] For example, if the order in which history record document A is added to the history record document collection is 1, the identification index of history record document A can be set to 1; if the order in which history record document B is added to the history record document collection is 20, the identification index of history record document B can be set to 20.
[0082] S340: Form document feature vectors corresponding to each historical record document according to the time interval and identification index of each historical record document.
[0083] In an optional implementation of this embodiment, after determining the time interval and identification index of each historical record document in the historical record document set, a document feature vector corresponding to each historical record document can be further formed based on the time interval and identification index of each historical record document.
[0084] In an optional implementation of the present embodiment, a document feature vector corresponding to each historical record document is formed based on the time interval from present to present and the identification index of each historical record document, which may include: generating a time interval vector and an index vector corresponding to each historical record document based on the time interval from present to present and the identification index of each historical record document; and concatenating the index vector and the time interval vector corresponding to each historical record document to form a document feature vector corresponding to each historical record document.
[0085] Exemplarily, if the index identifier of historical record document A is 1, an index vector corresponding to the reference identifier of historical record document A can be generated; if the time interval from the present to the present to the historical record document A is 2 minutes, a time interval vector corresponding to the time interval of 2 minutes from the present can be generated; further, the index vector of historical record document A and the time interval vector can be concatenated to generate a document feature vector corresponding to historical record document A. Exemplarily, if the index vector of historical record document A is a 64*1 vector, and the time interval vector of historical record document A is a 32*1 vector, then the concatenated document feature vector corresponding to historical record document A is a 96*1 vector.
[0086] S350: Form a unified feature vector based on the document feature vectors of each historical record document.
[0087] S360: Sort the historical record documents according to the similarity between the feature vectors of each document and the unified feature vector.
[0088] The solution of this embodiment may further include, before forming document feature vectors corresponding to each historical record document according to the time interval between each historical record document and the present, the following steps are performed:
[0089] Generate identification indexes corresponding to each historical record document in the historical record document collection according to a set order; further generate time interval vectors and index vectors corresponding to each historical record document according to the time interval from the present to the present and the identification index; concatenate the index vectors and time interval vectors corresponding to each historical record document to form document feature vectors corresponding to each historical record document, which can further enrich the document feature information contained in each document feature vector and provide a basis for the subsequent generation of more accurate document feature vectors and unified feature vectors.
[0090] Figure 4 is a schematic diagram of another method for sorting historical record documents according to an embodiment of the present disclosure. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with each optional solution in one or more of the above embodiments. Figure 4As shown, the sorting methods of the history records include the following:
[0091] S410: In response to a historical record document viewing request, obtain each historical record document generated within a preset time, and add each historical record document to a historical record document collection.
[0092] S420: Calculate the time intervals from now corresponding to each historical record document according to the sending time of the historical record document viewing request and the historical browsing time of each historical record document.
[0093] S430: Generate identification indexes corresponding to the respective historical record documents in the historical record document set according to a set order.
[0094] S440: Generate a time interval vector and an index vector corresponding to each historical record document according to the time interval from the present to the present and the identification index of each historical record document.
[0095] S450 , concatenating the index vectors and time interval vectors corresponding to the historical record documents to form document feature vectors corresponding to the historical record documents.
[0096] S460, input each document feature vector into the same long short-term memory model to obtain an intermediate vector corresponding to each document feature vector.
[0097] S470: Perform a pooling operation on each intermediate vector to generate a unified feature vector.
[0098] S480, input each document feature vector into a preset fully connected layer for nonlinear transformation to form a document feature vector in a one-dimensional vector form.
[0099] In an optional implementation of the present embodiment, before sorting each historical record document according to the similarity between each document feature vector and the unified feature vector, each document feature vector can also be input into a preset fully connected layer, that is, each document feature vector is nonlinearly transformed to reduce the dimension of each document feature vector.
[0100] For example, if the vector dimension of document feature vector A is 96*1, the dimension of the vector obtained by performing a nonlinear transformation on document feature vector A can be 32*1; the advantage of this setting is that by reducing the dimension of each document feature vector, the amount of calculation for the subsequent similarity between each document feature vector and the unified feature vector can be reduced, which can save a lot of computing resources and will not affect the final sorting result.
[0101] S490, input the unified feature vector into a fully connected layer for nonlinear transformation to form a unified feature vector in a one-dimensional vector form.
[0102] In an optional implementation of the present embodiment, before sorting the historical record documents according to the similarity between the feature vectors of each document and the unified feature vector, the unified feature vector can also be input into a preset fully connected layer, that is, the unified feature vector is nonlinearly transformed to reduce the dimension of the unified feature vector.
[0103] For example, if the vector dimension of the unified feature vector is 1*96, the dimension of the vector obtained by performing a nonlinear transformation on the unified feature vector can be 1*32; the advantage of this setting is that by reducing the dimension of the unified feature vector, the amount of subsequent calculation of the similarity between each document feature vector and the unified feature vector can be reduced, which can save a lot of computing resources and will not affect the final sorting result.
[0104] S491. Sort the history record documents according to the similarity between the feature vectors of each document and the unified feature vector.
[0105] S492: Display the sorted historical record documents.
[0106] According to the scheme of this embodiment, before sorting each historical record document according to the similarity between each document feature vector and the unified feature vector, each document feature vector can be input into a preset fully connected layer for nonlinear transformation to reduce the vector dimension of the document feature vector; the unified feature vector is input into the fully connected layer for nonlinear transformation to reduce the vector dimension of the unified feature vector, thereby reducing the dimensions of each document feature vector and the unified feature vector, and quickly obtaining the similarity between each document feature vector and the unified feature vector, thereby saving a lot of calculation and not affecting the final sorting results of each historical record document.
[0107] In order to enable those skilled in the art to better understand the method for sorting historical record documents involved in the present disclosure, a specific example is used below to illustrate the method. The specific process includes:
[0108] 1. Generate an identity index (IdentityDocument, ID) corresponding to each historical record document in the set order, and generate an embedding (index vector) corresponding to each historical record document according to each ID, and record it as e id .
[0109] 2. Record the timestamp t of each history document entering the history record i , calculate the history request time t now The timestamp t of each history record document entering the history record i The time interval betweengapi =t now -t i , and determine the embedding (time interval vector) corresponding to each time interval, and record it as e gap .
[0110] 3. Generate the document feature vector v of each historical record based on the index vector and time interval vector corresponding to each historical record document i =[e id ,e gap ](i=1,2,…,t)where t is the number of history record documents.
[0111] 4. Input the document feature vector of each historical record document into the GRU model to obtain the target vector h corresponding to each document feature vector i (i=1,2,…,t).
[0112] 5. For the target vector h i (i=1,2,…,t) performs the maximum pooling operation to obtain the vector v tmp , for v tmp Perform a nonlinear transformation (follow a fully connected layer) to obtain the vector v of the historical record sequence seq .
[0113] 6. Document feature vector v for each historical record document i =[e id ,e gap ](i=1,2,…,t) performs nonlinear transformation (followed by a fully connected layer) to obtain the prediction vector v corresponding to each historical record document pi (i=1,2,…,t).
[0114] 7. Calculate the cosine similarity between the prediction vector of each historical record document and the historical record sequence, and sort the historical records according to the cosine similarities, where each cosine similarity is the probability of the user clicking on each historical record.
[0115] In an optional implementation of this embodiment, the cosine similarity between the prediction vector of each historical record document and the historical record sequence can be calculated according to the following formula:
[0116]
[0117] Where K is the cosine similarity between the prediction vector of the i-th historical record document and the historical record sequence.
[0118] In order to better understand the embodiments of the present disclosure, Figure 5It is a network structure diagram of a method for sorting historical record documents according to an embodiment of the present disclosure, wherein the document feature vector of each historical record document is a concatenation of a 64-dimensional index vector and a 32-dimensional time interval vector.
[0119] like Figure 5 As shown, after obtaining the document feature vector of each historical record document, each document feature vector can be pooled at the maximum value, and the vector obtained after pooling is connected to a fully connected layer to obtain a unified feature vector; and a preliminary similarity calculation is performed with the document feature vector after connecting to a fully connected layer.
[0120] It should be noted that Figure 5 In the example, the target document feature vector is the document feature vector of the target historical record document, and the target historical record document is any historical record document in the historical record, which is not limited in this embodiment. N is any positive integer greater than 3, which is not limited in this embodiment; it can be understood that in this embodiment, N is the same as the number of historical record documents; for example, if the historical record contains 100 historical record documents, then the value of N is 100.
[0121] The disclosed embodiment mines the user's potential needs for each historical record document in the historical record, and places the historical record document that the user is interested in at the front of the historical record, thereby reducing the step length of the user's operation.
[0122] Figure 6 is a schematic diagram of the structure of a historical record document sorting device according to an embodiment of the present disclosure, and the device can execute the historical record document sorting method involved in any embodiment of the present disclosure; Figure 6 The device 600 for sorting historical record documents includes: a document feature vector generating module 610, a unified feature vector generating module 620 and a historical record document sorting module 630.
[0123] The document feature vector generation module 610 is used to obtain a set of historical record documents to be sorted, and to form a document feature vector corresponding to each historical record document. The document feature vector carries the browsing time description information of the historical record document.
[0124] A unified feature vector generating module 620 is used to form a unified feature vector according to the document feature vectors of each historical record document, and the unified feature vector carries the document features of all historical record documents;
[0125] The historical record document sorting module 630 is used to sort the historical record documents according to the similarity between the feature vectors of each document and the unified feature vector.
[0126] In the scheme of this embodiment, the historical record document sorting device obtains the historical record document set to be sorted through the document feature vector generation module, and forms a document feature vector corresponding to each historical record document; forms a unified feature vector according to the document feature vectors of each historical record document through the unified feature vector generation module; and sorts each historical record document according to the similarity between each document feature vector and the unified feature vector through the historical record document sorting module. This can solve the problem that when the historical record document required by the user is at the back of the historical record, the user's operation step length for flipping through the historical record increases, the operation is cumbersome and time-consuming, and the historical record documents in the historical record are sorted. In the process of the user flipping through the historical record, the user's operation step length can be reduced, saving time.
[0127] In an optional implementation of this embodiment, the document feature vector generation module 610 includes a historical record document set acquisition submodule;
[0128] A historical record document set acquisition submodule, for responding to a historical record document viewing request, acquiring each historical record document generated within a preset time, and adding each historical record document to the historical record document set;
[0129] The historical record document sorting device 600 further includes: a display module;
[0130] The display module is used to display the sorted historical record documents.
[0131] In an optional implementation of this embodiment, the document feature vector generation module 610 further includes: a document feature vector generation submodule;
[0132] The document feature vector generation submodule is used to calculate the time interval corresponding to each historical record document according to the sending time of the historical record document viewing request and the historical browsing time of each historical record document;
[0133] According to the time interval between each historical record document and the present, a document feature vector corresponding to each historical record document is formed.
[0134] In an optional implementation of this embodiment, the document feature vector generation submodule includes: an identification index generation unit and a document feature vector generation unit;
[0135] An identification index generating unit, used to generate identification indexes corresponding to each historical record document in the historical record document set according to a set order;
[0136] The document feature vector generating unit is used to form a document feature vector corresponding to each historical record document according to the time interval and identification index of each historical record document.
[0137] In an optional implementation of this embodiment, the document feature vector generating unit is specifically used to
[0138] Generate a time interval vector and an index vector corresponding to each historical record document according to the time interval and identification index of each historical record document;
[0139] The index vectors and time interval vectors corresponding to each historical record document are concatenated to form document feature vectors corresponding to each historical record document.
[0140] In an optional implementation of this embodiment, the unified feature vector generation module 620 is specifically used to
[0141] Input each document feature vector into the same long short-term memory model to obtain an intermediate vector corresponding to each document feature vector;
[0142] Pooling operation is performed on each intermediate vector to generate a unified feature vector.
[0143] In an optional implementation of this embodiment, the historical record document sorting device 600 further includes: a nonlinear transformation model;
[0144] A nonlinear transformation model is used to input each document feature vector into a preset fully connected layer for nonlinear transformation to reduce the vector dimension of the document feature vector;
[0145] The unified feature vector is input into the fully connected layer for nonlinear transformation to reduce the vector dimension of the unified feature vector.
[0146] The above-mentioned historical record document sorting device can execute the historical record document sorting method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the historical record document sorting method provided by any embodiment of the present disclosure.
[0147] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0148] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0149] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 707 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0150] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 707, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0151] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the sorting method of historical record documents. For example, in some embodiments, the sorting method of historical record documents may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 707. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the sorting method of historical record documents described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the sorting method of historical record documents in any other appropriate manner (e.g., by means of firmware).
[0152] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0153] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0154] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0156] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0157] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0158] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0159] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for sorting historical record documents, comprising: Acquire a set of historical record documents to be sorted, and form a document feature vector corresponding to each historical record document, wherein the document feature vector carries browsing time description information of the historical record document; According to the document feature vectors of the historical record documents, a unified feature vector is formed, wherein the unified feature vector carries the document features of all the historical record documents; sorting the historical record documents according to the similarity between the feature vectors of the documents and the unified feature vector; The set of historical record documents to be sorted is a set of historical record documents generated within a preset time in response to a request to view the historical record documents; The document feature vectors corresponding to the historical record documents are formed, including: According to the sending time of the historical record document viewing request and the historical browsing time of each historical record document, the time interval corresponding to each historical record document is calculated; according to the time interval between each historical record document, a document feature vector corresponding to each historical record document is formed.
2. The method according to claim 1, after sorting each of the history record documents, further comprising: Display the sorted historical record documents.
3. The method according to claim 1, before forming the document feature vectors corresponding to the historical record documents according to the time intervals between the historical record documents, further comprising: Generate identification indexes corresponding to the historical record documents in the historical record document set according to a set order; According to the time interval between each of the historical record documents, a document feature vector corresponding to each of the historical record documents is formed, including: According to the time interval and identification index of each of the historical record documents, a document feature vector corresponding to each of the historical record documents is formed.
4. The method according to claim 3, wherein: According to the time interval and identification index of each of the historical record documents, a document feature vector corresponding to each of the historical record documents is formed, including: Generate a time interval vector and an index vector corresponding to each of the historical record documents according to the time interval from now and the identification index of each of the historical record documents; The index vectors and time interval vectors respectively corresponding to each historical record document are concatenated to form document feature vectors respectively corresponding to each historical record document.
5. The method according to claim 1, wherein: The forming of a unified feature vector according to the document feature vectors of each of the historical record documents comprises: Inputting each of the document feature vectors into the same long short-term memory model respectively to obtain an intermediate vector corresponding to each of the document feature vectors; A pooling operation is performed on each of the intermediate vectors to generate the unified feature vector.
6. The method according to claim 1, wherein: Before sorting the history record documents according to the similarity between the document feature vectors and the unified feature vector, the method further includes: Inputting each of the document feature vectors into a preset fully connected layer for nonlinear transformation to reduce the vector dimension of the document feature vector; The unified feature vector is input into the fully connected layer for nonlinear transformation to reduce the vector dimension of the unified feature vector.
7. A device for sorting history record documents, comprising: A document feature vector generation module is used to obtain a set of historical record documents to be sorted and form a document feature vector corresponding to each historical record document, wherein the document feature vector carries browsing time description information of the historical record document; A unified feature vector generation module, used to form a unified feature vector according to the document feature vectors of each of the historical record documents, wherein the unified feature vector carries the document features of all the historical record documents; A historical record document sorting module, used for sorting each of the historical record documents according to the similarity between each of the document feature vectors and the unified feature vector; The document feature vector generation module includes a historical record document set acquisition submodule, which is used to respond to a historical record document viewing request, acquire each historical record document generated within a preset time, and add each historical record document to the historical record document set; The document feature vector generation module also includes a document feature vector generation submodule, which is used to calculate the time interval corresponding to each historical record document according to the sending time of the historical record document viewing request and the historical browsing time of each historical record document; and form a document feature vector corresponding to each historical record document according to the time interval between each historical record document.
8. The device according to claim 7, wherein: The device for sorting historical record documents also includes: a display module, which is used to display the sorted historical record documents.
9. The device according to claim 7, wherein the document feature vector generation submodule comprises: Identify index generation unit and document feature vector generation unit; The identification index generating unit is used to generate identification indexes corresponding to the historical record documents in the historical record document set according to a set order; The document feature vector generating unit is used to form a document feature vector corresponding to each historical record document according to the time interval and identification index of each historical record document.
10. The device according to claim 9, wherein: The document feature vector generating unit is specifically used to Generate a time interval vector and an index vector corresponding to each of the historical record documents according to the time interval from now and the identification index of each of the historical record documents; The index vectors and time interval vectors respectively corresponding to each historical record document are concatenated to form document feature vectors respectively corresponding to each historical record document.
11. The device according to claim 7, wherein: The unified feature vector generation module is specifically used for: Inputting each of the document feature vectors into the same long short-term memory model respectively to obtain an intermediate vector corresponding to each of the document feature vectors; A pooling operation is performed on each of the intermediate vectors to generate the unified feature vector.
12. The device according to claim 7, wherein: The historical record document sorting device further includes: a nonlinear transformation model; The nonlinear transformation model is used to input each of the document feature vectors into a preset fully connected layer for nonlinear transformation, so as to reduce the vector dimension of the document feature vector; The unified feature vector is input into the fully connected layer for nonlinear transformation to reduce the vector dimension of the unified feature vector.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for sorting history documents according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method for sorting history documents according to any one of claims 1-6.
15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for sorting history records documents according to any one of claims 1 to 6.
