【LLM KBQA】FlexKBQA:一种结合LLM的KBQA框架

前言

大语言模型(LLMs)在知识库问答(KBQA)领域的应用主要集中在包括但不限于以下几个方面:

  1. 直接生成答案:一些方法直接利用LLMs生成答案,而不是生成中间的程序(如SPARQL查询)。这种方法通常依赖于模型的上下文学习能力,通过提供少量的示例(in-context learning)来引导模型理解问题并生成答案。
  2. 程序生成:在某些情况下,LLMs被用来直接生成执行查询的程序,例如SPARQL查询。这种方法需要模型理解问题的结构,并能够将自然语言问题转换为有效的查询语言。
  3. 语义解析:LLMs也被用于将自然语言问题映射到结构化的查询表示,如SPARQL。这种方法通常涉及将问题分解为实体和关系,然后构造查询以从知识库中检索答案。
  4. 模型微调:在某些情况下,LLMs会在特定的KBQA任务上进行微调,以提高其在特定领域或数据集上的性能。

这些方法通常面临一些挑战,如上下文窗口大小的限制、推理成本高、模型部署困难以及在处理特定领域知识库时的准确性问题。本文介绍的方法:FlexKBQA,通过结合LLMs的生成能力和轻量级模型的推理效率,提供更灵活、高效且可扩展的KBQA解决方案。

方法

1.Automatic Program Sampling

FlexKBQA框架中的一个关键组件,负责从知识库(KB)中自动生成多样化的程序(如SPARQL查询),这些程序随后可以被转换为自然语言问题。这个过程分为两个主要步骤:模板收集(Template Collection)和逐步Grounding(Step-wise Grounding):

  • 模板收集(Template Collection):首先,从知识库中收集结构化查询(如SPARQL)的模板,这些模板包含了变量(例如,ent0, rel0, ent1),用于表示实体和关系。这些模板的设计旨在捕捉不同类型问题的基本逻辑。例如,一个SPARQL查询模板可能看起来像这样:

    SELECT ( ?x0 AS ?value ) WHERE
    { ?x0 :type.object.type ?ent1 .
    VALUES ?x1 { ?ent0 }
    ?x0 ?rel0 ?x1 .
    FILTER ( ?x0 ! = ?x1 )
    }
    

    在这个例子中,?type 是一个占位符,用于在后续步骤中填充具体的实体和关系。模板的多样性对于生成覆盖用户可能遇到的各种问题类型至关重要。

  • 逐步Grounding(Step-wise Grounding):在收集了多样化的模板之后,下一步是将模板中的变量逐步替换为具体的实体和关系值。这个过程称为“Step-wise Grounding”,通过迭代地确定模板中变量的值,将这些模板转换为可执行的程序。这个过程通过直接将模板中的变量视为查询对象,利用SPARQL的查询机制来实现。例如,对于上述SPARQL模板,可能的接地顺序是首先确定ent0,然后是rel0,最后是ent1。一旦这些变量被赋予了具体的值,就可以将它们填充到模板中,形成一个可执行的程序。

    SELECT ?rel0 ?ent0 ?ent1 WHERE
    { ?x0 :type.object.type ?ent1 .
    VALUES ?x1 { ?ent0 }
    ?x0 ?rel0 ?x1 .
    FILTER ( ?x0 ! = ?x1 ) }
    

    逐步接地的目的是有效地缩小搜索空间,同时保持生成程序的多样性。这个过程可以通过自动化算法实现,例如随机采样或基于某些策略的采样。在实际应用中,人们可以根据特定的业务场景自定义和设计自己的模板。

小结:通过这两个步骤,能够生成大量的有效程序,这些程序随后可以被用于生成自然语言问题,为后续的模型训练提供数据支持。这种方法有助于减轻手动标注数据的负担,特别是在数据稀缺的情况下。

