Inside Class Loaders

2020 Ansys Lumerical FDTD MODE安装步骤说明 lumerical 仿真 FDTD MODE 阅读详情
by Andreas Schaefer
11/12/2003

This series of articles started when I wanted to write a weblog about the impact of class loaders in a J2EE server. But the log entry grew, due the fact that a few basic rules still can provide a complex system, as you see in physics, where a few basic components and forces can build up something like our universe with all of the stars, black holes, pulsars, galaxies, and planets.

In this part, I want to lay the groundwork on which we can start a discussion about dynamic and modular software systems. Class loaders may seem to be a dry topic, but I think it is one of the topics that separate the junior from the senior software engineer, so bear with me for an exciting journey into the darker corners of Java.

Now you may ask yourself, "Why should I deal with multiple class loaders and their limitations and problems?" The short answer is that you probably have to, one way or the other. Even when you write a simple servlet or JSP program and deploy within a servlet container, your code is loaded by your very own class loader, preventing you from accessing other web applications' classes. In addition, many "container-type" applications such as J2EE servers, web containers, NetBeans, and others are using custom class loaders in order to limit the impact of classes provided by a component, and thus will have an impact on the developer of such components.

As we will see later, even with dynamic class loading, there can only be one class loaded in a particular JVM. Additional class loaders enable a developer to partition the JVM so that the reduced visibility of a class makes it possible to have multiple, different definitions of the same class loaded.

The class loaders work like the federal bank of each country, issuing their own currency. The border of each country defines the visibility and usability of the currency and makes it possible to have multiple currencies in the world.

First we need to explain some definitions:

CL: Class loader.
Initial CL: The CL that initiated the loading of the class.
Effective CL: The CL that actually loaded the class.
Class type: The fully qualified class name (package plus class name).
Class: A combination of the class type and effective class loader.
java.lang.Class: A class in the JDK that represents a class (name, fields, methods, etc.).
Symbolic Link: A class type used within the source code, such as superclasses, extended interfaces, variables, parameters, return values, instanceofs, and upcasts.

Class loaders and their usage follow a few simple rules:

  • Class loaders are hierarchically organized, where each one has a parent class loader, except the bootstrap class loader (the root).
  • Class loaders should (practically: must) delegate the loading of a class to the parent, but a custom class loader can define for itself when it should do so.
  • A class is defined by its class type and the effective class loader.
  • A class is only loaded once and then cached in the class loader to ensure that the byte code cannot change.
  • Any symbolic links are loaded by the effective class loader (or one of its ancestors), if this is not already done. The JVM can defer this resolution until the class is actually used.
  • An upcast of an instance to another class fails when the class of the instance and the class of the symbolic link do not match (meaning their class loaders do not match).

Now I want to put on some meat to these bare-bone rules to provide better understanding.

Class Loader Organization and Delegation

Before we start, let's look at a typical class loader hierarchy, as illustrated by Figure 1:

Figure 1
Figure 1. Class loader hierarchy example

As shown in Figure 1, the bootstrap class loader (BS) loads the classes from the JVM, as well as extensions to the JDK. The system class loader (CP) loads all of the classes provided by the CLASSPATH environment variable or passed using the -classpath argument to the java command. Finally we have several additional class loaders, where A1-3 are children of the CP, and B1-2 are children of A3. Every class loader (except BS) has a parent class loader, even if no parent is provided explicitly; in the latter case, the CP is automatically set as the parent.

Related Reading

Java Enterprise Best Practices

Java Enterprise Best Practices
By The O'Reilly Java Authors

Table of Contents
Index
Sample Chapter

Read Online--Safari Search this book on Safari:
 

Code Fragments only

That alone does not mean much but has a big impact on class-loading delegation. The Javadoc of java.lang.ClassLoader specifies that any class loader must first delegate the loading of a class to the parent, and only if this fails does it try to load the class itself. Actually, the class loader does not care about which one gets the bytes of the class, but rather which one calls defineClass(). In this final method, an instance of class java.lang.Class is created and cached in the class loader so that the byte code of a class cannot change on a following request to load the class. This method also checks that the given class name matches the class name in the byte code. Because this method is final, no custom class loader can change this behavior.

