Terraform Helm:微服務基礎設施即代碼

🚀 Terraform & Helm:微服務基礎設施即代碼


📚 目錄

  • 🚀 Terraform & Helm:微服務基礎設施即代碼
    • 1. 引言 🚀
    • 2. 環境與依賴 🧰
    • 3. 架構示意 🏗?
    • 4. Terraform 定義云資源 🛠?
      • 4.1 Provider 與 Backend
      • 4.2 公共變量與 Tag
      • 4.3 Resource Group 模塊
      • 4.4 VNet 模塊
      • 4.5 Key Vault 模塊
      • 4.6 AKS 模塊
      • 4.7 RDS 模塊
      • 4.8 根模塊調用
    • 5. Helm Chart 打包與校驗 📦
      • 5.1 Chart.yaml & Chart.lock
      • 5.2 values.schema.json
      • 5.3 Subchart 示例(gateway)
      • 5.4 Lint & Test
    • 6. CI/CD 流水線 🔄
      • 6.1 Infra Workflow
      • 6.2 Deploy Workflow
    • 7. 可觀測性與告警 🔔
    • 8. 附錄 📂


1. 引言 🚀

? TL;DR

  • 🛠? 精準聲明:Terraform 管理 Resource Group、VNet(多子網)、AKS(跨可用區 + Azure Monitor)、Key Vault、PostgreSQL 等生產資源,統一 Tag 并鎖定 Provider 版本
  • 📦 Umbrella Chart:Helm Umbrella Chart 支持多微服務(Gateway、Identity…),含 Probes、PodDisruptionBudget、NetworkPolicy、HPA、Secret 引用、values.schema.json 與 Chart.lock
  • 🔄 端到端 CI/CD:GitHub Actions 流水線集成 OIDC 登錄、Terraform fmt/validate/lint、Checkov、Infracost、Azure 登錄、ACR 鑒權、Helm lint/test/package/push、自動回滾,并發控制與環境審批
  • 🌟 企業級要素:高性能(Azure CNI + HPA + PDB)、高可用(多 AZ + Monitoring)、安全可復現(Key Vault + Terraform Backend + Sensitive + OIDC + Cost Scan)

📚 背景與動機
在多微服務架構下,“在我機器上沒問題”往往難以復現🧩。通過 Terraform + Helm Chart + GitOps/CI-CD,可實現基礎設施與應用部署一體化自動化、一致化、可審計、可回滾,大幅提升交付速度與可靠性💪。


2. 環境與依賴 🧰

terraform version      # >=1.4
az version             # 最新 Azure CLI
kubectl version --client
helm version           # >=3.8+

倉庫結構

.
├─ infra/
│   ├─ terraform/
│   │    ├─ backend.tf
│   │    ├─ required_providers.tf
│   │    ├─ variables.tf
│   │    ├─ main.tf
│   │    ├─ outputs.tf
│   │    └─ modules/
│   │         ├─ resource_group/
│   │         ├─ vnet/
│   │         ├─ keyvault/
│   │         ├─ aks/
│   │         └─ rds/
│   └─ helm-charts/
│        └─ abp-vnext/
│             ├─ Chart.yaml
│             ├─ Chart.lock
│             ├─ values.schema.json
│             ├─ values.yaml
│             ├─ values-dev.yaml
│             ├─ values-prod.yaml
│             ├─ charts/           # Gateway、Identity 等 Subcharts
│             └─ templates/        # Umbrella 公共資源(Ingress 可選)
└─ src/└─ MyAbpSolution.sln

3. 架構示意 🏗?

Azure
Resource Group
VNet
Subnet: aks
Subnet: db
Key Vault
AKS 集群
PostgreSQL
Helm 部署多服務
開發者
CI/CD 流水線
IaC: Terraform
Helm 部署

4. Terraform 定義云資源 🛠?

4.1 Provider 與 Backend