2.低资源程序翻译(Low-Resource Program Translation)

  • 传统的(a)LLM直接在自然文本上进行训练,缺乏对程序的训练。该文认为将程序转换为自然语言更加高效,特别是资源有限的情况下。

  • 使用大语言模型(LLMs)将上述生成的程序(S-expressions或SPARQL查询)转换为自然语言问题。这个过程涉及到构建一个提示(prompt),其中包括一个指令(Inst)来指导模型将程序翻译成问题,以及一些示例程序和问题对 ( p 1 f , q 1 f , . . . , p N f , q N f ) (p_1^f, q_1^f, ..., p_N^f, q_N^f) p1f,q1f,...,pNf,qNf作为示范。这个翻译过程可以表示为:
    q i s ← T r a n s l a t o r ( I n s t ; ( p 1 f , q 1 f ) , . . . , ( p N f , q N f ) ; p i s ) q_i^s \leftarrow Translator(Inst; (p_1^f, q_1^f), ..., (p_N^f, q_N^f); p_i^s) qisTranslator(Inst;(p1f,q1f),...,(pNf,qNf);pis)
    下面给出了GrailQA、WebQSP和KQA Pro数据集的prompt,设计了不同的prompt,这些prompt直接从数据集中的问题和答案对构建。这些prompt帮助模型理解如何将结构化查询转换为自然语言,同时保持问题的准确性和流畅性。

    prompt参考:

    Listing 1. Example Prompt for GrailQA

    ### Convert the s-expressions to natural language questions.
    # s-expression:(AND medicine.routed_drug (JOIN medicine.routed_drug.
    marketed_formulations Oxybutynin chloride 5 extended release film coated tablet))
    # question:oxybutynin chloride 5 extended release film coated tablet is the
    ingredients of what routed drug?
    # s-expression:(ARGMAX food.food food.food.energy)
    # question:when it comes to the food that has the most energy per 100g what is the
    name of it?
    # s-expression:(AND music.genre (JOIN (R music.genre.parent_genre) (JOIN music.genre.
    albums confessions tour)))
    # question:the albums confessions tour is part of what parent genre of a musical genre
    ?
    # s-expression:(AND architecture.architect (JOIN architecture.architect.
    architectural_style (JOIN (R architecture.architect.architectural_style) Josef
    Fanta)))
    # question:which architect has a similar architectural style to josef fanta?
    # s-expression:(AND architecture.building (lt architecture.building.floors 9ˆˆhttp://
    www.w3.org/2001/XMLSchema#integer))
    # question:which building has less than 9 floors?
    # s-expression:(AND comic_books.comic_book_series (JOIN (R comic_books.
    comic_book_genre.comic_book_series_in_this_genre) (JOIN (R comic_books.
    comic_book_story.genre) Case of the Namesake Murders)))
    # question:case of the namesake murders is the same genre as what comic book series?
    # s-expression:(AND film.director (JOIN (R media_common.quotation.author) It is an
    open question whether any behavior based on fear of eternal punishment can be
    regarded as ethical or should be regarded as merely cowardly.))
    # question:what is the name of the author who wrote it is an open question whether any
    behavior based on fear of eternal punishment can be regarded as ethical or should
    be regarded as merely cowardly.?
    # s-expression:(AND meteorology.beaufort_wind_force (ge meteorology.
    beaufort_wind_force.wave_height 7.0ˆˆhttp://www.w3.org/2001/XMLSchema#float))
    # question:for waves higher than 7.0 what is the beaufort window force?
    # s-expression:(AND book.short_story (JOIN book.short_story.characters (JOIN book.
    book_character.appears_in_stories Doing Clarence a Bit of Good)))
    # question:what short story has a character who also is in doing clarence a bit of
    good?
    # s-expression:(AND education.school_category (AND (JOIN (R education.
    educational_institution.school_type) Chiang Kai Shek College) (JOIN education.
    school_category.schools_of_this_kind Sacred Heart High School (Roseville, Michigan
    ))))
    # question:chiang kai shek college and sacred heart high school (roseville, michigan)
    are in what category of school?
    # s-expression:(ARGMIN food.bottled_water food.bottled_water.nitrate_content)
    # question:the bottled water that has the least amount of nitrates?
    ......
    # s-expression:
    

    Listing 2. Example Prompt for WebQSP

    ### Convert the s-expressions to natural language questions.
    # s-expression:(JOIN (R location.location.containedby) Auburn University)
    # question:where is university of auburn?
    # s-expression:(JOIN (R government.political_party_tenure.politician) (JOIN (R
    government.political_party.politicians_in_this_party) New Democratic Party))
    # question:who founded the new democratic party?
    # s-expression:(ARGMAX (JOIN (R location.location.contains) China) topic_server.
    population_number)
    # question:where do most chinese live?
    # s-expression:(JOIN (R film.performance.actor) (AND (JOIN film.performance.character
    Dorothy Gale) (JOIN (R film.film.starring) The Wizard of Oz)))
    # question:who played dorothy in the film wizard of oz?
    # s-expression:(AND (JOIN common.topic.notable_types College/University) (JOIN (R
    education.education.institution) (JOIN (R people.person.education) Jerry Rice)))
    # question:what college did jerry rice attend?
    # s-expression:(AND (JOIN common.topic.notable_types City/Town/Village) (JOIN (R
    location.location.contains) Oakland County))
    # question:what cities are in oakland county michigan?
    # s-expression:(JOIN (R people.marriage.spouse) (AND (JOIN people.marriage.time_macro
    2015ˆˆhttp://www.w3.org/2001/XMLSchema#date) (AND (JOIN people.marriage.
    type_of_union Marriage) (JOIN (R people.person.spouse_s) Jane Krakowski))))
    # question:who is married to jane krakowski?
    # s-expression:(AND (JOIN people.person.gender Female) (JOIN (R people.marriage.spouse
    ) (ARGMAX (JOIN (R people.person.spouse_s) Robert Downey Jr.) people.marriage.from
    )))
    # question:who is robert downey jr wife?
    # s-expression:(JOIN (R location.religion_percentage.religion) (ARGMAX (JOIN (R
    location.statistical_region.religions) United States of America) location.
    religion_percentage.percentage))
    # question:what is the most practiced religion in the united states?
    # s-expression:(ARGMAX (AND (JOIN sports.sports_championship_event.champion Dallas
    Cowboys) (JOIN (R sports.sports_team.championships) Dallas Cowboys)) time.event.
    end_date)
    # question:when was the last dallas cowboys super bowl win?
    # s-expression:(ARGMAX (JOIN (R film.performance.film) (JOIN (R film.actor.film)
    Brittany Murphy)) film.film.initial_release_date)
    # question:what is the last movie brittany murphy made?
    # s-expression:(AND (JOIN book.written_work.subjects Evolution) (AND (JOIN common.
    topic.notable_types Book) (JOIN (R book.author.works_written) Charles Darwin)))
    # question:what book did charles darwin write on evolution?
    ......
    # s-expression:
    

    Listing 3. Example Prompt for KQA Pro

    ### Convert the sparqls to natural language questions.
    # sparql:SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "town" .
    ?e <TOID> ?pv . ?pv <pred:value> "4000000074573917" . ?e <OS_grid_reference> ?
    pv_1 . ?pv_1 <pred:value> "SP8778" . }
    # question:Which town has a TOID of 4000000074573917 and has an OS grid reference of
    SP8778?
    # sparql:SELECT DISTINCT ?pv WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "human"
    . ?e <ISNI> ?pv_1 . ?pv_1 <pred:value> "0000 0001 2136 4821" . ?e <date_of_birth>
    ?pv . }
    # question:When was the person with ISNI 0000 0001 2136 4821 born?
    # sparql:ASK { ?e <pred:name> "Eve Myles" . ?e <official_website> ?pv . ?pv <pred:
    value> "http://www.cheechandchong.com" . }
    # question:Is http://www.cheechandchong.com Eve Myles’s official website?
    # sparql:SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "alternative rock" . ?e_2 <pred:
    name> "Greg Graffin" . ?e_1 ?p ?e_2 . }
    # question:What has alternative rock in common with Greg Graffin?
    # sparql:ASK { ?e <pred:instance_of> ?c . ?c <pred:name> "human" . ?e <ISNI> ?pv_1 . ?
    pv_1 <pred:value> "0000 0001 0893 552X" . ?e <name_in_native_language> ?pv . ?pv <
    pred:value> "Elias Koteas" . }
    # question:Is Elias Koteas the name in native language of the person with ISNI 0000
    0001 0893 552X?
    # sparql:SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Gregg Allman" . ?e_2 <pred:
    name> "Cher" . ?e_2 <birth_name> ?pv . ?pv <pred:value> "Cherilyn Sarkisian" . ?
    e_1 <spouse> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <spouse> ; <pred:fact_t>
    ?e_2 ] <end_time> ?qpv . }
    # question:When did Gregg Allman stop being the spouse of Cher (the one whose birth
    name is Cherilyn Sarkisian)?
    # sparql:SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <
    pred:name> "town" . ?e <postal_code> ?pv . ?pv <pred:value> "VLT" . ?e <area> ?
    pv_1 . ?pv_1 <pred:unit> "square mile" . ?pv_1 <pred:value> ?v . FILTER ( ?v <
    "530"ˆˆxsd:double ) . }
    # question:How many towns’ postal code is VLT and area is less than 530 square miles?
    # sparql:SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <
    pred:name> "sovereign state" . ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <
    pred:value> ?v . FILTER ( ?v != "7600000000"ˆˆxsd:double ) . }
    # question:What number of sovereign states have a population not equal to 7600000000?
    # sparql:SELECT DISTINCT ?pv WHERE { ?e <pred:name> "63rd Golden Globe Awards" . ?e <
    edition_number> ?pv . }
    # question:What is the edition number of the 63rd Golden Globe Awards?
    # sparql:ASK { ?e <pred:instance_of> ?c . ?c <pred:name> "film" . ?e <official_website
    > ?pv_1 . ?pv_1 <pred:value> "http://www.lovelybones.com" . ?e <duration> ?pv . ?
    pv <pred:unit> "minute" . ?pv <pred:value> ?v . FILTER ( ?v > "60"ˆˆxsd:double ) .
    }
    # question:Does the film, whose official website is http://www.lovelybones.com, have a
    duration greater than 60 minutes?
    ......
    # sparql:
    