As previously mentioned, a class loader must delegate the loading of a class (although a developer can override loadClass() and change this behavior). On one hand, if loading of system classes is not delegated, an application could provide malicious code for JDK classes and introduce a ton of problems. On the other hand, all classes at least extend java.lang.Object, and this class must be resolved, too. Thus the custom class loader has to load this class by itself, otherwise the load fails with a linkage error. These two facts imply that a custom class loader has to delegate class loading. In JDK 1.4, two of the three versions of defineClass() throw a SecurityException if the given class name starts with "java", while the third version is deprecated due to these security concerns.

I want to stress the fact here that there is a difference between the class loader that starts the process of loading the class and the one that actually loads (defines) the class. Assuming that in our example no class loader delegates the loading of a class to one of its children, any class is either loaded by the Initial CL or by one of its ancestors. Let us assume that a class A contains a symbolic link to class B that in turn contains a symbolic link to class C. The class loader of C can never be a child of the class loader of B or of A. Of course, one should never say "never," and yes, it is possible to break this rule, but like multiple inheritance in C++, this is "black belt" programming.

A more prominent exception of the JDK delegation model of "delegating first" is the class loader for a web container described in the servlet specification. This one tries to load a class first by itself before it delegates to the parent. Nevertheless, some classes, such as java.*, javax.*, org.xml.sax.* and others, are delegated first to the parent. For more information, please check out the Tomcat 5.0 documentation.

Class Linking

After a class is defined with defineClass(), it must be linked in order to be usable by the final resolveClass() method. Between this method call and the first usage of a symbolic link, the class type is loaded by the class loader of the containing class as Initial CL. If any linked class (type) cannot be loaded, the method will throw a linkage error (java.lang.NoClassDefFoundError). Keep in mind that the resolution of symbolic links is up to the JVM and can be done anywhere between the loading of the containing class (eager resolution or C-style) and the first actual usage of the symbolic link (lazy resolution). It can happen that a symbolic link is in a class and if it is never used, the linked class will never be loaded such as in this example with JDK 1.4.2 on Windows 2000:

public class M {
    // In JDK 1.4.2 on W2K this class can be used
    // fine even if class O is not available.
	public O mMyInstanceOfO;
}

whereas this class will fail with a linkage error if the class O cannot be loaded:

public class M {
    // In JDK 1.4.2 and W2K the creation of an
    // instance of M will FAIL with
    // a NoClassDefFoundError if class O is not
    // available
	public O mMyInstanceOfO = new O();
}

and to make matters a little bit more complicated, it only fails when an instance is created:

    // Fine because in JDK 1.4.2 on W2K class
    // linking is done lazy
    Class lClassM = Class.forName("M");
    // Fails with NoClassDefFoundError
    Object lObject = lClassM.newInstance();

For more information, please read Chapter 12: "Execution" in the Java Language Specification.

Class Definition

To a beginner, a class is identified solely by the class type. As soon as you start to deal with class loaders, this is no longer the case. Provided that class type M is not available to CP, A1 and A2 could load the same class type M with different byte code. Even when the byte code would be the same from a Java point of view, these classes are different, no matter if the byte code is the same or not. To avoid ambiguities, a class is identified by its class type as well as the Effective CL, and I will use the notation <Class Name>-<Class Loader>. So for this case, we have classes M-A1 and M-A2. Imagine we also have another class, Test-A1, with a method upcastM() that looks like this:

public void upcastM(Object pInstance)
        throws Exception {
    M lM = (M) pInstance;
}

Because the class Test is loaded by A1, its symbolic link M is also loaded by A1. So we are going to upcast a given object to M-A1. When this method is called with an instance of the class M-A1 as an argument, it will return successfully, but if it is called with an instance of M-A2, it will throw a ClassCastException because it is not the same class, according to the JVM. Even with reflection this rule is enforced, because both java.lang.Class.newInstance() and java.lang.reflect.Constructor.newInstance() return an instance of class java.lang.Object-BS. Unless only reflection is used during the lifetime of this object, the instance has to be upcast at some point. In the case of only using reflection to avoid conflicts, any arguments of a method still be subject to an upcast to the class of the method signature and therefore the classes must match, otherwise you get a java.lang.IllegalArgumentException due to the ClassCastException.

Test

The sample code may help the reader to better understand the concepts described above and, later, to do their own investigations. In order to run the sample code, just extract it in the directory of your choice and execute the ant build script in the classloader.part1.basics directory.