# required_providers.tf
terraform {required_version = ">= 1.4"required_providers {azurerm = {source  = "hashicorp/azurerm"version = "~> 3.0"}}backend "azurerm" {resource_group_name  = "tfstate-rg"storage_account_name = "tfstateacct"container_name       = "tfstate"key                  = "${terraform.workspace}.tfstate"}
}

4.2 公共變量與 Tag

# variables.tf
variable "location"    { type = string }
variable "environment" { type = string }
variable "owner"       { type = string }
variable "cost_center" { type = string }
variable "db_admin"    { type = string }
variable "db_password" { type = string }locals {common_tags = {environment = var.environmentowner       = var.ownercost_center = var.cost_center}
}

4.3 Resource Group 模塊

# modules/resource_group/main.tf
resource "azurerm_resource_group" "this" {name     = var.namelocation = var.locationtags     = var.tags
}
output "rg_name" { value = azurerm_resource_group.this.name }
# modules/resource_group/variables.tf
variable "name"     { type = string }
variable "location" { type = string }
variable "tags"     { type = map(string) }

4.4 VNet 模塊

# modules/vnet/main.tf
resource "azurerm_virtual_network" "this" {name                = var.nameaddress_space       = var.address_spacelocation            = var.locationresource_group_name = var.rg_nametags                = var.tags
}resource "azurerm_subnet" "this" {for_each            = var.subnetsname                = each.keyresource_group_name = var.rg_namevirtual_network_name= azurerm_virtual_network.this.nameaddress_prefixes    = [each.value]
}output "subnet_ids_map" {value = { for s in azurerm_subnet.this : s.name => s.id }
}
# modules/vnet/variables.tf
variable "name"          { type = string }
variable "location"      { type = string }
variable "rg_name"       { type = string }
variable "address_space" { type = list(string) }
variable "subnets"       { type = map(string) }
variable "tags"          { type = map(string) }

4.5 Key Vault 模塊

# modules/keyvault/main.tf
data "azurerm_client_config" "current" {}resource "azurerm_key_vault" "this" {name                        = var.namelocation                    = var.locationresource_group_name         = var.rg_nametenant_id                   = data.azurerm_client_config.current.tenant_idsku_name                    = "standard"purge_protection_enabled    = truesoft_delete_enabled         = truetags                        = var.tags
}resource "azurerm_key_vault_secret" "db_password" {name         = "db-password"value        = var.admin_passwordkey_vault_id = azurerm_key_vault.this.id
}
# modules/keyvault/variables.tf
variable "name"           { type = string }
variable "location"       { type = string }
variable "rg_name"        { type = string }
variable "admin_password" { type = string }
variable "tags"           { type = map(string) }

4.6 AKS 模塊

# modules/aks/main.tf
resource "azurerm_kubernetes_cluster" "this" {name                = var.namelocation            = var.locationresource_group_name = var.rg_namedns_prefix          = var.dns_prefixtags                = var.tagsdefault_node_pool {name                = "agentpool"vm_size             = var.node_sizeavailability_zones  = var.availability_zonesenable_auto_scaling = var.enable_auto_scalermin_count           = var.min_countmax_count           = var.max_countos_disk_size_gb     = 50}network_profile {network_plugin    = "azure"network_policy    = "calico"load_balancer_sku = "standard"subnet_id         = var.aks_subnet_id}identity { type = "SystemAssigned" }addon_profile { oms_agent { enabled = true } }  # Azure Monitor
}output "kube_config" {value     = azurerm_kubernetes_cluster.this.kube_admin_config_rawsensitive = true
}
# modules/aks/variables.tf
variable "name"               { type = string }
variable "location"           { type = string }
variable "rg_name"            { type = string }
variable "dns_prefix"         { type = string }
variable "aks_subnet_id"      { type = string }
variable "node_size"          { type = string }
variable "availability_zones"{ type = list(string), default = ["1","2","3"] }
variable "enable_auto_scaler" { type = bool, default = true }
variable "min_count"          { type = number, default = 2 }
variable "max_count"          { type = number, default = 5 }
variable "tags"               { type = map(string) }