3.执行引导的自训练(Execution-Guided Self Training, EGST)

这个策略通过迭代过程来提高知识库问答(KBQA)模型的性能,尤其是在数据稀缺的情况下。这个策略的核心思想是利用模型的预测结果来指导模型的自我改进。

EGST步骤:

(1)初始化模型

首先,使用大型语言模型(LLM)生成的合成数据对(程序和对应的自然语言问题)来微调一个轻量级模型(学生模型)。这个合成数据集是通过上述的"Low-Resource Program Translation"方法生成的。

(2)生成伪标签

在每次迭代中,使用当前的学生模型(教师模型)来预测未标记的真实用户问题。这些预测的程序(伪标签)是基于模型对问题的理解和知识库中的数据生成的。

(3)执行引导过滤

对生成的伪标签进行过滤,以确保它们的质量和准确性。这个过程包括以下几个步骤:

  • 错误过滤(Error Filtering):移除那些执行错误或无法从知识库中检索答案的程序。
  • 语义过滤(Semantic Filtering):使用预训练的句子转换器(如Sentence-BERT)来计算自然语言问题和预测程序中关系之间的语义相似度,过滤掉低相似度的数据对。
  • 内在推理过滤(Inherent Reasoning Filtering):排除那些伪答案与LLM直接推理结果不一致的样本。

