当前位置: 首页 > news >正文

高通Camera点亮3——Camera Module

Camera点亮除了Sensor之外还需要配置module、EEPROM等,multicamera;配置好编译设置。

Module

<?xml version="1.0" encoding="utf-8" ?>
<cameraModuleData<!--Module group can contain either 1 module or 2 modulesDual camera, stereo camera use cases contain 2 modules in the group --><moduleGroup><!--Module configuration --><moduleConfiguration description="Module configuration"><!--CameraId is the id to which DTSI node is mapped.Typically CameraId is the slot Id for non combo mode. --><!--cameraId字段与Camera设备树中的配置的id需要保持一致,同时multicamera中的soltId也对应该值--><cameraId>6</cameraId><!--Name of the module integrator --><moduleName>united</moduleName><!--Name of the sensor in the image sensor module --><!--对应的Sensor名,与Sensor XML中定义需要一样--><sensorName>ov13b10</sensorName><!--Actuator name in the image sensor moduleThis is an optional element. Skip this element if actuator is not present --><!--马达名称,与文件中的定义需要对应一致--><actuatorName>dw9714v</actuatorName><!-- Element for actuatorSlaveAddress --><actuatorSlaveAddress>0x18</actuatorSlaveAddress><eepromName>p24c64e</eepromName><flashName>pmic</flashName><!--Chromatix name is used to used to open binary.Binary name is of the form sensor_model_chromatix.bin --><chromatixName>united_ov13b10</chromatixName><!--Position of the sensor module.Valid values are: REAR, FRONT, REAR_AUX, FRONT_AUX, EXTERNAL --><position>REAR</position><!--CSI Information --><CSIInfo description="CSI Information"><!--MIPI数据lane的分布--><laneAssign>0x3210</laneAssign><isComboMode>0</isComboMode></CSIInfo><!--Lens information --><lensInfo description="Lens Information"><!--Focal length of the lens in millimeters. --><focalLength>3.34</focalLength><!--F-Number of the optical system. --><fNumber>2.2</fNumber><!--Minimum focus distance in meters. --><minFocusDistance>0.1</minFocusDistance><!--Total focus distance in meters. --><maxFocusDistance>8.0</maxFocusDistance><!--Horizontal view angle in degrees. --><horizontalViewAngle>68.4</horizontalViewAngle><!--Vertical view angle in degrees. --><verticalViewAngle>53</verticalViewAngle><!--Maximum Roll Degree. Valid values are: 0 to 359 --><maxRollDegree>360</maxRollDegree><!--Maximum Pitch Degree. Valid values are: 0, 90, 180, 270 --><maxPitchDegree>360</maxPitchDegree><!--Maximum Yaw Degree. Valid values are: 0 to 359 --><maxYawDegree>360</maxYawDegree></lensInfo></moduleConfiguration></moduleGroup>
</cameraModuleData>

EEPROM