4.7 RDS 模塊

# modules/rds/main.tf
data "azurerm_key_vault_secret" "db_pwd" {name         = "db-password"key_vault_id = var.keyvault_id
}resource "azurerm_postgresql_flexible_server" "this" {name                         = var.namelocation                     = var.locationresource_group_name          = var.rg_nameversion                      = var.pg_versionsku_name                     = var.sku_namestorage_mb                   = var.storage_mbdelegated_subnet_id          = var.subnet_idadministrator_login          = var.admin_useradministrator_login_password = data.azurerm_key_vault_secret.db_pwd.valuetags                         = var.tags
}output "connection_string" {value     = format("Host=%s;Port=5432;Username=%s;Password=%s;Database=%s",azurerm_postgresql_flexible_server.this.fqdn,var.admin_user,data.azurerm_key_vault_secret.db_pwd.value,var.db_name)sensitive = true
}
# modules/rds/variables.tf
variable "name"        { type = string }
variable "location"    { type = string }
variable "rg_name"     { type = string }
variable "pg_version"  { type = string }
variable "sku_name"    { type = string }
variable "storage_mb"  { type = number }
variable "admin_user"  { type = string }
variable "subnet_id"   { type = string }
variable "db_name"     { type = string }
variable "keyvault_id" { type = string }
variable "tags"        { type = map(string) }

4.8 根模塊調用

# main.tf
provider "azurerm" { features {} }module "rg" {source   = "./modules/resource_group"name     = "${var.environment}-rg"location = var.locationtags     = local.common_tags
}module "vnet" {source        = "./modules/vnet"name          = "${var.environment}-vnet"location      = var.locationrg_name       = module.rg.rg_nameaddress_space = ["10.0.0.0/16"]subnets       = { aks = "10.0.1.0/24", db = "10.0.2.0/24" }tags          = local.common_tags
}module "keyvault" {source         = "./modules/keyvault"name           = "${var.environment}-kv"location       = var.locationrg_name        = module.rg.rg_nameadmin_password = var.db_passwordtags           = local.common_tags
}module "aks" {source            = "./modules/aks"name              = "${var.environment}-aks"location          = var.locationrg_name           = module.rg.rg_namedns_prefix        = var.environmentaks_subnet_id     = module.vnet.subnet_ids_map["aks"]node_size         = "Standard_DS2_v2"availability_zones= ["1","2","3"]enable_auto_scaler= truemin_count         = 2max_count         = 5tags              = local.common_tags
}module "rds" {source      = "./modules/rds"name        = "${var.environment}-pg"location    = var.locationrg_name     = module.rg.rg_namepg_version  = "13"sku_name    = "GP_Gen5_2"storage_mb  = 5120admin_user  = var.db_adminsubnet_id   = module.vnet.subnet_ids_map["db"]keyvault_id = module.keyvault.azurerm_key_vault.this.iddb_name     = "abpdb"tags        = local.common_tags
}
# outputs.tf
output "kubeconfig"     { value = module.aks.kube_config      sensitive = true }
output "db_conn_string" { value = module.rds.connection_string sensitive = true }

5. Helm Chart 打包與校驗 📦

5.1 Chart.yaml & Chart.lock

# Chart.yaml
apiVersion: v2
name: abp-vnext
version: 0.4.0
appVersion: "1.0.0"
description: "ABP VNext 多服務 Kubernetes Umbrella Chart"
dependencies:- name: gatewayversion: "0.2.0"repository: file://charts/gateway- name: identityversion: "0.2.0"repository: file://charts/identity
helm dependency update infra/terraform/helm-charts/abp-vnext
helm dependency build  infra/terraform/helm-charts/abp-vnext

5.2 values.schema.json

