A hyperbolic space-based third-party library recommendation method and device

CN119128247BActive Publication Date: 2026-10-27WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410725956.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2026-10-27
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

[0004]针对现有技术中存在的第三方库推荐效果不佳的技术问题,本发明提出了一种基于双曲空间的第三方库推荐方法及装置

Benefits of technology

本发明将移动应用和第三方库的类别等文本信息通过语义模型进行编码,有效保留了类别、标签等信息;通过在双曲空间中的多层感知机将来自不同知识空间的节点特征有效地转移至统一的知识空间,解决了传统第三方库推荐方法中异质节点信息融合的缺陷;通过在双曲空间中对移动应用和第三方库间的交互关系进行学习,进而生成基于特征表示的评分排序,缓解了长尾分布中尾部节点的信息稀疏问题,提高了推荐第三方库的准确率,增强了实用性;模型结合历史数据与当前已选择的APP流程数据,通过本地可缓存的向量表(最终节点特征向量表)高效地生成第三方库的推荐结果,在数据量庞大的现实工业场景下具有可行性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128247B_ABST
    Figure CN119128247B_ABST
Patent Text Reader

Abstract

The application discloses a third-party library recommendation method and device based on hyperbolic space, wherein the method comprises the following steps: S1, inputting an APP category and TPL label text information, and obtaining initial feature vectors of APP nodes and TPL nodes in Euclidean space through a FastText semantic model; S2, using a multilayer perceptron to unify feature vector knowledge space in hyperbolic space, and then iteratively calculating node feature vectors through a pair comparison target function based on a Lorentz metric to obtain final APP and TPL feature vector tables; and S3, obtaining a recommended third-party library for a current APP in the final feature vector table. The application effectively retains the category features of the APP and the label features of the TPL; the multilayer perceptron is used to unify the node feature vectors to the same knowledge space, thereby overcoming the defects of heterogeneous node information fusion in traditional methods; long-tail distribution data features are learned in the hyperbolic space, the complex interaction relationship between the APP and the TPL is more accurately captured, and the accuracy of the third-party library recommendation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of third-party library recommendation algorithm technology, and in particular to a third-party library recommendation method and apparatus based on hyperbolic space. Background Technology

[0002] With the development of the internet and the widespread adoption of mobile devices, mobile applications (APPs) have attracted significant attention from developers. Faced with a highly competitive mobile application market, many developers choose to use third-party libraries (TPLs) to shorten development iteration cycles, improve development efficiency, and enhance product quality.

[0003] Third-party libraries are codebases written, open-sourced, and maintained by other developers, offering a wide range of functionalities and services. By referencing these libraries, developers don't need to write complex code from scratch; they can simply use them based on the needs of specific modules and tools. However, with the ever-increasing number and variety of third-party libraries, selecting the most suitable libraries for a project's needs from this vast pool becomes a crucial challenge for developers, requiring significant time and effort. Therefore, providing reliable and efficient third-party library recommendations for app developers is essential. Existing third-party library recommendation methods often lack consideration for the long-tail distribution of call relationships between mobile applications and third-party libraries, tending to recommend popular libraries with abundant call data. While these libraries are suitable for general scenarios, they may not meet the specific functional requirements of app developers in particular development scenarios, resulting in ineffective recommendations. Summary of the Invention

[0004] To address the technical problem of poor third-party library recommendation performance in existing technologies, this invention proposes a third-party library recommendation method and apparatus based on hyperbolic space.

[0005] The technical solution adopted in this invention is as follows: The first aspect provides a third-party library recommendation method based on hyperbolic space, including: S1: The classification information of the APP and the label text information of TPL are processed by embedding vectors through semantic model, and the initial feature vectors obtained by embedding are transferred into hyperbolic space; S2: In hyperbolic space, a unified feature vector knowledge space is obtained through a multilayer perceptron. Based on the strategy of comparing positive and negative samples, the feature vectors of APP nodes and TPL nodes are iteratively calculated using the Lorentz metric to obtain the final node feature vector table. The final node feature vector table contains the APP and TPL call feature information. S3: Based on the app currently selected by the user, recommend suitable third-party libraries to the user in the final feature vector table.

[0006] In one implementation, step S1 includes: S11: Input the APP's classification information and TPL's label text information into the pre-trained FastText model to obtain the Euclidean space. Initial feature vectors of APP and TPL; S12: Exponential mapping function through the Lorentz model Will The initial eigenvectors of APP and TPL are transferred from Euclidean space to hyperbolic space at the origin, where the formula for calculating the exponential mapping is:

[0007] For vectors It is the origin in hyperbolic space. Indicates APP node The initial eigenvectors in Euclidean space for Eigenvectors in hyperbolic space For the curvature of hyperbolic space, The Lorentz norm is calculated as follows:

[0008] in, yes The time dimension component, yes Components in spatial dimensions.

[0009] In one implementation, step S2 includes: S21: Map the APP node feature vector and the TPL node feature vector to the tangent space, and use a multilayer perceptron in the tangent space to unify the node feature knowledge space and map it back to the hyperbolic space. S22: Construct a loss function based on the scores of positive and negative example nodes of APP and TPL, and optimize the model parameters using the loss function; S23: Repeat step S22 until the maximum number of iterations is reached to obtain the final node feature vector table containing APP and TPL call feature information.

[0010] In one implementation, step S21 includes: S211: The feature vectors of APP nodes and TPL nodes are mapped into the tangent space using a projection function. The formula for calculating the projection function is as follows:

[0011] in, For vectors It is the origin in hyperbolic space. For Lorentz product, APP node Eigenvectors in hyperbolic space For APP nodes The eigenvectors in the tangent space; S212: Update the node feature vector using a multilayer perceptron (MLP), where the th The transformation calculation formula for layer MLP is:

[0012] in, It is the first The output of the layer, for the first layer, For the feature vector of the node, and They are the first Layer weight matrix and bias vector, For activation functions; S213: Map the updated node feature vectors back to hyperbolic space using an exponential mapping function.

[0013] In one implementation, step S22 includes: S221: Calculate the score difference between positive and negative example node pairs of APP and TPL based on the Lorenz metric. Positive examples are APP and TPL pairs with actual call relationships in the training set, while negative examples are randomly selected APP and TPL pairs without call records. The formula for calculating the score difference between positive and negative example node pairs of APP and TPL is as follows:

[0014] in, The activation function is Sigmoid; for the APP node. and TPL node The scoring formula is as follows:

[0015] For nodes and TPL node Lorentz product, and They are respectively Self-learning global preference features and Self-learning global preference features For hyperbolic vector addition, let there be two vectors. and , The calculation formula is:

[0016] in, For the curvature of hyperbolic space; S222: Repeat step S221 to obtain the score difference between positive and negative example nodes of each APP and TPL and add them together; S223: Calculate the probability term of the model parameters based on the pseudo-hyperbolic Gaussian distribution. The calculation formula is as follows:

[0017] in, Let be the vector embedding dimension in hyperbolic space. For the set of model parameters, For regularization parameters, The origin of hyperbolic space; S224: Repeat steps S221-S223 to optimize model parameters, update the node feature vectors of each APP and the node feature vectors of TPL, and obtain the final feature vector table.

[0018] In one implementation, the model's objective function is: in, To optimize the objective function, for Eigenvectors in hyperbolic space for Eigenvectors in hyperbolic space for Eigenvectors in hyperbolic space for Self-learning global preference features For the curvature of hyperbolic space, Let θ be the Lorentz norm, and Θ be the set of all parameters. For regularization parameters, The origin of hyperbolic space, Let be the vector embedding dimension in hyperbolic space. It is a set of nodes.

[0019] In one implementation, step S3 includes: Based on the app currently selected by the user, the topK algorithm is used to recommend the K highest-rated third-party libraries to the user in the final feature vector table.

[0020] Based on the same inventive concept, a second aspect of the present invention provides a third-party library recommendation device based on hyperbolic space, comprising: The feature vector initialization module is used to perform vector embedding processing on the classification information of the APP and the label text information of TPL through the semantic model, and transfer the initial feature vector obtained by embedding to the hyperbolic space. The final feature vector table acquisition module is used to unify the feature vector knowledge space in hyperbolic space through a multilayer perceptron. Based on the strategy of comparing positive and negative samples, it iteratively calculates the feature vectors of APP nodes and TPL nodes using the Lorentz metric to obtain the final node feature vector table. The final node feature vector table contains the APP and TPL call feature information. The third-party library recommendation module is used to recommend suitable third-party libraries to the user based on the app currently selected by the user in the final feature vector table.

[0021] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the hyperbolic space-based third-party library recommendation method described in the first aspect.