<?xml version="1.0" encoding="utf-8" ?>
<EEPROMDriverData<!--EEPROM slave informationelement for EEPROMNameelement for slaveAddresselemet for regAddrTypeelement for regDataTypeelement for I2CFrequencyModeelement for power up sequenceelement for power down sequence  --><slaveInfo description="EEPROM Slave Information"><!--Name of the EEPROM device --><!--需要与module中配置的对应起来来--><EEPROMName>p24c64e_eeprom</EEPROMName><!--8-bit or 10-bit I2C slave Write address --><slaveAddress>0xa0</slaveAddress><!--Register address / data size in bytes --><regAddrType range="[1,4]">2</regAddrType><!--Register address / data size in bytes --><regDataType range="[1,4]">1</regDataType><!--I2C frequency mode of slaveSupported modes are: STANDARD (100 KHz), FAST (400 KHz), FAST_PLUS (1 MHz), CUSTOM (Custom frequency in DTSI) --><i2cFrequencyMode>FAST</i2cFrequencyMode><!--Sequence of power configuration type and configuration value required to control power to the device --><powerUpSequence><!--Power setting configurationContains: configType, configValue and delay in milli seconds --><powerSetting><!--Power configuration typeSupported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY --><configType>VIO</configType><!--Configuration value for the type of configuration --><configValue>0</configValue><!--Delay in milli seconds --><delayMs>0</delayMs></powerSetting></powerUpSequence><!--Sequence of power configuration type and configuration value required to control power to the device --><powerDownSequence><!--Power setting configurationContains: configType, configValue and delay in milli seconds --><powerSetting><!--Power configuration typeSupported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY --><configType>VIO</configType><!--Configuration value for the type of configuration --><configValue>0</configValue><!--Delay in milli seconds --><delayMs>0</delayMs></powerSetting></powerDownSequence></slaveInfo><!--Sequence of register settings to configure the device --><memoryMap><!--Register setting configurationContains: register address, register data, register address type, register data type,operation and delay in micro secondselement for slaveAddrelement for registerAddrelement for registerDataelement for regAddrTypeelement for regDataTypeelement for operationelement for delayUs  --><regSetting><!--Slave address to communicate withe the device --><slaveAddr>0xa0</slaveAddr><!--Register address that is accessed --><registerAddr>0x0000</registerAddr><!--If operation is WRITE, registerData is the data value to be written into the specified register addressIf operation is READ, registerData is the number of bytes to be read from the specified register address --><!--这里为从EEPROM读取数据字节数,根据实际EEPROM中数据来填写--><registerData>0x0B04</registerData><!--Register address / data size in bytes --><regAddrType range="[1,4]">2</regAddrType><!--Register address / data size in bytes --><regDataType range="[1,4]">1</regDataType><!--Type of the operationValid values are: WRITE, READ, POLL --><operation>READ</operation><!--Delay in micro seconds. Delay is 0 if not explicitly provided --><delayUs>0</delayUs></regSetting></memoryMap><!--EEPROM data format informationelement for auto focus informationelement for white balance informationelement for lens shading informationelement for dual camera informationelement for shield pixel informationelement for PDAF DCC informationelement for pdaf 2D information  --><formatInfo description="EEPROM Data Format Information"><!--Specifies auto focus data information to format the OTP dataelement for AF data availablity and endianelement for macro informationelement for infinity informationelement for hall informationelement for hall bias informationelement for vertical macro informationelement for vertical infinity informationelement for horizontal macro informationelement for horizontal infinityelement for macro margin value informationelement for infinity margin value  --><AF><!--Specifies the availability of the specified data and type of endiannesselement for operation  --><autoFocusData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>LITTLE</endianness></autoFocusData><!--Specifies memory offset value and mask information --><macro><!--Offset value in the OTP memory --><offset>0x0719</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></macro><!--Specifies memory offset value and mask information --><infinity><!--Offset value in the OTP memory --><offset>0x071B</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></infinity><!--Specifies memory offset value and mask information --><hall><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></hall><!--Specifies memory offset value and mask information --><hallBias><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></hallBias><!--Hall register address to update with calibrated data --><hallRegisterAddr>0</hallRegisterAddr><!--Specifies memory offset value and mask information --><verticalMacro><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></verticalMacro><!--Specifies memory offset value and mask information --><verticalInfinity><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></verticalInfinity><!--Specifies memory offset value and mask information --><horizontalMacro><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></horizontalMacro><!--Specifies memory offset value and mask information --><horizontalInfinity><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></horizontalInfinity><!--Margin value to extend towards macro region --><macroMargin>0</macroMargin><!--margin value to extend towards infinity region --><infinityMargin>0</infinityMargin><!--lens sag in macro calibration --><lensSagCalMac>DEFAULT</lensSagCalMac><!--lens sag in infinity calibration --><lensSagCalInf>DEFAULT</lensSagCalInf><!--Specifies memory offset value and mask information --><otpGravityOfs0to90><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></otpGravityOfs0to90><!--Specifies memory offset value and mask information --><otpGravityOfs90to180><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></otpGravityOfs90to180><!--average value of gravity offset from 0 to 90 --><avgGravityOfs0to90>0</avgGravityOfs0to90><!--average value of gravity offset from 90 to 180 --><avgGravityOfs90to180>0</avgGravityOfs90to180></AF><!--Specifies white balance data information to format the OTP dataelement for WB data availablity and endianelement for WBType informationelement for WB light informationelement for mirror informationelement for flip informationelement for qValue informationelement for isInvertGROverGB information  --><WB><!--Specifies the availability of the specified data and type of endiannesselement for operation  --><WBData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>LITTLE</endianness></WBData><!--Type of the white balance dataValid values are: INDIVIDUAL, RATIO --><datatype>RATIO</datatype><!--whitebalance information for a particular light typeelement for light typeelement for R value informationelement for gr Value informationelement for b Value informationelement for gb Value informationelement for rOverG Value informationelement for bOverG Value informationelement for grOverGB Value information  --><lightInfo description="White balance light Information"><!--Type of the illuminantSupported illuminants are D65, TL84, A, D50 and H --><illuminantType>D50</illuminantType><!--Specifies memory offset value and mask information --><rValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></rValue><!--Specifies memory offset value and mask information --><grValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></grValue><!--Specifies memory offset value and mask information --><bValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></bValue><!--Specifies memory offset value and mask information --><gbValue><!--Offset value in the OTP memory --><offset>0x0</offset><!--mask value which will be applied to obtain required data bits --><mask>0x0</mask></gbValue><!--Specifies memory offset value and mask information --><rOverGValue><!--Offset value in the OTP memory --><offset>0x0021</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></rOverGValue><!--Specifies memory offset value and mask information --><bOverGValue><!--Offset value in the OTP memory --><offset>0x0023</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></bOverGValue><!--Specifies memory offset value and mask information --><grOverGBValue><!--Offset value in the OTP memory --><offset>0x0025</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></grOverGBValue></lightInfo><!--Specifies memory offset value and mask information --><mirror><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></mirror><!--Specifies memory offset value and mask information --><flip><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></flip><!--Q value --><qValue>1024.0</qValue><!--Set to TRUE if GRoverGB needs to be inverted --><isInvertGROverGB>TRUE</isInvertGROverGB></WB><!--Specifies LSC data information to format the OTP dataelement for LSC data availablity and endianelement for LSC light informationelement for mesh HW roll off size informationelement for incrimenting value for obtaing R value informationelement for incrimenting value for obtaing GR value informationelement for incrimenting value for obtaing GB value informationelement for incrimenting value for obtaing B value information  --><LSC><!--Specifies the availability of the specified data and type of endiannesselement for operation  --><LSCData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>BIG</endianness></LSCData><!--Lens shading information for a particular rolloff lightelement for light typeelement for MSB part of the R gain value informationelement for LSB part of the R gain value informationelement for MSB part of the gr gain value informationelement for LSB part of the gr gain value informationelement for MSB part of the gb gain value informationelement for LSB part of the gb gain value informationelement for MSB part of the b gain value informationelement for LSB part of the b gain value information  --><lightInfo description="Lens shading light information"><!--Type of the illuminantSupported illuminants are D65, TL84, A, D50 and H --><illuminantType>D50</illuminantType><!--Specifies memory offset value and mask information --><rGainMSB><!--Offset value in the OTP memory --><offset>0x0030</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></rGainMSB><!--Specifies memory offset value and mask information --><rGainLSB><!--Offset value in the OTP memory --><offset>0x002F</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></rGainLSB><!--Specifies memory offset value and mask information --><grGainMSB><!--Offset value in the OTP memory --><offset>0x0032</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></grGainMSB><!--Specifies memory offset value and mask information --><grGainLSB><!--Offset value in the OTP memory --><offset>0x0031</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></grGainLSB><!--Specifies memory offset value and mask information --><gbGainMSB><!--Offset value in the OTP memory --><offset>0x0034</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></gbGainMSB><!--Specifies memory offset value and mask information --><gbGainLSB><!--Offset value in the OTP memory --><offset>0x0033</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></gbGainLSB><!--Specifies memory offset value and mask information --><bGainMSB><!--Offset value in the OTP memory --><offset>0x0036</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></bGainMSB><!--Specifies memory offset value and mask information --><bGainLSB><!--Offset value in the OTP memory --><offset>0x0035</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFF</mask></bGainLSB></lightInfo><!--mesh HW rolloff size --><meshHWRollOffSize>221</meshHWRollOffSize><!--position of the next R value from the current R --><rIncrement>8</rIncrement><!--position of the next GR value from the current GR --><grIncrement>8</grIncrement><!--position of the next GB value from the current GB --><gbIncrement>8</gbIncrement><!--position of the next B value from the current B --><bIncrement>8</bIncrement></LSC><!--Specifies shield pixel correction data information to format the OTP dataelement for SPC data availablity and endianelement for offset address of the SPC dataelement for SPC address informationelement for size of the SPC settings informationelement for address type informationelement for data type informationelement for delay to write each registry entry information  --><SPC><!--Specifies the availability of the specified data and type of endiannesselement for operation  --><SPCData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>false</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>BIG</endianness></SPCData><SPCSettings><!--Specifies memory offset value and mask information --><dataOffset><!--Offset value in the OTP memory --><offset>0</offset><!--mask value which will be applied to obtain required data bits --><mask>0</mask></dataOffset><!--register address value to write SPC data --><SPCAddress>0</SPCAddress><!--size of the SPC data settings --><settingsSize>0</settingsSize></SPCSettings><!--Register address / data size in bytes --><addressType range="[1,4]">2</addressType><!--Register address / data size in bytes --><dataType range="[1,4]">1</dataType><!--Delay in milli seconds. Delay is 0 if not explicitly provided --><delay>0</delay></SPC><OIS><OISData description="Memory Type"><isAvailable>false</isAvailable><endianness>BIG</endianness></OISData><dataOffset><offset>0</offset><mask>0xFF</mask></dataOffset><OISAddressArray>0</OISAddressArray><settingsSize>0</settingsSize><addressType range="[1,4]">2</addressType><dataType range="[1,4]">1</dataType><delay>0</delay></OIS><!--Specifies PDAF defocus conversion coefficient data information to format the OTP dataelement for PDAF 2D data availablity and endianelement for version informationelement for X informationelement for Y informationelement for X ratio informationelement for Y ratio informationelement for map width informationelement for map height informationelement for gain width informationelement for gain height informationelement for left gain map informationelement for right gain map informationelement for conversion Coefficient Count informationelement for conversion Coefficient information  --><PDAF2D><!--Specifies the availability of the specified data and type of endiannesselement for operation  --><PDAF2DData description="Memory Type"><!--Specifies whether a particular OTP data available or not --><isAvailable>true</isAvailable><!--Type of the EndiannessValid values are: BIG, LITTLE --><endianness>LITTLE</endianness></PDAF2DData><!--Specifies memory offset value and mask information --><version><!--Offset value in the OTP memory --><offset>0x0721</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></version><!--Specifies memory offset value and mask information --><mapWidth><!--Offset value in the OTP memory --><offset>0x0723</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></mapWidth><!--Specifies memory offset value and mask information --><mapHeight><!--Offset value in the OTP memory --><offset>0x0725</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></mapHeight><!--gain width --><gainWidth>17</gainWidth><!--gain height --><gainHeight>13</gainHeight><!--Specifies memory offset value and mask information --><leftGainMap><!--Offset value in the OTP memory --><offset>0x0727</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></leftGainMap><!--Specifies memory offset value and mask information --><rightGainMap><!--Offset value in the OTP memory --><offset>0x08E1</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></rightGainMap><!--count of the conversion coefficient --><conversionCoefficientCount>48</conversionCoefficientCount><!--Specifies memory offset value and mask information --><DCCQFormatMemoryInfo><!--Offset value in the OTP memory --><offset>0x0A9D</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></DCCQFormatMemoryInfo><!--Specifies memory offset value and mask information --><DCCMapWidthMemoryInfo><!--Offset value in the OTP memory --><offset>0x0A9F</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></DCCMapWidthMemoryInfo><!--Specifies memory offset value and mask information --><DCCMapHeightMemoryInfo><!--Offset value in the OTP memory --><offset>0x0AA1</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></DCCMapHeightMemoryInfo><!--Specifies memory offset value and mask information --><conversionCoefficient><!--Offset value in the OTP memory --><offset>0x0AA3</offset><!--mask value which will be applied to obtain required data bits --><mask>0xFFFF</mask></conversionCoefficient></PDAF2D></formatInfo>
</EEPROMDriverData>