{"$schema": "https://json-schema.org/draft/2020-12/schema","type": "object","properties": {"replicaCount": { "type": "integer" },"image": {"type": "object","properties": {"repository": { "type": "string" },"tag": { "type": "string" }},"required": ["repository","tag"]},"service": {"type": "object","properties": {"type": { "type": "string" },"port": { "type": "integer" }},"required": ["type","port"]}},"required": ["replicaCount","image","service"]
}

5.3 Subchart 示例(gateway)

# charts/gateway/values.yaml
replicaCount: 2
image:repository: myacr.azurecr.io/abp-gatewaytag: "1.0.0"
service:type: ClusterIPport: 80
resources:limits:cpu: "500m"memory: "512Mi"requests:cpu: "250m"memory: "256Mi"
# charts/gateway/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:name: {{ include "gateway.fullname" . }}
spec:replicas: {{ .Values.replicaCount }}selector:matchLabels:app: {{ include "gateway.name" . }}template:metadata:labels:app: {{ include "gateway.name" . }}spec:containers:- name: gatewayimage: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"ports:- containerPort: 80readinessProbe:httpGet:path: /health/readyport: 80initialDelaySeconds: 20periodSeconds: 10livenessProbe:httpGet:path: /health/liveport: 80initialDelaySeconds: 30periodSeconds: 15resources:{{ toYaml .Values.resources | indent 12 }}

其余 Service、Ingress、PDB、NetworkPolicy、HPA 與前文一致。

5.4 Lint & Test

helm lint infra/terraform/helm-charts/abp-vnext --strict
helm template abp-vnext infra/terraform/helm-charts/abp-vnext
helm package  infra/terraform/helm-charts/abp-vnext -d charts-packages

6. CI/CD 流水線 🔄

6.1 Infra Workflow

# .github/workflows/infra.yml
name: Infra – Terraformon:push:paths: ["infra/terraform/**"]concurrency:group: infra-${{ github.ref }}cancel-in-progress: truepermissions:id-token: writecontents: readjobs:terraform:runs-on: ubuntu-latestoutputs:kubeconfig: ${{ steps.apply.outputs.kubeconfig }}db_conn_string: ${{ steps.apply.outputs.db_conn_string }}steps:- uses: actions/checkout@v3- name: Setup Terraformuses: hashicorp/setup-terraform@v2- name: Terraform Fmt Checkrun: terraform fmt -checkworking-directory: infra/terraform- name: Terraform Validaterun: terraform validateworking-directory: infra/terraform- name: Terraform Initrun: terraform init -input=falseworking-directory: infra/terraform- name: Checkov Scanuses: bridgecrewio/checkov-action@masterwith:directory: infra/terraform- name: Infracost Estimateuses: infracost/actions@v2with:path: infra/terraformenv:INFRACOST_TOKEN: ${{ secrets.INFRACOST_TOKEN }}- name: Terraform Planid: planrun: terraform plan -out=tfplanworking-directory: infra/terraform- name: Terraform Applyid: applyrun: |terraform workspace select ${{ github.ref_name }} || terraform workspace new ${{ github.ref_name }}terraform apply -auto-approve tfplanecho "kubeconfig<<EOF" >> $GITHUB_OUTPUTterraform output -raw kubeconfig >> $GITHUB_OUTPUTecho "EOF" >> $GITHUB_OUTPUTecho "db_conn_string<<EOF" >> $GITHUB_OUTPUTterraform output -raw db_conn_string >> $GITHUB_OUTPUTecho "EOF" >> $GITHUB_OUTPUTworking-directory: infra/terraformenv:ARM_USE_MSI:          trueARM_SUBSCRIPTION_ID:  ${{ secrets.AZURE_SUBSCRIPTION_ID }}ARM_TENANT_ID:        ${{ secrets.AZURE_TENANT_ID }}

6.2 Deploy Workflow