It has three directories: main, version_a, and version_b. The main directory contains the startup class Main.java as well as the custom class loader that will load classes from a given directory. The other two directories both contain one version of M.java and Test.java. The class Main will first create two custom class loaders each loading classes, after delegating to the parent class loader, from either the version_a or version_b directories. Then it will load the class M by each of these two class loaders and create an instance through reflection:

// Create two class loaders: one for each dir.
ClassLoader lClassLoader_A =
   new MyClassLoader(
      "./build/classes/version_a" );
ClassLoader lClassLoader_B =
   new MyClassLoader(
      "./build/classes/version_b" );
// Load Class M from first CL and
// create instance
Object lInstance_M_A =
   createInstance( lClassLoader_A, "M" );
// Load Class M from second CL and
// create instance
Object lInstance_M_B =
   createInstance( lClassLoader_B, "M" );

In order to test an upcast, I need a class where the Effective CL is one of the custom class loaders. I then use reflection in order to invoke a method on them because I cannot upcast them because Main is loaded by the CP:

// Check the upcast of a instance of M-A1
// to class M-A1. This test must succeed
// because the CLs match.
try {
    checkUpcast(
        lClassLoader_A, lInstance_M_A );
    System.err.println(
        "OK: Upcast of instance of M-A1"
        + " succeeded to a class of M-A1" );
} catch (ClassCastException cce) {
    System.err.println(
       "ERROR: Upcast of instance of M-A1"
       + " failed to a class of M-A1" );
}
// Check the upcast of a instance of M-A2 to
// class M-A1. This test must fail because
// the CLs does not match.
try {
    checkUpcast(
       lClassLoader_A, lInstance_M_B );
    System.err.println(
       "ERROR: upcast of instance of M-A2"
       + " succeeded to a class of M-A1" );
} catch (ClassCastException cce) {
    System.err.println(
       "OK: upcast of instance of M-A2 failed"
       + " to a class of M-A1" );
}

The checkUpcast() loads the class Test through reflection and calls the Test.checkUpcast() method, which makes a simple upcast:

private static void checkUpcast(
   ClassLoader pTestCL, Object pInstance )
      throws Exception {
    try {
        Object lTestInstance =
           createInstance( pTestCL, "Test" );
        Method lCheckUpcastMethod =
           lTestInstance.getClass().getMethod(
              "checkUpcast",
              new Class[] { Object.class } );
        lCheckUpcastMethod.invoke(
           lTestInstance,
           new Object[] { pInstance } );
    } catch( InvocationTargetException ite ) {
        throw (ClassCastException)
           ite.getCause();
    }
}

Afterwards, there are some tests that do the same thing, but check the upcast restriction against reflection to ensure that reflection cannot compromise the rules posted at the beginning of the article. The last test checks the linking of symbolic links. On Windows 2000 and JDK 1.4.2, it will also show the lazy loading of classes because the loading of the class succeeds, whereas the creation of the instance eventually fails:

// Load a class N that has a symbolic link to
// class O that was removed so that the class
// resolving must fail
try {
    // Upcast ClassLoader to our version in
    // order to access the normally protected
    // loadClass() method with the resolve
    // flag. Even the resolve flag is set to
    // true the missing symbolic link is only
    // detected in W2K and JDK 1.4.2 when the
    // instance is created.
    Class lClassN = ( (MyClassLoader)
       lClassLoader_A).loadClass( "N", true );
    // Finally when the instance is created
    // any used symbolic link must be resolved
    // and the creation must fail
    lClassN.newInstance();
    System.err.println(
       "ERROR: Linkage error not thrown even"
       + "class O is not available for"
       + " class N" );
} catch( NoClassDefFoundError ncdfe ) {
    System.err.println(
       "OK: Linkage error because class O"
       + " could not be found for class N" );
}

Please note that in the directory version_a there is a class named O.java, because in order to compile the class N.java, this class is needed. However, the ant build script will remove the compiled class O.class before the test is started.

Conclusion

As long as a Java developer does not deal with his or her own class loader, all of the classes are loaded by the bootstrap and system class loader, and there will never be a conflict. Thus, it seems that a class is defined only by the fully qualified class name. As soon as there are sibling class loaders -- neither a parent of the other -- a class type can be loaded multiple times with or without different byte code. The class loader also defines the visibility of a class type because any upcast checks against the class name as well as its class loaders.

