加载中 ...
首页 > 新闻资讯 > 经验心得 正文

百度新发布的智能小程序是什么?

2019-07-12 23:29:54 来源:沈阳小程序开发 作者:沈阳软件开发

从4月份开始,江湖上就有传言说百度要上线小程序了,但那时百度官方既没有“辟谣”,也没有出面解释,直到今年5月22日,百度应用业务部总经理平晓黎百度联盟峰会上给出了官方回应,宣布百度智能小程序将于7月正式上线。

7月5日,在百度AI开发者大会上,百度副总裁沉抖正式对外发布了百度智能小程序。百度称,智能小程序不仅全面接入百度大脑的AI能力,更将在今年12月份全面开源,但是主题演讲上并没有过多地透露智能小程序技术的细节。为此,小编赶赴百度小程序分论坛为大家挖掘了智能小程序在技术和应用上的特点。

从运行方式,程序架构来看,百度的智能小程序其实是一个跨小程序 /网络的框架,最终会生成两套页面,在百度平台使用小程序,在浏览器加载H5页面。

以下为记者从会场的分享整理而来:

生态服务

百度认为,近两年,应用推广成本居高不下,H5转化漏斗损耗大,H5下运营方式单一,而且又难以将百度AI和大数据的能力结合起来,为了充分发挥自身的优势和提升运营质量,所以智能小程序诞生了。

百度智能小程序和微信小程序原理相似,可以运行在百度的平台,另外还可以运行在合作浏览器,应用程序合作,Dueros,阿波罗等上。

流量如何分发?

XX 据了解,百度智能小程序在百度信息流中通过“主动分发+个性化推荐”到达用户。这还意味着通过探索用户的兴趣点,数据分析等,信息流将被用户最有趣和最需要的智能小程序个性化并且被场景推送给用户。当不同类型的用户刷新信息流时,可以看出主动推荐不同类型的智能小程序,这种分发不仅更有效,而且更准确。

昨天,百度副总裁沉晓宣布,将向开发商开放1000亿的流量,包括搜索和信息流等竞争产品,使开发商能够充分享受超级门户带来的流量红利。

因此,在百度搜索中,无论是基于现有H5网站的智能小程序,还是新开发的智能小程序,只要体验良好且足够高,就可以从搜索中获得流量。但是相比H5,百度搜索会优先分发智能小程序。目前,百度App每日活跃用户已超过1.5亿,这种巨大的流量将给开发者带来巨大的红利。 7月下旬,新版百度应用程序将打开智能小程序门户,其他常见浏览器及其合作伙伴应用程序将打开。

开发者如何接入?

如果开发人员希望Smart 小程序连接到搜索引擎,开发人员需要做什么?

众所周知,“Bear Palm”是一个统一的认证账号,供内容和服务提供商进入百度内容生态系统,因此搜索也是由熊掌号码设计为沈阳小程序

ad.jpg

接收高品质的互联网资源,包括智能小程序。

在开发人员在智能小程序的平台上注册后,它将自动打开或绑定熊掌帐户。提交并开发智能小程序后,请注意开发人员需要将网站管理员的二级域名映射到智能小程序服务器。在此映射之后,开发人员在其自己的域名下具有智能小程序。百度将自动索引智能小程序,开发人员也可以通过阿拉丁的结构化数据提交在百度搜索和显示。

搜索引擎自动抓取并理解,索引智能小程序,最后指示智能小程序。如果它在百度APP环境中,它将通过Native加载Smart 小程序。如果是Apple浏览器和谷歌浏览器,它将通过快速帧加载Smart 小程序Web版本。

101513zd4i4x8cpix91ici.png

如果您已经拥有H5站点,开发人员只需一行代码就可以迁移到Smart 小程序。

开发人员只需要向智能小程序页面添加Canonical标签,Canonical标签指向原始H5页面以表示托管关系。这里需要说明的是,智能小程序页面和H5页面需要一一对应,即A内容对应A内容,B内容对应B内容。两个相应页面的内容必须一致。智能小程序和原始H5网站必须属于同一个组域,因为这种传输和继承可以在同一个组域下完成。

H5和智能小程序属于同一组域。搜索将帮助开发人员自动继承在H5网站之前建立的智能小程序之前建立的SEO优化和搜索权重。

此外,智能小程序的访问必须是安全的,并且必须遵循https协议。这是一项基本要求,可以帮助智能小程序以更安全的方式防止用户隐私被盗,从而降低劫持和伪造智能小程序的风险。

如何开发智能小程序?

在智能小程序的开发技术中,百度应用商务部的前端架构师雷志兴给我们做了详细的介绍:

从技术角度来看,智能小程序与Web开发之间没有本质区别。 Web分为三个部分,HTML,JS,CSS。为了尽可能与Web保持一致,降低开发成本并提高运营效率。智能小程序使自定义视图,SWAN,JS和CSS在语法上不同。此时,您不能使用JS生命周期和事件,而是使用智能小程序生命周期和事件。

101512uai4ei9ae3ewe7fh.png

以上是智能小程序的代码,它定义了一个按钮。在遗嘱中,事件受以下约束。然后,JS使用自定义事件,具有对应关系,在JS中获取数据,写入数据。在JS中,智能小程序CSS和普通CSS之间没有区别。