# .github/workflows/deploy.yml
name: Deploy – Helmon:push:paths:- "src/**"- "infra/terraform/helm-charts/**"concurrency:group: deploy-${{ github.ref }}cancel-in-progress: truepermissions:id-token: writecontents: readenvironment:name: productionurl: https://abp.example.comreviewers:- alice- bobjobs:deploy:runs-on: ubuntu-latestneeds: terraformsteps:- uses: actions/checkout@v3- name: Azure Login via OIDCuses: azure/login@v1with:client-id:       ${{ secrets.AZURE_CLIENT_ID }}tenant-id:       ${{ secrets.AZURE_TENANT_ID }}subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}- name: AKS Set Contextuses: azure/aks-set-context@v1with:resource-group: production-rgcluster-name:   production-aks- name: Docker Login to ACRuses: docker/login-action@v2with:registry: myacr.azurecr.iousername: ${{ secrets.ACR_USERNAME }}password: ${{ secrets.ACR_PASSWORD }}- name: Build & Push Imagerun: |docker build -t myacr.azurecr.io/abp-vnext:${{ github.sha }} src/docker push myacr.azurecr.io/abp-vnext:${{ github.sha }}- name: Set DEPLOY_ENVrun: |if [ "${GITHUB_REF}" == "refs/heads/main" ]; thenecho "DEPLOY_ENV=prod" >> $GITHUB_ENVelseecho "DEPLOY_ENV=dev" >> $GITHUB_ENVfi- name: Helm Lint & Testrun: |helm lint infra/terraform/helm-charts/abp-vnext --stricthelm test --cleanup gateway- name: Helm Package & Pushrun: |helm package infra/terraform/helm-charts/abp-vnext -d charts-packageshelm push charts-packages/abp-vnext-*.tgz oci://myhelmrepo- name: Helm Upgrade with Rollbackrun: |set +ehelm repo add myrepo oci://myhelmrepohelm repo updatehelm upgrade --install abp-vnext myrepo/abp-vnext \--version 0.4.0 \-f infra/terraform/helm-charts/abp-vnext/values-${DEPLOY_ENV}.yaml \--set image.tag=${GITHUB_SHA} \--set-string env.DB_CONN="${{ needs.terraform.outputs.db_conn_string }}" \--wait --timeout 5mif [ $? -ne 0 ]; thenhelm rollback abp-vnext 1exit 1fiset -e- name: Verify Rolloutrun: kubectl rollout status deployment/gateway- name: Notify Slack on Successif: success()uses: 8398a7/action-slack@v3with:payload: '{"text":"? 部署成功:ABP VNext 微服務已更新到 '"${{ github.sha }}"'"}'channel: production-alertsenv:SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}- name: Notify Slack on Failureif: failure()uses: 8398a7/action-slack@v3with:payload: '{"text":"? 部署失敗:請檢查流水線日志!"}'channel: production-alertsenv:SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

7. 可觀測性與告警 🔔

  • Azure Monitor:已開啟 Container Insights
  • Prometheus/Grafana:可選部署,收集集群與業務指標
  • EFK/ELK:通過 DaemonSet 或 Sidecar 收集日志
  • Alertmanager:基于閾值觸發告警,推送到 Slack/Teams

8. 附錄 📂

參考資料

  • Terraform Azure Provider 文檔
  • Helm 官方文檔

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/87156.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/87156.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/87156.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

清理 Docker 緩存占用

Docker 緩存主要包括未使用的鏡像、容器、卷和網絡等資源。清理緩存可以提高磁盤空間&#xff0c;線上升級次數比較多的話&#xff0c;服務器中Docker緩存會非常嚴重&#xff0c;做下清理瘦身會有意想不到的效果 清理未使用的鏡像 運行以下命令刪除未被任何容器引用的鏡像&…

深入解析NumPy的核心函數np.array()

深入解析NumPy的核心函數np.array NumPy與np.array()簡介NumPy的重要性np.array()的作用 np.array()函數的詳細參數object參數dtype參數copy參數order參數subok參數ndmin參數like參數 np.array()函數的使用示例創建基本的一維和二維數組創建具有特定數據類型的數組創建多維數組…

