Sorting Method, Device, Medium and Electronic Device for Text Strings
By using the necessary user features of missing feature values in text string sorting to determine the target historical feature vector in the historical feature vector, and supplementing the initial feature vector, the inaccurate sorting problem caused by the loss of user feature data is solved, and a more accurate sorting result is achieved.
Patent Information
- Application Number
- CN202411752745.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-12-02
AI Technical Summary
During the text string sorting process, the sorting results are inaccurate due to the lack of user characteristic data.
By obtaining the initial eigenvector, the necessary user features of missing eigenvalues are used to determine the target historical eigenvector in the historical eigenvector, and the initial eigenvector is supplemented. After obtaining the target eigenvector, input the sorting model to sort it.
Improve the accuracy of the sorting results, making the sorting results closer to the characteristics of the target user and improving the accuracy of the sorting.
Smart Images

Figure CN119691238B_ABST
Abstract
Description
Background Art
[0002] In today's era of highly developed digital information, the application scenarios of sorting various text strings according to user characteristics are becoming increasingly common. For example, in e-commerce platforms, merchants often need to sort text strings such as product descriptions and recommended copy according to many user characteristics such as the user's purchase history, browsing preferences, geographical location, and age, in order to accurately push product information that meets the user's interests and needs to the user; Another example is in content information platforms, where operators will sort text strings such as article titles and content summaries according to the user's reading habits, subscribed topics, occupation and other characteristics, so as to achieve personalized content recommendation and improve the user experience and user stickiness of the platform.
[0003] In the process of implementing the sorting of text strings based on user characteristics, it is usually necessary to obtain complete and accurate data related to user characteristics as the basis for sorting. However, in actual operation, there is a prominent problem that needs to be solved urgently. That is, in many cases, there will be a situation of missing data of user characteristics.
[0004] The missing data of user characteristics may be caused by various reasons, and when the data of user characteristics is missing, it will have a serious adverse impact on the sorting result of the text string, directly resulting in inaccurate sorting results. Summary of the Invention
[0005] In view of the above technical problems, the present application provides a method, device, medium and electronic device for sorting text strings, which at least partially solve the problems existing in the prior art.
[0006] In the first aspect of the present application, a method for sorting text strings is provided, and the method includes:
[0007] S100, obtaining the user characteristics of the target user to obtain an initial feature vector T=(T1, T2,..., T i ,..., T n ); i = 1, 2,..., n; where n is the number of user characteristics of the target user; T i is the i-th user characteristic of the target user; the target user has a corresponding a to-be-sorted strings; each to-be-sorted string has a corresponding target object; each to-be-sorted string has at least one necessary user characteristic corresponding to it; each necessary user characteristic belongs to T; and there is at least one user characteristic with a missing feature value in T.
[0008] S200, determining a target historical feature vector from a number of historical feature vectors according to T and the necessary user characteristics in the user characteristics including missing feature values in T; where each historical feature vector does not have a user characteristic with a missing feature value; and the feature dimension included in each historical feature vector is the same as that of T.
[0009] S300. Supplement the user features with missing eigenvalue in T according to the target historical feature vector to obtain a target feature vector T'.
[0010] S400. Input T' into a sorting model to sort a sorted strings corresponding to the target user.
[0011] In a second aspect of the present application, there is provided a device for sorting text strings, the device comprising:
[0012] An initial vector acquisition unit, configured to acquire user features of a target user to obtain an initial feature vector T = (T1, T2,..., T i ,..., T n ); i = 1, 2,..., n; where n is the number of user features of the target user; T i is the i-th user feature of the target user; the target user has a corresponding a sorted strings; each sorted string has a corresponding target object; each sorted string has at least one necessary user feature corresponding thereto; each necessary user feature belongs to T; there is at least one user feature with a missing eigenvalue in T;
[0013] A target vector determination unit, configured to determine a target historical feature vector from a number of historical feature vectors according to T and the necessary user features among the user features with missing eigenvalues included in T; where each historical feature vector has no user feature with a missing eigenvalue; and the feature dimension included in each historical feature vector is the same as that of T;
[0014] A supplement unit, configured to supplement the user features with missing eigenvalues in T according to the target historical feature vector to obtain a target feature vector T';
[0015] A sorting unit, configured to input T' into a sorting model to sort a sorted strings corresponding to the target user.
[0016] In a third aspect of the present application, there is provided a non-transitory computer-readable storage medium storing at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the foregoing method for sorting text strings.
[0017] In a fourth aspect of the present application, there is provided an electronic device comprising a processor and the foregoing non-transitory computer-readable storage medium.
[0018] The present application has at least the following beneficial effects:
[0019] The sorting method for text strings provided in this application first obtains an initial feature vector based on the user characteristics of the target user. Due to various reasons, the initial feature vector contains at least one user characteristic with a missing eigenvalue, that is, there are some missing user characteristics for this user. Furthermore, the user characteristic values with missing eigenvalues may also include some necessary user characteristics. Based on the initial feature vector and the necessary user characteristics, a target historical vector is determined among several historical feature vectors. Here, the role of the target historical feature vector is to supplement the user vector with missing eigenvalues in the initial feature vector. After supplementation, an updated target feature vector is obtained. Finally, the target feature vector is input into the sorting model to sort a text strings corresponding to the target user. In this application, when determining the target historical vector, the necessary user characteristics in the user characteristics with missing eigenvalues included in T are also referred to. The necessary user characteristics are the more important user characteristics. Thus, the matching degree between the obtained target historical feature vector and the initial feature vector is the highest, that is, the target historical feature vector is the most similar to the initial feature vector. Therefore, by supplementing the user characteristics with missing eigenvalues in T according to the target historical feature vector, the obtained target feature vector is more accurate. Furthermore, the obtained sorting result is more accurate. This application determines the target historical feature vector through the necessary user characteristics with missing eigenvalues to supplement the user characteristics of the initial feature vector. The obtained target feature vector is closer to each user characteristic of the target user. Thus, the sorting result for the text strings to be sorted is more accurate. Description of the Drawings
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0021] Figure 1 Flowchart of the sorting method for text strings provided in the embodiments of this application;
[0022] Figure 2 Structural block diagram of the sorting device for text strings provided in the embodiments of this application. Detailed Embodiments
[0023] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, rather than all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application.
[0024] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0025] It should be noted that the following describes various aspects of embodiments within the scope of the appended claims. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement a device and / or practice a method. In addition, this device and / or this method can be implemented using other structures and / or functions in addition to one or more of the aspects described herein.
[0026] Please refer to Figure 1 As shown, an embodiment of the present application provides a method for sorting text strings, and the method includes:
[0027] Step S100, obtaining user characteristics of a target user to obtain an initial feature vector T = (T1, T2,..., T i ,..., T n ); i = 1, 2,..., n; where n is the number of user characteristics of the target user; T i is the i-th user characteristic of the target user; the target user has a corresponding a to-be-sorted strings; each to-be-sorted string has a corresponding target object; each to-be-sorted string has at least one corresponding necessary user characteristic; each necessary user characteristic belongs to T; and there is at least one user characteristic in T with a missing feature value.
[0028] Specifically, the a to-be-sorted strings corresponding to the target user are sorted according to the user characteristics and the characteristics of the target object corresponding to each to-be-sorted string. The higher the sorting position, the higher the matching degree of the to-be-sorted string with the target user. However, the currently obtained initial feature vector has at least one missing eigenvalue in the user characteristics. Due to the missing user characteristics, the initial feature vector is incomplete and cannot fully represent the user's characteristics. Therefore, the sorting result of the to-be-sorted strings obtained thereby is relatively inaccurate compared to the complete initial feature vector. Thus, it is necessary to complete the current initial feature vector.
[0029] Step S200: Determine a target historical feature vector from a number of historical feature vectors according to T and the necessary user characteristics among the user characteristics including missing eigenvalues in T; wherein, each historical feature vector does not have user characteristics with missing eigenvalues; and the feature dimensions included in each historical feature vector are the same as those of T.
[0030] Specifically, determine a target historical feature vector from a number of historical feature vectors according to T and the necessary user characteristics among the user characteristics including missing eigenvalues in T. In this embodiment, when determining the target historical vector, the necessary user characteristics among the user characteristics including missing eigenvalues in T are also referred to. The necessary user characteristics are the more important user characteristics. Therefore, the matching degree between the obtained target historical feature vector and the initial feature vector is the highest, that is, the target historical feature vector is the most similar to the initial feature vector.
[0031] Step S300: Supplement the user characteristics with missing eigenvalues in T according to the target historical feature vector to obtain a target feature vector T'.
[0032] Specifically, supplement the user characteristics with missing eigenvalues in T according to the target historical feature vector. Here, that is, supplement the user characteristics with missing eigenvalues in T corresponding to the historical user characteristics in the target historical feature vector corresponding to the missing eigenvalues in T, so that the initial feature vector becomes complete and there are no missing eigenvalues.
[0033] Step S400: Input T' into the sorting model to sort the a to-be-sorted strings corresponding to the target user.
[0034] Specifically, input the completed target feature vector after supplementation into the sorting model to sort the a to-be-sorted strings corresponding to the target user.
[0035] In this application, when determining the target historical vector, the necessary user features in the user features with missing eigenvalues included in T are also referred to. The necessary user features are the more important user features. The matching degree between the obtained target historical feature vector and the initial feature vector is the highest, that is, the target historical feature vector is the most similar to the initial feature vector. Therefore, the user features with missing eigenvalues in T are supplemented according to the target historical feature vector, and the obtained target feature vector is more accurate. Furthermore, the obtained sorting result is more accurate. This application determines the target historical feature vector through the necessary user features with missing eigenvalues to supplement the user features of the initial feature vector. The obtained target feature vector is closer to each user feature of the target user, and the sorting result for the string to be sorted obtained thereby is more accurate.
[0036] In some embodiments, the above sorting method for text strings can be implemented by the following code:
[0037]
[0038]
[0039]
[0040] In an exemplary embodiment of this application, step S200 includes:
[0041] S210, according to T, obtain the missing necessary feature vector Q = (Q1, Q2,..., Q j ,..., Q m ); j = 1, 2,..., m; where m is the number of missing necessary features; Q j is the i-th missing necessary feature; the missing necessary feature is the necessary user feature with a missing eigenvalue in T; each missing necessary feature has at least one associated necessary user feature; each associated necessary user feature belongs to T.
[0042] Specifically, the missing necessary feature vector contains each necessary user feature in the user features with missing eigenvalues in T. And each missing necessary feature has at least one associated necessary user feature, and the associated necessary user feature is the necessary user feature that will interact with the missing necessary feature. The necessary user feature is a feature that is more important than the user feature.
[0043] It should be noted that each associated necessary user feature belongs to T. T contains n-dimensional user features.
[0044] S220, according to each associated necessary user feature corresponding to each missing necessary feature, obtain the associated necessary feature vector B = (B1, B2,..., B x ,..., B y); x = 1, 2, …, y; where y is the number after removing duplicates of all associated necessary user features; B x is the x-th associated necessary user feature after removing duplicates; each associated necessary user feature after removing duplicates has a corresponding association number; the association number is the number of missing necessary features associated therewith.
[0045] Specifically, perform a duplicate removal process on all associated necessary user features corresponding to all missing necessary features to obtain the associated necessary feature vector B.
[0046] S230, according to T, obtain the non-missing feature vector F = (F1, F2, …, F c , …, F d ); c = 1, 2, …, d; where d is the number of user features with non-missing feature values in T; F c is the c-th user feature with a non-missing feature value in T.
[0047] S240, according to a number of historical non-missing feature vectors and F, obtain the matching degree list P = (P1, P2, …, P g , …, P h ); P g is the matching degree between F and the g-th historical non-missing feature vector L g ; the historical non-missing feature vector is obtained by deleting the user features in the corresponding historical feature vector that are the same as the user features of each missing feature value in T.
[0048] Specifically, P g meets the following conditions:
[0049]
[0050] where x c is the weight corresponding to F c ; L g , c is the user feature in L g corresponding to F c .
[0051] x c is determined according to the following steps:
[0052] x c = 1 / (1 + MAX(GX) - GX c );
[0053] where GX is the non-missing feature vector association number list; GX = (GX1, GX2, …, GX c , …, GX d ); GX c is for F cThe corresponding associated number; if F c is the same as any associated necessary user feature, then GX c is the number of missing necessary features associated with the corresponding associated necessary user feature; if F c is different from each associated necessary user feature, then GX c is 0.
[0054] Here, a number of historical feature vectors are obtained, and each historical feature item vector has no missing eigenvalue user feature; and the feature dimension included in each historical feature vector is the same as T. According to each user feature dimension corresponding to F in each historical feature vector, the corresponding historical non-missing feature vector is obtained. Furthermore, the target historical feature vector is determined according to the matching degree between each historical non-missing feature vector and the non-missing feature vector.
[0055] It should be noted that in this embodiment, when obtaining the matching degree between each historical non-missing feature vector and the non-missing feature vector, an optimized Euclidean distance formula is used, where a corresponding weight is assigned to each distance, because among the user features with non-missing eigenvalues included in F, some are associated necessary technical features corresponding to the necessary user features with missing eigenvalues, and the rest are conventional user features; then when obtaining the matching degree between F and each historical non-missing feature vector, a corresponding weight is assigned to each dimension difference. In this way, the weight corresponding to the dimension difference of the associated necessary technical feature corresponding to the necessary user feature with a missing eigenvalue, that is, the importance degree is higher, and the weight corresponding to the dimension difference of the conventional user feature, that is, the importance degree is lower. In summary, the associated necessary technical feature corresponding to the necessary user feature with a missing eigenvalue has a greater impact on the matching degree, and the conventional user feature has a smaller impact on the matching degree. The obtained matching degree better meets the requirements for sorting the to-be-sorted strings with necessary user features in this embodiment, and the obtained sorting result is more accurate.
[0056] Furthermore, for the weight corresponding to the associated necessary technical feature corresponding to the necessary user feature with a missing eigenvalue, the more the number of associated missing necessary features, the greater the relevance to the necessary user feature with a missing eigenvalue, and the greater the corresponding weight. Conversely, the fewer the number of associated missing necessary features, the smaller the relevance to the necessary user feature with a missing eigenvalue, and the smaller the corresponding weight. For conventional user features, the corresponding weight is even smaller. In this way, the associated necessary technical feature corresponding to the necessary user feature with a missing eigenvalue has a greater impact on the matching degree, and the more the number of associated missing necessary features, the greater the corresponding weight. The conventional user feature has a smaller impact on the matching degree, which is less than the impact of the associated necessary technical feature corresponding to each necessary user feature with a missing eigenvalue on the matching degree.
[0057] S250, if Pg = MAX(P), then P g is determined as the target historical feature vector.
[0058] The historical feature vector with the maximum matching degree is determined as the target historical feature vector, and the target historical feature vector is the one closest to the initial feature vector among several historical feature vectors.
[0059] In an exemplary embodiment of the present application, step S300 includes:
[0060] S310, if P g = MAX(P), and P g ≥ the preset matching degree threshold, then according to the target historical feature vector, each user feature with a missing eigenvalue in T is supplemented to obtain the target feature vector T'.
[0061] In this embodiment, if the matching degree between the target historical feature vector and F is relatively large (equal to or greater than the preset matching degree threshold), it indicates that the adaptability and similarity between the target historical feature vector and the initial feature vector are relatively high. At this time, each user feature with a missing eigenvalue in T is supplemented.
[0062] In an exemplary embodiment of the present application, step S300 includes:
[0063] S320, if P g = MAX(P), and P g <the preset matching degree threshold, then according to the target historical feature vector, the necessary user features with missing eigenvalues in T are supplemented to obtain the target feature vector T'.
[0064] In this embodiment, if the matching degree between the target historical feature vector and F is not very large, it indicates that the adaptability between the target historical feature vector and the initial feature vector is not very high. At this time, only the necessary user features with missing eigenvalues in T are supplemented. For the user features with missing eigenvalues, the eigenvalue can be set to null.
[0065] In this embodiment, when the matching degree between the target historical feature vector and F is not very large, only the necessary user features are supplemented, and other conventional user features are not supplemented. This is because the necessary user features are necessary for text string sorting, while other user features with missing eigenvalues have little impact on text string sorting. However, since the matching degree between the target historical feature vector and F is not very large, if all are supplemented and replaced, it may have a negative impact on the sorting result, resulting in a decrease in the objectivity and adaptability of the sorting result.
[0066] The following uses two specific scenarios to illustrate the text string sorting method of the present application:
[0067] In one embodiment, the user characteristics of the target user may be physical sign data such as blood type, blood oxygen saturation, blood pressure, heart rate, etc., and the string to be sorted may be a string composed of drug information such as the characteristics corresponding to a biological agent (such as the name of the biological agent). The target object corresponding to the string to be sorted may be a biological agent. At this time, after sorting the string to be sorted, it can be understood as the name sorting of each biological agent. The higher the ranking, the more suitable it is for the target user, so as to realize the recommendation of biological agents for the target user.
[0068] In another embodiment, the user characteristics of the target user may be preference information such as video length preference and video type preference, and the string to be sorted may be the jump link corresponding to the video. The target object corresponding to it may be the video. At this time, sorting the string to be sorted is used to realize the recommendation of preferred videos for the target user.
[0069] Please refer to Figure 2 As shown, an embodiment of the present application provides a sorting device 100 for text strings. The device includes:
[0070] An initial vector acquisition unit 110, configured to acquire the user characteristics of the target user to obtain an initial feature vector T = (T1, T2,..., T i ,..., T n ); i = 1, 2,..., n; where n is the number of user characteristics of the target user; T i is the i-th user characteristic of the target user; the target user has a corresponding a strings to be sorted; each string to be sorted has a corresponding target object; each string to be sorted has at least one necessary user characteristic corresponding to it; each necessary user characteristic belongs to T; and there is at least one user characteristic in T with a missing feature value.
[0071] A target vector determination unit 120, configured to determine a target historical feature vector from several historical feature vectors according to T and the necessary user characteristics in the user characteristics including missing feature values in T; where each historical feature vector does not have user characteristics with missing feature values; and the feature dimensions included in each historical feature vector are the same as those of T.
[0072] A supplement unit 130, configured to supplement the user characteristics with missing feature values in T according to the target historical feature vector to obtain a target feature vector T'.
[0073] A sorting unit 140, configured to input T' into a sorting model to sort the a strings to be sorted corresponding to the target user.
[0074] Embodiments of the present application also provide a computer program product, which includes program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps in the methods according to various exemplary embodiments of the present application described above in this specification.
[0075] In addition, although the steps of the methods in the present application are described in a specific order in the drawings, this does not require or imply that these steps must be executed in that specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.
[0076] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the methods according to the embodiments of the present application.
[0077] In an exemplary embodiment of the present application, an electronic device capable of implementing the above method is also provided.
[0078] Those skilled in the art can understand that various aspects of the present application can be implemented as a system, a method, or a program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to herein as "circuitry", "module", or "system".
[0079] An electronic device according to this embodiment of the present application. The electronic device is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0080] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one of the above processors, at least one of the above memories, and a bus connecting different system components (including the memory and the processor).
[0081] Among them, the memory stores program code, and the program code can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0082] The storage may include a readable medium in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0083] The storage may also include programs / utilities with a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, and the implementation of a network environment may be included in each or some combination of these examples.
[0084] The bus may represent one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of the various bus architectures.
[0085] The electronic device may also communicate with one or more external devices (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device, and / or communicate with any device that enables the electronic device to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be through an input / output (I / O) interface. Also, the electronic device may communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device through the bus. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0086] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or can be implemented by the way of software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0087] In an exemplary embodiment of the present application, a computer-readable storage medium is further provided, on which a program product capable of implementing the above methods in this specification is stored. In some possible implementation manners, various aspects of the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments described in the above "Exemplary Method" section of this specification.
[0088] The program product may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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 above.
[0089] The computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0090] The program code contained on the readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0091] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or, alternatively, can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0092] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0093] It should be noted that although several modules or units of the device for performing actions are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0094] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A sorting method for text strings, characterized in that, The method includes: S100, obtain the user characteristics of the target user to obtain the initial feature vector T = (T1, T2, …, T i , …, T n ); i = 1, 2, …, n; where n is the number of user characteristics of the target user; T i is the i-th user characteristic of the target user; the target user has a corresponding a to-be-sorted strings; each to-be-sorted string has a corresponding target object; each to-be-sorted string has at least one necessary user characteristic corresponding to it; each necessary user characteristic belongs to T; a user characteristic in T has at least one missing feature value; S200. Determine a target historical feature vector from a number of historical feature vectors according to T and the necessary user features among the user features with missing eigenvalue included in T. Each historical feature vector has no user feature with a missing eigenvalue, and each historical feature vector has the same feature dimension as T. S300. Supplement the user features with missing eigenvalue in T according to the target historical feature vector to obtain a target feature vector T'. S400. Input T' into a sorting model to sort a to-be-sorted strings corresponding to the target user. Step S200 includes: S210. According to T, obtain the missing essential feature vector Q = (Q1, Q2, …, Q j , …, Q m ); j = 1, 2, …, m; where m is the number of missing essential features; Q j is the i-th missing essential feature; the missing essential feature is an essential user feature with a missing feature value in T; each missing essential feature has at least one associated essential user feature; each associated essential user feature belongs to T; S220. According to each associated necessary user feature corresponding to each missing necessary feature, obtain the associated necessary feature vector B=(B1, B2, …, B x , …, B y ); where x = 1, 2, …, y; y is the number of all distinct associated necessary user features; B x is the x-th distinct associated necessary user feature; each distinct associated necessary user feature has a corresponding associated number; the associated number is the number of missing necessary features associated therewith; S230, obtain, according to T, a non-missing feature vector F = (F1, F2, …, F c , …, F d ); c = 1, 2, …, d; where d is the number of user features with non-missing eigenvalues in T; F c is the user feature of the c-th non-missing eigenvalue in T; S240. Obtain a matching degree list \(P=(P_1, P_2, \ldots, P g , \ldots, P h )\) based on a number of historical non - missing feature vectors and \(F\); \(P g is the matching degree between \(F\) and the \(g\) - th historical non - missing feature vector \(L g ; the historical non - missing feature vector is obtained by deleting the user features in the corresponding historical feature vector that are the same as the user features of each missing eigenvalue in \(T\). S250, if P g = MAX(P), then P g is determined as the target historical feature vector.
2. The sorting method of the text string according to claim 1, characterized in that, P g Meet the following conditions: ; Among them, x c is the weight corresponding to F c ; L g,c is the user feature in L g corresponding to F c .
3. The sorting method of the text string according to claim 2, characterized in that, x c Determined according to the following steps: x c = 1 / (1 + MAX(GX) - GX c ) Among them, GX is a list of non-missing feature vector correlation numbers; GX = (GX1, GX2,..., GX c ,..., GX d ); GX c is the correlation number corresponding to F c ; if F c is the same as any associated necessary user feature, then GX c is the number of missing necessary features associated with the corresponding associated necessary user feature; if F c is not the same as each associated necessary user feature, then GX c is 0.
4. The sorting method of the text string according to claim 3, characterized in that Step S300 includes: S310, if P g = MAX(P), and P g ≥ the preset matching degree threshold, then, according to the target historical feature vector, supplement the user features with each missing eigenvalue in T to obtain a target feature vector T'.
5. The sorting method of the text string according to claim 3, characterized in that, Step S300 includes: S320, if P g = MAX(P), and P g < the preset matching degree threshold, then necessary user features with missing eigenvalue in T are supplemented according to the target historical feature vector to obtain a target feature vector T'.
6. A sorting device for text strings, characterized in that, The apparatus includes: An initial vector acquisition unit, configured to acquire user features of a target user to obtain an initial feature vector T = (T1, T2, …, T i , …, T n ); i = 1, 2, …, n; where n is the number of user features of the target user; T i is the i-th user feature of the target user; the target user has a corresponding a to-be-sorted strings; each to-be-sorted string has a corresponding target object; each to-be-sorted string has at least one corresponding necessary user feature; each necessary user feature belongs to T; a user feature in T with at least one missing feature value; A target vector determination unit, configured to determine a target historical feature vector from a number of historical feature vectors according to T and the necessary user features among the user features with missing eigenvalue included in T. Each historical feature vector has no user feature with a missing eigenvalue, and each historical feature vector has the same feature dimension as T. A supplement unit, configured to supplement the user features with missing eigenvalue in T according to the target historical feature vector to obtain a target feature vector T'. A sorting unit, configured to input T' into a sorting model to sort a to-be-sorted strings corresponding to the target user. The target vector determination unit is further configured to perform the following steps: S210. Obtain, according to T, the missing necessary feature vector Q = (Q1, Q2,..., Q j ,..., Q m ); j = 1, 2,..., m; where m is the number of missing necessary features; Q j is the i-th missing necessary feature; the missing necessary feature is the necessary user feature with a missing feature value in T; each missing necessary feature has at least one associated necessary user feature; each associated necessary user feature belongs to T; S220. According to each associated essential user feature corresponding to each missing essential feature, obtain an associated essential feature vector B = (B1, B2, …, B x , …, B y ); where x = 1, 2, …, y; y is the number of all distinct associated essential user features; B x is the x-th distinct associated essential user feature; each distinct associated essential user feature has a corresponding number of associations; the number of associations is the number of missing essential features associated therewith; S230. According to T, obtain the non-missing feature vector F = (F1, F2,..., F c ,..., F d ); c = 1, 2,..., d; where d is the number of user features with non-missing eigenvalues in T; F c is the user feature of the c-th non-missing eigenvalue in T; S240. Obtain a matching degree list \(P=(P_1, P_2, \ldots, P g , \ldots, P h )\) based on a number of historical non - missing feature vectors and \(F\); \(P g is the matching degree between \(F\) and the \(g\) - th historical non - missing feature vector \(L g ; the historical non - missing feature vector is obtained by deleting the user features in the corresponding historical feature vector that are the same as the user features of each missing eigenvalue in \(T\). S250, if P g = MAX(P), then P g is determined as the target historical feature vector.
7. A non-transitory computer-readable storage medium, characterized in that, At least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method according to any one of claims 1-5.
8. An electronic device, characterized in that, It includes a processor and the non-transitory computer-readable storage medium described in claim 7.
Citation Information
Patent Citations
Value prediction model input data generation method and device, equipment and medium
CN112990989A
Method and device for training product purchase intention evaluation model
CN118411259A