[0022] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hyperbolic space-based third-party library recommendation method described in the first aspect.

[0023] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows: This invention encodes textual information such as the categories of mobile applications and third-party libraries using a semantic model, effectively preserving information such as categories and tags. By using a multilayer perceptron in hyperbolic space to effectively transfer node features from different knowledge spaces to a unified knowledge space, it solves the deficiency of heterogeneous node information fusion in traditional third-party library recommendation methods. By learning the interaction relationships between mobile applications and third-party libraries in hyperbolic space, it generates a feature-representation-based rating ranking, alleviating the information sparsity problem of tail nodes in long-tail distributions, improving the accuracy of third-party library recommendations, and enhancing practicality. The model combines historical data with currently selected APP process data, efficiently generating third-party library recommendation results through a locally cacheable vector table (final node feature vector table), demonstrating feasibility in real-world industrial scenarios with massive amounts of data. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A flowchart illustrating a third-party library recommendation method based on hyperbolic space provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a third-party library recommendation model (device) based on hyperbolic space in an embodiment of the present invention. Detailed Implementation

[0026] This invention provides a method and apparatus for recommending third-party libraries based on hyperbolic space. The main steps include: S1: Inputting textual information of mobile application (APP) category and third-party library (TPL) tag, and obtaining initial feature vectors of APP nodes and TPL nodes in Euclidean space using the FastText semantic model; S2: Unifying the feature vector knowledge space using a multilayer perceptron in hyperbolic space, and then iteratively calculating the node feature vectors using a pairwise comparison objective function based on Lorentz metric to obtain the final APP and TPL feature vector table; S3: Obtaining recommended third-party libraries from the final feature vector table using the current APP. This invention encodes the textual information of APP and TPL pairs, effectively preserving the category features of APP and the tag features of TPL; unifying node feature vectors to the same knowledge space using a multilayer perceptron overcomes the defect of heterogeneous node information fusion in traditional third-party library recommendation methods; learning long-tailed distributed data features in hyperbolic space more accurately captures the complex interaction relationship between APP and TPL, improving the accuracy of third-party library recommendation.

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Example 1 This invention discloses a third-party library recommendation method based on hyperbolic space. Please refer to [link / reference]. Figure 1 The method includes: S1: The classification information of the APP and the label text information of TPL are processed by embedding vectors through semantic model, and the initial feature vectors obtained by embedding are transferred into hyperbolic space; S2: In hyperbolic space, a unified feature vector knowledge space is obtained through a multilayer perceptron. Based on the strategy of comparing positive and negative samples, the feature vectors of APP nodes and TPL nodes are iteratively calculated using the Lorentz metric to obtain the final node feature vector table. The final node feature vector table contains the APP and TPL call feature information. S3: Based on the app currently selected by the user, recommend suitable third-party libraries to the user in the final feature vector table.

[0029] The specific implementation methods of each step of the present invention are described in detail below.

[0030] Step S1 can be achieved in the following way: S11: Input the APP's classification and TPL's label text information into the pre-trained FastText model to obtain the Euclidean space. Initial feature vectors of APP and TPL; S12: Exponential mapping function through the Lorentz model The initial eigenvectors are transferred from Euclidean space to hyperbolic space at the origin.

[0031] The formula for calculating the exponential mapping is:

[0032] in, For vectors , is the origin in hyperbolic space. Represents a node The initial eigenvectors in Euclidean space for Eigenvectors in hyperbolic space Let be the curvature of the hyperbolic space. The Lorentz norm is calculated as follows:

[0033] in, It is a vector The time dimension component, It is its component in the spatial dimension.

[0034] In practice, step S2 can be implemented in the following way: S21: Map the feature vectors of APP node and TPL node to the tangent space, and use a multilayer perceptron in the tangent space to unify the node feature knowledge space and map it back to the hyperbolic space. S22: Construct a loss function using scores, and optimize model parameters using the loss function; S23: Repeat step S22 until the maximum number of iterations is reached to obtain the final node feature vector table containing APP and TPL call feature information.

[0035] Step S21 can be implemented in the following way: S211: Map the feature vectors of APP and TPL nodes into the tangent space using a projection function; The formula for calculating the projection function is:

[0036] in, For vectors , is the origin in hyperbolic space. For Lorentz product, for Eigenvectors in hyperbolic space for The eigenvectors in the tangent space.

[0037] S212: Update the node feature vector using MLP, the first... The transformation calculation formula for layer MLP is:

[0038] in, It is the first The output of the layer, for the first layer, is the feature vector of the node. and They are the first Layer weight matrix and bias vector, This is the activation function.

[0039] S213: Map the node feature vectors back to hyperbolic space using an exponential mapping function.

[0040] Step S22 can be achieved in the following way: S221: Calculate the score difference between positive and negative example node pairs of APP and TPL based on the Lorentz metric. Positive examples are APP and TPL pairs with actual call relationships in the training set, while negative examples are randomly selected APP and TPL pairs without call records. The calculation formula is as follows:

[0041] in, This is the Sigmoid activation function.

[0042] Specifically, for APP nodes and TPL node The scoring formula is as follows:

[0043] in, For nodes and TPL node Lorentz product, and These are the global preference features learned by the nodes themselves. For hyperbolic vector addition, let there be two vectors. and , The calculation formula is:

[0044] in, Let be the curvature of the hyperbolic space.

[0045] S222: Repeat step S221 to obtain the score difference between positive and negative example nodes of each APP and TPL and add them together.

[0046] S223: Calculate the probability term of the model parameters based on the pseudo-hyperbolic Gaussian distribution. The calculation formula is as follows:

[0047] in, Let be the vector embedding dimension in hyperbolic space. For the set of model parameters, For regularization parameters, It is the origin of hyperbolic space.

[0048] S224: Repeat steps S221-S223 to optimize model parameters, update the node feature vectors of each APP and TPL, and obtain the final feature vector table.

[0049] Preferably, the optimized expression of the model is:

[0050] in, To optimize the objective function, for Eigenvectors in hyperbolic space Let be the curvature of the hyperbolic space. Let θ be the Lorentz norm, and Θ be the set of all parameters. For regularization parameters, The origin of hyperbolic space, Let be the vector embedding dimension in hyperbolic space.

[0051] In existing technologies, a third-party library recommendation method based on hybrid collaborative filtering (Method 1) is disclosed. This method generates a topic model through unsupervised learning and constructs feature vectors using a knowledge graph. Finally, it merges the recommendation list generated by the topic model and the recommendation list from the knowledge graph to generate a hybrid recommendation result. The method of this invention is also a third-party library recommendation method, but the difference lies in that Method 1's model is located in Euclidean space, while this invention's method performs iterative calculation of feature vectors in hyperbolic space. It leverages the geometric advantages of hyperbolic space in representing complex hierarchical data to enhance the accuracy of feature capture for APP and TPL, and is located in a different geometric space than Method 1. The collaborative filtering recommendation method and system based on hyperbolic space contrastive learning (Method 2) constructs a main recommendation task model in hyperbolic space and combines it with a contrastive learning auxiliary task model for multi-task learning to generate the final recommendation result. The method of this invention, like Method 2, performs recommendation tasks in hyperbolic space and can be applied to third-party library recommendation scenarios. The difference lies in that Method 2 uses a hyperbolic graph convolutional neural network when learning user and item representations and randomly discards edges to generate a new interaction graph in the contrastive learning auxiliary task. The method of this invention constructs the learning objective function based on Bayesian posterior probability when learning feature representations, and incorporates self-learning global preference feature modeling as well as text information such as labels and categories. Compared with method 2, this method has a different model technology route, that is, the technical means used are different. Based on method 2, those skilled in the art can only think of using hyperbolic graph convolutional neural networks to learn user and item representations separately, and randomly discarding edges to generate new interaction graphs in the contrastive learning auxiliary task, thereby realizing collaborative filtering recommendation.

[0052] This invention encodes textual information such as the categories of mobile applications and third-party libraries using a semantic model, effectively preserving information such as categories and tags. By using a multilayer perceptron in hyperbolic space to effectively transfer node features from different knowledge spaces to a unified knowledge space, it solves the deficiency of heterogeneous node information fusion in traditional third-party library recommendation methods. By learning the interaction relationships between mobile applications and third-party libraries in hyperbolic space, it generates a feature-representation-based rating ranking, alleviating the information sparsity problem of tail nodes in long-tail distributions, improving the accuracy of third-party library recommendations, and enhancing practicality. The model combines historical data with currently selected APP data, efficiently generating third-party library recommendation results through a locally cacheable vector table, demonstrating feasibility in real-world industrial scenarios with massive amounts of data.