EEPROM需要根据模组厂提供的EEPROM烧录内容和格式说明进行配置,

验证EEPROM
adb shell echo "dumpSensorEEPROMData=1" >> /vendor/etc/camera/camxoverridesettings.txt

该命令执行成功后可以查看/vendor/etc/camera/camxoverridesettings.txt是否生效,然后adb reboot重启设备后打开相机,在/data/vendor/camera/路径下会生成类似文件:

  • p24c64e_kbuffer_OTP.txt:从EEPROM中读取的所有数据
  • p24c64e_lsc_OTP.txt :从EEPROM中读取的LSC OTP数据
  • p24c64e_wb_OTP.txt:从EEPROM中读取的WBOTP数据

需要确认:

  • 读取的数据长度是否与设置的一致?并且大于或者等于烧录内容长度;
  • 读取的WB OTP数据是否合法?
  • 读取的LSC OTP数据是否合法?尤其注意是否为0或者明显特别大的数据;

WB OTP数据示例:

p24c64e_wb_OTP.txt
Whitebalance data dump for EEPROM p24c64eLight Type: A rOverG   = 0.828125bOverG   = 0.281250grOverGB = 0.999023Light Type: TL84 rOverG   = 0.608398bOverG   = 0.479492grOverGB = 0.999023Light Type: D65 rOverG   = 0.429688bOverG   = 0.657227grOverGB = 0.999023

