WO2019105093A1 - Data encapsulating method and apparatus, data processing device and apparatus, and electronic device - Google Patents

Data encapsulating method and apparatus, data processing device and apparatus, and electronic device Download PDF

Info

Publication number
WO2019105093A1
WO2019105093A1 PCT/CN2018/104184 CN2018104184W WO2019105093A1 WO 2019105093 A1 WO2019105093 A1 WO 2019105093A1 CN 2018104184 W CN2018104184 W CN 2018104184W WO 2019105093 A1 WO2019105093 A1 WO 2019105093A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
service
algorithm
image
view component
Prior art date
Application number
PCT/CN2018/104184
Other languages
French (fr)
Chinese (zh)
Inventor
汤锦鹏
陈晓升
Original Assignee
广州市动景计算机科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州市动景计算机科技有限公司 filed Critical 广州市动景计算机科技有限公司
Publication of WO2019105093A1 publication Critical patent/WO2019105093A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

A data encapsulating method and apparatus, a data processing device and apparatus, an electronic device and a non-temporary machine readable storage medium. The data encapsulating method comprises: providing an algorithm registration interface for registering an AR algorithm and an AR service interface for conducting AR interaction with a webpage on the basis of a webpage view component (S102); providing a channel for communication between an algorithm interface of the AR algorithm successfully registered on the basis of the webpage view component and the AR service interface (S104); and encapsulating and generating an AR service callable file according to the webpage view component, the algorithm registration interface of the AR algorithm, the AR service interface, and the established channel (S106). By means of the method, the AR distribution and deployment costs are greatly reduced.

Description