智能小程序使用MVVM的编程逻辑。整个应用程序有两层,逻辑层和视图层。逻辑层和视图层是分开的。 JS属于逻辑层。它包括智能小程序的生命周期,响应用户事件和管理。请求的数据以及各种页面在视图的核心中定义容器,并使用诸如EFR之类的语句控制表示,其中所有数据都是从逻辑层获得的。

智能小程序技术架构

101513cwnwq2nuzpsnnthp.png

The technical architecture of Intelligent 小程序 is divided into two parts, development and operation. The development is to include the management platform developer tools. The developer tools are mainly used to debug and see the effects. Another feature is the moving tool, which can quickly move other 小程序 ecosystems to the smart 小程序 ecosystem.

The operation includes the running environment and the enabling. The core of the running environment is the browsing framework. The browsing framework ensures the smooth running of the intelligent 小程序. The operating environment also includes other basic capabilities, such as the essential basic capabilities of the intelligent network 小程序.

The upper layer is divided into two large blocks, the first block is the component, and the second block is the capability.

On the component, Baidu Smart 小程序 provides components for reducing development work such as icons, forms, image viewing, progress bars, etc. as well as components that can be smoothed through client technology, such as audio and video live broadcasts, and ground canvas.

In terms of capabilities, Smart 小程序 provides basic API capabilities such as geographic location, Bluetooth network, and Baidu platform capabilities provided by Baidu AI and Baidu Big Data. For example, Baidu statistics, Baidu statistics currently have PC and mobile versions, and then there will be 小程序 version, in the smart 小程序 developer background to see the user's source, stickiness, and propagation effects, which is the ability of Baidu's platform to give 小程序 cloud.

101512gw3rrxz6xx222lz4.png

The development process of the intelligent 小程序 is exactly the same as the web development, and the running part is divided into two layers. The following is the running environment. The running environment is the basis for ensuring smooth running of 小程序. The corresponding version is implemented in the web, and a set is implemented in the browser. The framework equivalent to the Web, on the Web, intelligent 小程序 is responsible for the client's AI application, while the upper layer achieves equivalent API capabilities and cloud capabilities.

一次开发,多端运行是如何实现的?

xx 如上所述,Smart 小程序和Web类似。使用的技术是Web技术,可以在浏览器上运行。由于智能小程序具有逻辑层和视图层,因此逻辑层的核心是JS引擎。客户端和浏览器都有一个可以在不同平台甚至不同设备上运行的JS引擎。上述设计层可以在客户端部分使用Web,部分使用客户端技术进行渲染,使用其他渲染技术在其他平台上渲染,并在中间使用其他链接。这确保了每个人编写的代码都是在不同的平台上开发的。跑。

101512dd9q4snanaqkkele.png

在实际操作之前,Smart 小程序,SWAN,JS和CSS的源代码将被编译成运行代码,一个是JS,另一个是CSS,下一层是逻辑环境,包括业务框架,业务代码,没有视图的逻辑将数据发送到视图环境,其中包括智能小程序基本框架和第三方组件以及CSS。

这意味着通过分离逻辑环境和视图环境,我们可以使用不同的技术使视图环境在不同平台上更顺畅地运行,并使体验和感觉更好。 JS引擎是跨平台的。在开发过程中,开发人员使用百度提供的智能小程序开发工具。它可以在本地调试并查看效果。开发完成后,通过开发人员工具上传按钮并上传智能小程序。在管理平台上,在针对不同用户环境的管理平台中,将不同的代码包发送到相应的平台,并在APP中下载完整的运行包。此运行包包括所有逻辑环境和视图环境。事情。

For example, in Baidu APP, after getting this package, run 小程序 directly. The subsequent operations do not need to be downloaded. You only need to download the data. The same package is generated in the Web. This is deployed on the server. When the browser opens the link, it will render the page in H5 mode, which can achieve better browsing and experience on H5. Some things are browsed. It can't be implemented in the device, such as AR technology, Baidu suggests that developers can download the app to get a more complete experience.

关于开源

Yesterday, in the keynote speech, Baidu has said that smart 小程序 will be fully open source in December, but in fact, smart 小程序 has been partially open source, you can find 小程序 front-end core framework SAN in Github. This is the core part of 小程序 in the client runtime environment. It is the framework of MVVM. It has the characteristics of small size, high performance and good compatibility. It is not only suitable for 小程序 single-page applications, but also for traditional web applications.

San Address:https://github.com/baidu/san

Finally, Baidu said that through the open and open source to build a smart 小程序 technology ecosystem, they hope that more and more APP integrated intelligent 小程序 operating environment, they will also integrate intelligent 小程序 operating environment in more devices and systems, For example, the partner's APP, the intelligent voice operating system, and the on-board system Apollo, really do a single operation to run Smart 小程序.

xx

“沈阳软件公司”的新闻页面文章、图片、音频、视频等稿件均为自媒体人、第三方机构发布或转载。如稿件涉及版权等问题,请与

我们联系删除或处理,客服QQ:55506560,稿件内容仅为传递更多信息之目的,不代表本网观点,亦不代表本网站赞同

其观点或证实其内容的真实性。