[0053] The method of the present invention will be described below with specific examples, specifically using AppBrain as an embodiment; Pre-experiment preparation: The experimental programming environment consisted of PyTorch 2.0.1, SciPy 1.11.4, and NumPy 1.25.2. AppBrain is a well-known Android mobile application website that covers multi-dimensional information such as the application's name, category, description, and the third-party libraries it calls.

[0054] The implementation example retained applications with more than 5 calling libraries, ultimately resulting in the AppBrain dataset containing 667,233 mobile applications, 572 third-party libraries, and 11,392,322 call records. To simulate real-world development scenarios of different scales and application domains, the invention was evaluated by dividing it into three subsets. Dataset information is shown in Table 1.

[0055]

[0056] like Figure 2 As shown, when recommending third-party libraries, this invention constructs a final feature vector table for the app and TPL based on the text information and call data of the app and TPL in hyperbolic space using a multilayer perceptron and a positive-negative example contrast loss optimization strategy. This results in the final ranking list of third-party libraries. Finally, the top 5 and 10 third-party libraries by final score are recommended for each app in the experimental dataset. The mean precision (MP), mean recall (MR), hit rate (HR), and normalized discounted cumulative gain (NDCG) of the recommendation results are calculated. The closer each metric is to 1, the higher the accuracy of the recommendation ranking.

[0057] The training parameters of the model in this invention are shown in Table 2.

[0058]

[0059] The final experimental results of this invention are shown in Table 3.

[0060]

[0061] Example 2 Based on the same inventive concept, this embodiment discloses a third-party library recommendation device based on hyperbolic space, comprising: The feature vector initialization module is used to perform vector embedding processing on the classification information of the APP and the label text information of TPL through the semantic model, and transfer the initial feature vector obtained by embedding to the hyperbolic space. The final feature vector table acquisition module is used to unify the feature vector knowledge space in hyperbolic space through a multilayer perceptron. Based on the strategy of comparing positive and negative samples, it iteratively calculates the feature vectors of APP nodes and TPL nodes using the Lorentz metric to obtain the final node feature vector table. The final node feature vector table contains the APP and TPL call feature information. The third-party library recommendation module is used to recommend suitable third-party libraries to the user based on the app currently selected by the user in the final feature vector table.

[0062] It should be noted that, Figure 2 In the model shown, the embedding initialization module corresponds to the feature vector initialization module in the hyperbolic space-based third-party library recommendation device, the feature representation learning module corresponds to the final feature vector table acquisition module, and the rating prediction module corresponds to the third-party library recommendation module.

[0063] Since the apparatus described in Embodiment 2 of this invention is the same apparatus used to implement the hyperbolic space-based third-party library recommendation method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this apparatus based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All apparatuses used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0064] Example 3 Based on the same inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in Embodiment 1.

[0065] Since the computer-readable storage medium described in Embodiment 3 of this invention is the same computer-readable storage medium used in implementing the hyperbolic space-based third-party library recommendation method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer-readable storage medium based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable storage media used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0066] Example 4 The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in Embodiment 1.

[0067] Since the computer device described in Embodiment 4 of this invention is the same computer device used to implement the hyperbolic space-based third-party library recommendation method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0068] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0069] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0070] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the embodiments of the invention fall within the scope of the claims of the invention and their equivalents, the invention also intends to include these modifications and variations.

Claims

1. A third-party library recommendation method based on hyperbolic space, characterized in that, include: S1: The classification information of the APP and the label text information of TPL are processed by embedding vectors through semantic model, and the initial feature vectors obtained by embedding are transferred into hyperbolic space; S2: In hyperbolic space, a unified feature vector knowledge space is obtained through a multilayer perceptron. Based on the strategy of comparing positive and negative samples, the feature vectors of APP nodes and TPL nodes are iteratively calculated using the Lorentz metric to obtain the final node feature vector table. The final node feature vector table contains the APP and TPL call feature information. S3: Based on the app currently selected by the user, recommend suitable third-party libraries to the user in the final feature vector table; Step S2 includes: S21: Map the APP node feature vector and the TPL node feature vector to the tangent space, and use a multilayer perceptron in the tangent space to unify the node feature knowledge space and map it back to the hyperbolic space. S22: Construct a loss function based on the scores of positive and negative example nodes of APP and TPL, and optimize the model parameters using the loss function; S23: Repeat step S22 until the maximum number of iterations is reached to obtain the final node feature vector table containing APP and TPL call feature information; Step S21 includes: S211: The feature vectors of APP nodes and TPL nodes are mapped into the tangent space using a projection function. The formula for calculating the projection function is as follows: in, For vectors It is the origin in hyperbolic space. For the curvature of hyperbolic space, For Lorentz product, For APP nodes Eigenvectors in hyperbolic space For APP nodes The eigenvectors in the tangent space; S212: Update the node feature vector using a multilayer perceptron (MLP), where the th The transformation calculation formula for layer MLP is: in, It is the first The output of the layer, for the first layer, For the feature vector of the node, and They are the first Layer weight matrix and bias vector, For activation functions; S213: Map the updated node feature vectors back to hyperbolic space using an exponential mapping function.