定時器的設計

定時器 定時器原理如何理解定時器定時器數據結構選取定時器觸發方式 定時器的實現 定時器原理 如何理解定時器 定時器在日常通常被描述為組織大量延時任務的模塊&#xff0c;其實從字面意思去理解的話&#xff0c;他就是去處理延時任務的&#xff0c;那么什么是延時任務呢&am…

大模型-分布式論文一瞥

1分離式架構 1.1 DistServe DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving 講的是一個將prefill和decoding分…

02.SpringBoot常用Utils工具類詳解

文章目錄 1. BeanUtils詳解1.1 什么是BeanUtils&#xff1f;1.2 主要的BeanUtils實現1.2.1 Spring BeanUtils1.2.2 Apache Commons BeanUtils1.2.3 其他實現 1.3 Spring BeanUtils詳細使用1.3.1 基本用法1.3.2 指定忽略屬性1.3.3 批量拷貝&#xff08;列表轉換&#xff09; 1.4…

Golang快速開發框架——項目立項與系統配置讀取組件viper(一)

Golang快速開發框架——項目立項與系統配置讀取組件viper&#xff08;一&#xff09; 背景 知識分享之Golang篇是我在日常使用Golang時學習到的各種各樣的知識的記錄&#xff0c;將其整理出來以文章的形式分享給大家&#xff0c;來進行共同學習。歡迎大家進行持續關注。 知識分…

打造可觀測的 iOS CICD 流程:調試、追蹤與質量保障全記錄

隨著iOS項目復雜度增加&#xff0c;團隊越來越依賴自動化構建、自動化測試等CI/CD流程來保證產品質量。但CI/CD環境下&#xff0c;很多線下調試手段無法直接使用&#xff0c;比如&#xff1a; 無法手動連真機跑Instruments測試包只在分發后才能拿到崩潰模擬器上表現和真機不一…

C++11中 <cinttypes>的入門與精通

文章目錄 一、<cinttypes> 是什么1. 固定寬度的整數類型2. 整數操作函數3. 格式化輸入輸出宏 二、深入理解 <cinttypes>1. 固定寬度整數類型的使用2. 整數操作函數的使用3. 格式化輸入輸出宏的使用 三、實踐和技巧1. 使用固定寬度整數類型的最佳實踐2. 使用整數操作…

Pytorhc Lightning進階:一篇實例玩轉Pytorhc Lightning 讓訓練更高效

Pytorhc Lightning進階&#xff1a;一篇實例玩轉Pytorhc Lightning 讓訓練更高效 Pytorhc Lightning 主要包含以下幾大類&#xff0c;主要圍繞以下講解&#xff1a; 模型&#xff0c;PyTorch Lightning 的核心是繼承 pl.LightningModule數據&#xff0c;數據模塊繼承pl.Light…

大模型算法面試筆記——注意力Transformer流程/面試題篇

學習資料來源于字母站大學 1 Transformer架構 基于編碼器-解碼器的架構來處理序列對。跟使用注意力的seq2seq不同&#xff0c;Transformer是基于純注意力。 2 注意力 2.1 自注意力機制 使用注意力&#xff1a;需要根據整個序列進行預測&#xff0c;對于同一input&#xf…

Rust 定義與實例化結構體

文章目錄 Rust 定義與實例化結構體5.1 結構體的定義與意義5.2 結構體實例化5.2.1 基本實例化5.2.2 可變性規則5.2.3 字段初始化簡寫5.2.4 結構體更新語法 5.3 特殊結構體類型5.3.1 元組結構體&#xff08;Tuple Struct&#xff09;5.3.2 類單元結構體&#xff08;Unit-Like Str…

ELK日志分析系統(filebeat+logstash+elasticsearch+kibana)

