# 自研 SDK 注意事项

若客户对前端接入第三方 SDK 有严格限制和顾虑，SDK 可自研，但自研需要注意以下几项：

### 1. 数据模型需保持一致

易观方舟包括数据采集、接收、处理、查询等模块，这些模块通过易观的 Common Data 数据模型一以贯之。若 SDK 自研，需对方舟分析平台的数据模型、数据链路有较深刻的认知，以便适配后续的方舟其他模块的升级。否则，可能导致处理和分析模块不可用。

### 2. 需处理 SDK 与数据采集模块的接收端服务器的交互

处理交互原因：设备终端通过 SDK 采集并上报数据时，服务端会根据各种情况（如设备终端网络不佳、服务端数据压力大等），进行策略调整，并发送至终端，SDK 据此快速响应。 策略如:上行数据频率策略，失败重试策略，缓存数目策略，限制策略等

### 3. 需验证上报数据的合法性

数据采集时 SDK 上报的数据，须符合约定，否则服务器会将进行丢弃。 约定主要是基于字段和模型的校验，需根据方舟版本迭代。

### 4. 需确保兼容和适配众多的机型和版本

SDK 数据采集需要适配兼容众多机型和版本，故而研发成本较高，周期较长，需要持续投入，会严重拖慢公司数字化建设周期。

### 5. 可视化埋点功能需要与方舟采集服务器交互

方舟 SDK 实现了可视化埋点，可视化埋点的配置数据要实时从服务端获取。SDK 上报数据时，数据采集依赖配置文件和方舟数据模型。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://arkdocs.analysys.cn/integration/sdk/sdk-faq/research-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