数据封装、处理方法、装置及电子设备Data encapsulation, processing method, device and electronic device 技术领域Technical field
本发明实施例涉及计算机技术领域,尤其涉及一种数据封装及处理方法、装置及电子设备。The embodiments of the present invention relate to the field of computer technologies, and in particular, to a data encapsulation and processing method, apparatus, and electronic device.
背景技术Background technique
AR(Augmented Reality,增强现实技术)是一种将真实世界信息和虚拟世界信息“无缝”集成的新技术,其把原本在现实世界的一定时间空间范围内很难体验到的信息(如,视觉信息、声音信息等),模拟仿真后叠加到真实的信息中,真实的环境和虚拟的物体实时地叠加到了同一个画面或空间同时存在。AR (Augmented Reality) is a new technology that integrates real world information and virtual world information "seamlessly". It uses information that is difficult to experience in a certain time and space of the real world (eg, Visual information, sound information, etc.), superimposed on the real information after the simulation, the real environment and the virtual object are superimposed in the same picture or space at the same time.
随着移动通信技术的发展和智能终端处理能力的提高,应用于智能终端的增强现实技术开始得到重视。但是现有技术中需要依赖安装内嵌AR算法的App(Application,应用程序)的方式实现增强现实技术,采用这种方式时,上线新的AR业务需要进行App版本升级,替换或者新增AR算法也需要进行App版本升级,并且,即使同一个AR业务也不能在不同的App上同时运行。可见,这种方式使得AR的分发和部署成本都较高,不利于AR的普及和发展。With the development of mobile communication technology and the improvement of processing capabilities of intelligent terminals, augmented reality technology applied to smart terminals has begun to receive attention. However, in the prior art, an augmented reality technology is implemented by means of an application (application) in which an embedded AR algorithm is installed. In this manner, a new AR service needs to be upgraded, replaced or added with an AR algorithm. App version upgrades are also required, and even the same AR service cannot be run simultaneously on different apps. It can be seen that this method makes the distribution and deployment cost of the AR high, which is not conducive to the popularization and development of the AR.
发明内容Summary of the invention
有鉴于此,本发明实施例提供一种数据封装及处理方法、装置及电子设备,以解决现有AR分发和部署成本高的问题。In view of this, the embodiments of the present invention provide a data encapsulation and processing method, apparatus, and electronic device to solve the problem of high cost of existing AR distribution and deployment.
根据本发明实施例的第一方面,提供了一种数据封装方法,包括:基于网页视图组件,设置用于注册AR算法的算法注册接口和用于与网页进行AR 交互的AR业务接口;设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道;根据网页视图组件、所述算法注册接口、AR业务接口和所述通道,封装生成AR业务可调用文件。According to a first aspect of the embodiments of the present invention, a data encapsulation method is provided, comprising: setting, according to a web page view component, an algorithm registration interface for registering an AR algorithm and an AR service interface for performing AR interaction with a webpage; a channel for communicating between the algorithm interface of the AR algorithm and the AR service interface of the web page view component; and the AR service may be encapsulated according to the web page view component, the algorithm registration interface, the AR service interface, and the channel. Call the file.
根据本发明实施例的第二方面,提供了一种数据处理方法,包括:接收AR业务请求,其中,AR业务请求中携带有AR业务参数;将AR业务请求中的AR业务参数发送给AR业务可调用文件,其中,AR业务可调用文件根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成;通过AR业务可调用文件对所述AR业务参数进行处理,并返回处理结果;根据所述处理结果进行AR业务展示。According to a second aspect of the embodiments of the present invention, a data processing method is provided, including: receiving an AR service request, where an AR service request carries an AR service parameter; and an AR service parameter in an AR service request is sent to an AR service. The callable file, wherein the AR service callable file is generated according to the algorithm registration interface of the AR algorithm, the webpage view component, the AR service interface, and the communication channel between the AR algorithm interface and the AR service interface; The AR service parameters are processed, and the processing result is returned; and the AR service is displayed according to the processing result.
根据本发明实施例的第三方面,提供了一种数据封装装置,包括:第一设置模块,用于基于网页视图组件,设置用于注册AR算法的算法注册接口和用于与网页进行AR交互的AR业务接口;第二设置模块,用于设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道;封装模块,用于根据网页视图组件、所述算法注册接口、AR业务接口和所述通道,封装生成AR业务可调用文件。According to a third aspect of the embodiments of the present invention, a data encapsulating apparatus is provided, including: a first setting module, configured to set an algorithm registration interface for registering an AR algorithm and perform AR interaction with a webpage based on a webpage view component; The AR service interface, the second setting module, configured to set a channel for communicating between the algorithm interface of the AR algorithm and the AR service interface based on the webpage view component; the encapsulation module is configured according to the webpage view component, The algorithm registers an interface, an AR service interface, and the channel, and encapsulates an AR service callable file.
根据本发明实施例的第四方面,提供了一种数据处理装置,包括:接收模块,用于接收AR业务请求,其中,AR业务请求中携带有AR业务参数;发送模块,用于将AR业务请求中的AR业务参数发送给AR业务可调用文件,其中,AR业务可调用文件根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成;处理模块,用于通过AR业务可调用文件对所述AR业务参数进行处理,并返回处理结果;展示模块,用于根据所述处理结果进行AR业务展示。According to a fourth aspect of the present invention, a data processing apparatus is provided, including: a receiving module, configured to receive an AR service request, where an AR service request carries an AR service parameter, and a sending module is configured to use the AR service The AR service parameter in the request is sent to the AR service callable file, wherein the AR service callable file is encapsulated according to the algorithm registration interface of the AR algorithm, the web view component, the AR service interface, and the communication channel encapsulation between the AR algorithm interface and the AR service interface. And a processing module, configured to process the AR service parameter by using an AR service callable file, and return a processing result; and a display module, configured to perform AR service display according to the processing result.
根据本发明实施例的第五方面,提供了一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如第一方面所述的数据封装方法对应的操作。According to a fifth aspect of the embodiments of the present invention, there is provided an electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete each other through the communication bus The memory is for storing at least one executable instruction that causes the processor to perform operations corresponding to the data encapsulation method of the first aspect.
根据本发明实施例的第六方面,提供了一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如第二方面所述的数据处理方法对应的操作。According to a sixth aspect of the embodiments of the present invention, there is provided an electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete each other through the communication bus The memory is for storing at least one executable instruction that causes the processor to perform an operation corresponding to the data processing method of the second aspect.
根本本发明实施例的第七方面,提供了一种非暂时性机器可读存储介质,其上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如上所述的方法。According to a seventh aspect of the embodiments of the present invention, there is provided a non-transitory machine readable storage medium having stored thereon executable code for causing the executable code to be executed by a processor of an electronic device The method performs the method as described above.
根据本发明实施例的方案,将AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道,一起封装生成AR业务可调用文件。其中,AR算法本身独立于AR业务可调用文件,其仅需向AR业务可调用文件进行注册,告知AR业务可调用文件相应的算法信息,即可供AR业务可调用文件调用。AR业务可调用文件无需了解AR算法的修改、或者增加或者删除等的具体实现,只需通过注册操作获相应算法信息即可。此外,AR业务端仅需与AR业务可调用文件进行交互即可实现相应的AR功能,AR业务端无需内嵌AR算法,也无需了解AR算法的具体实现细节。由此,当上线新的AR业务时,仅需对前端如HTML页面进行小幅度的改动即可使用新AR业务;AR业务可调用文件所在的宿主App本身也可以不具有AR算法,通过它方注册的AR算法即可实现宿主App本身的AR业务;当替换或者新增不属于宿主App本身的AR算法时,无需改动宿主App本身;并且,可以轻松地实现同一个AR业务在不同的App上同时运行。可见,通过本发明实施例的方案,大大降低了AR的分发和部署成本。According to the solution of the embodiment of the present invention, an algorithm registration interface of an AR algorithm, a webpage view component for implementing a webpage function, an AR service interface for implementing an AR service, and a communication channel between an AR algorithm interface and an AR service interface are encapsulated and generated into an AR. Business callable files. The AR algorithm itself is independent of the AR service callable file, and only needs to register with the AR service callable file, and informs the AR service that the corresponding algorithm information of the file can be called, that is, the AR service callable file can be called. The AR service callable file does not need to understand the modification of the AR algorithm, or the specific implementation of adding or deleting, and only needs to obtain the corresponding algorithm information through the registration operation. In addition, the AR service end only needs to interact with the AR service callable file to implement the corresponding AR function. The AR service end does not need to embed the AR algorithm, and does not need to understand the specific implementation details of the AR algorithm. Therefore, when the new AR service is launched, the new AR service can be used only by making small changes to the front end such as the HTML page; the host application itself where the AR service can call the file itself may not have the AR algorithm, and The registered AR algorithm can implement the AR service of the host App itself; when replacing or adding the AR algorithm that does not belong to the host App itself, there is no need to change the host App itself; and, the same AR service can be easily implemented on different apps. Run at the same time. It can be seen that the distribution and deployment cost of the AR is greatly reduced by the solution of the embodiment of the present invention.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面 描述中的附图仅仅是本发明实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a few embodiments described in the embodiments of the present invention, and other drawings can be obtained according to the drawings for those skilled in the art.
图1为根据本发明实施例一的一种数据封装方法的步骤流程图;1 is a flow chart showing the steps of a data encapsulation method according to Embodiment 1 of the present invention;
图2为根据本发明实施例二的一种数据封装方法的步骤流程图;2 is a flow chart showing the steps of a data encapsulation method according to Embodiment 2 of the present invention;
图3为根据本发明实施例的一种AR业务可调用文件的结构示意图;3 is a schematic structural diagram of an AR service callable file according to an embodiment of the present invention;
图4为根据本发明实施例的一种AR数据交互的示意图;4 is a schematic diagram of an AR data interaction according to an embodiment of the present invention;
图5为根据本发明实施例三的一种数据处理方法的步骤流程图;5 is a flow chart showing the steps of a data processing method according to Embodiment 3 of the present invention;
图6为根据本发明实施例四的一种数据处理方法的步骤流程图;6 is a flow chart showing the steps of a data processing method according to Embodiment 4 of the present invention;
图7为根据本发明实施例五的一种数据封装装置的结构框图;7 is a structural block diagram of a data encapsulating apparatus according to Embodiment 5 of the present invention;
图8为根据本发明实施例六的一种数据处理装置的结构框图;FIG. 8 is a structural block diagram of a data processing apparatus according to Embodiment 6 of the present invention; FIG.
图9为根据本发明实施例七的一种电子设备的结构示意图;9 is a schematic structural diagram of an electronic device according to Embodiment 7 of the present invention;
图10为根据本发明实施例八的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to Embodiment 8 of the present invention.
具体实施方式Detailed ways
为了使本领域的人员更好地理解本发明实施例中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明实施例一部分实施例,而不是全部的实施例。基于本发明实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本发明实施例保护的范围。For a better understanding of the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments are only a part of the embodiments of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art should be within the scope of protection of the embodiments of the present invention based on the embodiments in the embodiments of the present invention.
下面结合本发明实施例附图进一步说明本发明实施例具体实现。The specific implementation of the embodiments of the present invention is further described below in conjunction with the accompanying drawings.
实施例一Embodiment 1
参照图1,示出了根据本发明实施例一的一种数据封装方法的步骤流程图。Referring to FIG. 1, a flow chart of steps of a data encapsulation method according to a first embodiment of the present invention is shown.
本实施例的数据封装方法包括以下步骤:The data encapsulation method of this embodiment includes the following steps:
步骤S102:基于网页视图组件,设置用于注册AR算法的算法注册接口和用于与网页进行AR交互的AR业务接口。Step S102: Based on the webpage view component, set an algorithm registration interface for registering the AR algorithm and an AR service interface for performing AR interaction with the webpage.
AR算法是用于实现AR功能的底层算法,如,检测图像中的人脸并返回 人脸关键点的信息,检测图像中设定的目标对象并返回目标对象的位置信息,检测图像中的目标对象是否具有某一属性,等等。AR算法可采用适当的语言实现,可选地,可采用解释语言如Java语言或C#语言实现,或者,可采用编译语言如C语言或C++语言实现。相比较于脚本语言如JS语言实现AR算法,编译语言或解释语言更为高效快速,可以有效满足AR业务对于时效的需求。但不限于此,在实际使用中,脚本语言也同样适用于本发明实施例的AR算法。The AR algorithm is an underlying algorithm for implementing AR functions, such as detecting a face in an image and returning information of a face key point, detecting a target object set in the image and returning the position information of the target object, and detecting the target in the image. Whether the object has a certain attribute, and so on. The AR algorithm may be implemented in an appropriate language, optionally in an interpreted language such as the Java language or the C# language, or in a compiled language such as C or C++. Compared with scripting languages such as JS language to implement AR algorithm, compiling language or interpreted language is more efficient and faster, which can effectively meet the needs of AR business for timeliness. However, it is not limited thereto, and in actual use, the scripting language is also applicable to the AR algorithm of the embodiment of the present invention.
算法注册是将算法的相关信息(如,算法标识(名称或ID等)、类名等)告知算法调用方的一种方式,算法注册可以采用函数注册或函数声明的方式实现。Algorithm registration is a way to inform the algorithm caller of relevant information of the algorithm (such as algorithm identification (name or ID, etc.), class name, etc.). Algorithm registration can be implemented by function registration or function declaration.
采用注册的方式,AR算法可实现算法内部的灵活修改而无需调用方了解修改的具体细节;当出现了新的AR算法时,通过注册方式告知算法调用方相关算法信息即可实现新的AR算法的调用;当需要删除已注册的AR算法时,不再注册或调用即可。AR算法可以通过AR算法接口返回相应的信息,如通过AR业务接口向HTML5页面返回相应的信息,以供HTML5页面基于该信息进行进一步的AR处理。With the registration method, the AR algorithm can implement flexible modification within the algorithm without the caller knowing the specific details of the modification; when a new AR algorithm occurs, the new AR algorithm can be realized by informing the algorithm caller related algorithm information through registration. Call; when you need to delete the registered AR algorithm, you can no longer register or call. The AR algorithm can return corresponding information through the AR algorithm interface, for example, returning corresponding information to the HTML5 page through the AR service interface, so that the HTML5 page performs further AR processing based on the information.
本发明实施例中,通过设置算法注册接口接收AR算法的注册,AR算法通过该算法注册接口将算法信息告知算法调用方。其中,算法注册接口的具体实现方式可以由本领域技术人员根据实际需求适当设置,本发明实施例对此不作限制。In the embodiment of the present invention, the algorithm registration interface is configured to receive the registration of the AR algorithm, and the AR algorithm notifies the algorithm caller of the algorithm information through the algorithm registration interface. The specific implementation manner of the algorithm registration interface may be appropriately set by a person skilled in the art according to actual requirements, which is not limited by the embodiment of the present invention.
AR业务设置于前端(如通过前端HTML5页面中的JavaScript(JS)代码实现),实现的功能包括但不限于摄像头数据渲染或者其它图像数据渲染、AR特效绘制等功能。AR业务自身不具有AR算法能力,需要通过AR业务接口获取AR算法返回的结果,基于该结果最终实现AR业务。AR业务接口是用于与网页进行AR交互的接口,可通过脚本语言实现,可选地,可实现为JS API的形式,AR业务接口通过网页视图组件与AR算法接口交互,传递AR业务参数。The AR service is set at the front end (as implemented by JavaScript (JS) code in the front-end HTML5 page), and functions implemented include, but are not limited to, camera data rendering or other image data rendering, AR special effects rendering, and the like. The AR service does not have the AR algorithm capability. The AR service interface needs to obtain the result returned by the AR algorithm. Based on the result, the AR service is finally implemented. The AR service interface is an interface for performing AR interaction with a webpage, and can be implemented by a scripting language. Alternatively, the AR service interface can be implemented in the form of a JS API. The AR service interface interacts with the AR algorithm interface through the webpage view component to deliver AR service parameters.
网页视图组件是实现浏览器功能的组件,如WEBVIEW,其可以实现为一种基于浏览器内核的网页渲染引擎,通过加载HTML数据的方式即可展现相应 的界面和网页。The web view component is a component that implements browser functions, such as WEBVIEW, which can be implemented as a web-based rendering engine based on the browser kernel, which can display the corresponding interface and webpage by loading HTML data.
本实施例中,基于网页视图组件,设置算法注册接口和AR业务接口,也即,后端AR算法和前端如HTML5网页通过与网页视图组件中设置的上述对应接口即可实现算法注册和前端AR数据交互。In this embodiment, the algorithm registration interface and the AR service interface are set based on the webpage view component, that is, the backend AR algorithm and the front end, such as the HTML5 webpage, can implement algorithm registration and front-end AR through the corresponding interface set in the webpage view component. Data interaction.
步骤S104:设置基于网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道。Step S104: Set a channel for communicating between the algorithm interface of the AR algorithm based on the web page view component and the AR service interface.
在具体使用AR业务时,前端网页会将AR业务请求的业务参数通过AR业务接口交由网页视图组件,网页视图组件除根据业务参数调用内部的相应功能模块实现相应的功能外,还会为AR业务接口和AR算法接口建立通信通道,以进行AR数据和网页数据的传输、交互、处理等。AR业务接口和AR算法接口之间的通信通道可以表现为相互之间的参数传递和/或接口调用等。When the AR service is specifically used, the front-end webpage transfers the service parameters of the AR service request to the webpage view component through the AR service interface, and the webpage view component not only performs the corresponding function according to the corresponding function module of the internal service parameter, but also is the AR. The service interface and the AR algorithm interface establish a communication channel for performing transmission, interaction, processing, and the like of the AR data and the web page data. The communication channel between the AR service interface and the AR algorithm interface may be represented by parameter transfer and/or interface call between each other.
步骤S106:根据网页视图组件、AR算法的算法注册接口、AR业务接口和建立的所述通道,封装生成AR业务可调用文件。Step S106: Encapsulate and generate an AR service callable file according to the webpage view component, the algorithm registration interface of the AR algorithm, the AR service interface, and the established channel.
通过AR业务可调用文件,可以实现前端AR业务与后端AR算法之间的交互,最终实现AR功能。Through the AR service callable file, the interaction between the front-end AR service and the back-end AR algorithm can be realized, and finally the AR function is implemented.
其中,AR业务可调用文件可以采用任意适当的文件形式,包括但不限于组件的形式,如AAR组件或者COM组件等。通过可调用文件的方式,相关App或浏览器可直接调用AR算法进行AR业务处理,无需自身实现AR算法,无需了解AR算法实现细节,从而使得AR功能实现更具灵活性和兼容性,更易于分发和部署。The AR service callable file may take any suitable file format, including but not limited to a component form, such as an AAR component or a COM component. Through the callable file, the related App or browser can directly call the AR algorithm for AR service processing, without implementing the AR algorithm itself, without knowing the implementation details of the AR algorithm, thereby making the AR function more flexible and compatible, and easier. Distribution and deployment.
需要说明的是,在实际应用中,不限于AR算法的算法注册接口、网页视图组件、AR业务接口和建立的所述通道,本领域技术人员还可以根据实际需求,将其它适当接口或功能组件或功能模块封装入AR业务可调用文件。It should be noted that, in practical applications, the algorithm is not limited to the algorithm registration interface of the AR algorithm, the web page view component, the AR service interface, and the established channel. Those skilled in the art may also use other suitable interfaces or functional components according to actual needs. Or the function module is encapsulated into an AR service callable file.
通过本实施例,将AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道,一起封装生成AR业务可调用文件。其中,AR算法本身独立于AR业 务可调用文件,其仅需向AR业务可调用文件进行注册,告知AR业务可调用文件相应的算法信息,即可供AR业务可调用文件调用。AR业务可调用文件无需了解AR算法的修改、或者增加或者删除等的具体实现,只需通过注册操作获相应算法信息即可。此外,AR业务端仅需与AR业务可调用文件进行交互即可实现相应的AR功能,AR业务端无需内嵌AR算法,也无需了解AR算法的具体实现细节。由此,当上线新的AR业务时,仅需对前端如HTML页面进行小幅度的改动即可使用新AR业务;AR业务可调用文件所在的宿主App本身也可以不具有AR算法,通过它方注册的AR算法即可实现宿主App本身的AR业务;当替换或者新增不属于宿主App本身的AR算法时,无需改动宿主App本身;并且,可以轻松地实现同一个AR业务在不同的App上同时运行。可见,通过本发明实施例的方案,大大降低了AR的分发和部署成本。In this embodiment, the algorithm registration interface of the AR algorithm, the webpage view component that implements the webpage function, the AR service interface that implements the AR service, and the communication channel between the AR algorithm interface and the AR service interface are encapsulated and generated by the AR service. file. The AR algorithm itself is independent of the AR service callable file, and only needs to register with the AR service callable file, and informs the AR service that the corresponding algorithm information of the file can be called, that is, the AR service callable file can be called. The AR service callable file does not need to understand the modification of the AR algorithm, or the specific implementation of adding or deleting, and only needs to obtain the corresponding algorithm information through the registration operation. In addition, the AR service end only needs to interact with the AR service callable file to implement the corresponding AR function. The AR service end does not need to embed the AR algorithm, and does not need to understand the specific implementation details of the AR algorithm. Therefore, when the new AR service is launched, the new AR service can be used only by making small changes to the front end such as the HTML page; the host application itself where the AR service can call the file itself may not have the AR algorithm, and The registered AR algorithm can implement the AR service of the host App itself; when replacing or adding the AR algorithm that does not belong to the host App itself, there is no need to change the host App itself; and, the same AR service can be easily implemented on different apps. Run at the same time. It can be seen that the distribution and deployment cost of the AR is greatly reduced by the solution of the embodiment of the present invention.
本实施例的数据封装方法可以由任意适当的具有数据处理功能的设备或装置实现,包括但不限于各种终端及服务器等。The data encapsulation method of this embodiment may be implemented by any suitable device or device having data processing functions, including but not limited to various terminals and servers.
实施例二Embodiment 2
参照图2,示出了根据本发明实施例二的一种数据封装方法的步骤流程图。Referring to FIG. 2, a flow chart of steps of a data encapsulation method according to a second embodiment of the present invention is shown.
本实施例的数据封装方法包括以下步骤:The data encapsulation method of this embodiment includes the following steps:
步骤S202:基于网页视图组件,设置用于与网页进行AR交互的AR业务接口。Step S202: Set an AR service interface for performing AR interaction with the webpage based on the webpage view component.
其中,网页视图组件是实现浏览器功能的组件,其可以实现为一种基于浏览器内核的网页渲染引擎,通过加载HTML数据的方式可展现相应的界面和网页。在实际应用中,本领域技术人员可以根据实际情况采用任意适当的网页视图组件。本实施例中,以WEBVIEW网页视图组件为例。The web view component is a component that implements a browser function, and can be implemented as a webpage rendering engine based on a browser kernel, and the corresponding interface and webpage can be displayed by loading HTML data. In practical applications, those skilled in the art can adopt any suitable web page view component according to actual conditions. In this embodiment, the WEBVIEW web page view component is taken as an example.
WEBVIEW是一个基于WEBKIT引擎、展现WEB页面的控件。WEBVIEW除了具有一般VIEW的属性和设置外,还可以对URL请求、页面加载、渲染、页面交互进行处理。通过WEBVIEW,可以显示和渲染WEB页面,直接使用HTML文件(网络上或本地assets中)作布局,可以和JavaScript交互调用,等等。浏览器App可以通过WEBVIEW实现浏览器的功能,而非浏览器App则可以通 过WEBVIEW将浏览器功能嵌入自身应用中。WEBVIEW is a control based on WEBKIT engine that displays WEB pages. In addition to the general VIEW properties and settings, WEBVIEW can also handle URL requests, page loads, renderings, and page interactions. WEBVIEW allows you to display and render web pages, use HTML files (on the web or in local assets) for layout, interact with JavaScript, and more. The browser app can implement the browser function through WEBVIEW, while the non-browser app can embed the browser function into its own application through WEBVIEW.
WEBVIEW还提供了扩展其自身功能的方法,例如,通过WEBVIEW提供的addJavascriptInterface()方法,以向WEBVIEW设置扩展的JS(JavaScript)接口,并将这些扩展的JS接口的调用方法转发到接口所注册的native函数中。基于此,本发明实施例设置了与网页进行AR交互的AR业务接口,以便实现前端网页所需的各种AR功能。例如,AR业务接口可以接收前端HTML5页面发送的AR业务参数,一方面,通过WEBVIEW将该AR业务参数交给相匹配的AR算法的算法接口;另一方面,使得WEBVIEW根据该业务参数调用相应的图像设备接口或者图像获取接口以获得图像。此外,AR算法在根据AR业务参数对图像进行处理后,会将处理结果返回给AR业务接口,由AR业务接口交给HTML5页面进行处理。在一种可行方式中,AR业务接口可以通过JavaScript语言实现。WEBVIEW also provides methods to extend its own functionality. For example, the addJavascriptInterface() method provided by WEBVIEW is used to set the extended JS (JavaScript) interface to WEBVIEW, and forward the calling methods of these extended JS interfaces to the interface registration. Native function. Based on this, the embodiment of the present invention sets an AR service interface for performing AR interaction with a webpage, so as to implement various AR functions required for the front-end webpage. For example, the AR service interface can receive the AR service parameters sent by the front end HTML5 page. On the one hand, the AR service parameters are forwarded to the algorithm interface of the matched AR algorithm through WEBVIEW; on the other hand, the WEBVIEW invokes the corresponding according to the service parameters. An image device interface or an image acquisition interface to obtain an image. In addition, after processing the image according to the AR service parameters, the AR algorithm returns the processing result to the AR service interface, and the AR service interface hands it to the HTML5 page for processing. In one possible approach, the AR service interface can be implemented in the JavaScript language.
此外,还可以基于WEBVIEW的扩展功能,设置用于获取AR算法的算法信息的查询接口,该查询接口也与前端网页进行交互,通过该查询接口,前端网页可以获知已注册的各种AR算法的算法信息,以为后续选择确定与AR业务相对应的AR算法提供参考。In addition, based on the extended function of WEBVIEW, a query interface for acquiring algorithm information of the AR algorithm may be set, and the query interface also interacts with the front-end webpage, and the front-end webpage can learn the registered various AR algorithms through the query interface. The algorithm information is used to provide a reference for determining the AR algorithm corresponding to the AR service for subsequent selection.
步骤S204:基于网页视图组件,设置用于注册AR算法的算法注册接口。Step S204: Set an algorithm registration interface for registering the AR algorithm based on the web page view component.
AR算法的算法注册接口用于实现AR算法的注册,通过注册告知AR算法调用方AR算法的算法信息,以供后续调用。其中,AR算法可以是设置于App中的算法,也可以是独立存在的算法如操作系统自带的AR算法。AR算法也可以内嵌于AR业务可调用文件中,即直接封装入AR业务可调用文件中。在一种可行方式中,AR算法可以实现为底层算法组件。The algorithm registration interface of the AR algorithm is used to implement the registration of the AR algorithm, and the algorithm information of the AR algorithm caller AR algorithm is notified by registration for subsequent calls. The AR algorithm may be an algorithm set in the App, or may be an independently existing algorithm such as an AR algorithm that is included in the operating system. The AR algorithm can also be embedded in the AR service callable file, that is, directly encapsulated into the AR service callable file. In one possible approach, the AR algorithm can be implemented as an underlying algorithm component.
AR算法可以包括一个或多个(两个及两个以上),在一种可行方案中,可以设定AR算法对外使用统一的接口,多个AR算法通过相同的接口类进行注册,以简化接口设置,提升算法兼容性。The AR algorithm may include one or more (two or more). In one feasible solution, the AR algorithm may be configured to use a unified interface externally, and multiple AR algorithms are registered through the same interface class to simplify the interface. Settings to improve algorithm compatibility.
步骤S206:基于网页视图组件,设置用于控制图像采集设备的图像设备 接口,和/或,设置用于获取图像数据的图像获取接口。Step S206: Set an image device interface for controlling the image capturing device based on the web page view component, and/or set an image obtaining interface for acquiring image data.
图像设备接口用于控制图像采集设备,如,控制摄像头的打开、拍摄、关闭、数据传输等等。一种可行方式中,图像设备接口也可以基于WEBVIEW的扩展功能设置。但不限于此,在实际应用中,本领域技术人员也可以根据实际需要,将对图像的采集和处理封装为独立的功能模块,向外提供相应的接口以供调用。通过图像设备接口,可以实时采集图像,实现实时图像的AR处理。在具体实现时,图像设备接口可以通过图像设备控制算法控制图像采集设备,该图像设备控制算法可以是封装入AR业务可调用文件中的算法,也可以是AR业务可调用文件外但可被调用的算法。The image device interface is used to control the image capture device, such as controlling camera opening, shooting, closing, data transfer, and the like. In a feasible way, the image device interface can also be set based on the extended function of WEBVIEW. However, the present invention is not limited thereto. In practical applications, those skilled in the art may also package the image collection and processing into independent functional modules according to actual needs, and provide corresponding interfaces for calling. Through the image device interface, images can be acquired in real time to realize AR processing of real-time images. In a specific implementation, the image device interface may control the image collection device by using an image device control algorithm, where the image device control algorithm may be an algorithm encapsulated in an AR service callable file, or may be an AR service callable file but may be called. Algorithm.
图像获取接口用于获取图像数据,如,静态图像(如本地存储或网络下载的图像),或者,录制完成的视频中的视频帧图像。图像获取接口也可以基于WEBVIEW的扩展功能设置。但不限于此,在实际应用中,本领域技术人员也可以根据实际需要,将其封装为独立的功能模块,向外提供相应的接口以供调用。通过图像获取接口,可以实现非实时图像的AR处理。在具体实现时,图像获取接口可以通过图像获取算法获取图像数据,该图像获取算法可以是封装入AR业务可调用文件中的算法,也可以是AR业务可调用文件外但可被调用的算法。The image acquisition interface is used to acquire image data, such as a still image (such as a locally stored or network downloaded image), or a video frame image in a recorded video. The image acquisition interface can also be based on the extended function settings of WEBVIEW. However, the present invention is not limited thereto. In practical applications, those skilled in the art may also package them into independent functional modules according to actual needs, and provide corresponding interfaces for calling. Through the image acquisition interface, AR processing of non-real time images can be realized. In a specific implementation, the image acquisition interface may acquire image data by using an image acquisition algorithm. The image acquisition algorithm may be an algorithm encapsulated in an AR service callable file, or may be an algorithm that can be called outside the AR service callable file.
图像设备接口和图像获取接口都接受WEBVIEW的调用,根据该调用采集图像或获取图像,一方面将采集到的或者获取到的图像发送给AR算法接口进行处理,另一方面会回传给AR业务接口,以供AR业务接口交由前端HTML5页面进行渲染绘制。Both the image device interface and the image acquisition interface accept the call of WEBVIEW, and according to the call, the image is acquired or the image is acquired. On the one hand, the collected or acquired image is sent to the AR algorithm interface for processing, and on the other hand, it is returned to the AR service. Interface for the AR business interface to be rendered by the front-end HTML5 page.
需要说明的是,为了描述方便,本实施例按照步骤S202-步骤S204的顺序对相应接口的设置进行说明,但本领域技术人员应当明了,在实际应用中,上述步骤的执行可以不分先后顺序,也可以并行执行。It should be noted that, for convenience of description, the embodiment describes the setting of the corresponding interface according to the sequence of steps S202-S204, but those skilled in the art should understand that in actual applications, the execution of the above steps may be in no particular order. , can also be executed in parallel.
步骤S208:设置基于网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道。Step S208: Set a channel for communicating between the algorithm interface of the AR algorithm based on the web page view component and the AR service interface.
AR算法接口和AR业务接口之间通过通信通道实现数据传输和信息交互。一种可行方式中,可以设置将网页视图组件通过AR业务接口接收的AR业务参数传递给注册成功的AR算法接口的通信通道。AR业务参数包括但不限于AR业务的业务类型、AR业务的操作参数,等等。Data transmission and information exchange are implemented between the AR algorithm interface and the AR service interface through a communication channel. In a feasible manner, the AR service parameter received by the webpage view component through the AR service interface may be set to be transmitted to the communication channel of the successfully registered AR algorithm interface. The AR service parameters include, but are not limited to, the service type of the AR service, the operation parameters of the AR service, and the like.
当还设置有图像设备接口和图像获取接口中的至少一个接口时,也需要建立图像设备接口和/或图像获取接口与AR业务接口之间的通信通道,以及,图像设备接口和/或图像获取接口与AR算法接口之间的通信通道。也即,设置经由网页视图组件的、图像设备接口分别与AR业务接口和AR算法的算法接口之间的通信通道;和/或,设置经由网页视图组件的、图像获取接口分别与AR业务接口和AR算法的算法接口之间的通信通道,以实现向AR算法接口发送待处理的图像数据供AR算法进行处理,以及,向AR业务接口回传待处理的图像数据供AR业务接口交由前端网页进行渲染绘制。When at least one of the image device interface and the image acquisition interface is also provided, it is also necessary to establish a communication channel between the image device interface and/or the image acquisition interface and the AR service interface, and the image device interface and/or image acquisition. The communication channel between the interface and the AR algorithm interface. That is, setting a communication channel between the image device interface and the AR service interface and the algorithm interface of the AR algorithm via the web page view component; and/or setting the image acquisition interface via the web page view component and the AR service interface respectively The communication channel between the algorithm interfaces of the AR algorithm is configured to send the image data to be processed to the AR algorithm interface for processing by the AR algorithm, and return the image data to be processed to the AR service interface for the AR service interface to be handed over to the front page. Render rendering.
步骤S210:根据图像设备接口和图像获取接口中的至少一个接口,以及,网页视图组件、AR算法的算法注册接口、AR业务接口、AR算法接口和AR业务接口之间的通信通道、和查询接口,封装生成AR业务组件。Step S210: According to at least one interface of the image device interface and the image acquisition interface, and a webpage view component, an algorithm registration interface of the AR algorithm, an AR service interface, a communication channel between the AR algorithm interface and the AR service interface, and a query interface Encapsulation generates AR business components.
本实施例中,AR业务可调用文件实现为AR业务可调用组件,如aar组件的形式。但本领域技术人员应当明了,其它可调用文件形式也同样适用。In this embodiment, the AR service callable file is implemented as an AR service callable component, such as a aar component. However, it will be apparent to those skilled in the art that other forms of callable files are equally applicable.
在一种可行方式中,可以将图像设备接口和图像获取接口中的至少一个接口,以及,AR算法的算法注册接口、网页视图组件、AR业务接口、AR算法接口和AR业务接口之间的通信通道、和查询接口进行封装,生成AR业务组件。In a feasible manner, at least one of the image device interface and the image acquisition interface, and the algorithm registration interface, the web view component, the AR service interface, the AR algorithm interface, and the AR service interface of the AR algorithm may be communicated. The channel and the query interface are encapsulated to generate an AR service component.
在另一种可行方式中,网页视图组件可以不封装进AR业务组件中,此种情况下,可以设置用于调用网页视图组件的调用接口,将图像设备接口和图像获取接口中的至少一个接口,以及,AR算法的算法注册接口、网页视图组件的调用接口、AR业务接口、AR算法接口和AR业务接口之间的通信通道、和查询接口进行封装,生成AR业务组件。In another possible manner, the webpage view component may not be encapsulated into the AR service component. In this case, a call interface for calling the webpage view component may be set, and at least one interface of the image device interface and the image acquisition interface may be set. And, the algorithm registration interface of the AR algorithm, the calling interface of the webpage view component, the AR service interface, the communication channel between the AR algorithm interface and the AR service interface, and the query interface are encapsulated to generate an AR service component.
基于上述过程实现的一种AR业务可调用文件的实例如图3所示,图3 中,AR业务可调用文件实现为一种采用WebAR框架形式的组件,也即,将WebAR框架整体封装成组件(简称为WebAR组件),让宿主App(如图3中的UC浏览器应用、淘宝应用、支付宝应用)引用。对于Android系统,封装成aar;对于iOS系统,封装成Framework。An example of an AR service callable file implemented based on the above process is shown in FIG. 3. In FIG. 3, the AR service callable file is implemented as a component in the form of a WebAR framework, that is, the WebAR framework is integrally packaged into components. (referred to as the WebAR component), let the host App (such as the UC browser application, Taobao application, Alipay application in Figure 3) reference. For Android system, packaged into aar; for iOS system, packaged into Framework.
宿主App通过引用WebAR组件中相应的AR算法注册接口(如图3中的Android Java接口和iOS OC接口)和AR算法组件中对应的算法类,将AR算法(如图3中的A算法1、A算法2、B算法)注册到WebAR组件中。其中,AR算法包括宿主App自身具有的AR算法和/或独立于宿主App的AR算法。The host App uses the corresponding AR algorithm registration interface in the WebAR component (such as the Android Java interface and the iOS OC interface in FIG. 3) and the corresponding algorithm class in the AR algorithm component, and the AR algorithm (such as the A algorithm in FIG. 3) A algorithm 2, B algorithm) is registered in the WebAR component. The AR algorithm includes an AR algorithm that the host App itself has and/or an AR algorithm that is independent of the host App.
本实例中,前端通过HTML5页面设置有AR业务1、AR业务2和AR业务3,AR业务通过JS接口(AR业务接口)实现与WebAR组件的交互。其中,JS接口(AR业务接口)通过AR环境管理类ARSession实现。ARSession是一个通过管理设备摄像头与运动处理从而提供AR功能的共享对象,其协调AR众多的处理过程,其中包括从设备运动传感器中获取数据,控制内建camera,camera获取图像的处理分析。ARSession通过综合所有的结果来建立现实空间和虚拟坐标系空间之间的联系,从而实现AR效果。In this example, the front end is provided with an AR service 1, an AR service 2, and an AR service 3 through an HTML5 page, and the AR service implements interaction with the WebAR component through a JS interface (AR service interface). The JS interface (AR service interface) is implemented by the AR environment management class ARSession. ARSession is a shared object that provides AR functions by managing device cameras and motion processing. It coordinates AR's numerous processes, including data acquisition from device motion sensors, control of built-in cameras, and camera image processing. ARSession achieves AR effects by combining all the results to establish a connection between the real space and the virtual coordinate system space.
本实例中,前端HTML5页面通过经由ARSession实现的JS接口(AR业务接口)初始化AR环境,打开摄像头和选择AR业务需要的Detector接口。HTML5页面通过JS接口(AR业务接口)获得摄像头拍摄的图像数据后,将图像数据的原始格式转换成适合绘制的格式,通过WebGL进行渲染。而Detector接口可以调用AR算法的对应能力,WebAR组件负责将通过JS接口接收的调用消息以及摄像头拍摄的图像数据传递到AR算法,再将AR算法的处理结果返回给HTML5页面。In this example, the front-end HTML5 page initializes the AR environment through the JS interface (AR service interface) implemented via ARSession, opens the camera and selects the Detector interface required for the AR service. After obtaining the image data captured by the camera through the JS interface (AR service interface), the HTML5 page converts the original format of the image data into a format suitable for drawing, and renders through WebGL. The Detector interface can call the corresponding capability of the AR algorithm. The WebAR component is responsible for transmitting the call message received through the JS interface and the image data captured by the camera to the AR algorithm, and then returning the processing result of the AR algorithm to the HTML5 page.
本实例中,每个AR算法采用独立的组件形式,所有AR算法均实现统一的接口类IDetector接口,IDetector接口中包含统一的流程接口、检测接口和回调接口,如,start()接口、pause()接口、stop()接口、resume()接口、init()接口、track()接口、onResult()接口等,这些接口在前端均有 相对应的JS(JavaScript)映射接口即Detector接口,因此前端HTML5页面看起来就像直接调用了AR算法。In this example, each AR algorithm adopts a separate component form, and all AR algorithms implement a unified interface type IDetector interface. The IDetector interface includes a unified process interface, a detection interface, and a callback interface, such as a start() interface and a pause( ) interface, stop() interface, resume() interface, init() interface, track() interface, onResult() interface, etc. These interfaces have corresponding JS (JavaScript) mapping interfaces, ie Detector interfaces, on the front end, so the front end The HTML5 page looks like the AR algorithm is called directly.
宿主App在初始化时需要向WebAR组件注册需要用到的AR算法,前端HTML5页面可以通过JS接口(查询接口)查询当前可用的AR算法,并且选择激活所需要的AR算法。WebAR组件通过JS接口(AR业务接口)的选择创建AR算法实例,但交互过程依靠IDetector完成,因此具体的AR算法实现是A算法1还是B算法,甚至是与A算法1功能一致但实现细节不同的A算法2,对WebAR组件来说都是一样的,因此可以实现AR算法的随意替换。The host App needs to register the required AR algorithm with the WebAR component during initialization. The front-end HTML5 page can query the currently available AR algorithm through the JS interface (query interface) and select the AR algorithm required for activation. The WebAR component creates an AR algorithm instance through the selection of the JS interface (AR service interface), but the interaction process is completed by the IDetector. Therefore, whether the specific AR algorithm is implemented by the A algorithm 1 or the B algorithm, or even the function of the A algorithm 1 is different, but the implementation details are different. The A algorithm 2 is the same for the WebAR component, so the random replacement of the AR algorithm can be implemented.
WebAR组件向当前被激活的AR算法实例输送摄像头数据,等待AR算法完成检测并将其返回的结果回调至JS接口(AR业务接口),进而由JS接口(AR业务接口)交由HTML5页面进行处理。The WebAR component delivers camera data to the currently activated AR algorithm instance, waits for the AR algorithm to complete the detection and returns the returned result to the JS interface (AR service interface), and then the JS interface (AR service interface) is processed by the HTML5 page. .
本实施中,对图像采集设备的控制和管理由图3中示的摄像头管理组件实现,其通过相应的接口获取并传递摄像头数据。对于Android系统,可以通过系统接口android.hardware.Camera()或android.hardware.Camera2()获取摄像头数据;对于iOS系统,可以通过系统接口UIImagePickerController()获取摄像头数据。获取到的摄像头数据,通过JS接口(AR业务接口),传递到前端HTML5页面。HTML5页面通过调用WebAR组件的JS接口(AR业务接口),实时获取摄像头当前拍摄的图像数据。同时,使用WebGL技术在着色器将输入的YUV颜色编码的流媒体数据转换为RGB格式,并绘制到Canvas画布上,以此实现摄像头画面的渲染。In this implementation, the control and management of the image acquisition device is implemented by the camera management component shown in FIG. 3, which acquires and transmits the camera data through the corresponding interface. For the Android system, the camera data can be obtained through the system interface android.hardware.Camera() or android.hardware.Camera2(); for the iOS system, the camera data can be obtained through the system interface UIImagePickerController(). The acquired camera data is passed to the front-end HTML5 page through the JS interface (AR service interface). The HTML5 page acquires the image data currently captured by the camera in real time by calling the JS interface (AR service interface) of the WebAR component. At the same time, the WebGL technology is used to convert the input YUV color-encoded streaming media data into RGB format and draw it onto the Canvas canvas to realize the rendering of the camera image.
WebAR组件通过WebView的扩展功能,扩展出用于AR业务的JS接口,从而实现向前端HTML5页面提供WebAR组件的AR扩展接口。WebAR组件为JS接口和AR算法接口搭建通信通道,使通过JS接口接收的调用消息能到达AR算法组件,AR算法组件的算法接口能通过JS接口将处理结果通知给HTML5页面。其中,对于Android系统,WebView可以作为组件内嵌于WebAR框架中;对于iOS系统,WebView需要宿主App进行设置后引用,如,宿主App 将UI WebView或者WK Webview注册到WebAR组件中。图3示出了Android系统的WebAR组件示例,其中,WebView作为组件内嵌于WebAR组件中。The WebAR component extends the JS interface for the AR service through the extension function of WebView, thereby implementing the AR extension interface of the WebAR component to the front end HTML5 page. The WebAR component establishes a communication channel for the JS interface and the AR algorithm interface, so that the call message received through the JS interface can reach the AR algorithm component, and the algorithm interface of the AR algorithm component can notify the HTML5 page of the processing result through the JS interface. For the Android system, WebView can be embedded as a component in the WebAR framework; for the iOS system, the WebView needs to be referenced by the host App. For example, the host App registers the UI WebView or WK Webview into the WebAR component. FIG. 3 shows an example of a WebAR component of the Android system in which a WebView is embedded as a component in a WebAR component.
基于图3所示WebAR组件,一种AR数据交互的过程如图4所示。由图4可见,当前端HTML5页面发起一个AR业务时,AR业务通过ARSession实现的JS接口(AR业务接口和图像设备接口)控制摄像头管理组件启动摄像头,并从Detector注册列表中查询已注册的AR算法,从中选择确定实现AR业务的AR算法,获得该AR算法的算法信息,如,IDetector接口的信息;JS接口(图像设备接口)将摄像头采集的摄像头数据传递给确定的IDetector接口,交由IDetector接口对应的AR算法进行处理后,将处理结果通过JS接口(AR业务接口)发送给前端HTML5页面,由前端HTML5页面进行进一步处理,如,渲染绘制,或基于处理结果进行虚拟对象叠加等。Based on the WebAR component shown in Figure 3, a process of AR data interaction is shown in Figure 4. As shown in Figure 4, when the current HTML5 page initiates an AR service, the AR service controls the camera management component to start the camera through the JS interface (AR service interface and image device interface) implemented by ARSession, and queries the registered AR from the Detector registration list. The algorithm selects the AR algorithm for determining the AR service, obtains the algorithm information of the AR algorithm, for example, the information of the IDetector interface; the JS interface (the image device interface) transmits the camera data collected by the camera to the determined IDetector interface, and is handed over to the IDetector interface. After the AR algorithm corresponding to the interface is processed, the processing result is sent to the front end HTML5 page through the JS interface (AR service interface), and further processed by the front end HTML5 page, for example, rendering rendering, or virtual object superposition based on the processing result.
本实例通过在WebAR组件内部与WebView进行数据交换,搭建摄像头数据传输到JS接口(AR业务接口)的数据通道,并且将WebAR组件的JS接口(AR业务接口和查询接口)与AR算法的接口进行映射绑定。JS接口(AR业务接口和查询接口)向前端提供统一的AR相关能力接口,因此前端AR业务逻辑可以随时更换;AR算法的算法注册接口用以桥接各种AR算法,因此AR算法的实现可以随时更换;整个WebAR框架作为一个组件让宿主App引用,因此不同的宿主App接入后,都可以向前端提供相同JS接口(AR业务接口和查询接口)和AR算法能力。In this example, the data is exchanged with the WebView in the WebAR component, the data transmission of the camera data is transmitted to the JS interface (AR service interface), and the JS interface (AR service interface and query interface) of the WebAR component is interfaced with the AR algorithm. Map binding. The JS interface (AR service interface and query interface) provides a unified AR related capability interface to the front end, so the front end AR service logic can be replaced at any time; the algorithm registration interface of the AR algorithm is used to bridge various AR algorithms, so the AR algorithm can be implemented at any time. Replacement; the entire WebAR framework serves as a component for the host App to reference, so after the different host App accesses, it can provide the same JS interface (AR service interface and query interface) and AR algorithm capabilities to the front end.
通过WebAR组件,让前端HTML5页面的AR业务,底层AR算法和宿主App分别只跟WebAR组件交互对接,三者间没有互相依赖。从而达到以WebAR组件为中心,AR业务,AR算法和宿主App都是可以随意独立插拔而不互相影响的状态。Through the WebAR component, the AR service of the front-end HTML5 page, the underlying AR algorithm and the host App are only interacted with the WebAR component respectively, and the three do not depend on each other. Therefore, the ARAR service, the AR algorithm, and the host App are all freely pluggable and independent of each other without being affected by each other.
例如,如果需要更换前端AR业务,只需要重新编写HTML5页面,宿主App和AR算法均保持不变,从而实现AR业务的快速上线,用户只需要访问新的HTML5页面的即可,无需更新App版本,由此解决了上线新的AR业务需要App发版升级的问题;如果需要新增AR算法,或者替换已有的AR算法, 只需要让新的算法实现IDetector接口并在WebAR组件中注册以使宿主App引用,HTML5页面就可以直接使用新的AR算法,而HTML5页面和宿主App均无需变动,由此解决了替换、新增AR算法需要App发版升级的问题;如果有AR业务需要在多个App上同时运行,那么只需要在多个目标宿主App上均接入WebAR组件,就能达到一个AR业务在多个App上运行的效果,跟正常的HTML5网页没有差异,由此解决了同一个AR业务不能在不同App上同时运行的问题。For example, if you need to replace the front-end AR service, you only need to re-write the HTML5 page, and the host App and AR algorithms remain unchanged, so that the AR service can be quickly launched. Users only need to access the new HTML5 page, and there is no need to update the App version. Therefore, the problem that the new AR service on the line needs to be upgraded by the App is solved; if the AR algorithm needs to be added or the existing AR algorithm is replaced, only the new algorithm needs to implement the IDetector interface and register in the WebAR component to make The host app reference, the HTML5 page can directly use the new AR algorithm, and the HTML5 page and the host App do not need to be changed, thereby solving the problem that the replacement, the new AR algorithm needs to be upgraded by the App; if there is an AR service needs more Simultaneously running on the App, you only need to access the WebAR component on multiple target host App, you can achieve the effect of one AR service running on multiple App, no difference with the normal HTML5 webpage, thus solving the same An issue where an AR service cannot run simultaneously on different apps.
可见,通过本实例,实现了一个可插拔的WebAR组件,让前端AR业务、具体的AR算法和宿主App可以灵活更换,从而让AR业务变更和AR算法更新无需要等待App升级,且同一个前端AR业务可以运行在多个不同的宿主App上。It can be seen that, through this example, a pluggable WebAR component is implemented, so that the front-end AR service, the specific AR algorithm, and the host application can be flexibly replaced, so that the AR service change and the AR algorithm update do not need to wait for the App upgrade, and the same Front-end AR services can run on multiple different host applications.
此外,本实例中以WebAR组件采用WEBVIEW为例,但不限于此,本领域技术人员还可以根据本发明实施例的描述,利用Weex或者RN(React Native)替代WebView实现本方案。Weex或者RN能像WEBVIEW那样解析JS语言,具体实现时只需遵从Weex或RN框架的规定即可。In addition, in this example, WEBVIEW is used as the WebAR component as an example, but is not limited thereto. Those skilled in the art may also use Weex or RN (React Native) instead of WebView to implement the solution according to the description of the embodiments of the present invention. Weex or RN can parse the JS language like WEBVIEW, and only need to follow the Weex or RN framework when implementing it.
通过本实施例,将AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道,一起封装生成AR业务可调用文件。其中,AR算法本身独立于AR业务可调用文件,其仅需向AR业务可调用文件进行注册,告知AR业务可调用文件相应的算法信息,即可供AR业务可调用文件调用。AR业务可调用文件无需了解AR算法的修改、或者增加或者删除等的具体实现,只需通过注册操作获相应算法信息即可。此外,AR业务端仅需与AR业务可调用文件进行交互即可实现相应的AR功能,AR业务端无需内嵌AR算法,也无需了解AR算法的具体实现细节。由此,当上线新的AR业务时,仅需对前端如HTML页面进行小幅度的改动即可使用新AR业务;AR业务可调用文件所在的宿主App本身也可以不具有AR算法,通过它方注册的AR算法即可实现宿主App本身的AR业务;当替换或者新增不属于宿主App本身的AR算法时,无需改动宿主App本身;并且,可以轻松地实现同一个AR业务在不同的App上同时运行。 可见,通过本发明实施例的方案,大大降低了AR的分发和部署成本。In this embodiment, the algorithm registration interface of the AR algorithm, the webpage view component that implements the webpage function, the AR service interface that implements the AR service, and the communication channel between the AR algorithm interface and the AR service interface are encapsulated and generated by the AR service. file. The AR algorithm itself is independent of the AR service callable file, and only needs to register with the AR service callable file, and informs the AR service that the corresponding algorithm information of the file can be called, that is, the AR service callable file can be called. The AR service callable file does not need to understand the modification of the AR algorithm, or the specific implementation of adding or deleting, and only needs to obtain the corresponding algorithm information through the registration operation. In addition, the AR service end only needs to interact with the AR service callable file to implement the corresponding AR function. The AR service end does not need to embed the AR algorithm, and does not need to understand the specific implementation details of the AR algorithm. Therefore, when the new AR service is launched, the new AR service can be used only by making small changes to the front end such as the HTML page; the host application itself where the AR service can call the file itself may not have the AR algorithm, and The registered AR algorithm can implement the AR service of the host App itself; when replacing or adding the AR algorithm that does not belong to the host App itself, there is no need to change the host App itself; and, the same AR service can be easily implemented on different apps. Run at the same time. It can be seen that the distribution and deployment cost of the AR is greatly reduced by the solution of the embodiment of the present invention.
本实施例的数据封装方法可以由任意适当的具有数据处理功能的设备或装置实现,包括但不限于各种终端及服务器等。The data encapsulation method of this embodiment may be implemented by any suitable device or device having data processing functions, including but not limited to various terminals and servers.
实施例三Embodiment 3
参照图5,示出了根据本发明实施例三的一种数据处理方法的步骤流程图。Referring to FIG. 5, a flow chart of steps of a data processing method according to a third embodiment of the present invention is shown.
本实施例从安装AR业务可调用文件的宿主的角度为例进行说明,其中,AR业务可调用文件采用实施例一或二中所述的AR业务可调用文件实现AR业务的数据处理,与AR业务可调用文件相关的内容均可参考前述实施例。This embodiment is described as an example of a host in which an AR service callable file is installed. The AR service callable file uses the AR service callable file described in Embodiment 1 or 2 to implement data processing of the AR service, and the AR. The contents related to the business callable file can be referred to the foregoing embodiment.
本实施例的数据处理方法包括以下步骤:The data processing method of this embodiment includes the following steps:
步骤S302:接收AR业务请求。Step S302: Receive an AR service request.
其中,AR业务请求中携带有AR业务参数,如AR业务的业务类型、AR业务的操作参数,等等。该AR业务请求可以由前端HTML5页面发起,调用WebAR组件进行处理。The AR service request carries the AR service parameters, such as the service type of the AR service, the operation parameters of the AR service, and the like. The AR service request can be initiated by the front end HTML5 page, and the WebAR component is called for processing.
步骤S304:将AR业务请求中的AR业务参数发送给AR业务可调用文件。Step S304: Send the AR service parameter in the AR service request to the AR service callable file.
其中,如实施例一或二中所述,AR业务可调用文件至少根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成。如,实施例二中的WebAR组件。The AR service callable file is generated according to at least the algorithm registration interface of the AR algorithm, the webpage view component, the AR service interface, and the communication channel encapsulation between the AR algorithm interface and the AR service interface, as described in Embodiment 1 or 2. For example, the WebAR component in the second embodiment.
当用户通过网页如HTML5页面触发AR业务,AR业务可调用文件所在宿主App或浏览器会生成相应的AR业务请求,调用AR业务可调用文件对该AR业务请求进行处理,将AR业务请求中的AR业务参数发送给AR业务可调用文件中的AR业务接口。When the user triggers the AR service through a webpage such as an HTML5 page, the host application or the browser where the AR service can invoke the file generates a corresponding AR service request, and the AR service callable file is called to process the AR service request, and the AR service request is processed. The AR service parameters are sent to the AR service interface in the AR service callable file.
步骤S306:通过AR业务可调用文件对AR业务参数进行处理,并返回处理结果。Step S306: The AR service parameters are processed by the AR service callable file, and the processing result is returned.
AR业务可调用文件被调起后,会根据AR业务参数选择适当的AR算法,并且控制图像采集设备如摄像头采集图像,将AR业务参数和图像数据发送给AR算法接口,通过AR算法接口调用AR算法根据AR业务参数对图像数据进行处理,并通过AR业务接口返回处理结果。After the AR service callable file is revoked, the AR algorithm is selected according to the AR service parameters, and the image acquisition device, such as the camera, is controlled to collect images, and the AR service parameters and image data are sent to the AR algorithm interface, and the AR algorithm interface is used to invoke the AR. The algorithm processes the image data according to the AR service parameters, and returns the processing result through the AR service interface.
步骤S308:根据处理结果进行AR业务展示。Step S308: Perform AR service presentation according to the processing result.
前端HTML5页面接收到处理结果后,会基于该处理结果进行相应的AR业务处理和展示,如,对当前图像中的人脸进行贴图等。After receiving the processing result, the front-end HTML5 page performs corresponding AR service processing and display based on the processing result, for example, mapping the face in the current image.
通过本实施例,使用封装有AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道的AR业务可调用文件,实现前端的AR业务。前端无需实现AR算法,也无需了解AR算法的实现细节,大大降低了AR的分发和部署成本。With this embodiment, an AR-enabled file can be used to register an interface, a web page view component that implements a web page function, an AR service interface that implements an AR service, and an AR service callable file of a communication channel between an AR algorithm interface and an AR service interface. To achieve front-end AR services. The front end does not need to implement the AR algorithm, and does not need to understand the implementation details of the AR algorithm, which greatly reduces the distribution and deployment cost of the AR.
本实施例的数据处理方法可以由任意适当的具有数据处理功能的设备或装置实现,包括但不限于各种终端及服务器等。The data processing method of this embodiment may be implemented by any suitable device or device having data processing functions, including but not limited to various terminals and servers.
实施例四Embodiment 4
参照图6,示出了根据本发明实施例四的一种数据处理方法的步骤流程图。Referring to Figure 6, there is shown a flow chart of the steps of a data processing method in accordance with a fourth embodiment of the present invention.
本实施例从安装AR业务可调用文件的宿主的角度为例进行说明,其中,AR业务可调用文件采用实施例一或二中所述的AR业务可调用文件实现AR业务的数据处理,与AR业务可调用文件相关的内容均可参考前述实施例。This embodiment is described as an example of a host in which an AR service callable file is installed. The AR service callable file uses the AR service callable file described in Embodiment 1 or 2 to implement data processing of the AR service, and the AR. The contents related to the business callable file can be referred to the foregoing embodiment.
本实施例的数据处理方法包括以下步骤:The data processing method of this embodiment includes the following steps:
步骤S402:接收AR算法的注册请求,通过AR业务可调用文件的算法注册接口对AR算法进行注册。Step S402: Receive a registration request of the AR algorithm, and register the AR algorithm by using an algorithm registration interface of the AR service callable file.
通过AR算法注册,AR业务可调用文件可获知AR算法的算法信息,AR算法的注册可以采用接口注册的方式。Through the AR algorithm registration, the AR service can call the file to learn the algorithm information of the AR algorithm, and the registration of the AR algorithm can adopt the interface registration method.
其中,AR业务可调用文件可以为AR业务可调用组件,如实施例二中的WebAR组件。The AR service callable file may be an AR service callable component, such as the WebAR component in the second embodiment.
步骤S404:接收AR算法查询请求,通过AR业务可调用文件的查询接口返回AR算法的算法信息。Step S404: Receive an AR algorithm query request, and return the algorithm information of the AR algorithm through the query interface of the AR service callable file.
AR算法向AR业务可调用文件进行注册后,AR业务可调用文件中保存有注册成功的AR算法的算法信息,当前端HTML5页面通过AR业务可调用文件中封装的查询接口进行AR算法查询,发送了AR算法查询请求时,AR业务可 调用文件可接收并根据该AR算法查询请求,将AR算法的算法信息返回给前端HTML5页面,后续HTML5页面可以根据实际的AR业务需求通过AR业务接口和AR算法接口调用AR算法。After the AR algorithm registers with the AR service callable file, the AR service can call the file to store the algorithm information of the successfully registered AR algorithm, and the current HTML5 page can query the AR algorithm through the query interface encapsulated in the AR service callable file, and send the AR algorithm. When the AR algorithm queries the request, the AR service callable file can receive and return the algorithm information of the AR algorithm to the front end HTML5 page according to the AR algorithm query request, and the subsequent HTML5 page can pass the AR service interface and the AR according to the actual AR service requirement. The algorithm interface calls the AR algorithm.
步骤S406:接收AR业务请求。Step S406: Receive an AR service request.
其中,AR业务请求中携带有AR业务参数,如,AR业务类型,AR操作参数等等。The AR service request carries an AR service parameter, such as an AR service type, an AR operation parameter, and the like.
步骤S408:将AR业务请求中的AR业务参数发送给AR业务可调用文件。Step S408: Send the AR service parameter in the AR service request to the AR service callable file.
如前所述,本实施例中,AR业务可调用文件采用实施例一或实施例二中的AR业务可调用文件。As described above, in the embodiment, the AR service callable file adopts the AR service callable file in the first embodiment or the second embodiment.
AR业务可调用文件的宿主App或浏览器将AR业务参数发送给AR业务可调用文件中的AR业务接口。The host application or browser of the AR service callable file sends the AR service parameters to the AR service interface in the AR service callable file.
步骤S410:通过AR业务可调用文件对AR业务参数进行处理,并返回处理结果。Step S410: The AR service parameters are processed by the AR service callable file, and the processing result is returned.
在一种可行方式中,可以通过AR业务可调用文件的AR业务接口接收AR业务参数,并根据AR业务参数确定匹配的AR算法,通过网页视图组件将AR业务参数发送给匹配的AR算法的AR算法接口进行处理,并通过AR业务接口接收AR算法接口返回的AR业务数据。In a feasible manner, the AR service parameter can be received by the AR service interface of the AR service callable file, and the matched AR algorithm is determined according to the AR service parameter, and the AR service parameter is sent to the AR of the matched AR algorithm by using the webpage view component. The algorithm interface processes and receives the AR service data returned by the AR algorithm interface through the AR service interface.
当AR业务可调用文件中封装有用于控制图像采集设备的图像设备接口,和/或,封装有用于获取图像数据的图像获取接口时,还可以在根据AR业务参数确定匹配的AR算法之后,通过AR业务可调用文件的图像设备接口,调用图像采集设备进行图像采集;和/或,通过AR业务可调用文件的图像获取接口获取静态图像或视频帧图像。此种情况下,通过网页视图组件将AR业务参数发送给匹配的AR算法的AR算法接口进行处理包括:通过网页视图组件将图像采集设备采集的或者图像获取接口获取的图像,以及AR业务参数发送给AR算法接口进行处理。When the AR service callable file encapsulates an image device interface for controlling the image capture device, and/or encapsulates an image acquisition interface for acquiring image data, it may also pass after determining the matched AR algorithm according to the AR service parameter. The AR service may invoke an image device interface of the file, invoke an image acquisition device for image collection, and/or acquire a still image or a video frame image through an image acquisition interface of the AR service callable file. In this case, the processing of the AR service parameter by the web page view component to the AR algorithm interface of the matched AR algorithm includes: sending the image acquired by the image acquisition device or the image acquisition interface through the web page view component, and sending the AR service parameter. The AR algorithm interface is processed.
步骤S412:根据所述处理结果进行AR业务展示。Step S412: Perform AR service presentation according to the processing result.
如,在接收到AR业务可调用文件通过AR业务接口返回的人脸图像中的 人脸关键点位置数据后,对图像中的人脸进行贴图处理,等等。For example, after receiving the AR service callable file, the face key position data in the face image returned by the AR service interface is subjected to texture processing on the face in the image, and the like.
通过本实施例,使用封装有AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道的AR业务可调用文件,实现前端的AR业务。前端无需实现AR算法,也无需了解AR算法的实现细节,大大降低了AR的分发和部署成本。With this embodiment, an AR-enabled file can be used to register an interface, a web page view component that implements a web page function, an AR service interface that implements an AR service, and an AR service callable file of a communication channel between an AR algorithm interface and an AR service interface. To achieve front-end AR services. The front end does not need to implement the AR algorithm, and does not need to understand the implementation details of the AR algorithm, which greatly reduces the distribution and deployment cost of the AR.
本实施例的数据处理方法可以由任意适当的具有数据处理功能的设备或装置实现,包括但不限于各种终端及服务器等。The data processing method of this embodiment may be implemented by any suitable device or device having data processing functions, including but not limited to various terminals and servers.
实施例五Embodiment 5
参照图7,示出了根据本发明实施例五的一种数据封装装置的结构框图。Referring to FIG. 7, a block diagram of a structure of a data encapsulating apparatus according to Embodiment 5 of the present invention is shown.
本实施例的数据封装装置包括:第一设置模块502,用于基于网页视图组件,设置用于注册AR算法的算法注册接口和用于与网页进行AR交互的AR业务接口;第二设置模块504,用于设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道;封装模块506,用于根据AR算法的算法注册接口、网页视图组件、AR业务接口和所述通道,封装生成AR业务可调用文件。The data encapsulating device of this embodiment includes: a first setting module 502, configured to set an algorithm registration interface for registering an AR algorithm and an AR service interface for performing AR interaction with a webpage based on a webpage view component; and a second setting module 504 And a channel for performing communication between the algorithm interface of the AR algorithm based on the web page view component and the AR service interface; the encapsulation module 506 is configured to register the interface, the webpage view component, and the AR according to the algorithm of the AR algorithm. The service interface and the channel encapsulate the AR service callable file.
可选地,本实施例的数据封装装置还包括:第三设置模块508,用于基于所述网页视图组件,设置用于控制图像采集设备的图像设备接口,和/或,设置用于获取图像数据的图像获取接口;封装模块506用于根据所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册接口、网页视图组件、AR业务接口和所述通道,封装生成AR业务可调用文件。Optionally, the data encapsulating device of this embodiment further includes: a third setting module 508, configured to set an image device interface for controlling the image capturing device based on the web page view component, and/or configured to acquire an image An image acquisition interface of the data; the encapsulation module 506 is configured to encapsulate at least one of the image device interface and the image acquisition interface, and the algorithm registration interface, the webpage view component, the AR service interface, and the channel, and the encapsulation Generate an AR business callable file.
可选地,封装模块506用于将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册接口、网页视图组件、AR业务接口和所述通道进行封装,生成AR业务可调用文件;或者,设置用于调用网页视图组件的调用接口,将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册接口、网页视图组件的调用接口、AR业务接口和所述通道进行封装,生成AR业务可调用文件。Optionally, the encapsulating module 506 is configured to encapsulate, generate, and generate, at least one of the image device interface and the image obtaining interface, and the algorithm registration interface, the webpage view component, the AR service interface, and the channel. The AR service may invoke a file; or, set a call interface for invoking a web page view component, at least one interface of the image device interface and the image acquisition interface, and the algorithm registration interface, a webpage view component call The interface, the AR service interface, and the channel are encapsulated to generate an AR service callable file.
可选地,第二设置模块504用于设置将网页视图组件通过AR业务接口接收的AR业务参数传递给注册成功的AR算法接口的通信通道。Optionally, the second setting module 504 is configured to set, by the communication channel, the AR service parameter received by the webpage view component through the AR service interface to the AR algorithm interface that is successfully registered.
可选地,第二设置模块504还用于设置经由所述网页视图组件的、用于控制图像采集设备的图像设备接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道;和/或,设置经由所述网页视图组件的、用于获取图像数据的图像获取接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道。Optionally, the second setting module 504 is further configured to set, by using the webpage view component, communication between the image device interface for controlling the image collection device and the algorithm interface of the AR service interface and the AR algorithm, respectively. a channel; and/or a communication channel between the image acquisition interface for acquiring image data via the web page view component and the algorithm interface of the AR service interface and the AR algorithm, respectively.
可选地,本实施例的数据封装装置还包括:第四设置模块510,用于设置用于获取AR算法的算法信息的查询接口,并将查询接口封装入AR业务可调用文件。Optionally, the data encapsulating device of the embodiment further includes: a fourth setting module 510, configured to set a query interface for acquiring algorithm information of the AR algorithm, and encapsulate the query interface into the AR service callable file.
可选地,AR业务可调用文件为AR业务可调用组件。Optionally, the AR service callable file is an AR service callable component.
可选地,AR算法包括多个,多个AR算法通过相同的接口类进行注册。Optionally, the AR algorithm includes multiple, and multiple AR algorithms are registered by the same interface class.
本实施例的数据封装装置用于实现前述多个方法实施例中相应的数据封装方法,并具有相应的方法实施例的有益效果,在此不再赘述。The data encapsulating device of this embodiment is used to implement the corresponding data encapsulation method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
实施例六Embodiment 6
参照图8,示出了根据本发明实施例六的一种数据处理装置的结构框图。Referring to Fig. 8, there is shown a block diagram showing the structure of a data processing apparatus according to a sixth embodiment of the present invention.
本实施例的数据处理装置包括:接收模块602,用于接收AR业务请求,其中,AR业务请求中携带有AR业务参数;发送模块604,用于将AR业务请求中的AR业务参数发送给AR业务可调用文件,其中,AR业务可调用文件根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成;处理模块606,用于通过AR业务可调用文件对AR业务参数进行处理,并返回处理结果;展示模块608,用于根据所述处理结果进行AR业务展示。The data processing apparatus of this embodiment includes: a receiving module 602, configured to receive an AR service request, where the AR service request carries an AR service parameter, and a sending module 604, configured to send the AR service parameter in the AR service request to the AR a business callable file, wherein the AR service callable file is generated according to an algorithm registration interface of the AR algorithm, a web page view component, an AR service interface, and a communication channel encapsulation between the AR algorithm interface and the AR service interface; and the processing module 606 is configured to pass The AR service can process the AR service parameters and return the processing result. The display module 608 is configured to perform the AR service display according to the processing result.
可选地,处理模块606用于通过AR业务可调用文件的AR业务接口接收AR业务参数,并根据AR业务参数确定匹配的AR算法;通过所述网页视图组件将所述AR业务参数发送给匹配的AR算法的AR算法接口进行处理,并通过 所述AR业务接口接收所述AR算法接口返回的AR业务数据。Optionally, the processing module 606 is configured to receive an AR service parameter by using an AR service interface of the AR service callable file, and determine a matched AR algorithm according to the AR service parameter; send the AR service parameter to the matching by using the webpage view component. The AR algorithm interface of the AR algorithm processes, and receives the AR service data returned by the AR algorithm interface through the AR service interface.
可选地,AR业务可调用文件中还封装有用于控制图像采集设备的图像设备接口,和/或,封装有用于获取图像数据的图像获取接口;处理模块606还用于根据所述AR业务参数确定匹配的AR算法之后,通过所述AR业务可调用文件的图像设备接口,调用图像采集设备进行图像采集;和/或,通过所述AR业务可调用文件的图像获取接口获取静态图像或视频帧图像;以及,通过所述网页视图组件将图像采集设备采集的或者图像获取接口获取的图像,以及所述AR业务参数发送给所述AR算法接口进行处理。Optionally, the AR service callable file is further encapsulated with an image device interface for controlling the image collection device, and/or an image acquisition interface for acquiring image data is encapsulated; the processing module 606 is further configured to use the AR service parameter according to the AR service parameter. After determining the matched AR algorithm, the image collection device is invoked to perform image acquisition through the image device interface of the AR service callable file; and/or, the static image or video frame is obtained through the image acquisition interface of the AR service callable file. And the image obtained by the image acquisition device or the image acquisition interface, and the AR service parameter are sent to the AR algorithm interface for processing by the webpage view component.
可选地,本实施例的数据处理装置还包括:注册模块610,用于在接收模块602接收AR业务请求之前,接收AR算法的注册请求,通过AR业务可调用文件的算法注册接口对AR算法进行注册。Optionally, the data processing apparatus of this embodiment further includes: a registration module 610, configured to: before the receiving module 602 receives the AR service request, receive a registration request of the AR algorithm, and register an interface to the AR algorithm by using an algorithm of the AR service callable file. Sign up.
可选地,AR业务可调用文件中还封装有用于获取AR算法的算法信息的查询接口;本实施例的数据处理装置还包括:查询模块612,用于在接收模块接收AR业务请求之前,接收AR算法查询请求,通过AR业务可调用文件的查询接口返回AR算法的算法信息。Optionally, the AR service callable file is further encapsulated with a query interface for acquiring the algorithm information of the AR algorithm. The data processing apparatus of the embodiment further includes: a query module 612, configured to receive the AR service request before receiving the AR service request The AR algorithm queries the request, and returns the algorithm information of the AR algorithm through the query interface of the AR service callable file.
可选地,AR业务可调用文件为AR业务可调用组件。Optionally, the AR service callable file is an AR service callable component.
本实施例的数据处理装置用于实现前述多个方法实施例中相应的数据处理方法,并具有相应的方法实施例的有益效果,在此不再赘述。The data processing apparatus of this embodiment is used to implement the corresponding data processing method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
实施例七Example 7
参照图9,示出了根据本发明实施例七的一种电子设备的结构示意图,本发明具体实施例并不对电子设备的具体实现做限定。Referring to FIG. 9, a schematic structural diagram of an electronic device according to Embodiment 7 of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
如图9所示,该电子设备可以包括:处理器(processor)702、通信接口(Communications Interface)704、存储器(memory)706、以及通信总线708。As shown in FIG. 9, the electronic device can include a processor 702, a communications interface 704, a memory 706, and a communications bus 708.
其中:among them:
处理器702、通信接口704、以及存储器706通过通信总线708完成相互间的通信。Processor 702, communication interface 704, and memory 706 complete communication with one another via communication bus 708.
通信接口704,用于与其它终端设备或服务器进行通信。The communication interface 704 is configured to communicate with other terminal devices or servers.
处理器702,用于执行程序710,具体可以执行上述数据封装方法实施例中的相关步骤。The processor 702 is configured to execute the program 710, and specifically, perform the related steps in the foregoing data encapsulation method embodiment.
具体地,程序710可以包括程序代码,该程序代码包括计算机操作指令。In particular, program 710 can include program code, the program code including computer operating instructions.
处理器702可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。终端设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 702 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the terminal device may be the same type of processor, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器706,用于存放程序710。存储器706可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 706 is configured to store the program 710. Memory 706 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
程序710具体可以用于使得处理器702执行以下操作:基于网页视图组件,设置用于注册AR算法的算法注册接口和用于与网页进行AR交互的AR业务接口;设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道;根据所述算法注册接口、网页视图组件、AR业务接口和所述通道,封装生成AR业务可调用文件。The program 710 may be specifically configured to cause the processor 702 to perform an operation of: setting an algorithm registration interface for registering an AR algorithm and an AR service interface for performing AR interaction with a webpage based on a webpage view component; setting based on the webpage view component And a channel for communicating between the algorithm interface of the AR algorithm and the AR service interface; and registering the interface, the webpage view component, the AR service interface, and the channel according to the algorithm, and encapsulating the AR service callable file.
在一种可选的实施方式中,程序710还用于使得处理器702基于所述网页视图组件,设置用于控制图像采集设备的图像设备接口;和/或,设置用于获取图像数据的图像获取接口;程序710还用于使得处理器702在根据所述算法注册接口、网页视图组件、AR业务接口和所述通道,封装生成AR业务可调用文件时,根据所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册接口、网页视图组件、AR业务接口和所述通道,封装生成AR业务可调用文件。In an optional implementation, the program 710 is further configured to enable the processor 702 to set an image device interface for controlling the image collection device based on the web page view component; and/or to set an image for acquiring image data. Obtaining an interface; the program 710 is further configured to: when the processor 702 generates an AR service callable file according to the algorithm registration interface, the webpage view component, the AR service interface, and the channel, according to the image device interface and the At least one interface in the image acquisition interface, and the algorithm registration interface, the web page view component, the AR service interface, and the channel, and the package generates an AR service callable file.
在一种可选的实施方式中,程序710还用于使得处理器702在根据所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册 接口、网页视图组件、AR业务接口和所述通道,封装生成AR业务可调用文件时,将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册接口、网页视图组件、AR业务接口和所述通道进行封装,生成AR业务可调用文件;或者,设置用于调用网页视图组件的调用接口,将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述算法注册接口、网页视图组件的调用接口、AR业务接口和所述通道进行封装,生成AR业务可调用文件。In an optional implementation, the program 710 is further configured to cause the processor 702 to perform at least one interface according to the image device interface and the image acquisition interface, and the algorithm registration interface, a webpage view component, And the at least one interface of the image device interface and the image acquisition interface, and the algorithm registration interface, the webpage view component, and the AR service interface, when the AR service interface and the channel are configured to generate an AR service callable file Encapsulating with the channel to generate an AR service callable file; or setting a call interface for calling a web page view component, at least one interface of the image device interface and the image acquisition interface, and the algorithm The registration interface, the calling interface of the webpage view component, the AR service interface, and the channel are encapsulated to generate an AR service callable file.
在一种可选的实施方式中,程序710还用于使得处理器702在设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道时,设置将网页视图组件通过AR业务接口接收的AR业务参数传递给注册成功的AR算法接口的通信通道。In an optional implementation, the program 710 is further configured to enable the processor 702 to set a channel for communication between the algorithm interface of the AR algorithm based on the web page view component and the AR service interface. The AR service parameters received by the web page view component through the AR service interface are delivered to the communication channel of the AR algorithm interface that is successfully registered.
在一种可选的实施方式中,程序710还用于使得处理器702设置经由所述网页视图组件的、用于控制图像采集设备的图像设备接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道;和/或,设置经由所述网页视图组件的、用于获取图像数据的图像获取接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道。In an optional implementation, the program 710 is further configured to enable the processor 702 to set an image device interface for controlling the image collection device via the web page view component to respectively associate with the AR service interface and the AR algorithm. a communication channel between the algorithm interfaces; and/or a communication between the image acquisition interface for acquiring image data via the web page view component and the algorithm interface of the AR service interface and the AR algorithm, respectively aisle.
在一种可选的实施方式中,程序710还用于使得处理器702设置用于获取AR算法的算法信息的查询接口,并将所述查询接口封装入所述AR业务可调用文件。In an optional implementation, the program 710 is further configured to cause the processor 702 to set a query interface for acquiring algorithm information of the AR algorithm, and encapsulate the query interface into the AR service callable file.
在一种可选的实施方式中,AR业务可调用文件为AR业务可调用组件。In an optional implementation manner, the AR service callable file is an AR service callable component.
在一种可选的实施方式中,AR算法包括多个,多个AR算法通过相同的接口类进行注册。In an optional implementation manner, the AR algorithm includes multiple, and multiple AR algorithms are registered through the same interface class.
程序710中各步骤的具体实现可以参见上述数据封装方法实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。For a specific implementation of the steps in the program 710, reference may be made to the corresponding steps in the foregoing embodiment of the data encapsulation method and the corresponding description in the unit, and details are not described herein. A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the device and the module described above may be referred to the corresponding process description in the foregoing method embodiment, and details are not described herein again.
通过本实施例的电子设备,将AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道,一起封装生成AR业务可调用文件。其中,AR算法本身独立于AR业务可调用文件,其仅需向AR业务可调用文件进行注册,告知AR业务可调用文件相应的算法信息,即可供AR业务可调用文件调用。AR业务可调用文件无需了解AR算法的修改、或者增加或者删除等的具体实现,只需通过注册操作获相应算法信息即可。此外,AR业务端仅需与AR业务可调用文件进行交互即可实现相应的AR功能,AR业务端无需内嵌AR算法,也无需了解AR算法的具体实现细节。由此,当上线新的AR业务时,仅需对前端如HTML页面进行小幅度的改动即可使用新AR业务;AR业务可调用文件所在的宿主App本身也可以不具有AR算法,通过它方注册的AR算法即可实现宿主App本身的AR业务;当替换或者新增不属于宿主App本身的AR算法时,无需改动宿主App本身;并且,可以轻松地实现同一个AR业务在不同的App上同时运行。可见,通过本发明实施例的方案,大大降低了AR的分发和部署成本。With the electronic device of the embodiment, the algorithm registration interface of the AR algorithm, the webpage view component that implements the webpage function, the AR service interface that implements the AR service, and the communication channel between the AR algorithm interface and the AR service interface are encapsulated and generated into an AR. Business callable files. The AR algorithm itself is independent of the AR service callable file, and only needs to register with the AR service callable file, and informs the AR service that the corresponding algorithm information of the file can be called, that is, the AR service callable file can be called. The AR service callable file does not need to understand the modification of the AR algorithm, or the specific implementation of adding or deleting, and only needs to obtain the corresponding algorithm information through the registration operation. In addition, the AR service end only needs to interact with the AR service callable file to implement the corresponding AR function. The AR service end does not need to embed the AR algorithm, and does not need to understand the specific implementation details of the AR algorithm. Therefore, when the new AR service is launched, the new AR service can be used only by making small changes to the front end such as the HTML page; the host application itself where the AR service can call the file itself may not have the AR algorithm, and The registered AR algorithm can implement the AR service of the host App itself; when replacing or adding the AR algorithm that does not belong to the host App itself, there is no need to change the host App itself; and, the same AR service can be easily implemented on different apps. Run at the same time. It can be seen that the distribution and deployment cost of the AR is greatly reduced by the solution of the embodiment of the present invention.
实施例八Example eight
参照图10,示出了根据本发明实施例七的一种电子设备的结构示意图,本发明具体实施例并不对电子设备的具体实现做限定。Referring to FIG. 10, a schematic structural diagram of an electronic device according to Embodiment 7 of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
如图10所示,该电子设备可以包括:处理器(processor)802、通信接口(Communications Interface)804、存储器(memory)806、以及通信总线808。As shown in FIG. 10, the electronic device can include a processor 802, a communications interface 804, a memory 806, and a communications bus 808.
其中:among them:
处理器802、通信接口804、以及存储器806通过通信总线808完成相互间的通信。Processor 802, communication interface 804, and memory 806 complete communication with one another via communication bus 808.
通信接口804,用于与其它终端设备或服务器进行通信。The communication interface 804 is configured to communicate with other terminal devices or servers.
处理器802,用于执行程序810,具体可以执行上述数据处理方法实施 例中的相关步骤。The processor 802 is configured to execute the program 810, and specifically may perform the related steps in the foregoing data processing method embodiment.
具体地,程序810可以包括程序代码,该程序代码包括计算机操作指令。In particular, program 810 can include program code, the program code including computer operating instructions.
处理器802可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。终端设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 802 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the terminal device may be the same type of processor, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器806,用于存放程序810。存储器806可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 806 is configured to store the program 810. Memory 806 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
程序810具体可以用于使得处理器802执行以下操作:接收AR业务请求,其中,AR业务请求中携带有AR业务参数;将AR业务请求中的AR业务参数发送给AR业务可调用文件,其中,AR业务可调用文件根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成;通过AR业务可调用文件对AR业务参数进行处理,并返回处理结果;根据所述处理结果进行AR业务展示。The program 810 is specifically configured to enable the processor 802 to perform the following operations: receiving an AR service request, where the AR service request carries an AR service parameter, and the AR service parameter in the AR service request is sent to the AR service callable file, where The AR service callable file is generated according to the algorithm registration interface of the AR algorithm, the webpage view component, the AR service interface, and the communication channel between the AR algorithm interface and the AR service interface; the AR service callable file is used to process the AR service parameters, and Returning the processing result; performing AR service display according to the processing result.
在一种可选的实施方式中,程序810还用于使得处理器802在通过AR业务可调用文件对所述AR业务参数进行处理,并返回处理结果时,通过AR业务可调用文件的AR业务接口接收AR业务参数,并根据AR业务参数确定匹配的AR算法;通过所述网页视图组件将所述AR业务参数发送给匹配的AR算法的AR算法接口进行处理,并通过所述AR业务接口接收所述AR算法接口返回的AR业务数据。In an optional implementation manner, the program 810 is further configured to: when the processor 802 processes the AR service parameter by using an AR service callable file, and returns a processing result, the AR service of the file can be invoked through the AR service. The interface receives the AR service parameter, and determines the matched AR algorithm according to the AR service parameter. The AR service parameter is sent to the AR algorithm interface of the matched AR algorithm for processing by the webpage view component, and is received by the AR service interface. The AR service data returned by the AR algorithm interface.
在一种可选的实施方式中,AR业务可调用文件中还封装有用于控制图像采集设备的图像设备接口,和/或,封装有用于获取图像数据的图像获取接口;程序810还用于使得处理器802在根据所述AR业务参数确定匹配的AR算法之后,通过AR业务可调用文件的图像设备接口,调用图像采集设备进行 图像采集;和/或,通过所述AR业务可调用文件的图像获取接口获取静态图像或视频帧图像;程序810还用于使得处理器802在通过所述网页视图组件将所述AR业务参数发送给匹配的AR算法的AR算法接口进行处理时,通过所述网页视图组件将图像采集设备采集的或者图像获取接口获取的图像,以及所述AR业务参数发送给所述AR算法接口进行处理。In an optional implementation, the AR service callable file is further encapsulated with an image device interface for controlling the image capture device, and/or encapsulated with an image acquisition interface for acquiring image data; the program 810 is further configured to enable After determining the matched AR algorithm according to the AR service parameter, the processor 802 invokes the image collection device to perform image collection through the image device interface of the AR service callable file; and/or, through the AR service, the image of the file can be called. Obtaining an interface to obtain a still image or a video frame image; the program 810 is further configured to cause the processor 802 to pass the webpage when the AR service parameter is sent by the webpage view component to the AR algorithm interface of the matched AR algorithm The view component sends the image acquired by the image acquisition device or acquired by the image acquisition interface, and the AR service parameter to the AR algorithm interface for processing.
在一种可选的实施方式中,程序810还用于使得处理器802在接收AR业务请求之前,接收AR算法的注册请求,通过AR业务可调用文件的算法注册接口对AR算法进行注册。In an optional implementation manner, the program 810 is further configured to enable the processor 802 to receive a registration request of the AR algorithm before receiving the AR service request, and register the AR algorithm by using an algorithm registration interface of the AR service callable file.
在一种可选的实施方式中,AR业务可调用文件中还封装有用于获取AR算法的算法信息的查询接口;程序810还用于使得处理器802在接收AR业务请求之前,接收AR算法查询请求,通过AR业务可调用文件的查询接口返回AR算法的算法信息。In an optional implementation manner, the AR service callable file is further encapsulated with a query interface for acquiring algorithm information of the AR algorithm; the program 810 is further configured to enable the processor 802 to receive the AR algorithm query before receiving the AR service request. The request returns the algorithm information of the AR algorithm through the query interface of the AR service callable file.
在一种可选的实施方式中,AR业务可调用文件为AR业务可调用组件。In an optional implementation manner, the AR service callable file is an AR service callable component.
程序810中各步骤的具体实现可以参见上述数据处理方法实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。For a specific implementation of the steps in the program 810, reference may be made to the corresponding steps in the foregoing data processing method embodiment and the corresponding description in the unit, and details are not described herein. A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the device and the module described above may be referred to the corresponding process description in the foregoing method embodiment, and details are not described herein again.
通过本实施例的电子设备,使用封装有AR算法的算法注册接口、实现网页功能的网页视图组件、实现AR业务的AR业务接口,以及AR算法接口和AR业务接口之间的通信通道的AR业务可调用文件,实现前端的AR业务。前端无需实现AR算法,也无需了解AR算法的实现细节,大大降低了AR分发和部署成本。With the electronic device of the embodiment, an algorithm encapsulation interface encapsulating the AR algorithm, a web page view component implementing the webpage function, an AR service interface implementing the AR service, and an AR service of the communication channel between the AR algorithm interface and the AR service interface are used. The file can be called to implement the AR service of the front end. The front end does not need to implement the AR algorithm, and does not need to understand the implementation details of the AR algorithm, which greatly reduces the AR distribution and deployment costs.
需要指出,根据实施的需要,可将本发明实施例中描述的各个部件/步骤拆分为更多部件/步骤,也可将两个或多个部件/步骤或者部件/步骤的部分操作组合成新的部件/步骤,以实现本发明实施例的目的。It should be noted that the various components/steps described in the embodiments of the present invention may be split into more components/steps according to the needs of the implementation, or two or more components/steps or partial operations of the components/steps may be combined into one. New components/steps to achieve the objectives of embodiments of the present invention.
上述根据本发明实施例的方法可在硬件、固件中实现,或者被实现为可 存储在记录介质(诸如CD ROM、RAM、软盘、硬盘或磁光盘)中的软件或计算机代码,或者被实现通过网络下载的原始存储在远程记录介质或非暂时机器可读介质中并将被存储在本地记录介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件(诸如ASIC或FPGA)的记录介质上的这样的软件处理。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件(例如,RAM、ROM、闪存等),当所述软件或计算机代码被计算机、处理器或硬件访问且执行时,实现在此描述的方法。此外,当通用计算机访问用于实现在此示出的方法的代码时,代码的执行将通用计算机转换为用于执行在此示出的方法的专用计算机。The above method according to an embodiment of the present invention may be implemented in hardware, firmware, or implemented as software or computer code that may be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or implemented by The network downloads computer code originally stored in a remote recording medium or non-transitory machine readable medium and stored in a local recording medium so that the methods described herein can be stored using a general purpose computer, a dedicated processor or programmable Such software processing on a recording medium of dedicated hardware such as an ASIC or an FPGA. It will be understood that a computer, processor, microprocessor controller or programmable hardware includes storage components (eg, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is The methods described herein are implemented when the processor or hardware is accessed and executed. Moreover, when a general purpose computer accesses code for implementing the methods shown herein, the execution of the code transforms the general purpose computer into a special purpose computer for performing the methods illustrated herein.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及方法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明实施例的范围。Those of ordinary skill in the art will appreciate that the elements and method steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the embodiments of the invention.
以上实施方式仅用于说明本发明实施例,而并非对本发明实施例的限制,有关技术领域的普通技术人员,在不脱离本发明实施例的精神和范围的情况下,还可以做出各种变化和变型,因此所有等同的技术方案也属于本发明实施例的范畴,本发明实施例的专利保护范围应由权利要求限定。The above embodiments are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention, and those skilled in the art can also make various kinds without departing from the spirit and scope of the embodiments of the present invention. Variations and modifications, therefore, all equivalent technical solutions are also within the scope of the embodiments of the present invention, and the scope of patent protection of the embodiments of the present invention should be defined by the claims.

Claims (31)

  1. 一种数据封装方法,包括:A data encapsulation method, including:
    基于网页视图组件,设置用于注册增强现实AR算法的算法注册接口和用于与网页进行AR交互的AR业务接口;An algorithm registration interface for registering an augmented reality AR algorithm and an AR service interface for performing AR interaction with a webpage are set based on a webpage view component;
    设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道;Setting a channel for communicating between the algorithm interface of the AR algorithm successfully registered based on the web page view component and the AR service interface;
    根据所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道,封装生成AR业务可调用文件。Encapsulating and generating an AR service callable file according to the webpage view component, the algorithm registration interface, the AR service interface, and the channel.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述方法还包括:基于所述网页视图组件,设置用于控制图像采集设备的图像设备接口;和/或,设置用于获取图像数据的图像获取接口;The method further includes: setting an image device interface for controlling the image capture device based on the web page view component; and/or setting an image acquisition interface for acquiring image data;
    所述根据所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道,封装生成AR业务可调用文件,包括:And generating, according to the webpage view component, the algorithm registration interface, the AR service interface, and the channel, an AR service callable file, including:
    根据所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道,封装生成AR业务可调用文件。And encapsulating an AR service callable file according to at least one of the image device interface and the image acquisition interface, and the webpage view component, the algorithm registration interface, the AR service interface, and the channel.
  3. 根据权利要求2所述的方法,其中,根据所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道,封装生成AR业务可调用文件,包括:The method of claim 2, wherein at least one of the image device interface and the image acquisition interface, and the web page view component, the algorithm registration interface, the AR service interface, and the The channel, the package generates an AR service callable file, including:
    将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道进行封装,生成AR业务可调用文件;或者,Encapsulating at least one of the image device interface and the image acquisition interface, and the web page view component, the algorithm registration interface, the AR service interface, and the channel to generate an AR service callable file ;or,
    设置用于调用所述网页视图组件的调用接口,将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件的调用接口、所述算法注册接口、所述AR业务接口和所述通道进行封装,生成AR业务可调用文件。Setting a call interface for invoking the webpage view component, at least one interface of the image device interface and the image acquisition interface, and a call interface of the webpage view component, the algorithm registration interface, the The AR service interface and the channel are encapsulated to generate an AR service callable file.
  4. 根据权利要求1-3中任一项所述的方法,其中,所述设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道,包括:The method according to any one of claims 1-3, wherein the setting is based on a channel between the algorithm interface of the successfully registered AR algorithm and the AR service interface based on the web page view component, including:
    设置将网页视图组件通过AR业务接口接收的AR业务参数传递给注册成功的AR算法接口的通信通道。The AR service parameter received by the webpage view component through the AR service interface is set to be transmitted to the communication channel of the successfully registered AR algorithm interface.
  5. 根据权利要求4所述的方法,其中,所述方法还包括:The method of claim 4 wherein the method further comprises:
    设置经由所述网页视图组件的、用于控制图像采集设备的图像设备接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道;和/或,Providing, by the web page view component, a communication channel between the image device interface for controlling the image capture device and the algorithm interface of the AR service interface and the AR algorithm; and/or
    设置经由所述网页视图组件的、用于获取图像数据的图像获取接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道。And a communication channel between the image acquisition interface for acquiring image data via the web page view component and the algorithm interface of the AR service interface and the AR algorithm, respectively.
  6. 根据权利要求1-3中任一项所述的方法,其中,所述方法还包括:The method of any of claims 1-3, wherein the method further comprises:
    设置用于获取所述AR算法的算法信息的查询接口,并将所述查询接口封装入所述AR业务可调用文件。And a query interface for acquiring algorithm information of the AR algorithm, and encapsulating the query interface into the AR service callable file.
  7. 根据权利要求1-3中任一项所述的方法,其中,所述AR业务可调用文件为AR业务可调用组件。The method of any of claims 1-3, wherein the AR service callable file is an AR service callable component.
  8. 根据权利要求1-3中任一项所述的方法,其中,所述AR算法包括多个,多个所述AR算法通过相同的接口类进行注册。The method according to any one of claims 1 to 3, wherein the AR algorithm comprises a plurality of, and the plurality of the AR algorithms are registered by the same interface class.
  9. 一种数据处理方法,包括:A data processing method comprising:
    接收增强现实AR业务请求,其中,所述AR业务请求中携带有AR业务参数;Receiving an augmented reality AR service request, where the AR service request carries an AR service parameter;
    将所述AR业务请求中的AR业务参数发送给AR业务可调用文件,其中,所述AR业务可调用文件根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成;Sending the AR service parameter in the AR service request to the AR service callable file, where the AR service callable file is registered according to the algorithm of the AR algorithm, the webpage view component, the AR service interface, the AR algorithm interface, and the AR service. Communication channel encapsulation between interfaces is generated;
    通过所述AR业务可调用文件对所述AR业务参数进行处理,并返回处理结果;Processing, by the AR service callable file, the AR service parameter, and returning a processing result;
    根据所述处理结果进行AR业务展示。The AR service is displayed according to the processing result.
  10. 根据权利要求9所述的方法,其中,所述通过所述AR业务可调用文件对所述AR业务参数进行处理,并返回处理结果,包括:The method according to claim 9, wherein the processing of the AR service parameters by the AR service callable file and returning the processing result comprises:
    通过所述AR业务可调用文件的AR业务接口接收所述AR业务参数,并根据所述AR业务参数确定匹配的AR算法;Receiving, by the AR service interface of the AR service callable file, the AR service parameter, and determining a matched AR algorithm according to the AR service parameter;
    通过所述网页视图组件将所述AR业务参数发送给匹配的AR算法的AR算法接口进行处理,并通过所述AR业务接口接收所述AR算法接口返回的AR业务数据。The AR service parameter is sent to the AR algorithm interface of the matched AR algorithm for processing by the webpage view component, and the AR service data returned by the AR algorithm interface is received by the AR service interface.
  11. 根据权利要求10所述的方法,其中,所述AR业务可调用文件中还封装有用于控制图像采集设备的图像设备接口,和/或,封装有用于获取图像数据的图像获取接口;The method according to claim 10, wherein the AR service callable file is further encapsulated with an image device interface for controlling the image capture device, and/or encapsulated with an image acquisition interface for acquiring image data;
    在所述根据所述AR业务参数确定匹配的AR算法之后,所述方法还包括:After the determining the matched AR algorithm according to the AR service parameter, the method further includes:
    通过所述AR业务可调用文件的图像设备接口,调用图像采集设备进行图像采集;和/或,通过所述AR业务可调用文件的图像获取接口获取静态图像或视频帧图像;And acquiring, by the image device interface of the AR service callable file, an image collection device to perform image collection; and/or acquiring a still image or a video frame image by using an image acquisition interface of the AR service callable file;
    所述通过所述网页视图组件将所述AR业务参数发送给匹配的AR算法的AR算法接口进行处理,包括:通过所述网页视图组件将图像采集设备采集的或者图像获取接口获取的图像,以及所述AR业务参数发送给所述AR算法接口进行处理。The processing, by the webpage view component, sending the AR service parameter to the AR algorithm interface of the matched AR algorithm, including: acquiring, by the webpage view component, an image acquired by the image acquisition device or acquired by the image acquisition interface, and The AR service parameters are sent to the AR algorithm interface for processing.
  12. 根据权利要求9-1中1任一项所述的方法,其中,在所述接收增强现实AR业务请求之前,所述方法还包括:The method of any of claims 9-1, wherein before the receiving the augmented reality AR service request, the method further comprises:
    接收AR算法的注册请求,通过所述AR业务可调用文件的算法注册接口对所述AR算法进行注册。Receiving a registration request of the AR algorithm, registering the AR algorithm by using an algorithm registration interface of the AR service callable file.
  13. 根据权利要求9-11中任一项所述的方法,其中,所述AR业务可调用文件中还封装有用于获取AR算法的算法信息的查询接口;The method according to any one of claims 9-11, wherein the AR service callable file is further encapsulated with a query interface for acquiring algorithm information of the AR algorithm;
    在所述接收增强现实AR业务请求之前,所述方法还包括:Before the receiving the augmented reality AR service request, the method further includes:
    接收AR算法查询请求,通过所述AR业务可调用文件的查询接口返回AR算法的算法信息。The AR algorithm query request is received, and the algorithm information of the AR algorithm is returned through the query interface of the AR service callable file.
  14. 根据权利要求9-11中任一项所述的方法,其中,所述AR业务可调用文件为AR业务可调用组件。The method of any of claims 9-11, wherein the AR service callable file is an AR service callable component.
  15. 一种数据封装装置,包括:A data encapsulating device comprising:
    第一设置模块,用于基于网页视图组件,设置用于注册增强现实AR算法的算法注册接口和用于与网页进行AR交互的AR业务接口;a first setting module, configured to: according to a webpage view component, an algorithm registration interface for registering an augmented reality AR algorithm and an AR service interface for performing AR interaction with a webpage;
    第二设置模块,用于设置基于所述网页视图组件的、注册成功的AR算法的算法接口和AR业务接口之间进行通信的通道;a second setting module, configured to set a channel for performing communication between the algorithm interface of the AR algorithm based on the webpage view component and the AR service interface;
    封装模块,用于根据所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道,封装生成AR业务可调用文件。And an encapsulating module, configured to generate an AR service callable file according to the webpage view component, the algorithm registration interface, the AR service interface, and the channel.
  16. 根据权利要求15所述的装置,其中,The device according to claim 15, wherein
    所述装置还包括:第三设置模块,用于基于所述网页视图组件,设置用于控制图像采集设备的图像设备接口,和/或,设置用于获取图像数据的图像获取接口;The device further includes: a third setting module, configured to set an image device interface for controlling the image capturing device based on the webpage view component, and/or an image acquiring interface for acquiring image data;
    所述封装模块,用于根据所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道,封装生成AR业务可调用文件。The encapsulating module is configured to: according to at least one interface of the image device interface and the image obtaining interface, and the webpage view component, the algorithm registration interface, the AR service interface, and the channel, and the encapsulation Generate an AR business callable file.
  17. 根据权利要求16所述的装置,其中,所述封装模块,用于将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件、所述算法注册接口、所述AR业务接口和所述通道进行封装,生成AR业务可调用文件;或者,设置用于调用所述网页视图组件的调用接口,将所述图像设备接口和所述图像获取接口中的至少一个接口,以及,所述网页视图组件的调用接口、所述算法注册接口、所述AR业务接口和所述通道进行封装,生成AR业务可调用文件。The apparatus according to claim 16, wherein the encapsulating module is configured to interface at least one of the image device interface and the image acquisition interface, and the webpage view component, the algorithm registration interface, Encapsulating the AR service interface and the channel to generate an AR service callable file; or setting a call interface for calling the webpage view component, and at least one of the image device interface and the image acquisition interface The interface, and the calling interface of the webpage view component, the algorithm registration interface, the AR service interface, and the channel are encapsulated to generate an AR service callable file.
  18. 根据权利要求15-17中任一项所述的装置,其中,所述第二设置模块,用于设置将网页视图组件通过AR业务接口接收的AR业务参数传递给注册成功的AR算法接口的通信通道。The device according to any one of claims 15-17, wherein the second setting module is configured to set a communication of the AR service parameter received by the webpage view component through the AR service interface to the AR algorithm interface with successful registration. aisle.
  19. 根据权利要求15-17中任一项所述的装置,其中,所述第二设置模块,还用于设置经由所述网页视图组件的、用于控制图像采集设备的图像设备接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道;和/或,设置经由所述网页视图组件的、用于获取图像数据的图像获取接口分别与所述AR业务接口和所述AR算法的算法接口之间的通信通道。The device according to any one of claims 15-17, wherein the second setting module is further configured to set an image device interface for controlling an image capturing device via the webpage view component and the a communication channel between the AR service interface and the algorithm interface of the AR algorithm; and/or an image acquisition interface for acquiring image data via the web page view component, respectively, and the AR service interface and the AR The communication channel between the algorithm's algorithm interfaces.
  20. 根据权利要求15-17中任一项所述的装置,其中,所述装置还包括:The device of any of claims 15-17, wherein the device further comprises:
    第四设置模块,用于设置用于获取所述AR算法的算法信息的查询接口,并将所述查询接口封装入所述AR业务可调用文件。And a fourth setting module, configured to set a query interface for acquiring algorithm information of the AR algorithm, and encapsulate the query interface into the AR service callable file.
  21. 根据权利要求15-17中任一项所述的装置,其中,所述AR业务可调用文件为AR业务可调用组件。The apparatus of any of claims 15-17, wherein the AR service callable file is an AR service callable component.
  22. 根据权利要求15-17中任一项所述的装置,其中,所述AR算法包括多个,多个所述AR算法通过相同的接口类进行注册。The apparatus according to any one of claims 15-17, wherein the AR algorithm comprises a plurality of, and the plurality of the AR algorithms are registered by the same interface class.
  23. 一种数据处理装置,包括:A data processing device comprising:
    接收模块,用于接收增强现实AR业务请求,其中,所述AR业务请求中携带有AR业务参数;a receiving module, configured to receive an augmented reality AR service request, where the AR service request carries an AR service parameter;
    发送模块,用于将所述AR业务请求中的AR业务参数发送给AR业务可调用文件,其中,所述AR业务可调用文件根据AR算法的算法注册接口、网页视图组件、AR业务接口和AR算法接口与AR业务接口之间的通信通道封装生成;a sending module, configured to send an AR service parameter in the AR service request to an AR service callable file, where the AR service callable file is registered according to an algorithm of an AR algorithm, a webpage view component, an AR service interface, and an AR The communication channel encapsulation between the algorithm interface and the AR service interface is generated;
    处理模块,用于通过所述AR业务可调用文件对所述AR业务参数进行处理,并返回处理结果;a processing module, configured to process the AR service parameter by using the AR service callable file, and return a processing result;
    展示模块,用于根据所述处理结果进行AR业务展示。And a display module, configured to perform AR service display according to the processing result.
  24. 根据权利要求23所述的装置,其中,所述处理模块,用于通过所述AR业务可调用文件的AR业务接口接收所述AR业务参数,并根据所述AR业务参数确定匹配的AR算法;通过所述网页视图组件将所述AR业务参数发送给匹配的AR算法的AR算法接口进行处理,并通过所述AR业务接口接收所述AR算法接口返回的AR业务数据。The apparatus according to claim 23, wherein the processing module is configured to receive the AR service parameter by using an AR service interface of the AR service callable file, and determine a matched AR algorithm according to the AR service parameter; The AR service parameter is sent to the AR algorithm interface of the matched AR algorithm for processing by the webpage view component, and the AR service data returned by the AR algorithm interface is received by the AR service interface.
  25. 根据权利要求24所述的装置,其中,所述AR业务可调用文件中还封装有用于控制图像采集设备的图像设备接口,和/或,封装有用于获取图像数据的图像获取接口;The apparatus according to claim 24, wherein said AR service callable file is further encapsulated with an image device interface for controlling an image capture device, and/or encapsulated with an image acquisition interface for acquiring image data;
    所述处理模块,还用于在所述根据所述AR业务参数确定匹配的AR算法之后,通过所述AR业务可调用文件的图像设备接口,调用图像采集设备进行图像采集;和/或,通过所述AR业务可调用文件的图像获取接口获取静态图像或视频帧图像;以及,通过所述网页视图组件将图像采集设备采集的或者图像获取接口获取的图像,以及所述AR业务参数发送给所述AR算法接口进行处理。The processing module is further configured to: after the determining the matched AR algorithm according to the AR service parameter, invoke an image collection device to perform image collection by using an image device interface of the AR service callable file; and/or Obtaining a static image or a video frame image by the image acquisition interface of the AR service callable file; and sending, by the webpage view component, the image acquired by the image acquisition device or the image acquisition interface, and the AR service parameter to the The AR algorithm interface is processed.
  26. 根据权利要求23-25中任一项所述的装置,其中,所述装置还包括:The device of any of claims 23-25, wherein the device further comprises:
    注册模块,用于在所述接收模块接收增强现实AR业务请求之前,接收AR算法的注册请求,通过所述AR业务可调用文件的算法注册接口对所述AR算法进行注册。And a registration module, configured to receive a registration request of the AR algorithm before the receiving module receives the augmented reality AR service request, and register the AR algorithm by using an algorithm registration interface of the AR service callable file.
  27. 根据权利要求23-25中任一项所述的装置,其中,所述AR业务可调用文件中还封装有用于获取AR算法的算法信息的查询接口;The apparatus according to any one of claims 23-25, wherein the AR service callable file is further encapsulated with a query interface for acquiring algorithm information of the AR algorithm;
    所述装置还包括:查询模块,用于在所述接收模块接收增强现实AR业务请求之前,接收AR算法查询请求,通过所述AR业务可调用文件的查询接口返回AR算法的算法信息。The device further includes: a querying module, configured to: before the receiving module receives the augmented reality AR service request, receive an AR algorithm query request, and return the algorithm information of the AR algorithm by using the query interface of the AR service callable file.
  28. 根据权利要求23-25中任一项所述的装置,其中,所述AR业务可调用文件为AR业务可调用组件。The apparatus of any of claims 23-25, wherein the AR service callable file is an AR service callable component.
  29. 一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;An electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete communication with each other through the communication bus;
    所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如权利要求1-8任一项所述的数据封装方法对应的操作。The memory is configured to store at least one executable instruction that causes the processor to perform operations corresponding to the data encapsulation method of any of claims 1-8.
  30. 一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;An electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete communication with each other through the communication bus;
    所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如权利要求9-14任一项所述的数据处理方法对应的操作。The memory is configured to store at least one executable instruction that causes the processor to perform operations corresponding to the data processing method of any of claims 9-14.
  31. 一种非暂时性机器可读存储介质,其上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求1-8、9-14中任一项所述的方法。A non-transitory machine readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to perform as claimed in claims 1-8, 9-14 The method of any of the preceding claims.
PCT/CN2018/104184 2017-11-30 2018-09-05 Data encapsulating method and apparatus, data processing device and apparatus, and electronic device WO2019105093A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711241821.4 2017-11-30
CN201711241821.4A CN107861754B (en) 2017-11-30 2017-11-30 Data packaging method, data processing method, data packaging device, data processing device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2019105093A1 true WO2019105093A1 (en) 2019-06-06

Family

ID=61704283

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104184 WO2019105093A1 (en) 2017-11-30 2018-09-05 Data encapsulating method and apparatus, data processing device and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN107861754B (en)
WO (1) WO2019105093A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860982A (en) * 2019-11-27 2021-05-28 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer storage medium
CN112860982B (en) * 2019-11-27 2024-05-10 阿里巴巴集团控股有限公司 Data processing method, device, electronic equipment and computer storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861754B (en) * 2017-11-30 2020-12-01 阿里巴巴(中国)有限公司 Data packaging method, data processing method, data packaging device, data processing device and electronic equipment
CN109325756A (en) * 2018-08-03 2019-02-12 上海小渔数据科技有限公司 Data processing method and device, server for data algorithm transaction
CN111427529B (en) * 2019-01-09 2023-05-30 斑马智行网络(香港)有限公司 Interaction method, device, equipment and storage medium
CN110505273B (en) * 2019-07-12 2022-04-22 苏州浪潮智能科技有限公司 Service capability limitation using method, device and readable medium
WO2023092292A1 (en) * 2021-11-23 2023-06-01 京东方科技集团股份有限公司 Communication method for flutter web application and host program, and computer device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577931A (en) * 2013-10-28 2014-02-12 北京邮电大学 Reusable-software-service management system based on semanteme and implementation method thereof
CN106201161A (en) * 2014-09-23 2016-12-07 北京三星通信技术研究有限公司 The display packing of electronic equipment and system
US20170090589A1 (en) * 2015-09-28 2017-03-30 Wand Labs, Inc. Unified virtual reality platform
CN107305435A (en) * 2016-04-18 2017-10-31 迪斯尼企业公司 Linked between augmented reality and reality environment and interactive system and method
CN107861754A (en) * 2017-11-30 2018-03-30 广州市动景计算机科技有限公司 Data encapsulation, processing method, device and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006012678A1 (en) * 2004-08-03 2006-02-09 Silverbrook Research Pty Ltd Walk-up printing
CN100481002C (en) * 2007-04-18 2009-04-22 杭州华三通信技术有限公司 Web interface extending method and device
CN103679800B (en) * 2013-11-21 2017-09-01 北京航空航天大学 A kind of video image virtual scene generation system and its framework building method
CN105338117B (en) * 2015-11-27 2018-05-29 亮风台(上海)信息科技有限公司 For generating AR applications and method, equipment and the system of AR examples being presented
CN106412082B (en) * 2016-10-31 2019-04-26 东北大学 A kind of fused magnesite fusion process mobile monitoring system based on cloud and method
CN106951233B (en) * 2017-03-02 2020-04-17 广州天高软件科技有限公司 Mixed-mode smart phone application development framework system
CN107391201B (en) * 2017-07-27 2020-03-27 艾迪森海安数字医疗装备有限公司 Data flow realization method of software framework of dynamic service data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577931A (en) * 2013-10-28 2014-02-12 北京邮电大学 Reusable-software-service management system based on semanteme and implementation method thereof
CN106201161A (en) * 2014-09-23 2016-12-07 北京三星通信技术研究有限公司 The display packing of electronic equipment and system
US20170090589A1 (en) * 2015-09-28 2017-03-30 Wand Labs, Inc. Unified virtual reality platform
CN107305435A (en) * 2016-04-18 2017-10-31 迪斯尼企业公司 Linked between augmented reality and reality environment and interactive system and method
CN107861754A (en) * 2017-11-30 2018-03-30 广州市动景计算机科技有限公司 Data encapsulation, processing method, device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LU , PING: "Research on Key Technology of Image Processing in Mobile Augmented Reality and its Application", CHINA DOCTORAL DISSERTATIONS FULL-TEXT DATABASE (ELECTRONIC JOURNALS, 15 May 2016 (2016-05-15), ISSN: 1674-022X *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860982A (en) * 2019-11-27 2021-05-28 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer storage medium
CN112860982B (en) * 2019-11-27 2024-05-10 阿里巴巴集团控股有限公司 Data processing method, device, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN107861754A (en) 2018-03-30
CN107861754B (en) 2020-12-01

Similar Documents

Publication Publication Date Title
WO2019105093A1 (en) Data encapsulating method and apparatus, data processing device and apparatus, and electronic device
CN108563517B (en) Calling method and device of system interface
WO2018050003A1 (en) 3d canvas web page element rendering method and apparatus, and electronic device
US20220007083A1 (en) Method and stream-pushing client for processing live stream in webrtc
US11864248B2 (en) Application function implementation method and electronic device
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
EP2854348B1 (en) Interface display method and system of home gateway applicable to multiple display types
CN110874217B (en) Interface display method and device for quick application and storage medium
CN110096370B (en) Control inversion component service model for virtual environments
US11210119B2 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN103430123A (en) Methods and systems for conducting a remote desktop session via HTML that supports a 2D canvas and dynamic drawing
CN103430164A (en) Methods and systems for remote desktop session redrawing via HTTP headers
US20140201619A1 (en) Method And Device For Implementing Local Operation On Web Page
CN112527174B (en) Information processing method and electronic equipment
CN113032080A (en) Page implementation method, application program, electronic device and storage medium
CN108364324B (en) Image data processing method and device and electronic terminal
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN108052377B (en) Cloud-based input processing method and device, server and storage medium
WO2020221090A1 (en) Method for use in combined operation of guest applications, and device
EP3835967A1 (en) Card data display method and apparatus, and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN109857568B (en) Data encapsulation and processing method and device and electronic equipment
US20190172263A1 (en) Method and apparatus for augmenting reality
CN117216428B (en) Webpage resource request method, terminal equipment and computer readable storage medium
CN116958300A (en) Image processing apparatus, image processing method, image capturing apparatus, and electronic apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18884044

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18884044

Country of ref document: EP

Kind code of ref document: A1