(4)微调学生模型

使用经过过滤的合成数据和原始的合成数据对来微调学生模型。这个过程允许模型从真实世界的数据中学习,同时保持对合成数据的泛化能力。

(5)更新教师模型

将微调后的学生模型作为下一次迭代的教师模型,模型可以在每次迭代中不断改进。

(6)迭代直至收敛

重复上述步骤,直到模型的性能不再显著提高,即达到收敛。这个过程允许模型逐渐适应真实用户问题的数据分布,从而提高其在实际应用中的性能。

小结:EGST策略的关键优势在于它能够结合合成数据和真实用户数据,通过迭代过程不断优化模型。这种方法特别适用于那些难以获得大量标注数据的场景,如零样本(Zero-shot)或少量样本(Few-shot)学习。该文通过这种方式,FlexKBQA能够在资源有限的情况下,有效地提升KBQA模型的性能。

4.内在推理增强(Inherent Reasoning Augmentation)

在EGST阶段,选择那些答案与LLM生成的答案一致的样本,以减少训练数据中的噪声。此外,当语义解析方法失败时,可以使用LLM的内在推理结果作为最终答案。(主要起到补充语义的作用)

总结

从上面结果来看还是取得了比较好的结果的,文章中对于数据合成-从知识库中自动化生成SPARQL查询(中间结果)比较有意思的。最后在语义解析失败时,使用了LLM进行兜底。