To use the currency analogy, this is expressed by the fact that you can have several currencies in your wallet, but as soon as you want to use one, the cashier will check if your money is of the local currency. Still, you can carry these currencies in your pocket wherever you go, and likewise, you can carry around instances of classes even when they are unknown or not compatible in a particular class, as long as the class of the reference is compatible there. Luckily in Java, java.lang.Object is the superclass of all instances and is loaded by the BS, which is the parent of all class loaders no matter what. This means a reference of a class java.lang.Object is always compatible. I think of this as a "tunneling through" of classes from one compatible island to the next -- something that is very important in J2EE, as will be shown in a future installment.

My analogy with the currencies is very simplified, because it implies that all classes have the same visibility due to the single border of a country. The analogy is based on the two-dimensional world map, whereas with Java class loaders, each level within the hierarchy of the class loaders is adding a new layer and building up a three-dimensional space.

Additional class loaders enable a Java developer to write modular applications where the visibility of classes is restricted, and therefore, multiple class types can be loaded and managed. Nevertheless, it requires effort to understand the used class loaders and the organization of the classes and class loaders. As with threads, class loading is a runtime behavior that is not obviously visible to the developer, and requires experience and testing to understand and utilize.

Now that the groundwork is laid, we can finally delve into the usage of class loaders. In the next article, we will see how class loaders can be used in a J2EE application server to manage deployments and what the effects are on invocations through local or remote interfaces. Afterwards, we will see how advanced class loaders make it possible to drop class types or massage the code in order to add "Advices" (AOP) at runtime without changing or recompiling your code.

Andreas Schaefer is a system architect for J2EE at SeeBeyond Inc., where he leads application server development.

 
Lumerical官方案例、FDTD时域有限差分法仿真学习(三)——环形谐振器(Ring resonator)之第一部分 环形谐振器教程的第 1 部分使用 MODE 来设计和仿真环形谐振器。 自由光谱范围 (FSR) 和品质因数 (Q 因数) 是这种面向片上通信应用的基于绝缘体上硅 (SOI) 波导设计的关键性能指标。 阅读详情

相关推荐

PDF处理全栈实战:从系统打印到编程生成与AI解析

PDF作为跨平台文档交换标准,其核心在于将内容、字体、图像等元素编码为独立于软硬件的固定格式文件。这一特性使得PDF在打印、归档和电子分发中具有不可替代性。从技术原理看,无论是操作系统打印服务(如Windows Print Spooler、Linux CUPS)将文档渲染为页面描述语言,还是编程库(如reportlab、weasyprint)直接生成PDF字节流,本质都是完成从逻辑结构到视觉呈现的转换。在工程实践中,PDF处理的价值体现在自动化报告生成、格式转换(如PDF转Word)、文档压缩与批量编辑等场

weixin_30268921的博客 368

Ansys Lumerical | FDTD 应用:设计光栅耦合器

这是通过对组中的对象应用轻微旋转并对对象使用“网格顺序”设置来完成的,以便光纤仅向下延伸到光栅耦合器上方的某个点,而不是像布局视图中可能描述的那样完全穿过光纤。1、基本光栅耦合器设计 :D. Taillaert,F. Van Laere,M. Ayre,W. Bogaerts,D. Van Thourhout,P. Bienstman和R. Baets,“用于光纤和纳米光子波导之间耦合的光栅耦合器”,日本应用物理学杂志,第45卷,第8a期,第6071-6077页,2006年。这种倾斜可防止反射到光纤中。

ueotek的博客 4271

LangChain工程化实践:从MVP开发到生产级部署全链路指南

LangChain并非简单的LLM调用封装,而是面向AI应用的工程化中间件,其核心在于解耦数据接入、检索增强、记忆管理与执行引擎四大正交层。它通过模块化设计支撑可维护、可扩展、可审计的AI系统构建,技术价值体现在上下文智能管理、私有化向量检索集成、故障熔断与多源混合检索等关键能力上。典型应用场景包括企业知识库问答、合同智能审查、客服工单分类及保险理赔Agent等需长期记忆、外部数据联动与业务规则嵌入的生产系统。本文基于真实项目压测与K8s落地经验,深度解析DocumentLoader选型、bge-m3嵌入模

weixin_34242509的博客 355

Ansys Lumerical FDTD几何相位的参数扫描

这里设置的长和宽为0.5um,高度-0.2-2um。

