• [<1024>活动] ModelArts每个用户只限创建一个基于此免费规格的实例问题
    如图,ModelArts每个用户只限创建一个基于此免费规格的实例选不了,但是我只有一个实例啊?这个实例指什么?
  • [问题求助] 开发软件
    怎么购买软件APP,我有个软件需要开发
  • [互动交流] API Explorer关于RDS的代码实例报DefaultHttpClient ConnectionException
    代码如下,除了改动了示例代码的AK和SK其他都没动,而且我的AK和SK绝对没错啊,为什么连接不上呢???public class ExploerTest { @Test public void test(){ // String ak = EncryAnddecryUtils.decryptByAES(AccessConfig.HUAWEI_CLOUD_IAM_AK); // String sk = EncryAnddecryUtils.decryptByAES(AccessConfig.HUAWEI_CLOUD_IAM_SK); String ak = "我的ak"; String sk = "我的sk"; ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); RdsClient client = RdsClient.newBuilder() .withCredential(auth) .withRegion(RdsRegion.valueOf("cn-east-2")) .build(); ListApiVersionRequest request = new ListApiVersionRequest(); try { ListApiVersionResponse response = client.listApiVersion(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } }完整的报错如下:com.huaweicloud.sdk.core.exception.ConnectionException: DefaultHttpClient ConnectionException at com.huaweicloud.sdk.core.impl.DefaultHttpClient.syncInvokeHttp(DefaultHttpClient.java:283) at com.huaweicloud.sdk.core.HcClient.syncInvokeHttp(HcClient.java:164) at com.huaweicloud.sdk.core.HcClient.syncInvokeHttp(HcClient.java:139) at com.huaweicloud.sdk.core.auth.BasicCredentials.processAuthParams(BasicCredentials.java:115) at com.huaweicloud.sdk.core.ClientBuilder.build(ClientBuilder.java:122) at com.example.middle_platform.utils.ExploerTest.test(ExploerTest.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) Caused by: java.net.ConnectException: Failed to connect to iam.myhuaweicloud.com/43.254.0.77:443 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297) at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207) at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at com.huaweicloud.sdk.core.impl.DefaultHttpListener.intercept(DefaultHttpListener.java:68) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) at com.huaweicloud.sdk.core.impl.DefaultHttpClient.syncInvokeHttp(DefaultHttpClient.java:275) ... 74 more Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ... 92 more
  • [使用说明] CodeArts IDE华为云API第二章-华为云API实战演练
    在上一篇中,给大家介绍了CodeArts中华为云API的功能和用法。本文将通过实战演练的形式,带着大家一块体验下整个API开发过程。那么话不多说,Let's go!这里以一个大家经常遇到的应用场景举例:文字识别。面对日常生活中涉及到的各种票证--身份证、驾驶证、银行卡、火车票、发票等等,甚至是核酸检测记录—各种票据凭证识别工作耗费大量人力物力,尤其现在大多数都是电子版,这里我们通过华为云文字识别OCR服务提供的API快速实现一个发票识别应用,来体验下CodeArts以及华为云API的强大能力。一、打开华为云插件,搜索想要实现的功能:发票识别,查看搜索出的API,可以看到华为云为发票识别提供了丰富的API,点击打开API详情,挑选出符合需求的API这里我们挑选增值税发票识别,通过查看API的详细文档,可以了解到此API可以直接将图片的base64编码作为参数直接传入,也可以支持传入远程服务器中图片的url路径,方便对接自己公司的票务系统,这些参数都将作为http post请求中的body体发送给华为云OCR服务。注:图片转base64的方法可以直接用JDK提供的Base64.getEncodeer().encodeToString(data)实现。点击在线体验API,此时跳转到了API调测平台API Explorer,在这里可以将图片的base64编码填入Body体重的image参数,点击调试,右下的响应结果会将接口的返回体打印出来。二、体验完了API,就要开始写代码了先来学习下一个API调用的完整流程,点击文档右侧的SDK示例代码,可以看到一个API完整调用流程:通过BasicCredentials鉴权,然后开始组装HttpClient模型,之后将参数封装到request模型中,并作为参数传入到client发送的API请求中。注意调用API的几个必填参数:ak/sk:access key和secret access key,用于鉴权。region:云服务资源所在的区域projectId:你要操作的region中的项目ID。如果projectId不填,SDK会自动获取region下第一个projectId将刚刚的base64编码拷贝到参数中,这时右侧示例代码同步生成对应的参数模型。可以将SDK代码拷贝到自己的工程中,进行调试。注1:通过CodeArts新建初始化工程可以参考CodeArts使用说明文章,这里就不再赘述,本教程工程模板附在本文末尾注2:由于image字符串较长,这里没有直接拷贝到方法中,而是抽取了一个参数image传入注3:如果是内网用户通过代理访问API,则需要配置代理,如没有Certificate证书,则可以http代理类关闭SSL校验。三、如果仅仅是copy代码是不是还太初阶了?CodeArts华为云API还提供华为云SDK代码补全功能,通过右键菜单或者命令行打开开关(默认关闭),在用户输入代码时会提供API联想提示,并插入SDK代码,API代码一键生成!SDK代码补全支持以下场景:识别上下文中的鉴权、client信息,如果用户已实现鉴权、client封装等,则会直接获取对应的引用调用API如果SDK代码中的声明变量名称重复,则会自动加上后缀识别用户已经声明的日志类,并替换到SDK代码中自动安装SDK的依赖包到pom中,并刷新maven dependency样例工程中已经将鉴权、client封装好,这时在方法中插入代码,选中recognizeVatInvoice,将直接复用上面声明的myClient变量,将剩余代码插入到方法中。此时再将image封装到请求的body体中,就完成了整个API调用代码。启动调试,查看结果。注:当前还不支持参数模型代码自动生成,该功能将在下个版本上线。大家是否也跃跃欲试了呢,欢迎大家申请试用CodeArts,抢鲜体验华为云API!
  • [使用说明] CodeArts IDE华为云API第一章-玩转华为云API
    华为云当前有120+云服务提供4000+API供广大开发者调用,本篇文章主要为您讲解CodeArts上如何使用华为云API,包括华为云API检索、API文档查看、API调试,提供SDK示例代码供开发者学习如何使用API。同时,在开发者实际编程过程中,提供SDK代码自动补全功能助你快速集成开发。华为云API介绍打开CodeArts后,点击左侧侧边栏中的华为云API图标,则可打开华为云API插件主面板,如果是第一次进入,右侧会弹出华为云服务API全景图,为您介绍此插件丰富的能力。你也可以通过点击右上角的API全景图按钮打开全景图。API检索打开的华为云API,可以在搜索框中搜索华为云发布的所有云服务、API、SDK、错误码等。同时下面的热门推荐会为你展示最近有哪些热门的API。查看API文档根据搜索结果选择满足诉求的API,右侧panel将会打开API文档,可以查看此API的详细信息包括接口说明、URL、参数说明及示例、返回结果说明及示例等,方便你全方位的了解此API功能。API调试在API文档上方,点击“在线体验API”按钮,会跳转到API调测工具APIExplorer的页面,你可以在此调试该APISDK示例代码在API文档右侧,点击切换到“SDK示例代码”页签,这里的示例代码会指导你如何通过华为云SDK代码来调用API,并且在左侧编辑此API参数时,右侧面板会同步将参数模型的封装插入到示例代码中。SDK代码自动补全华为云API插件还提供代码补全功能,辅助开发者在编程过程中,通过识别用户上下文,将SDK代码片段补全,使调用华为云API更方便。SDK代码补全功能默认关闭,开发者可以通过鼠标右键中的菜单栏或者命令行-启用华为云SDK代码补全助手来打开开关。这时在编辑器中输入代码时,插件会联想出匹配的华为云API。开发者选中后,会对此时代码插入位置的上下文进行分析,将SDK代码插入到该位置。Talk is cheap,show you the code!实际编码过程中更加详细的玩法,请见CodeArts华为云API第二章-华为云API实战演练。
  • 【华为云Stack ManageOne 】订单执行结果查询没有资源id
    通过订单申请资源后,查询订单执行详情没有返回创建的资源的id,那应该如何查询创建的资源的详情?
  • [技术干货] 将Graph Explorer搬上JupyterLab:使用GES4Jupyter连接GES并进行图探索
    GES4Jupyter是一款可以在JupyterLab中连接访问GES并可视化的工具。工具中封装了部分GES业务面接口,并提供对返回数据的可视化能力。基于该工具在Jupyter上进行图探索,可以大大降低编码成本,丰富JupyterLab的数据表现力。详情参考:https://bbs.huaweicloud.com/blogs/361607
  • [热门活动] 【HCSD华为云实践营·成都东软学院站】实践篇:体验5分钟完成文字转定制化语音,赢取华为耳机、周边等好礼
    语音合成,是一种将文本转换成逼真语音的服务。用户通过实时访问和调用API获取语音合成结果,将用户输入的文字合成为音频。通过音色选择、自定义音量、语速,为企业和个人提供个性化的发音服务。毕业季将至,快快体验华为云API Explore语音合成接口,为即将离开校园的学长学姐送上最真挚的祝福吧!按照【操作指导】完成操作即可抽奖!操作指导步骤一:访问API Explorer的AI语音合成接口点击链接进入API Explorer页面,选择【语音合成接口】,(注意:要登录自己的账号哦,没有账号请注册账号)步骤二:体验接口调试功能在text参数里随意输入想合成的文本,发起调试注:改变property的参数即可切换不同音色步骤三:将语音编码转成音频文件复制步骤二调试成功的响应体,复制按键如图所示注:如响应结果提示“响应体内容长度超出显示限制,下载查看完整内容”,则需要先下载查看完整内容并进行复制点击【预览代码】进入新页面,并点击右上角【在CloudIDE上】打开(若未开通CloudIDE,进入CloudIDE产品页面点击【立即体验】免费开通即可)进入CloudIDE双击json文件将之前复制的响应体粘贴到json文件预置的空数组中(提示:若要拼凑多个转语音编码,可生成多个语音编码的响应体,复制到数组中,用逗号隔开)点击运行到Explorer下,选择mp3文件,右键,选择download,即可下载生成音频文件来听啦体验抽奖完成上述【操作指导】内容并在本贴反馈体验截图(必须包含生产的MP3文件及右上角华为云账号,如下图所示)即可抽奖>>抽奖链接说明:必须先完成体验方可进行抽奖,如先进行抽奖再完成体验则不发放奖品!
  • [热门活动] 【已结束】体验5分钟完成文字转定制化语音,赢取手环、帆布包、运动汗巾等好礼
    活动已结束,如有问题可加群反馈活动说明:需要将文字转不同方言、不同情景对话场景等个性化的语音,自写程序应对多样个性化的需求门槛高,成本高?华为云语音接口给你解决,简单几步就可实现文字转个性化语音编码甚至音频文件,快来康康,现在体验还有机会赢手环、帆布包、运动汗巾等好礼!体验指导书>>> 活动时间:即日起至礼品放完为止激励概览:心得文章投稿须知>>>注意事项:1、请务必使用个人账号参与活动(IAM、企业账号等账号参与无效);2、华为云新用户定义:2022年5月16日后注册华为云账号的用户;3、一个新用户最多获取一次“新用户体验有奖”奖项,不能再获得其他三个活动的该奖项,但可以参与其余三个同期体验活动的体验抽奖(其余三个活动可进群了解);4、只有完成产品体验并截图回帖后再进行问卷抽奖才算有效。否则并不具备获奖资格,将不会发放奖品;5、用户回帖只会仅楼主可见,以防冒用截图;6、截图务必包含华为云账号;7、获奖名单将于每月底统一公布直至礼品发放完毕,届时将发布兑奖方式。8、本活动最终解释权归华为云所有。获奖公示:奖品公示(截至5月30日):如有异议请加入体验群进行反馈,谢谢!恭喜以上获奖小伙伴,请获奖小伙伴(抽奖奖项获奖已填写收件小伙伴无需重复填写)2022年6月10日之前点链接>>>填写领奖信息,逾期将自动视为放弃,礼品将于15个工作日内安排发放,请耐心等待~奖品公示(6月1日-6月30日):如有异议请加入体验群进行反馈,谢谢!恭喜以上获奖小伙伴,请获奖小伙伴2022年7月15日之前点链接>>>填写领奖信息,逾期将自动视为放弃,礼品将于15个工作日内安排发放,请耐心等待~活动答疑群:
  • [问题求助] 【ABC产品】【数据服务】应用导航中不存在API Explorer
    【功能模块】最近项目需要开发数据统计的相关功能模块查看到平台提供数据服务的相关功能,但是在我们的开发环境并没有查看到API Explorer该项目还有具体调用的相关地址也需要华为相关人员提供一下租户:Hi-hstc123【操作步骤&问题现象】1、2、【截图信息】【日志信息】(可选,上传日志内容或者附件)
  • [交流吐槽] 做个快乐的挣豆人
    每天 码豆新建工作项 15提交代码   60执行代码检查 30执行构建 30 执行部署 30 执行手工测试用例 15 执行接口测试用例 15执行流水线 15使用API Explorer在线调试 30浏览Codelabs代码示例  30每天两篇博客 150 * 2每天 五个回帖 * 10 连续签到 每天 7060 + 150 + 60 + 300 + 50  + 70= 690 还可以 
  • [问题求助] API Explorer AddDevice 创建设备
    总是报如下错误。使用 API Explorer  AddDevice 创建设备时 ,无真实设备,node_id 如何获取?填写?
  • [其他] ProtoBuf 的使用场景讨论
    之前在网络通信和通用数据交换等应用场景中经常使用的技术是 JSON 或 XML,而目前互联网也出现了蛮多使用Google 的 ProtoBuf替代Json和XML。protocol buffers 是一种语言无关、平台无关、可扩展的序列化结构数据的方法,它可用于(数据)通信协议、数据存储等。Protocol Buffers 是一种灵活,高效,自动化机制的结构数据序列化方法-可类比 XML,但是比 XML 更小(3 ~ 10倍)、更快(20 ~ 100倍)、更为简单。(a)占用空间小 一条消息数据,用protobuf序列化后的大小是json的10分之一,xml格式的20分之一,是二进制序列化的10分之一(极端情况下,会大于等于直接序列化),总体看来ProtoBuf的优势还是很明显的。(b)解析速度快 解析速度快,主要归功于protobuf对message 没有动态解析,没有了动态解析的处理序列化速度自然快了。就比如xml ,获取文件之后,还需要解析标签、节点、字段,每一个都需要遍历,而protobuf不需要,直接将field装入流。(c)兼容性好 fieldNumber 为每个field定义一个编号,其一保证不重复,其二保证其在流中的位置。如若当前数据流中有某个字段,而解析方没有相关的解析代码,解析放会直接skip 吊这个field,而且读数据的position也会后移,保证后续读取不出问题。欢迎大家一起分享下ProtoBuf的优点和使用场景分析。
  • 【API Explorer体验送码豆活动】 完成在线调试,就可得码豆!
     冲
  • [整体安全] 【漏洞通告】Internet Explorer远程代码执行漏洞安全风险通告
    漏洞描述近日,监测到微软发布Internet Explorer远程代码执行漏洞通告,CVE编号为CVE-2021-27085,该漏洞影响多个平台的Internet Explorer,通过该漏洞,攻击者让受害者打开恶意网站触发该漏洞,成功利用该漏洞可以导致远程代码执行。微软在通告里声称该漏洞已被用于在野攻击且已有PoC。此类漏洞多用于APT攻击。 风险评级:高危 风险等级:蓝色(一般事件) 影响范围在以下平台的所有的IE11Windows 10 Version 20H2 for x64-based SystemsWindows 10 Version 2004 for x64-based SystemsWindows 10 Version 2004 for ARM64-based SystemsWindows 10 Version 2004 for 32-bit SystemsWindows 10 Version 1909 for ARM64-based SystemsWindows 10 Version 1909 for x64-based SystemsWindows 10 Version 1909 for 32-bit SystemsWindows Server 2019Windows 10 Version 1809 for ARM64-based SystemsWindows 10 Version 1809 for x64-based SystemsWindows 10 Version 1809 for 32-bit SystemsWindows 10 Version 1803 for x64-based SystemsWindows 10 Version 1803 for 32-bit SystemsWindows 10 Version 20H2 for ARM64-based SystemsWindows 10 Version 20H2 for 32-bit Systems处置建议安装补丁:到https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27085下载补丁缓解措施:禁用Internet Explorer改用Chrome、Firefox等现代浏览器,不打开来源不明的链接。参考资料[1]https://www.rapid7.com/db/vulnerabilities/msft-cve-2021-27085/[2]https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27085
总条数:162 到第
上滑加载中