2. The third-party library recommendation method based on hyperbolic space as described in claim 1, characterized in that, Step S1 includes: S11: Input the APP's classification information and TPL's label text information into the pre-trained FastText model to obtain the Euclidean space. Initial feature vectors of APP and TPL; S12: Exponential mapping function through the Lorentz model Will The initial eigenvectors of APP and TPL are transferred from Euclidean space to hyperbolic space at the origin, where the formula for calculating the exponential mapping is: For vectors It is the origin in hyperbolic space. Indicates APP node The initial eigenvectors in Euclidean space for Eigenvectors in hyperbolic space For the curvature of hyperbolic space, The Lorentz norm is calculated as follows: in, yes The time dimension component, yes Components in spatial dimensions.

3. The third-party library recommendation method based on hyperbolic space as described in claim 1, characterized in that, Step S22 includes: S221: Calculate the score difference between positive and negative example node pairs of APP and TPL based on the Lorenz metric. Positive examples are APP and TPL pairs with actual call relationships in the training set, while negative examples are randomly selected APP and TPL pairs without call records. The formula for calculating the score difference between positive and negative example node pairs of APP and TPL is as follows: in, The activation function is Sigmoid; for the APP node. and TPL node The scoring formula is as follows: For nodes and TPL node Lorentz product, and They are respectively Self-learning global preference features and Self-learning global preference features For hyperbolic vector addition, let there be two vectors. and , The calculation formula is: For the curvature of hyperbolic space; S222: Repeat step S221 to obtain the score difference between positive and negative example nodes of each APP and TPL and add them together; S223: Calculate the probability term of the model parameters based on the pseudo-hyperbolic Gaussian distribution. The calculation formula is as follows: in, Let be the vector embedding dimension in hyperbolic space. For the set of model parameters, For regularization parameters, The origin of hyperbolic space; S224: Repeat steps S221-S223 to optimize model parameters, update the node feature vectors of each APP and the node feature vectors of TPL, and obtain the final feature vector table.

4. The third-party library recommendation method based on hyperbolic space as described in claim 3, characterized in that, The optimization objective function of the model is: in, To optimize the objective function, for Eigenvectors in hyperbolic space for Eigenvectors in hyperbolic space for Eigenvectors in hyperbolic space for Self-learning global preference features For the curvature of hyperbolic space, Let θ be the Lorentz norm, and Θ be the set of all parameters. For regularization parameters, The origin of hyperbolic space, Let be the vector embedding dimension in hyperbolic space. It is a set of nodes.

5. The third-party library recommendation method based on hyperbolic space as described in claim 1, characterized in that, Step S3 includes: Based on the app currently selected by the user, the topK algorithm is used to recommend the K highest-rated third-party libraries to the user in the final feature vector table.

6. A third-party library recommendation device based on hyperbolic space, characterized in that, Based on the method described in claim 1, it includes: The feature vector initialization module is used to perform vector embedding processing on the classification information of the APP and the label text information of TPL through the semantic model, and transfer the initial feature vector obtained by embedding to the hyperbolic space. The final feature vector table acquisition module is used to unify the feature vector knowledge space in hyperbolic space through a multilayer perceptron. Based on the strategy of comparing positive and negative samples, it iteratively calculates the feature vectors of APP nodes and TPL nodes using the Lorentz metric to obtain the final node feature vector table. The final node feature vector table contains the APP and TPL call feature information. The third-party library recommendation module is used to recommend suitable third-party libraries to the user based on the app currently selected by the user in the final feature vector table.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the hyperbolic space-based third-party library recommendation method as described in any one of claims 1 to 5.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the hyperbolic space-based third-party library recommendation method as described in any one of claims 1 to 5.