参考文献

1.FlexKBQA: A Flexible LLM-Powered Framework for Few-Shot Knowledge Base Question Answering,https://arxiv.org/abs/2308.12060v3

2.https://github.com/leezythu/FlexKBQA

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/367495.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

iTOP-3A5000开发板支持PCIE 3.0、USB 3.0和 SATA 3.0.显示接口2 路、HDMI 和1路VGA等

性能强 采用全国产龙芯3A5000处理器&#xff0c;基于龙芯自主指令系统 (LoongArch)的LA464微结构&#xff0c;并进一步提升频率&#xff0c;降低功耗&#xff0c;优化性能。 桥片 采用龙芯 7A2000&#xff0c;支持PCIE 3.0、USB 3.0和 SATA 3.0.显示接口2 路、HDMI 和1路 VGA…

C++ pair+map+set+multimap+multiset+AVL树+红黑树(深度剖析)

文章目录 1. 前言2. 关联式容器3. pair——键值对4. 树形结构的关联式容器4.1 set4.1.1 set 的介绍4.1.2 set 的使用 4.2 map4.2.1 map 的介绍4.2.2 map 的使用 4.3 multiset4.3.1 multiset 的介绍4.3.2 multiset 的使用 4.4 multimap4.4.1 multimap 的介绍4.4.2 multimap 的使…

【TCP】四次挥手(终止连接)

前言 TCP&#xff08;传输控制协议&#xff09;是互联网协议&#xff08;IP&#xff09;中的一种重要传输层协议&#xff0c;用于在通信的计算机之间建立可靠的、有序的和错误校验的数据传输。在TCP连接中&#xff0c;数据传输是双向的&#xff0c;因此需要一种机制来开始和结…

【操作宝典】IntelliJ IDEA新建maven项目详细教程

目录 &#x1f33c;1. 配置maven环境 &#x1f33c;2. 创建maven项目 &#x1f33c;3. 创建maven项目完整示例 a. 导入spring boot环境 b. 修改maven配置 c. 下载jar包 d. 创建Java类 &#x1f33c;1. 配置maven环境 【安装指南】maven下载、安装与配置详细教程-CSDN博客…

多层面深度分析【HarmonyOS NEXT】开发者内容

一、IDE工具层面 DevEco Studio作为专门用于开发鸿蒙操作系统&#xff08;HarmonyOS&#xff09;的应用程序的集成开发环境&#xff08;IDE&#xff09;&#xff0c;提供一个清晰、直观的用户界面&#xff0c;使得开发人员可以更容易地进行编码、调试和测试我们的应用。新的版…

eduSRC那些事儿-4(未授权漏洞+社会工程学)

点击星标&#xff0c;即时接收最新推文 本文对edusrc挖掘的部分漏洞进行整理&#xff0c;将案例脱敏后输出成文章&#xff0c;不包含0DAY/BYPASS的案例过程&#xff0c;仅对挖掘思路和方法进行相关讲解。 未授权漏洞 一般都出现在内网&#xff0c;也有外网出现的情况&#xff0…

C语言指针的几种用途

先看题目&#xff0c;写一个fun函数&#xff0c;统计一个字符串中某个字符出现的次数&#xff0c;以及这个字符第一次出现的位置。 看起来很简单&#xff0c;似乎几行就可以搞定&#xff0c;但是写出来之后&#xff0c;才发现代码怎么这么长&#xff01;程序里多处使用了指针&…

问题:在电容耦合的放大电路中,耦合电容对输入交流信号应可视为( )。 #微信#媒体#学习方法

问题&#xff1a;在电容耦合的放大电路中&#xff0c;耦合电容对输入交流信号应可视为( )。 A:电流源; B:断路; C:短路; D:电压源 参考答案如图所示

CSS要点总结

一、CSS 快速入门 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>css 快速入门</title><!-- 解读1. 在 head 标签内&#xff0c;出现了 <style type"text/css"></style…