LSC OTP数据示例:
在这里插入图片描述

multicamera配置

高通Camera会根据
vendor/qcom/proprietary/chi-cdk/oem/qcom/multicamera/chimcxcameraconfig/configs中的配置与DTS中的配置对应然后找到具体加载哪一份配置
netrani/netrani_dc.xml

<Devicesxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="../../../tools/logicalcameragenerator/logicalcam.xsd"><PhysicalDevice name="RearPhysicalCam"     slotId="6" cameraId="0" sensorName="ov13b10"/>
</Devices>

编译

vendor/qcom/proprietary/chi-cdk/oem/Android.mk中指定了编译so文件:

include $(CAMX_CHICDK_OEM_PATH)/qcom/sensor/ov13b10/build/android/Android.mk 

vendor/qcom/proprietary/chi-cdk/configs/product.mk:

PRODUCT_PACKAGES += com.qti.sensor.ov13b10
PRODUCT_PACKAGES += com.qti.sensormodule.united_ov13b10.bin
PRODUCT_PACKAGES += com.qti.tuned.united_ov13b10.bin

vendor/qcom/proprietary/chi-cdk/oem/qcom/buildbins/build/android/binary_parrot会有相应的mk文件,指定了使用哪一个文件来生成:

qti.sensormodule.united_ov13b10.mk
##################################
# Generate camx binary file from XMLsifeq ($(CAMX_CHICDK_PATH),)LOCAL_PATH            := $(abspath $(call my-dir)/../../..)CAMX_CHICDK_PATH      := $(abspath $(LOCAL_PATH)/../../..)
elseLOCAL_PATH            := $(CAMX_CHICDK_OEM_PATH)/qcom/buildbins
endifinclude $(CLEAR_VARS)# file name of the binary
CAMX_LOCAL_BIN := com.qti.sensormodule.united_ov13b10.bin# the inputs to the binary
CAMX_LOCAL_BIN_INPUTS := sensor/ov13b10/ov13b10_sensor.xml      \sensor/ov13b10/ov13b10_pdaf.xml        \module/united_ov13b10_module.xml       \eeprom/p24c64e_ov13b10_eeprom.xml           \actuator/dw9714p_actuator.xml        \flash/pmic_flash.xmlCAMX_BINARY_XSD_PATH  := $(CAMX_CHICDK_PATH)/api/sensor/# The argument for the ParameterParser
# leave it blank if you are not sure about it.
CAMX_LOCAL_PARAMETERPARSER_ARG :=# include the common settings for camx binary generation
include $(CAMX_BUILD_GENERIC_BINARY)