weixin_50538161的博客 4226

多物理场光学仿真软件:Ansys Lumerical_(5).FDTD解决方案详解

在FDTD仿真中,材料属性的定义是非常重要的。Ansys Lumerical支持多种材料模型,包括常数介质、色散介质等。# 添加色散介质材料# 设置材料的折射率# 设置色散参数用户可以通过自定义材料模型来模拟特定的光学材料。# 定义自定义材料模型n = 3.4 + 0.1 * frequency # 简化的色散模型# 设置自定义材料用户可以通过自定义边界条件来模拟特定的物理场景。# 添加PML边界条件# 设置PML的参数用户可以通过二次开发来自定义仿真的可视化结果。

kkchenjj的博客 1797

文本生成3D人体动作:扩散模型MDM开源实现全解析

在生成模型领域,扩散模型凭借其稳定的训练过程和强大的多模态建模能力,已成为图像、音频乃至三维人体运动生成任务的核心技术范式。与传统的回归或生成对抗网络相比,扩散模型能从随机噪声中逐步刻画高维结构化数据,在文本到动作生成这一极具挑战的跨模态任务中展现出独特优势——一段自然语言描述即可驱动虚拟角色产生符合语义的骨骼动画序列。MDM(Human Motion Diffusion Model)正是这一方向的开创性工作之一,其基于PyTorch的官方实现提供了从文本编码、动作表征到扩散采样、评估的完整工程闭环。本文从

weixin_34133829的博客 409

Inside Class Loaders: Debugging

 转载自: http://www.onjava.com/pub/a/onjava/2004/06/30/classloader2.html?page=1by Andreas Schaefer06/30/2004Though we discussed the basics of class loading in the previous article in this series, we st

hanyong_sc的专栏 333

STM32CubeMX安装避坑指南:为什么你的Java环境总是报错?

本文针对STM32CubeMX安装过程中最常见的Java环境报错问题,提供了一套完整的诊断与解决方案。文章深入剖析了JRE版本冲突、环境变量配置错误、路径权限等核心原因,并给出了从系统级检查到手动修正环境变量的详细步骤,帮助开发者彻底解决安装难题,顺利开启STM32开发之旅。

prometheus9mon的博客 230

Inside Class Loaders - O'Reilly Media

Inside Class Loaders - O'Reilly Media 点击打开链接

rdchris的专栏 745

新能源知识库(98)SOC曲线介绍

​:一条异常的健康SOC曲线,往往能提前反映出电池性能的衰退或系统存在的隐患。BMS和EMS通过实时跟踪SOC值,能在电池电量过高(如>95%)时停止充电,电量过低(如<20%)时停止放电,从而避免因过度充放电引发的。​:OCV-SOC曲线上较为平坦的部分(例如,磷酸铁锂电池通常在20%-80% SOC范围)。​:在光伏、储能、电网协同的系统中,SOC曲线是能量调度的核心依据。​:电池的寿命很大程度上取决于它的工作方式。​:利用电池静置后电压与SOC的对应关系来估算,较准确但需要电池静置,无法实时使用。

竹君子之家 932

如何使用3D高斯分布进行环境建模

使用3D高斯分布来进行建模,关键在于通过引入不确定性描述来提高建图的鲁棒性和精度。与传统点云表示相比,3D高斯分布提供了一种更为灵活和有效的方式来处理空间数据,能够通过协方差矩阵表示点的空间不确定性,帮助优化SLAM过程中的定位和地图更新。

JaydenQ的博客 2361

Inside Class Loaders: Debugging 作者:Andreas Schaefer

Inside Class Loaders: Debuggingby Andreas Schaefer06/30/2004Though we discussed the basics of class loading in the previous article in this series, we still need more knowledge before we can delve i

2468

k8s中如何使用gpu、gpu资源讲解、nvidia gpu驱动安装

gpu资源也是服务器中常见的一种资源,gpu即显卡,一般用在人工智能、图文识别、大模型等领域,其中nvidia gpu是nvidia公司生产的nvidia类型的显卡,amd gpu则是adm公司生产的amd类型gpu。企业中服务器最常见的就是英伟达gpu服务器了。本篇也主要讲解英伟达驱动相关的知识。

MssGuo的博客 1万+

Inside Class Loaders深入理解类加载器