美国纳斯达克大屏怎么投放:投放完成需要多长时间-大舍传媒Dashe Media

陕西大舍广告传媒有限公司&#xff08;Shaanxi Dashe Advertising Media Co., Ltd&#xff09;&#xff0c;简称大舍传媒&#xff08;Dashe Media&#xff09;&#xff0c;是纳斯达克在中国区的总代理&#xff08;China General Agent&#xff09;。与纳斯达克合作已经有八年的…

大数据平台-可视化面板介绍-Echarts

应对现在数据可视化的趋势&#xff0c;越来越多企业需要在很多场景(营销数据&#xff0c;生产数据&#xff0c;用户数据)下使用&#xff0c;可视化图表来展示体现数据&#xff0c;让数据更加直观&#xff0c;数据特点更加突出。 目录 01-使用技术 02- 案例适配方案 03-基础…

Leetcode206:反转链表

一、题目 给你单链表的头节点 head &#xff0c;请你反转链表&#xff0c;并返回反转后的链表 示例&#xff1a; 输入&#xff1a;head [1,2,3,4,5] 输出&#xff1a;[5,4,3,2,1]输入&#xff1a;head [1,2] 输出&#xff1a;[2,1]输入&#xff1a;head [] 输出&#xff1…

拓展欧几里得法求逆元

板子&#xff1a; x即为最终答案&#xff0c;x可能为负数&#xff0c;加模数即可 乘法逆元 - OI Wiki (oi-wiki.org) void exgcd(int a, int b, int& x, int& y) {if (b 0) {x 1, y 0;return;}exgcd(b, a % b, y, x);y - a / b * x; } 使用: exgcd(a, n 1, x,…

nest.js实现登录验证码功能(学习笔记)

安装express-session npm i express-session 引入 注册session import * as session from express-session;import { NestFactory } from nestjs/core; import {DocumentBuilder,SwaggerModule, } from nestjs/swagger;import { AppModule } from ./app.module;async functio…

今天又接到了一个离谱的DEBUG订单

一、BUG程序 #include <iostream> #include <string>class Rectangle { private:int width;int height;public:Rectangle(int w, int h) {width w;height h;}void setWidth(int w) {width w;}void setHeight(int h) {height h;}int getArea() {return width *…

24年2月深度学习

参考&#xff1a; RAPTOR: RECURSIVE ABSTRACTIVE PROCESSING FOR TREE-ORGANIZED RETRIEVAL 树结构检索方案。

项目安全-----加密算法实现

目录 对称加密算法 AES &#xff08;ECB模式&#xff09; AES(CBC 模式)。 非对称加密 对称加密算法 对称加密算法&#xff0c;是使用相同的密钥进行加密和解密。使用对称加密算法来加密双方的通信的话&#xff0c;双方需要先约定一个密钥&#xff0c;加密方才能加密&#…

SQL注入:sqli-labs靶场通关(1-37关)

SQL注入系列文章&#xff1a; 初识SQL注入-CSDN博客 SQL注入&#xff1a;联合查询的三个绕过技巧-CSDN博客 SQL注入&#xff1a;报错注入-CSDN博客 SQL注入&#xff1a;盲注-CSDN博客 SQL注入&#xff1a;二次注入-CSDN博客 ​SQL注入&#xff1a;order by注入-CSDN博客 …

uniCloud -- uniIdRouter自动路由

目录 自动路由 云对象响应触发needLogin 获取当前用户信息getCurrentUserInfo 实战应用 个人中心页面 pages.json配置 uni-id自动路由 uni_modules\uni-id-pages/common 登录页面store修改 自动路由 支持的HBuilderX版本 uni-appuni-app x3.5.03.99 uniIdRouter 是一…

RK3568平台 安卓hal3适配usb camera

一.RK安卓hal3 camera框架 Camera hal3 在 android 框架中所处的位置如上图&#xff0c; 对上&#xff0c;主要实现 Framework 一整套 API 接口&#xff0c;响应其 控制命令&#xff0c;返回数据与控制参数结果。 对下&#xff0c; 主要是通 V4l2 框架实现与 kernel 的交互。3a…