相关文章:

高通Camera点亮3——Camera Module

Camera点亮除了Sensor之外还需要配置module、EEPROM等&#xff0c;multicamera&#xff1b;配置好编译设置。 Module <?xml version"1.0" encoding"utf-8" ?> <cameraModuleData<!--Module group can contain either 1 module or 2 modules…...

学习路程二 LangChain基本介绍

前面简单调用了一下deepseek的方法&#xff0c;发现有一些疑问和繁琐的问题&#xff0c;需要更多的学习&#xff0c;然后比较流行的就是LangChain这个东西了。 目前大部分企业都是基于 LangChain 、qwen-Agent、lammaIndex框架进行大模型应用开发。LangChain 提供了 Chain、To…...

Docker-技术架构演进之路

目录 一、概述 常见概念 二、架构演进 1.单机架构 2.应用数据分离架构 3.应用服务集群架构 4.读写分离 / 主从分离架构 5.引入缓存 —— 冷热分离架构 6.垂直分库 7.业务拆分 —— 微服务 8.容器化引入——容器编排架构 三、尾声 一、概述 在进行技术学习过程中&am…...

API接口设计模式:从分层架构到CQRS的实战应用

以下将从分层架构和 CQRS&#xff08;命令查询职责分离&#xff09;的基本概念入手&#xff0c;为你阐述从分层架构到 CQRS 的实战应用相关内容&#xff1a; 分层架构 概念&#xff1a;分层架构是将系统按照功能划分为不同的层次&#xff0c;每个层次负责特定的职责&#xff0c…...