一、ELK 平臺介紹 1、ELK 概述 日志主要包括系統日志、應用程序日志和安全日志。系統運維和開發人員可以通過日志了解服務器軟硬件信息、檢查配置過程中的錯誤及錯誤發生的原因。經常分析日志可以了解服務器的負荷&#xff0c;性能安全性&#xff0c;從而及時采取措施糾正錯誤。…

JS基礎4—jQuery

jQuery常用內容 jQuery 介紹jQuery 獲取方式基本選擇器 (最常用)層級選擇器 (基于元素間關系)過濾選擇器 (基于特定條件) jQuery事件綁定jQuery 方法調用jQuery遍歷jQuery 獲取與設置jQuery 添加與刪除jQuery CSS 類jQuery - AJAX 總結 jQuery 介紹 jQuery 是一個輕量級、快速…

時鐘周期是什么?

時鐘周期&#xff08;Clock Cycle&#xff09;是什么&#xff1f; 時鐘周期&#xff08;Clock Cycle&#xff09;是計算機系統中一個最基礎的時間單位&#xff0c;也稱為時鐘節拍或時鐘周期時間&#xff08;Clock Period&#xff09;。它由系統時鐘發生器產生的一個周期性脈沖…

如何用SEO優化長尾關鍵詞?

內容概要 在SEO優化領域&#xff0c;長尾關鍵詞扮演著至關重要的角色&#xff0c;它們能有效提升網站在搜索引擎中的可見度和流量轉化率。本文將全面解析如何通過系統方法優化長尾關鍵詞&#xff0c;涵蓋從基礎理論到實戰應用的完整流程。核心內容包括利用專業工具進行關鍵詞挖…

電子面單系統開發全解析

一、如果要做電子面單系統&#xff0c;怎么做&#xff1f; 開發電子面單系統是一項復雜且涉及多方面考量的工程&#xff0c;涵蓋需求分析、系統架構設計、技術選型、接口對接、安全性保障、第三方服務選擇以及部署與維護等關鍵環節。 電子面單系統開發步驟 需求分析&#xf…

UE5 - 制作《塞爾達傳說》中林克的技能 - 18 - 磁力抓取器

讓我們繼續《塞爾達傳說》中林克技能的制作!!! UE版本:5.6.0 VS版本:2022 本章節的核心目標:磁力抓取器 先讓我們看一下完成后的效果: 18_磁力抓取器 大綱如下: 引言功能架構與核心邏輯物理材質與場景配置代碼實現:從識別到操控操作說明1.引言 在《塞爾達傳說》中,林…

基于ApachePOI實現百度POI分類快速導入PostgreSQL數據庫實戰

目錄 前言 一、百度POI分類簡介 1、數據表格 2、分類結構 二、從Excel導入到PG數據庫 1、Excel解析流程 2、數據入庫 3、入庫成果及檢索 三、總結 前言 在上一篇博文中&#xff0c;我們對高德POI分類進行了深入剖析 并對Excel 中 POI 分類數據的存儲結構特點進行了詳細介…

學習經驗分享【41】YOLOv13:基于超圖增強自適應視覺感知的實時目標檢測

YOLO算法更新速度很快&#xff0c;已經出到V13版本&#xff0c;后續大家有想發論文或者搞項目可更新自己的baseline了。 摘要&#xff1a;YOLO 系列模型憑借其卓越的精度和計算效率&#xff0c;在實時目標檢測領域占據主導地位。然而&#xff0c;YOLOv11 及早期版本的卷積架構&…

Handling outliers in non-blind image deconvolution論文閱讀

Handling outliers in non-blind image deconvolution 1. 研究目標與實際意義2. 創新方法:基于EM的異常值建模2.1 新模糊模型2.1.1 目標函數2.2 EM框架:迭代優化二元掩碼2.2.1 E步:計算后驗權重 E [ m x ] E[m_x] E[mx?]2.2.2 M步:加權正則化反卷積2.3 優化加速技術2.3.1…