原文:http://www.onjava.com/pub/a/onjava/2003/11/12/classloader.html,本文有删减。 First we need to explain some definitions: 首先我们来解释一些名字的定义: CL:               Class loader(类加载器).              Initial CL: T

若鱼的专栏 1926

基于ESP32-S3的电子吧唧DIY:蓝牙传图、触摸交互与动态显示全解析

本文详细解析了如何利用ESP32-S3芯片DIY一个功能丰富的电子吧唧(智能徽章)。项目核心实现了通过蓝牙低功耗(BLE)接收手机小程序发送的图片,并存储至文件系统,最终在带触摸功能的TFT屏幕上进行动态显示与交互。教程涵盖了从硬件选型、软件开发环境搭建,到蓝牙通信、图片处理与触摸功能实现的完整步骤,并分享了实用的调试技巧,适合创客和嵌入式爱好者动手实践。

weixin_42510243的博客 695

机器学习: 共轭梯度算法(PCG)

今天介绍数值计算和优化方法中非常有效的一种数值解法,共轭梯度法。我们知道,在解大型线性方程组的时候,很少会有一步到位的精确解析解,一般都需要通过迭代来进行逼近,而 PCG 就是这样一种迭代逼近算法。 我们先从一种特殊的线性方程组的定义开始,比如我们需要解如下的线性方程组: Ax=bAx=b 这里的 A(n×n)A(n×n) 是对称,正定矩阵, b(n×...

weixin_30807677的博客 3186

[RAG在LangChain中的实现-01]让LLM在指定的上下文范围内回答问题

大模型(LLM)具有两大的局限:一是它不知道自己不知道,所以我们发现它经常天马行空、一本正经地胡说八道,这就是所谓的“幻觉”;二是模型具有的知识在训练生成的那一刻就已经冻结,知识体系不会继续更替。RAG是目前针对这两个问题的主要解决方案。RAG(Retrieval-Augmented Generation,检索增强生成)是一种结合了信息检索和文本生成的AI技术架构。它通过为大型语言模型(LLM)外挂一个“知识库”,让模型在回答问题前先去查询相关资料,从而有效解决了模型回答“胡编乱造”和知识滞后的问题。

JaydenAI的博客 692

希捷硬盘卡死修复实战:U盘启动盘制作与低格清零全流程

机械硬盘使用多年后常出现卡顿、假死、坏道等问题,很多用户在网上搜索“希捷硬盘低格工具”或“U盘硬盘复活器”,却发现要么工具不明,要么操作不当造成二次损伤。其实所谓修复工具,本质是U盘启动环境配合硬盘检测与清零软件,低格并非修复物理坏道,而是通过全盘写零触发主控重映射,隔离不稳定扇区。懂原理后,用官方SeaTools、Ventoy/U盘启动盘、Victoria或Linux dd等组合工具,即可对可抢救的硬盘做清零修复。这一技术适用于逻辑坏道、SMART警告、扇区不稳定等场景,但需先备份数据并判断盘体是否有异响

weixin_30431445的博客 225

[RAG在LangChain中的实现-05]利用LangGraph编写RAG应用

在让“LLM在指定的上下文范围内回答问题”一文中,我们利用LangChain(`create_agent`工厂函数)编写了一个简单RAG应用,这是一个将指定博文内容作为上下文的QA应用。现在我们使用LangGraph的编程模式重现实现它,并额外添加检索内容相关度评估和查询重写的功能。

JaydenAI的博客 819

【异常】Coze/扣子 Workflow 调用报 4200 错误深度解析

Coze API 的。

奶爸的编程之路,也就一周冷个三天 314

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

[RAG在LangChain中的实现-07]利用重排序选择相关性最高的检索内容构建上下文

重排序(Re-ranking)是一种关键的RAG优化技术。它通过在“初始检索”与“最终生成”之间,通过对初步检索出的文档进行二次评估,筛选出与用户查询语义最相关的结果,从而提高生成内容的准确性。在典型的检索流程中,第一步通常使用向量相似度搜索,虽然速度极快,但由于只对比向量间的距离,往往难以捕捉深层的语义关系。重排序模型(Reranker)接收用户查询和一组初步检索到的文档,输出每个文档的相关性分数。

JaydenAI的博客 810

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

上一篇: Java类加载内幕
下一篇: Find a way out of the ClassLoader maze (1)
DeepNightTwo
博客等级 码龄21年 3粉丝 25原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址