【机器学习】【KMeans聚类分析实战】用户分群聚类详解——SSE、CH 指数、SC全解析,实战电信客户分群案例

1.引言 在实际数据分析中&#xff0c;聚类算法常用于客户分群、图像分割等场景。如何确定聚类数 k 是聚类分析中的关键问题之一。本文将以“用户分群”为例&#xff0c;展示如何通过 KMeans 聚类&#xff0c;利用 SSE&#xff08;误差平方和&#xff0c;也称 Inertia&#xff…...

【C++】 时间库chrono计算程序运行时间

C 时间库chrono计算程序运行时间 本文总结了chrono库的引入方法以及计算程序片段运行时间的方法 一、chrono库的引入方法&#xff08;注意事项&#xff09; 首先chrono是属于std命名空间的。 所以在程序中应该这样包含头文件&#xff1a; #include <chrono> using n…...

PCL 边界体积层次结构(Boundary Volume Hierarchy, BVH)

文章目录 一、简介二、实现代码三、实现效果参考资料一、简介 边界体积层次结构(Boundary Volume Hierarchy, BVH) 是一种高效的空间数据结构,广泛应用于计算机图形学、计算机视觉、机器人学、物理仿真等领域。它的核心思想是通过将空间递归地划分为层次化的包围体(通常是轴…...

算法随笔_58: 队列中可以看到的人数

上一篇:算法随笔_57 : 游戏中弱角色的数量-CSDN博客 题目描述如下: 有 n 个人排成一个队列&#xff0c;从左到右 编号为 0 到 n - 1 。给你以一个整数数组 heights &#xff0c;每个整数 互不相同&#xff0c;heights[i] 表示第 i 个人的高度。 一个人能 看到 他右边另一个人…...

创建React项目的三个方式

创建React项目 创建一个React项目非常简单&#xff0c;通常有几种方法可以进行&#xff0c;下面是最常见的几种方法&#xff1a; 1. 使用 create-react-app (已经不被推荐了) create-react-app 是一个官方的脚手架工具&#xff0c;用于快速创建 React 项目。它会为你配置好很…...

QT闲记-工具栏

工具栏通常用来放置常用的操作按钮,如QPushButton,QAction等。可以放置在顶部,底部,左侧,右侧,并且支持拖曳,浮动。 1、创建工具栏 通常通过QMainWindow 提供的addToolBar()来创建,它跟菜单栏一样,如果需要工具栏,一般情况下,我们设置这个类的基类为QMainWindow。 …...

为什么继电器要加一个反向并联一个二极管

1 动感就是电流不突变 2 为什么有的继电器上面要反向并联一个二极管和电阻 1 并联二极管是为消除掉动感产生的高压 2 加上二极管是为了让继电器更快的断开&#xff08;二极管选型的工作电流要大于动感电流&#xff0c;开关要够快&#xff09; 3 公式&#xff1a;二极管压降0…...

【Leetcode 每日一题 - 扩展】1512. 好数对的数目

问题背景 给你一个整数数组 n u m s nums nums。 如果一组数字 ( i , j ) (i,j) (i,j) 满足 n u m s [ i ] n u m s [ j ] nums[i] nums[j] nums[i]nums[j] 且 i < j i < j i<j&#xff0c;就可以认为这是一组 好数对 。 返回好数对的数目。 数据约束 1 ≤ n …...

vue3 采用xlsx库实现本地上传excel文件,前端解析为Json数据

需求&#xff1a;本地上传excel 文件&#xff0c;但需要对excel 文件的内容进行解析&#xff0c;然后展示出来 1. 安装依赖 首先&#xff0c;确保安装了 xlsx 库&#xff1a; bash复制 npm install xlsx 2. 创建 Vue 组件 创建一个 Vue 组件&#xff08;如 ExcelUpload.v…...

计算机视觉:经典数据格式(VOC、YOLO、COCO)解析与转换(附代码)

第一章&#xff1a;计算机视觉中图像的基础认知 第二章&#xff1a;计算机视觉&#xff1a;卷积神经网络(CNN)基本概念(一) 第三章&#xff1a;计算机视觉&#xff1a;卷积神经网络(CNN)基本概念(二) 第四章&#xff1a;搭建一个经典的LeNet5神经网络(附代码) 第五章&#xff1…...

FPGA DSP:Vivado 中带有 DDS 的 FIR 滤波器

本文使用 DDS 生成三个信号&#xff0c;并在 Vivado 中实现低通滤波器。低通滤波器将滤除相关信号。 介绍 用DDS生成三个信号&#xff0c;并在Vivado中实现低通滤波器。低通滤波器将滤除较快的信号。 本文分为几个主要部分&#xff1a; 信号生成&#xff1a;展示如何使用DDS&am…...

记录此刻:历时两月,初步实现基于FPGA的NVMe SSD固态硬盘存储控制器设计!

背景 为满足实验室横向项目需求&#xff0c;在2024年12月中下旬导师提出基于FPGA的NVMe SSD控制器研发项目。项目核心目标为&#xff1a;通过PCIe 3.0 x4接口实现单盘3000MB/s的持续读取速率。 实现过程 调研 花了半个月的时间查阅了一些使用FPGA实现NVME SSD控制器的论文、…...

【计算机网络】OSI模型、TCP/IP模型、路由器、集线器、交换机

一、计算机网络分层结构 计算机网络分层结构 指将计算机网络的功能划分为多个层次&#xff0c;每个层次都有其特定的功能和协议&#xff0c;并且层次之间通过接口进行通信。 分层设计的优势&#xff1a; 模块化&#xff1a;各层独立发展&#xff08;如IPv4→IPv6&#xff0c…...

正点原子[第三期]Arm(iMX6U)Linux系统移植和根文件系统构建-5.3 xxx_defconfig过程

前言&#xff1a; 本文是根据哔哩哔哩网站上“arm(iMX6U)Linux系统移植和根文件系统构键篇”视频的学习笔记&#xff0c;在这里会记录下正点原子 I.MX6ULL 开发板的配套视频教程所作的实验和学习笔记内容。本文大量引用了正点原子教学视频和链接中的内容。 引用&#xff1a; …...

250223-Linux/MacOS如何跳过Miniconda的条款阅读,直接安装Miniconda

你可以通过将 -b 参数传递给 Miniconda 的安装脚本&#xff0c;来跳过条款阅读并自动同意许可条款。这样安装会自动进行到下一步的选择项。下面是具体的安装命令&#xff1a; bash Miniconda3-latest-Linux-x86_64.sh -b这里的 -b 代表“批量模式”&#xff08;batch mode&…...

点云的几何特征

点云的几何特征是基于一个点周围的邻域对该点周围几何形状的描述。例如&#xff0c;位于墙面上的一个点将具有较高的平面度planarity。 基于局部点云的特征值 λ1、λ2 和 λ3 以及特征向量 e1、e2 和e3计算得到的一系列几何特征&#xff0c;这些特征用于描述点云中点的局部几…...

Android Wi-Fi 连接失败日志分析

1. Android wifi 关键日志总结 (1) Wi-Fi 断开 (CTRL-EVENT-DISCONNECTED reason3) 日志相关部分&#xff1a; 06-05 10:48:40.987 943 943 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid44:9b:c1:57:a8:90 reason3 locally_generated1解析&#xff1a; CTR…...

手游刚开服就被攻击怎么办?如何防御DDoS?

开服初期是手游最脆弱的阶段&#xff0c;极易成为DDoS攻击的目标。一旦遭遇攻击&#xff0c;可能导致服务器瘫痪、玩家流失&#xff0c;甚至造成巨大经济损失。本文为开发者提供一套简洁有效的应急与防御方案&#xff0c;帮助快速应对并构建长期防护体系。 一、遭遇攻击的紧急应…...

shell脚本--常见案例

1、自动备份文件或目录 2、批量重命名文件 3、查找并删除指定名称的文件&#xff1a; 4、批量删除文件 5、查找并替换文件内容 6、批量创建文件 7、创建文件夹并移动文件 8、在文件夹中查找文件...

Java如何权衡是使用无序的数组还是有序的数组

在 Java 中,选择有序数组还是无序数组取决于具体场景的性能需求与操作特点。以下是关键权衡因素及决策指南: ⚖️ 核心权衡维度 维度有序数组无序数组查询性能二分查找 O(log n) ✅线性扫描 O(n) ❌插入/删除需移位维护顺序 O(n) ❌直接操作尾部 O(1) ✅内存开销与无序数组相…...

IGP(Interior Gateway Protocol,内部网关协议)

IGP&#xff08;Interior Gateway Protocol&#xff0c;内部网关协议&#xff09; 是一种用于在一个自治系统&#xff08;AS&#xff09;内部传递路由信息的路由协议&#xff0c;主要用于在一个组织或机构的内部网络中决定数据包的最佳路径。与用于自治系统之间通信的 EGP&…...

解锁数据库简洁之道:FastAPI与SQLModel实战指南

在构建现代Web应用程序时&#xff0c;与数据库的交互无疑是核心环节。虽然传统的数据库操作方式&#xff08;如直接编写SQL语句与psycopg2交互&#xff09;赋予了我们精细的控制权&#xff0c;但在面对日益复杂的业务逻辑和快速迭代的需求时&#xff0c;这种方式的开发效率和可…...

汽车生产虚拟实训中的技能提升与生产优化​

在制造业蓬勃发展的大背景下&#xff0c;虚拟教学实训宛如一颗璀璨的新星&#xff0c;正发挥着不可或缺且日益凸显的关键作用&#xff0c;源源不断地为企业的稳健前行与创新发展注入磅礴强大的动力。就以汽车制造企业这一极具代表性的行业主体为例&#xff0c;汽车生产线上各类…...

鸿蒙中用HarmonyOS SDK应用服务 HarmonyOS5开发一个医院查看报告小程序

一、开发环境准备 ​​工具安装​​&#xff1a; 下载安装DevEco Studio 4.0&#xff08;支持HarmonyOS 5&#xff09;配置HarmonyOS SDK 5.0确保Node.js版本≥14 ​​项目初始化​​&#xff1a; ohpm init harmony/hospital-report-app 二、核心功能模块实现 1. 报告列表…...

WordPress插件:AI多语言写作与智能配图、免费AI模型、SEO文章生成

厌倦手动写WordPress文章&#xff1f;AI自动生成&#xff0c;效率提升10倍&#xff01; 支持多语言、自动配图、定时发布&#xff0c;让内容创作更轻松&#xff01; AI内容生成 → 不想每天写文章&#xff1f;AI一键生成高质量内容&#xff01;多语言支持 → 跨境电商必备&am…...

UR 协作机器人「三剑客」:精密轻量担当(UR7e)、全能协作主力(UR12e)、重型任务专家(UR15)

UR协作机器人正以其卓越性能在现代制造业自动化中扮演重要角色。UR7e、UR12e和UR15通过创新技术和精准设计满足了不同行业的多样化需求。其中&#xff0c;UR15以其速度、精度及人工智能准备能力成为自动化领域的重要突破。UR7e和UR12e则在负载规格和市场定位上不断优化&#xf…...