CN118012432B - Terminal intelligent experience realization method, device, medium and equipment - Google Patents
Terminal intelligent experience realization method, device, medium and equipment Download PDFInfo
- Publication number
- CN118012432B CN118012432B CN202410417291.8A CN202410417291A CN118012432B CN 118012432 B CN118012432 B CN 118012432B CN 202410417291 A CN202410417291 A CN 202410417291A CN 118012432 B CN118012432 B CN 118012432B
- Authority
- CN
- China
- Prior art keywords
- experience
- intelligent
- data
- decision
- model
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及应用程序开发技术领域,尤其是涉及到一种端智能体验实现方法、装置、介质及设备。The present application relates to the field of application development technology, and in particular to a method, device, medium and equipment for implementing a terminal intelligent experience.
背景技术Background technique
用户在终端(例如智能手机)通过各类客户端(例如APP、网页、网站、小程序等)进行工作、交流、购物等,是现代生活的一个重要部分。用户在使用客户端时的即时体验,可能涉及界面设计、页面加载、功能响应、易用性、流畅度、用户反馈等一些列功能,如何基于改善用户体验进行应用程序开发和改进是本领域技术人员需要考虑的技术问题。It is an important part of modern life for users to work, communicate, shop, etc. through various clients (such as APP, web pages, websites, mini-programs, etc.) on terminals (such as smartphones). The instant experience of users when using the client may involve a series of functions such as interface design, page loading, function response, usability, fluency, user feedback, etc. How to develop and improve applications based on improving user experience is a technical issue that technicians in this field need to consider.
发明内容Summary of the invention
有鉴于此,本申请提供了一种端智能体验实现方法、装置、介质及电子设备,主要目的在于通过实现端上智能以改善用户体验。In view of this, the present application provides a method, device, medium and electronic device for realizing end-to-end intelligent experience, the main purpose of which is to improve user experience by realizing end-to-end intelligence.
依据本申请的一个方面,提供了一种端智能体验实现方法,用于针对适用于多类型客户端的前端代码,在前端进行用户体验的感知、决策和处置,所述方法应用于多类型客户端中任意类型客户端中的一个客户端,包括:According to one aspect of the present application, a method for implementing a terminal intelligent experience is provided, which is used to perceive, decide and handle user experience at the front end for front-end codes applicable to multiple types of clients, and the method is applied to one client of any type of client among the multiple types of clients, including:
启动客户端,向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;Start the client, send a request for the client intelligent experience configuration to the server, obtain the client intelligent experience configuration and store it locally;
运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。Running the end intelligence suite in the front-end code includes: starting the perception engine in the end intelligence suite to obtain target data in real time; triggering the decision engine in the end intelligence suite to make experience decisions for the target data based on the end intelligence experience configuration; and running the contact engine in the end intelligence suite to trigger corresponding disposal plans based on the experience decision results.
在一种实现方式中,所述处置方案包括:体验监测处置方案、体验分层处置方案,和/或,体验增强处置方案;In one implementation, the treatment scheme includes: an experience monitoring treatment scheme, an experience layering treatment scheme, and/or an experience enhancement treatment scheme;
所述体验监测处置方案包括:根据体验决策确定发生复杂事件时,以UI交互方式在界面中进行实时消息推送和/或进行页面跳转操作;The experience monitoring and handling scheme includes: when a complex event is determined to occur according to the experience decision, real-time message push and/or page jump operation is performed in the interface in a UI interactive manner;
所述体验分层处置方案包括:根据体验决策确定设备运行状态为低运行状态差时,进行接口加载优化和/或页面内容动态调整方案;The experience layering solution includes: when the device operation state is determined to be low or poor according to the experience decision, performing interface loading optimization and/or page content dynamic adjustment;
所述体验增强处置方案包括:根据体验决策得到用户未来行为轨迹,确定用户可能访问的分包资源或页面资源,对所述分包资源或页面资源进行预加载操作。The experience enhancement solution includes: obtaining a user's future behavior trajectory based on the experience decision, determining sub-package resources or page resources that the user may access, and preloading the sub-package resources or page resources.
在一种实现方式中,还包括:In one implementation, the method further includes:
设置不同处置方案对应不同的优先级,根据优先级确定不同处置方案之间的执行逻辑关系;其中,设置体验分层处置方案对应第一优先级;根据体验分层处置方案的处理结果,确定是否执行体验监测处理方案和/或体验增强处置方案。Set different handling plans to correspond to different priorities, and determine the execution logic relationship between different handling plans according to the priorities; among them, set the experience stratification handling plan to correspond to the first priority; according to the processing results of the experience stratification handling plan, determine whether to execute the experience monitoring handling plan and/or the experience enhancement handling plan.
在一种实现方式中,还包括:In one implementation, the method further includes:
通过白盒模型或黑盒模型进行体验监控、体验分层或体验增强的体验决策,以及,根据白盒模型进行初步决策,并根据白盒模型初步决策结果确定是否利用黑盒模型进一步进行精细决策。Use white box models or black box models to make experience decisions for experience monitoring, experience layering, or experience enhancement, and make preliminary decisions based on the white box model, and determine whether to use the black box model to make further refined decisions based on the preliminary decision results of the white box model.
在一种实现方式中,还包括:In one implementation, the method further includes:
设置体验分层决策对应的体验分层模型为白盒模型模式,在所述客户端冷启动阶段,运行所述白盒模型模式的所述体验分层模型,根据所述体验分层模型的预测结果,确定是否继续执行端智能套件或关闭端智能套件;Setting the experience layering model corresponding to the experience layering decision to a white box model mode, running the experience layering model in the white box model mode during the cold start phase of the client, and determining whether to continue to execute the terminal intelligence suite or shut down the terminal intelligence suite according to the prediction result of the experience layering model;
设置体验增强决策对应的全链路动线预测模型为黑盒模型模式,在所述客户端热启动阶段,运行所述黑盒模型模式的所述全链路动线预测模型。The full-link traffic flow prediction model corresponding to the experience enhancement decision is set to a black box model mode, and during the client hot start phase, the full-link traffic flow prediction model of the black box model mode is run.
在一种实现方式中,所述端智能体验配置包括复杂事件配置信息,所述复杂事件配置信息包括至少一项目标复杂事件的事件配置信息和时机配置信息;In one implementation, the terminal intelligent experience configuration includes complex event configuration information, and the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event;
所述启动端智能套件中的感知引擎,实时获取目标数据,包括:启动感知引擎,基于前端代码中的统一事件流处理工具,捕捉埋点数据,根据所述埋点数据确定是否触发了所述事件配置信息对应的目标复杂事件;The perception engine in the startup end intelligent suite acquires target data in real time, including: starting the perception engine, capturing embedded point data based on the unified event stream processing tool in the front-end code, and determining whether the target complex event corresponding to the event configuration information is triggered according to the embedded point data;
所述触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策,包括:响应于目标复杂事件的触发,运行决策引擎,以依据所述时机配置信息针对所述埋点数据进行时机匹配,确定是否满足所述目标复杂事件的时机;The decision engine in the trigger end intelligent suite makes an experience decision for the target data according to the end intelligent experience configuration, including: in response to the triggering of the target complex event, running the decision engine to match the timing of the embedding data according to the timing configuration information to determine whether the timing of the target complex event is met;
所述运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案,包括:在时机匹配成功后,运行触点引擎,以触发目标复杂事件对应的体验监测处置方案。The contact engine in the operating end intelligent suite triggers a corresponding disposal plan according to the experience decision result, including: after the timing is successfully matched, running the contact engine to trigger the experience monitoring disposal plan corresponding to the target complex event.
在一种实现方式中,在统一事件流处理工具捕捉到埋点数据之后,还包括:In one implementation, after the unified event stream processing tool captures the tracking data, it also includes:
对埋点数据进行客户端类型分析及格式分析,并对埋点数据进行标准化处理,使得不同类型客户端的数据具有统一的格式和结构;Perform client type and format analysis on the tracking data, and standardize the tracking data so that the data of different types of clients have a unified format and structure;
其中,所述对埋点数据进行标准化处理,包括:解析埋点数据的埋点信息、事件ID、参数信息;对所述埋点信息、事件ID以及参数信息进行统一格式封装,转换为标准格式的事件信息。Among them, the standardized processing of the buried point data includes: parsing the buried point information, event ID, and parameter information of the buried point data; packaging the buried point information, event ID, and parameter information in a unified format, and converting them into event information in a standard format.
在一种实现方式中,所述决策引擎,是基于自研的复杂事件匹配规则库并被声明为静态函数的复杂事件处理组件,其中,所述自研的复杂事件匹配规则库采用开发以兼容多类型客户端。In one implementation, the decision engine is a complex event processing component based on a self-developed complex event matching rule library and declared as a static function, wherein the self-developed complex event matching rule library is developed to be compatible with multiple types of clients.
在一种实现方式中,所述端智能体验配置包括体验分层模型;In one implementation, the terminal intelligent experience configuration includes an experience layering model;
所述启动端智能套件中的感知引擎,实时获取目标数据,包括:启动感知引擎,获取设备硬件静态数据、设备实时状态数据以及场景实时运行数据;The perception engine in the startup end intelligent kit obtains target data in real time, including: starting the perception engine to obtain static data of device hardware, real-time status data of the device, and real-time operation data of the scene;
所述触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策,包括:将获取的设备硬件静态数据、设备实时状态数据以及场景实时运行数据输入至所述体验分层模型,预测设备运行状态;The decision engine in the trigger end intelligent suite makes experience decisions for target data according to the end intelligent experience configuration, including: inputting the acquired static data of device hardware, real-time status data of device and real-time operation data of scene into the experience hierarchical model to predict the operation status of device;
所述运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案,包括:运行触点引擎,根据设备运行状态的预测结果触发对应的体验分层处置方案。The touchpoint engine in the operation-end intelligent suite triggers a corresponding disposal plan according to the experience decision result, including: the operation touchpoint engine triggers a corresponding experience layered disposal plan according to the prediction result of the device operation status.
在一种实现方式中,所述体验分层模型,是基于卷积神经网络对数据样本进行特征提取、将提取的特征输入到深度神经网络模型中进行训练而得到的。In one implementation, the experience layering model is obtained by extracting features from data samples based on a convolutional neural network and inputting the extracted features into a deep neural network model for training.
在一种实现方式中,所述体验分层模型,是通过训练第一网络结构得到第一体验分模型以及训练第二网络结构得到第二体验分层模型,在所述决策引擎决策过程中,通过第一体验分层模型作为白盒模型进行白盒预筛以及通过第二体验分层模型作为黑盒模型进行黑盒精筛,从而预测出设备运行状态。In one implementation, the experience layering model is obtained by training a first network structure to obtain a first experience model and training a second network structure to obtain a second experience layering model. In the decision-making process of the decision engine, the first experience layering model is used as a white box model for white box pre-screening and the second experience layering model is used as a black box model for black box fine screening, so as to predict the operating status of the device.
在一种实现方式中,所述端智能体验配置包括全链路动线预测模型;In one implementation, the terminal intelligent experience configuration includes a full-link dynamic line prediction model;
所述启动端智能套件中的感知引擎,实时获取目标数据,包括:启动感知引擎,获取用户行为数据、用户基础数据、场景数据及性能数据;The perception engine in the startup terminal intelligent suite acquires target data in real time, including: starting the perception engine to acquire user behavior data, user basic data, scenario data and performance data;
所述触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策,包括:将获取的用户行为数据、用户基础数据、场景数据及性能数据输入至所述全链路动线预测模型,预测用户未来行为轨迹;The decision engine in the trigger end intelligent suite makes experience decisions for the target data according to the end intelligent experience configuration, including: inputting the acquired user behavior data, user basic data, scenario data and performance data into the full-link dynamic line prediction model to predict the user's future behavior trajectory;
所述运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案,包括:运行触点引擎,根据用户未来行为轨迹的预测结果触发对应的体验增强处置方案。The touch engine in the operating end intelligent suite triggers a corresponding disposal plan according to the experience decision result, including: running the touch engine to trigger a corresponding experience enhancement disposal plan according to the prediction result of the user's future behavior trajectory.
依据本申请另一个方面,提供一种端智能体验实现装置,用于针对适用于多类型客户端的前端代码,在前端进行用户体验的感知、决策和处置,所述装置应用于多类型客户端中任意类型客户端中的一个客户端,包括:According to another aspect of the present application, a terminal intelligent experience implementation device is provided, which is used to perceive, decide and handle user experience at the front end for front-end codes applicable to multiple types of clients, and the device is applied to a client of any type of client among the multiple types of clients, including:
配置请求单元,用于启动客户端,向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;A configuration request unit is used to start the client, send a terminal intelligent experience configuration request to the server, obtain the terminal intelligent experience configuration and store it locally;
端智能执行单元,用于运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。The end intelligent execution unit is used to run the end intelligent suite in the front-end code, including: starting the perception engine in the end intelligent suite to obtain the target data in real time; triggering the decision engine in the end intelligent suite to make experience decisions for the target data based on the end intelligent experience configuration; and running the contact engine in the end intelligent suite to trigger the corresponding disposal plan according to the experience decision result.
依据本申请的一个方面,提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述的端智能体验实现方法。According to one aspect of the present application, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned terminal intelligent experience implementation method when running.
依据本申请的一个方面,提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述的端智能体验实现方法。According to one aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above-mentioned terminal intelligent experience implementation method.
借由上述技术方案,本申请提供的一种端智能体验实现方法、装置、介质及设备,针对适用于多类型客户端的前端代码,在前端进行用户体验的感知、决策和处置,首先,启动客户端后向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;然后运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。With the help of the above technical scheme, the present application provides a method, device, medium and equipment for realizing end intelligent experience, which perceives, makes decisions and handles user experience at the front end for the front end code applicable to multiple types of clients. First, after starting the client, a request for end intelligent experience configuration is sent to the server to obtain the end intelligent experience configuration and store it locally; then the end intelligent suite in the front end code is run, including: starting the perception engine in the end intelligent suite to obtain the target data in real time; triggering the decision engine in the end intelligent suite to make experience decisions for the target data according to the end intelligent experience configuration; and running the contact engine in the end intelligent suite to trigger the corresponding handling plan according to the experience decision result.
本申请实施例提供的端智能体验实现方法,强调的是一种跨端、即时、智能的体验优化方法,它不仅仅关注于提升性能的某一方面,而是从用户体验的全局角度出发,通过实时感知用户状态并动态调整体验,以提供更优质的服务。其核心优势至少包括如下几方面:The method for implementing the end intelligent experience provided in the embodiments of the present application emphasizes a cross-end, instant, and intelligent experience optimization method. It does not only focus on improving a certain aspect of performance, but also starts from the overall perspective of user experience, by real-time perception of user status and dynamic adjustment of experience to provide better services. Its core advantages include at least the following aspects:
1、跨端智能体验:支持跨端使用,例如小程序、不同技术栈如web端等,其中,通过静态编译将前端代码转为多端支持代码,能够在不同的平台和设备上提供一致的优化效果;1. Cross-terminal intelligent experience: Supports cross-terminal use, such as mini-programs, different technology stacks such as the web, etc. Among them, the front-end code is converted into multi-terminal support code through static compilation, which can provide consistent optimization effects on different platforms and devices;
2、即时反应能力:能够实时感知用户的行为和设备状态,如网络情况、内存使用等,并根据这些信息做出即时的调整。这种即时反应能力能够在用户使用过程中不断优化体验,而不是仅在页面加载时进行一次性优化;2. Instant response capability: It can perceive user behavior and device status in real time, such as network conditions, memory usage, etc., and make instant adjustments based on this information. This instant response capability can continuously optimize the user experience during the user's use, rather than just a one-time optimization when the page is loaded;
3、智能决策与自动优化:端智能体验框架内置了黑盒模型和白盒模型,能够根据收集到的数据进行智能分析,从而做出针对性的优化决策。这种基于数据驱动的优化方法,能够更精准地识别和解决性能瓶颈。3. Intelligent decision-making and automatic optimization: The end-to-end intelligent experience framework has built-in black box models and white box models, which can perform intelligent analysis based on the collected data to make targeted optimization decisions. This data-driven optimization method can more accurately identify and solve performance bottlenecks.
4、全局策略支持:提供了一系列全局策略,如图片质量降级、包预加载、弱网切换等,这些策略能够在不同场景下灵活使用,从而实现端到端的性能优化。4. Global policy support: A series of global policies are provided, such as image quality degradation, package preloading, weak network switching, etc. These policies can be used flexibly in different scenarios to achieve end-to-end performance optimization.
相较于云端智能,端智能具有突出的技术优点:Compared with cloud intelligence, edge intelligence has outstanding technical advantages:
1、实时性:端上的实时性是云上难以比拟的,对于许多交互式和流媒体场景而言,云上的延迟几乎无法满足实时的体验需求;1. Real-time performance: The real-time performance on the client is difficult to match on the cloud. For many interactive and streaming scenarios, the latency on the cloud can hardly meet the real-time experience requirements.
2、离线能力:虽然4G,5G已经普及,但是在实际生活中,比如车上,飞机,或者是郊区,经常出现网络连接不稳定,甚至没有网络的情况,这时端智能就可以很好规避网络差的问题;2. Offline capability: Although 4G and 5G are already popular, in real life, such as in cars, airplanes, or in the suburbs, network connections are often unstable or even unavailable. In this case, the intelligent terminal can effectively avoid the problem of poor network.
3、数据隐私:处于数据隐私的要求,很多用户数据无法被上传到云端,所以只能在端上使用;3. Data privacy: Due to data privacy requirements, a lot of user data cannot be uploaded to the cloud, so it can only be used on the client;
4、成本:云计算虽然提供了海量的算力,但是面向海量用户,AI计算和网络带宽的成本是非常高昂的。4. Cost: Although cloud computing provides massive computing power, the cost of AI computing and network bandwidth is very high for a large number of users.
此外,与传统的性能优化相比,传统方法往往侧重于针对特定问题的技术优化,如代码分割、懒加载、资源压缩等。而本发明实施例基于端智能体验框架,则更加注重于通过实时的数据分析和智能决策,从用户体验的角度出发,提供一种全面、动态和自适应的优化方案。这种方法不仅能够解决传统性能优化中遇到的一些局限性问题,还能够根据实际的使用场景和用户需求,提供更加个性化和优质的服务。In addition, compared with traditional performance optimization, traditional methods often focus on technical optimization for specific problems, such as code segmentation, lazy loading, resource compression, etc. The embodiment of the present invention is based on the end intelligent experience framework, and pays more attention to providing a comprehensive, dynamic and adaptive optimization solution from the perspective of user experience through real-time data analysis and intelligent decision-making. This method can not only solve some of the limitations encountered in traditional performance optimization, but also provide more personalized and high-quality services based on actual usage scenarios and user needs.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1示出了本申请实施例提供的一种端智能体验实现方法的流程图;FIG1 is a flow chart showing a method for implementing a terminal intelligent experience provided by an embodiment of the present application;
图2示出了本申请实施例提供的端智能体验处置方案示意图;FIG2 is a schematic diagram of a terminal intelligent experience processing solution provided in an embodiment of the present application;
图3示出了本申请实施例提供的端智能体验监测方法流程图;FIG3 shows a flow chart of a method for monitoring terminal intelligent experience provided in an embodiment of the present application;
图4示出了本申请实施例提供的端智能体验监测中复杂事件配置与匹配逻辑示意图;FIG4 shows a schematic diagram of complex event configuration and matching logic in terminal intelligent experience monitoring provided by an embodiment of the present application;
图5示出了本申请实施例提供的端智能体验监测中时机匹配流程图;FIG5 shows a flow chart of timing matching in terminal intelligent experience monitoring provided by an embodiment of the present application;
图6示出了本申请实施例提供的端智能体验分层方法流程图;FIG6 shows a flow chart of a method for layering terminal intelligent experience provided in an embodiment of the present application;
图7示出了本申请实施例提供的端智能体验分层实现逻辑示意图;FIG. 7 shows a schematic diagram of the logic of implementing the terminal intelligent experience layering provided in an embodiment of the present application;
图8示出了本申请实施例提供的端智能体验增强方法流程图;FIG8 shows a flow chart of a method for enhancing terminal intelligent experience provided in an embodiment of the present application;
图9示出了本申请实施例提供的另一种端智能体验实现方法的流程图;FIG9 is a flowchart of another method for implementing a terminal intelligent experience provided by an embodiment of the present application;
图10示出了本申请实施例提供的一种端智能体验实现装置结构示意图。FIG10 shows a schematic diagram of the structure of a device for implementing a terminal intelligent experience provided in an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
各类型客户端都存在用户体验的问题,因此如何改善用户体验是应用程序开发中需要不断研究的课题。All types of clients have user experience issues, so how to improve user experience is a topic that needs to be continuously studied in application development.
传统的 HTML 5应用开发效率较高,但用户性能体验不够完美,于是出现了使用Web 技术开发具有类似于原生应用的用户体验的 Web 应用的尝试。小程序(MiniApp)的出现迅速受到用户的欢迎。MiniApp 是一种小型、免安装、快速加载的程序,通常在一个宿主应用或操作系统中运行(如小程序、快应用),也可以是支持跨端部署的 JS 原生应用。小程序本身受架构所限,很难做到类比原生应用的丝滑体验,特别是对于巨型小程序来说,用户操作过程中动态的体验劣化是一个难解的课题。由于小程序的用户体验问题较为突出,因此,本申请实施例以小程序为例进行说明,但是可以理解,对于其他类型客户端(原生应用APP、网页、网站等)都是可以适用的。Traditional HTML 5 application development is efficient, but the user performance experience is not perfect, so there have been attempts to use Web technology to develop Web applications with user experience similar to native applications. The emergence of mini-programs (MiniApp) has quickly become popular with users. MiniApp is a small, installation-free, fast-loading program that usually runs in a host application or operating system (such as mini-programs, quick applications), or it can be a JS native application that supports cross-end deployment. Mini-programs themselves are limited by the architecture, and it is difficult to achieve a silky experience analogous to native applications. Especially for giant mini-programs, dynamic experience degradation during user operation is a difficult issue. Since the user experience problem of mini-programs is more prominent, the embodiment of this application takes mini-programs as an example for explanation, but it can be understood that it is applicable to other types of clients (native application APP, web pages, websites, etc.).
现有方案中,通常采用前端采集数据、服务端进行数据计算再反馈给前端的方式进行用户体验改善,该方式可以称为服务端智能或云端智能(云端AI)的方案,虽然具有数据处理能力较强的特点,然而却存在着高延迟、维护成本高的局限性。In existing solutions, the user experience is usually improved by collecting data on the front end, calculating the data on the server end, and then feeding it back to the front end. This method can be called server-side intelligence or cloud-side intelligence (cloud-side AI) solution. Although it has the characteristics of strong data processing capabilities, it has the limitations of high latency and high maintenance costs.
因此,本申请发明人创新性地提出,通过端上智能(或称为“终端智能”或“前端智能”,以下简称“端智能”)改善用户体验,其中端智能可以理解为在端上具备思考决策能力,简言之,端智能就是在端侧进行实时感知、计算、决策和干预,通过让端具备机器学习能力,带来用户体验提升。本发明实施例中的端智能体验,通过数据分析以及机器学习等技术深入洞察和理解用户行为,全局探测和统筹多样的用户设备环节、复杂的运行场景,通过实施反馈循环和适时的调整干预,以优化客户端产品体验的一种综合性方案,其具有即时性、智能化、可处置的特点。Therefore, the inventor of this application innovatively proposed to improve the user experience through end-side intelligence (or "terminal intelligence" or "front-end intelligence", hereinafter referred to as "end intelligence"), where end intelligence can be understood as the ability to think and make decisions on the end. In short, end intelligence is real-time perception, calculation, decision-making and intervention on the end side, which improves the user experience by enabling the end to have machine learning capabilities. The end-side intelligent experience in the embodiment of the present invention uses data analysis and machine learning technologies to deeply understand and understand user behavior, globally detect and coordinate various user device links and complex operating scenarios, and implements feedback loops and timely adjustments and interventions to optimize the client product experience. A comprehensive solution is characterized by immediacy, intelligence, and disposability.
经过分析以及实践,端智能具有突出的技术优点:1、实时性:端上的实时性是云上难以比拟的,对于许多交互式和流媒体场景而言,云上的延迟几乎无法满足实时的体验需求;2、离线能力:虽然4G,5G已经普及,但是在实际生活中,比如车上,飞机,或者是郊区,经常出现网络连接不稳定,甚至没有网络的情况,这时端智能就可以很好规避网络差的问题;3、数据隐私:处于数据隐私的要求,很多用户数据无法被上传到云端,所以只能在端上使用;4、成本:云计算虽然提供了海量的算力,但是面向海量用户,AI计算和网络带宽的成本是非常高昂的。而现在端侧设备的普及,存在大量手机、智能车、机顶盒等具备算力的设备可以使用,来降低云上部署的成本。After analysis and practice, end-to-end intelligence has outstanding technical advantages: 1. Real-time performance: The real-time performance on the end is difficult to match on the cloud. For many interactive and streaming scenarios, the delay on the cloud can hardly meet the real-time experience requirements; 2. Offline capability: Although 4G and 5G have been popularized, in real life, such as in cars, airplanes, or in the suburbs, the network connection is often unstable or even unavailable. At this time, end-to-end intelligence can well avoid the problem of poor network; 3. Data privacy: Due to data privacy requirements, many user data cannot be uploaded to the cloud, so they can only be used on the end; 4. Cost: Although cloud computing provides massive computing power, the cost of AI computing and network bandwidth is very high for massive users. Now that end-side devices are popular, there are a large number of mobile phones, smart cars, set-top boxes and other devices with computing power that can be used to reduce the cost of cloud deployment.
本申请发明人继续研究发现,实现端智能存在几方面的挑战。第一是包大小挑战,在端上进行程技术,就涉及占用 APP 的安装包大小、存储资源,这对端计算引擎瘦身、端模型大小、端模型压缩、动态发布等能力都提出了较高的要求;第二是性能挑战,由于使用移动设备的计算资源,要兼顾用户体验与计算效率的平衡,需要针对移动端设备 CPU/GPU、内存、耗电、指令集、线程调度等进行持续优化;第三是适配挑战,面对设备、系统版本的碎片化,端智能技术需要进行大量适配,确保运行时的稳定性与可用性。 因此,本申请实施例提出一种端智能体验实现方案,旨在克服云端AI存在的缺陷,并从上述几个挑战入手,优化方案的实施效果。The inventors of this application continued to study and found that there are several challenges in realizing end intelligence. The first is the challenge of package size. The process technology on the end involves occupying the installation package size and storage resources of the APP, which puts forward high requirements on the end computing engine slimming, end model size, end model compression, dynamic publishing and other capabilities; the second is the performance challenge. Due to the use of computing resources of mobile devices, it is necessary to balance user experience and computing efficiency. It is necessary to continuously optimize the mobile device CPU/GPU, memory, power consumption, instruction set, thread scheduling, etc.; the third is the adaptation challenge. In the face of the fragmentation of devices and system versions, end intelligent technology needs to be adapted in large quantities to ensure stability and availability during operation. Therefore, the embodiment of this application proposes a solution for implementing end intelligent experience, which aims to overcome the defects of cloud AI and optimize the implementation effect of the solution based on the above challenges.
此外,在现有网络应用中,同一个网络产品往往对应不同类型的客户端(不同渠道发布),例如,一款外卖产品,除了外卖APP,还具有小程序、网站、网页等多种类型客户端形式。针对同一款产品前端代码,如果针对各种不同类型客户端(包括但不限于APP、小程序、网站、网页等类型)都分别采取不同的端智能体验机制,则对代码开发以及发布效率带来很大影响。因此,本申请实施例也在此方面进一步改进,以期实现跨端适用的一套端智能体验实现方案。为了达到适用于多类型客户端的方案,本申请实施例依托适用跨端的编程语言(例如JavaScript,JS)进行前端代码开发,由于JS 开发兼容APP、小程序、H5 各类型客户端,因此可实现跨端的目的。在具体实施过程中,还需要考虑对源代码进行处理以去除各类客户端之间的差异性等问题。In addition, in existing network applications, the same network product often corresponds to different types of clients (published through different channels). For example, a takeaway product, in addition to the takeaway APP, also has various types of client forms such as mini-programs, websites, and web pages. For the same product front-end code, if different terminal intelligent experience mechanisms are adopted for various types of clients (including but not limited to APP, mini-programs, websites, web pages, etc.), it will have a great impact on code development and publishing efficiency. Therefore, the embodiment of the present application is also further improved in this regard, in order to achieve a set of terminal intelligent experience implementation solutions applicable across terminals. In order to achieve a solution applicable to multiple types of clients, the embodiment of the present application relies on a cross-terminal programming language (such as JavaScript, JS) for front-end code development. Since JS development is compatible with APP, mini-programs, and H5 clients of various types, the purpose of cross-terminal can be achieved. In the specific implementation process, it is also necessary to consider processing the source code to remove the differences between various types of clients.
参见图1,为本申请实施例中一种端智能体验实现方法的流程图,该方法用于针对适用于多类型客户端的前端代码,在前端进行用户体验的感知、决策和处置,该方法应用于多类型客户端中任意类型客户端中的一个客户端,包括如下步骤S101-S102。Refer to Figure 1, which is a flow chart of a method for implementing a terminal intelligent experience in an embodiment of the present application. The method is used to perceive, decide and handle user experience at the front end for front-end codes applicable to multiple types of clients. The method is applied to a client of any type of client among multiple types of clients, and includes the following steps S101-S102.
本申请实施例中,适用于多类型客户端(也成为“跨端”)的前端代码(例如JavaScript(JS)前端代码),是通过对源代码进行静态编译去除各类客户端之间的差异性获得的。静态编译,是指编译器在编译可执行文件时,将可执行文件需要调用的对应静态库中的部分提取出来,链接到可执行文件中,使可执行文件在运行的时候不依赖于动态链接库。在本申请实施例中,对源代码进行静态编译主要是处理JS源码中约束强且不能动态修改的部分,可包括三个方面:1.模块引用,例如将JS源码中的模块引用替换和后缀名修改;2.模版属性映射或语法兼容处理,例如,在JS中,模板属性映射通常是指将对象的属性映射到模板字符串中,以生成一个完整的字符串,这种映射可以用于创建动态的HTML字符串或者其他类型的文本;在JS中,如语法兼容处理目的是确保源码在不同的环境中都能运行,需要关注不同环境可能存在的语法差异,场景的语法兼容处理可采用多种方式,例如,采用严格模式、适用JSON对象来序列化和反序列化、使用可选链操作符、使用特定语法、使用模版导入或导出等;3.配置映射,如通过页面配置。由此,通过上述几个方面操作,抹平各类型客户端之间的差异性,为实现跨端实现端智能体验提供基础。In the embodiment of the present application, the front-end code (e.g., JavaScript (JS) front-end code) applicable to multiple types of clients (also called "cross-client") is obtained by statically compiling the source code to remove the differences between various types of clients. Static compilation means that when the compiler compiles the executable file, it extracts the part of the corresponding static library that the executable file needs to call and links it into the executable file, so that the executable file does not rely on the dynamic link library when running. In the embodiment of the present application, static compilation of source code is mainly to process the parts of JS source code that are strongly constrained and cannot be dynamically modified, which may include three aspects: 1. Module reference, such as replacing module references and modifying suffix names in JS source code; 2. Template attribute mapping or syntax compatibility processing, for example, in JS, template attribute mapping generally refers to mapping the attributes of an object to a template string to generate a complete string. This mapping can be used to create dynamic HTML strings or other types of text; in JS, if the purpose of syntax compatibility processing is to ensure that the source code can run in different environments, it is necessary to pay attention to the syntax differences that may exist in different environments. The syntax compatibility processing of the scene can be carried out in a variety of ways, for example, using strict mode, applying JSON objects to serialize and deserialize, using optional chain operators, using specific syntax, using template import or export, etc.; 3. Configuration mapping, such as through page configuration. Therefore, through the above-mentioned operations, the differences between various types of clients are smoothed out, providing a basis for realizing cross-end intelligent experience.
S101:启动客户端,向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;S101: Start the client, send a request for terminal intelligent experience configuration to the server, obtain the terminal intelligent experience configuration and store it locally;
S102:运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。S102: Running the end intelligent suite in the front-end code, including: starting the perception engine in the end intelligent suite to obtain target data in real time; triggering the decision engine in the end intelligent suite to make experience decisions for the target data based on the end intelligent experience configuration; and running the contact engine in the end intelligent suite to trigger corresponding disposal plans according to the experience decision results.
本申请实施例中,为了减轻端计算处理压力,预先在服务端进行端智能体验配置,当启动客户端之后,加载端智能体验配置并存储在本地,为后续在本地进行决策等操作提供准备。In an embodiment of the present application, in order to reduce the computing processing pressure on the end, the end intelligent experience configuration is performed in advance on the server side. After the client is started, the end intelligent experience configuration is loaded and stored locally to prepare for subsequent local decision-making and other operations.
在服务端(或云端)预先配置的端智能体验配置,可以理解为包括两个维度配置。1、事件规则配置:服务端需要预先定义各种用户行为事件和相关的规则,包括事件的触发条件、规则的执行逻辑等。2、时机策略配置:在场景上时机是指在满足一系列条件的情况下进行某种特定操作的表达,在实现上,时机是复杂事件(复合事件)规则加上触发配置;策略就是触发时机需要满足的条件或者说复合事件规则模型部署:对于需要机器学习模型支持的策略,服务端负责模型的部署和下发。这些模型基于大量历史数据训练得到,用于预测用户行为或评估用户体验质量。The end-to-end intelligent experience configuration pre-configured on the server (or cloud) can be understood as including two dimensions of configuration. 1. Event rule configuration: The server needs to pre-define various user behavior events and related rules, including event triggering conditions, rule execution logic, etc. 2. Timing strategy configuration: In the scenario, timing refers to the expression of performing a certain specific operation when a series of conditions are met. In implementation, timing is a complex event (compound event) rule plus a trigger configuration; the strategy is the condition that needs to be met for the trigger timing or the compound event rule model deployment: For strategies that require machine learning model support, the server is responsible for the deployment and distribution of the model. These models are trained based on a large amount of historical data and are used to predict user behavior or evaluate the quality of user experience.
在客户端代码开发中,植入有端智能套件。端智能套件,可以理解为一套解决端智能体验的功能模块集合,其深入洞察和理解用户行为,结合数据分析、机器学习等技术,全面探测和统筹用户的设备环境和场景运行场景,通过实时反馈循环和适时调整干预,优化客户端体验。端智能套件中内置感知引擎、决策引擎及触点引擎,根据加载至本地的端智能体验配置,在相应处理节点自动触发对应的引擎,以实现对数据的实时感知、实时决策及实时处置。In the client code development, an end-to-end intelligent kit is embedded. The end-to-end intelligent kit can be understood as a set of functional modules that solve the end-to-end intelligent experience. It has a deep insight into and understanding of user behavior, combines data analysis, machine learning and other technologies, comprehensively detects and coordinates the user's device environment and scenario operation scenarios, and optimizes the client experience through real-time feedback loops and timely adjustment interventions. The end-to-end intelligent kit has built-in perception engines, decision engines and contact engines. According to the end-to-end intelligent experience configuration loaded locally, the corresponding engine is automatically triggered at the corresponding processing node to achieve real-time perception, real-time decision-making and real-time processing of data.
在一种实现方式中,可以基于端智能体验架构开发端智能套件。该端智能体验框架可包括如下及部分。1.端智能体验解决层,针对具体问题提供的一套解决策略和工具,它们依赖于基础能力提供的监测和决策能力,针对性地解决用户在使用过程中遇到的各种问题。按照体验维度分类,端智能体验解决层可包括体验监测、体验分层和体验增强三个功能模块。In one implementation, an end-to-end intelligent suite can be developed based on the end-to-end intelligent experience architecture. The end-to-end intelligent experience framework may include the following parts. 1. End-to-end intelligent experience solution layer, a set of solution strategies and tools for specific problems, which rely on the monitoring and decision-making capabilities provided by the basic capabilities to solve various problems encountered by users during use. According to the experience dimension classification, the end-to-end intelligent experience solution layer may include three functional modules: experience monitoring, experience stratification, and experience enhancement.
2.端智能体验插件系统,例如可提供插件市场和插件开发的平台,允许第三方或者内部开发者针对特定功能开发插件。这个系统可以看作是一个扩展平台,依托于基础架构和解决方案提供的服务和API进行插件的开发和分发。2. End-to-end intelligent experience plug-in system, such as a plug-in market and plug-in development platform, allowing third-party or internal developers to develop plug-ins for specific functions. This system can be seen as an extension platform, relying on the services and APIs provided by the infrastructure and solutions to develop and distribute plug-ins.
3.端智能体验内核,整个系统运作的基础,可由感知、建模、决策和处置三个部分组成,负责收集和处理信息,并作出智能响应。这个内核直接支撑着体验监测、体验增强和体验分层的智能化实施。3. The end-to-end intelligent experience core is the basis for the operation of the entire system. It can be composed of three parts: perception, modeling, decision-making and disposal. It is responsible for collecting and processing information and making intelligent responses. This core directly supports the intelligent implementation of experience monitoring, experience enhancement and experience stratification.
4.跨端智能层,是系统的高级功能层,它整合了统一事件流、模型推理、特征工程、决策引擎和触点引擎等能力。4. The cross-end intelligent layer is the high-level functional layer of the system, which integrates capabilities such as unified event stream, model reasoning, feature engineering, decision engine, and touchpoint engine.
上述各部分和层次之间的逻辑关系体现了从基础到高级的服务层次,每一层都为上层提供支持和服务,共同作用,以保证系统的整体智能化和高效运作。The logical relationship between the above parts and levels reflects the service hierarchy from basic to advanced. Each layer provides support and services to the upper layer, and they work together to ensure the overall intelligent and efficient operation of the system.
可见,上述通过端智能体验架构开发的端智能套件,可以理解为以一个统一的体验基座进行构建的,与散点化方案(例如针对特定体验问题进行单独特定方案开发)不同,端智能体验实现方案以统一的体验基座进行建模,这种采用统一体验基建的方式具有降本增效的好处,并且在场景层面上,只需调用基座并渲染呈现即可场景个性化需求,具有可扩展化及个性化的优势。It can be seen that the above-mentioned end-to-end intelligent suite developed through the end-to-end intelligent experience architecture can be understood as being built on a unified experience base. Unlike scattered solutions (such as developing separate specific solutions for specific experience problems), the end-to-end intelligent experience implementation solution is modeled on a unified experience base. This approach of using a unified experience infrastructure has the benefit of reducing costs and increasing efficiency. At the scene level, it only needs to call the base and render to meet the personalized needs of the scene, which has the advantages of scalability and personalization.
下面针对S102中三个主要动作(数据收集、决策、处置)进行详细说明。The following is a detailed description of the three main actions in S102 (data collection, decision-making, and disposal).
一.数据收集1. Data Collection
端智能套件包括感知引擎,用于收集数据。对用户在端上的实时数据进行感知是端智能体验的基础。S102中的目标数据是在不同体验解决方案(例如包括体验监测、体验分层、体验增强,后续会详细介绍)中所需要感知的不同类型数据集合。一般而言,目标数据可能包括用户基础数据、用户行为数据、场景数据、性能数据等。The end intelligence suite includes a perception engine for collecting data. Perceiving the real-time data of users on the end is the basis of the end intelligence experience. The target data in S102 is a collection of different types of data that need to be perceived in different experience solutions (for example, including experience monitoring, experience layering, and experience enhancement, which will be introduced in detail later). Generally speaking, the target data may include user basic data, user behavior data, scenario data, performance data, etc.
用户基础数据可通过一些API获取,例如使用getSysteminfo获取设备型号,使用getNetworkType获取当前网络类型,使用onNetworkStatusChange监听网络状态变化的事件等。User basic data can be obtained through some APIs, such as using getSysteminfo to obtain the device model, using getNetworkType to obtain the current network type, and using onNetworkStatusChange to monitor network status change events.
用户行为数据可通过UT进行埋点,根据行为所属的事件编号放到不同的事件流中进行埋点和上报。用户行为数据相对复杂,需要一定的计算逻辑。以“页面停留时长事件”为例,涉及如下要点:(1)当用户进入页面时开始计时,用户在页面内浏览超过xx秒后触发页面停留事件;(2)当用户在页面内停留时长未达标,即跳出页面,停留时长会暂停计时,返回页面后继续累计计时;(3)一次页面访问(pageAppear到pageDisAppear)内至多只触发一次页面停留事件。User behavior data can be tracked through UT and placed in different event streams for tracking and reporting according to the event number to which the behavior belongs. User behavior data is relatively complex and requires certain calculation logic. Taking the "page dwell time event" as an example, the following points are involved: (1) The timing starts when the user enters the page, and the page dwell event is triggered after the user browses the page for more than xx seconds; (2) When the user stays on the page for less than the required time, that is, jumps out of the page, the dwell time will be paused, and the accumulation will continue after returning to the page; (3) The page dwell event is triggered at most once in a page visit (pageAppear to pageDisAppear).
对于场景数据,可涉及页面访问(2001)、点击(2101)、曝光(2201)等行为,其他的行为则被放到了自定义行为中,再根据一定的场景规则整理出不同的场景数据。For scenario data, it may involve behaviors such as page visits (2001), clicks (2101), and exposures (2201). Other behaviors are placed in custom behaviors, and then different scenario data are sorted out according to certain scenario rules.
对于性能数据,例如接口耗时可通过基础的网络SDK收集上报,渲染相关性能数据可依赖于客户端框架和容器(例如小程序框架和容器),结合场景/页面的渲染场景,完成各阶段的数据采集和上报。以小程序为例,具体分为:(1)小程序性能插件:采集应用/页面启动及标准生命周期耗时,自动化上报 ,其中,(1.1)拓展能力:通过小程序performanceApi,提供部分容器启动的性能数据,主要是启动起点时间及路由耗时;(1.2)针对部分渠道缺乏容器采集API,无法获取启动时间点,可自定义以应用onLaunch作为起点的场景T2耗时 ;(2)小程序性能组件mini-performance采集场景T2耗时终点,其中,(2.1)结算方式:组件基于IntersectionObserver的API,由场景接入到“首屏完整渲染的最后一个模块”,该组件会记录自己在视图内被看见(&渲染)的事件(&时间)作为模拟T2的结算点位,且无额外性能损耗。另外,小程序框架提供了App对象的onError方法,可以用来监听全局的脚本错误,以及onPromiseError监控所有未捕获的Promise异常。至于页面白屏的监测,可采用了一种自定义方式,通过在接口请求完成并返回数据后启动一个计时器,如果在随后的数秒内页面没有任何元素被成功渲染,将此情况视为页面白屏并进行相应的统计。For performance data, such as interface time consumption, it can be collected and reported through the basic network SDK. Rendering-related performance data can rely on the client framework and container (such as the mini-program framework and container), combined with the scene/page rendering scene, to complete the data collection and reporting of each stage. Taking the mini-program as an example, it is specifically divided into: (1) Mini-program performance plug-in: collect application/page startup and standard life cycle time consumption, and report automatically, among which, (1.1) expansion capability: through the mini-program performanceApi, provide some container startup performance data, mainly the startup starting time and route time consumption; (1.2) for some channels lack container collection API, unable to obtain the startup time point, you can customize the scene T2 time consumption with the application onLaunch as the starting point; (2) Mini-program performance component mini-performance collects the scene T2 time consumption end point, among which, (2.1) settlement method: the component is based on the IntersectionObserver API, and is connected to the "last module of the first screen full rendering" by the scene. The component will record the event (& time) of being seen (& rendered) in the view as the settlement point of simulated T2, and there is no additional performance loss. In addition, the Mini Program framework provides the onError method of the App object, which can be used to monitor global script errors, and onPromiseError to monitor all uncaught Promise exceptions. As for the monitoring of page white screen, a custom method can be adopted, which starts a timer after the interface request is completed and the data is returned. If no element on the page is successfully rendered within the next few seconds, this situation is regarded as a page white screen and corresponding statistics are performed.
二.决策Decision-making
端智能套件包括决策引擎,用于进行体验决策,即依据下载的端智能体验配置,针对实时收集到的目标数据进行体验决策。其中,端智能体验配置可包括事件配置信息或模型配置信息,从而根据事件配置信息进行事件匹配,或根据模型进行预测。其中,事件配置信息例如可以是复杂事件配置信息(对应“体验监测”方案,后文详述),模型可以是体验分层模型(对应“体验分层”方案,后文详述),也可以是全链路动线预测模型(对应“体验增强”方案,后文详述)。本发明实施例中,事件配置以及模型训练和部署是离线的,推理是在前端推理,前端能够实现更快的响应速度,减少网络请求延迟,保护用户数据隐私,以及在无网络连接的环境下仍能提供服务。The end intelligence suite includes a decision engine for making experience decisions, that is, making experience decisions based on the downloaded end intelligence experience configuration and the target data collected in real time. Among them, the end intelligence experience configuration may include event configuration information or model configuration information, so as to match events according to the event configuration information, or make predictions according to the model. Among them, the event configuration information can be, for example, complex event configuration information (corresponding to the "experience monitoring" solution, which will be described in detail later), and the model can be an experience layering model (corresponding to the "experience layering" solution, which will be described in detail later), or a full-link dynamic line prediction model (corresponding to the "experience enhancement" solution, which will be described in detail later). In an embodiment of the present invention, event configuration and model training and deployment are offline, and reasoning is performed at the front end. The front end can achieve faster response speed, reduce network request latency, protect user data privacy, and still provide services in an environment without network connection.
三.处置3. Disposal
端智能套件包括触点引擎,用于根据体验决策结果触发体验处置。本申请实施例提供的端智能体验方案中,通过收集收集及体验决策从而感知到问题以后,可以直接在端上解决问题或者上报问题,可提供全面灵活的处置能力,例如某些情况下,需要通过弹窗、底部浮条等UI形式与用户交互,能够在应用界面推送实时消息,告知用户重要信息或者操作反馈,例如实时消息提示、用户引导等。端智能体验框架可提供完善的UI组件,组件高度可定制,组件以动态插件/分包的形式内置于宿主中,可以快速地将信息触达到用户。端智能体验框架可以在发送或接收网络请求数据时进行拦截,可以自定义请求头或者对返回数据进行处理,从而对网络进行灵活干预。端智能体验框架可以在不同的场景下对基础库api进行动态代理和重写,以此来扩展或修改原有的行为。例如,可以对hashToUrl改变进行代理,使其在不同运行状态的机型下返回不同质量的图片。The end intelligent kit includes a contact engine, which is used to trigger the experience disposal according to the experience decision result. In the end intelligent experience solution provided by the embodiment of the present application, after the problem is perceived by collecting and experiencing the decision, the problem can be solved or reported directly on the end, and a comprehensive and flexible disposal capability can be provided. For example, in some cases, it is necessary to interact with the user through UI forms such as pop-ups and bottom floating bars, and real-time messages can be pushed on the application interface to inform the user of important information or operation feedback, such as real-time message prompts, user guidance, etc. The end intelligent experience framework can provide a complete UI component, which is highly customizable. The component is built into the host in the form of dynamic plug-ins/sub-packages, and the information can be quickly reached to the user. The end intelligent experience framework can intercept when sending or receiving network request data, customize the request header or process the returned data, so as to flexibly intervene in the network. The end intelligent experience framework can dynamically proxy and rewrite the basic library API in different scenarios to expand or modify the original behavior. For example, the hashToUrl change can be proxied to return pictures of different qualities under different operating states.
由此,通过上述三个步骤(数据收集、决策、处置),即可在端上进行用户体验的实时感知和处置。下面从一个“体验分层”具体实例对上述步骤进行示例性展示。Therefore, through the above three steps (data collection, decision-making, and processing), real-time perception and processing of user experience can be performed on the terminal. The following is an example of the above steps using a specific example of "experience layering".
步骤1:准备步骤与模型训练。数据收集:收集用户访问页面的行为数据,包括页面加载时间、用户设备类型、网络环境等信息。特征提取:从收集的数据中提取关键特征,如设备性能指标(CPU、内存使用率)、网络速度等。模型训练:使用这些特征和页面加载时间作为训练数据,构建机器学习模型,预测不同机型的运行状态。模型发布:将训练好的模型转为ONNX格式,发布模型文件到CDN,供决策引擎加载预测使用。Step 1: Preparation steps and model training. Data collection: Collect behavioral data of users visiting pages, including page loading time, user device type, network environment and other information. Feature extraction: Extract key features from the collected data, such as device performance indicators (CPU, memory usage), network speed, etc. Model training: Use these features and page loading time as training data to build a machine learning model to predict the operating status of different models. Model publishing: Convert the trained model to ONNX format and publish the model file to CDN for the decision engine to load and predict.
步骤2:实时特征收集。数据收集:在用户使用应用时,实时监控并收集页面加载时间、设备CPU使用率和内存使用率等数据。数据归一化处理:将数据的数值范围调整到一个特定的区间,通常是0到1或者-1到1之间。Step 2: Real-time feature collection. Data collection: When users use the app, real-time monitoring and collection of data such as page loading time, device CPU usage, and memory usage. Data normalization: Adjust the data value range to a specific interval, usually between 0 and 1 or -1 to 1.
步骤3:利用模型进行决策。将收集好的特征收据,根据模型预测的结果进行机型运行状态判定,如果预测结果超过了设定的阈值,则判定为低运行状态(运行状态差或运行状态一般)。Step 3: Use the model to make decisions. The collected feature data is used to determine the model's operating status based on the model's prediction results. If the prediction result exceeds the set threshold, it is determined to be in a low operating state (poor operating state or average operating state).
步骤4:场景处置。接口加载优化:对于判定为运行状态差的机型,自动优化网络加载策略,如延迟非关键接口的加载等;内容适配:根据设备运行状态,动态调整页面内容,例如降低图片质量或简化页面元素;数据反馈:将处置结果和用户体验反馈继续收集,作为新的数据输入,不断优化模型和策略。Step 4: Scenario handling. Interface loading optimization: For models that are judged to be in poor operating status, automatically optimize the network loading strategy, such as delaying the loading of non-critical interfaces; Content adaptation: Dynamically adjust the page content according to the device operating status, such as reducing the image quality or simplifying the page elements; Data feedback: Continue to collect handling results and user experience feedback as new data input to continuously optimize models and strategies.
如前描述的,根据用户体验角度,可以包括体验监测、体验分层和体验增强三个维度。参见图2,为本申请实施例提供的端智能体验解决方案示意图。体验监测,是通过对用户体验数据实时的采集、分析和预警,主动去发现用户在使用客户端过程中的体验问题(例如是否发生了特定的复杂事件),并进行实时反馈和现场处置,从而提升用户体验。体验分层,是从用户实际使用角度进行用户设备运行状态评估,与以往僵化地根据出厂硬件信息对设备分级不同,智能体验分层以应用实际运行的多维度耗时数据为依据,利用体验分层模型(通过端智能体验配置获取到),对用户设备数据进行综合实时加权打分,并根据打分进行相应的处置。体验增强:基于用户实时交互行为信息,利用全链路动线预测模型(通过端智能体验配置获取到),实现实时用户未来轨迹预估,对用户可能访问的分包、页面进行预加载等干预,提升用户体验惊喜感。As described above, from the perspective of user experience, it can include three dimensions: experience monitoring, experience stratification, and experience enhancement. See Figure 2, which is a schematic diagram of the end intelligent experience solution provided by the embodiment of the present application. Experience monitoring is to actively discover the user's experience problems (such as whether a specific complex event has occurred) in the process of using the client through real-time collection, analysis and early warning of user experience data, and provide real-time feedback and on-site disposal, thereby improving the user experience. Experience stratification is to evaluate the operating status of the user's device from the perspective of actual user use. Different from the rigid classification of devices based on factory hardware information in the past, the intelligent experience stratification is based on the multi-dimensional time-consuming data of the actual operation of the application, and uses the experience stratification model (obtained through the end intelligent experience configuration) to comprehensively and weightedly score the user's device data in real time, and perform corresponding disposal according to the score. Experience enhancement: Based on the user's real-time interactive behavior information, the full-link dynamic line prediction model (obtained through the end intelligent experience configuration) is used to realize real-time user future trajectory estimation, preload the sub-packages and pages that the user may visit, and enhance the user experience.
因此,在一种实现方式中,上述处置方案包括:体验监测处置方案、体验分层处置方案,和/或,体验增强处置方案。Therefore, in one implementation, the above-mentioned processing scheme includes: an experience monitoring processing scheme, an experience layering processing scheme, and/or an experience enhancement processing scheme.
所述体验监测处置方案包括:根据体验决策确定发生复杂事件时,以UI交互方式在界面中进行实时消息推送和/或进行页面跳转操作。The experience monitoring and handling scheme includes: when a complex event is determined to occur according to the experience decision, real-time message push and/or page jump operation are performed in the interface in a UI interactive manner.
所述体验分层处置方案包括:根据体验决策确定设备运行状态为低运行状态时,进行接口加载优化和/或页面内容动态调整方案。其中,体验决策的预测结果可分为运行状态良好、运行状态一般、运行状态差三个级别,其中,运行状态良好属于高运行状态,运行状态一般和运行状态差属于低运行状态,其中,运行状态一般可理解为运行状态中等水平,具有体验改善的空间,而运行状态差则是亟需进行体验改善。本领域技术人员可以根据具体的性能参数设定和区分各个级别的运行状态。在确定低运行状态时,可以执行对应的处置方案,例如,通过接口加载优化方案进行改善,包括优化网络加载策略等方式;再如,页面内容动态调整方案可包括:降低图片质量、简化页面元素,和/或,简化页面交互。The experience layering disposal scheme includes: when it is determined according to the experience decision that the device operating state is a low operating state, an interface loading optimization and/or page content dynamic adjustment scheme is performed. Among them, the prediction results of the experience decision can be divided into three levels: good operating state, general operating state, and poor operating state. Among them, good operating state belongs to a high operating state, and general operating state and poor operating state belong to a low operating state. Among them, the general operating state can be understood as a medium level of operating state, with room for experience improvement, and the poor operating state is in urgent need of experience improvement. Those skilled in the art can set and distinguish the operating states of each level according to specific performance parameters. When determining a low operating state, a corresponding disposal scheme can be executed, for example, improvement can be made through an interface loading optimization scheme, including optimizing network loading strategies and the like; for example, a page content dynamic adjustment scheme may include: reducing image quality, simplifying page elements, and/or simplifying page interactions.
所述体验增强处置方案包括:根据体验决策得到用户未来行为轨迹,确定用户可能访问的分包资源或页面资源,对所述分包资源或页面资源进行预加载操作。The experience enhancement solution includes: obtaining a user's future behavior trajectory based on the experience decision, determining sub-package resources or page resources that the user may access, and preloading the sub-package resources or page resources.
在一种实现方式中,可以通过设置不同处置方案的优先级,来确定它们之间的执行逻辑关系。因此,上述方法还包括:设置不同处置方案对应不同的优先级,根据优先级确定不同处置方案之间的执行逻辑关系。例如,设置体验分层处置方案对应第一优先级;根据体验分层处置方案的处理结果,确定是否执行体验监测处理方案和/或体验增强处置方案。这种处理方式的好处在于,首先通过体验分层处置方案进行处置,例如针对低性能设备进行降低图片质量等处置,在经过上述体验分层处置之后,如果设备运行状态仍为“较差”状态(可再次通过分层体验模型进行预测得到),那么此时认为当前不适合进行体验监测以及体验增强,以节省资源开销,减轻数据处理压力。In one implementation, the execution logic relationship between different treatment schemes can be determined by setting their priorities. Therefore, the above method also includes: setting different priorities corresponding to different treatment schemes, and determining the execution logic relationship between different treatment schemes according to the priorities. For example, the experience layering treatment scheme is set to correspond to the first priority; according to the processing result of the experience layering treatment scheme, determine whether to execute the experience monitoring treatment scheme and/or the experience enhancement treatment scheme. The advantage of this processing method is that it is first processed through the experience layering treatment scheme, such as reducing the image quality for low-performance devices. After the above-mentioned experience layering treatment, if the device operating state is still in a "poor" state (which can be predicted again by the layered experience model), then it is considered that it is not suitable for experience monitoring and experience enhancement at this time, so as to save resource overhead and reduce data processing pressure.
此外,在一种实现方式中,在执行处置方案之后还可以包括:确定执行的处置方案以及收集用户反馈数据,将所述处置方案以及用户反馈数据发送至服务端,作为新输入使服务端优化所述端智能体验配置。由此,将处置结果和用户体验反馈继续收集,作为新的数据输入,不断优化模型和策略。In addition, in one implementation, after executing the treatment plan, the following may be included: determining the treatment plan to be executed and collecting user feedback data, sending the treatment plan and user feedback data to the server as new inputs to enable the server to optimize the terminal intelligent experience configuration. Thus, the treatment results and user experience feedback are continuously collected as new data inputs to continuously optimize the model and strategy.
此外,为了优化实现效果,通过白盒+黑盒的模式进行决策判定。In addition, in order to optimize the implementation effect, decision-making is performed through the white box + black box model.
白盒模型:在线运行时权重已经具体,无需加载推理模型进行推理。白盒模型主要是在用户打开客户端(例如小程序)的冷启阶段,用于初筛低性能设备,以避免模型运行给设备带来额外的负担。这一策略确保了在后续流程中可以通过更高级的模型进行进一步的运行状态诊断和体验优化。黑盒模型:这是一种通过多层非线性变换、抽象全局特征学习等方法构建的深层网络架构,模拟人脑神经系统的分层处理信息的方式,用于解决分类、回归等问题。例如本申请实施例中,全链路动线预测模型可主要依赖于黑盒模型,如深度学习网络(例如LSTM),来预测用户的行为路径。这种模型通过分析用户的历史行为数据,尝试预测用户接下来可能的操作或偏好。由于深度学习模型通常涉及复杂的网络结构和大量的参数,其内部决策逻辑对于用户来说是不透明的,因此被称作黑盒模型。这类模型在预测用户未来行为轨迹、实现智能预加载等方面发挥重要作用,旨在提升用户体验的流畅性和个性化水平。体验分层模型则更多地使用白盒模型,如GBDT算法,来根据设备的运行状况对用户体验进行分层管理。通过分析设备的性能参数(如内存使用、处理器性能等),模型能够实时评估设备的性能水平,并据此调整应用的表现,比如降低图片质量或简化交互效果,以适应不同性能级别的设备。白盒模型的决策过程是透明的,允许开发者明确理解模型的决策逻辑和依据,便于调优和维护。White box model: When running online, the weights are already specific, and there is no need to load the inference model for inference. The white box model is mainly used to screen low-performance devices in the cold start phase when the user opens the client (such as a mini program) to avoid the model running bringing additional burden to the device. This strategy ensures that further operation status diagnosis and experience optimization can be performed through more advanced models in subsequent processes. Black box model: This is a deep network architecture constructed by methods such as multi-layer nonlinear transformation and abstract global feature learning, which simulates the hierarchical processing of information by the human brain nervous system and is used to solve classification, regression and other problems. For example, in an embodiment of the present application, the full-link dynamic line prediction model can mainly rely on a black box model, such as a deep learning network (such as LSTM), to predict the user's behavior path. This model analyzes the user's historical behavior data and attempts to predict the user's next possible operation or preference. Because deep learning models usually involve complex network structures and a large number of parameters, their internal decision-making logic is opaque to users, so they are called black box models. This type of model plays an important role in predicting users' future behavior trajectories and realizing intelligent preloading, aiming to improve the fluency and personalization of user experience. The experience layering model uses more white-box models, such as the GBDT algorithm, to manage the user experience in layers according to the device's operating status. By analyzing the device's performance parameters (such as memory usage, processor performance, etc.), the model can evaluate the device's performance level in real time and adjust the application's performance accordingly, such as reducing image quality or simplifying interaction effects to adapt to devices of different performance levels. The decision-making process of the white-box model is transparent, allowing developers to clearly understand the model's decision logic and basis, which is convenient for tuning and maintenance.
因此,在一种实现方式中,通过白盒模型或黑盒模型进行体验监控、体验分层或体验增强的体验决策,以及,根据白盒模型进行初步决策,并根据白盒模型初步决策结果确定是否利用黑盒模型进一步进行精细决策。Therefore, in one implementation, experience decisions for experience monitoring, experience stratification, or experience enhancement are made through a white box model or a black box model, and preliminary decisions are made based on the white box model, and it is determined whether to use the black box model to make further refined decisions based on the preliminary decision results of the white box model.
在一种实现方式中,设置体验分层模型为白盒模型模式;在客户端冷启动阶段,运行白盒模型模式的体验分层模型,根据体验分层模型的预测结果,确定是否继续执行端智能套件或关闭端智能套件;相应的,设置全链路动线预测模型为黑盒模型模式;在客户端热启动阶段,运行黑盒模型模式的全链路动线预测模型。In one implementation, the experience layering model is set to a white box model mode; in the cold start phase of the client, the experience layering model in the white box model mode is run, and according to the prediction results of the experience layering model, it is determined whether to continue to execute the end intelligent suite or shut down the end intelligent suite; accordingly, the full-link traffic flow prediction model is set to a black box model mode; in the hot start phase of the client, the full-link traffic flow prediction model in the black box model mode is run.
可见,本申请实施例提供的端智能体验实现方法,强调的是一种跨端、即时、智能的体验优化方法,它不仅仅关注于提升性能的某一方面,而是从用户体验的全局角度出发,通过实时感知用户状态并动态调整体验,以提供更优质的服务。其核心优势可包括:It can be seen that the end intelligent experience implementation method provided by the embodiment of the present application emphasizes a cross-end, instant, and intelligent experience optimization method. It does not only focus on improving a certain aspect of performance, but also starts from the overall perspective of user experience, by real-time perception of user status and dynamic adjustment of experience to provide better services. Its core advantages may include:
1、跨端智能体验:支持跨端使用,例如小程序、不同技术栈如web端等,其中,通过静态编译将前端代码转为多端支持代码,能够在不同的平台和设备上提供一致的优化效果;1. Cross-terminal intelligent experience: Supports cross-terminal use, such as mini-programs, different technology stacks such as the web, etc. Among them, the front-end code is converted into multi-terminal support code through static compilation, which can provide consistent optimization effects on different platforms and devices;
2、即时反应能力:能够实时感知用户的行为和设备状态,如网络情况、内存使用等,并根据这些信息做出即时的调整。这种即时反应能力能够在用户使用过程中不断优化体验,而不是仅在页面加载时进行一次性优化;2. Instant response capability: It can perceive user behavior and device status in real time, such as network conditions, memory usage, etc., and make instant adjustments based on this information. This instant response capability can continuously optimize the user experience during the user's use, rather than just a one-time optimization when the page is loaded;
3、智能决策与自动优化:端智能体验框架内置了黑盒模型和白盒模型,能够根据收集到的数据进行智能分析,从而做出针对性的优化决策。这种基于数据驱动的优化方法,能够更精准地识别和解决性能瓶颈。3. Intelligent decision-making and automatic optimization: The end-to-end intelligent experience framework has built-in black box models and white box models, which can perform intelligent analysis based on the collected data to make targeted optimization decisions. This data-driven optimization method can more accurately identify and solve performance bottlenecks.
4、全局策略支持:提供了一系列全局策略,如图片质量降级、包预加载、弱网切换等,这些策略能够在不同场景下灵活使用,从而实现端到端的性能优化。4. Global policy support: A series of global policies are provided, such as image quality degradation, package preloading, weak network switching, etc. These policies can be used flexibly in different scenarios to achieve end-to-end performance optimization.
综上,与传统的性能优化相比,传统方法往往侧重于针对特定问题的技术优化,如代码分割、懒加载、资源压缩等。而本发明实施例基于端智能体验框架,则更加注重于通过实时的数据分析和智能决策,从用户体验的角度出发,提供一种全面、动态和自适应的优化方案。这种方法不仅能够解决传统性能优化中遇到的一些局限性问题,还能够根据实际的使用场景和用户需求,提供更加个性化和优质的服务。In summary, compared with traditional performance optimization, traditional methods often focus on technical optimization for specific problems, such as code segmentation, lazy loading, resource compression, etc. The embodiment of the present invention is based on the end intelligent experience framework, and pays more attention to providing a comprehensive, dynamic and adaptive optimization solution from the perspective of user experience through real-time data analysis and intelligent decision-making. This method can not only solve some limitations encountered in traditional performance optimization, but also provide more personalized and high-quality services based on actual usage scenarios and user needs.
下面以体验监测、体验分层、体验增强三个角度,对本申请实施例提供的端智能体验实现方法进行示例性说明。The following is an illustrative description of the terminal intelligent experience implementation method provided in the embodiment of the present application from three perspectives: experience monitoring, experience stratification, and experience enhancement.
首先,参考图3-图5,对体验监测进行说明。First, experience monitoring is described with reference to FIG. 3 to FIG. 5 .
体验监测,是通过对用户体验数据实时的采集、分析和预警,主动去发现用户在使用客户端过程中的体验问题(例如是否发生了特定的复杂事件),并进行实时反馈和现场处置,从而提升用户体验。Experience monitoring is to proactively discover user experience issues (such as whether specific complex events have occurred) when using the client through real-time collection, analysis and early warning of user experience data, and provide real-time feedback and on-site disposal to improve user experience.
参见图3,示出了本申请实施例提供的端智能体验监测方法流程图。Referring to FIG3 , a flow chart of a method for monitoring terminal intelligent experience provided in an embodiment of the present application is shown.
S301:启动客户端,向服务端发送端智能体验配置请求,获取到复杂事件配置信息并进行初始化,复杂事件配置信息包括至少一项目标复杂事件的事件配置信息和时机配置信息;S301: Start the client, send a terminal intelligent experience configuration request to the server, obtain complex event configuration information and initialize it, where the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event;
S302:启动感知引擎,基于前端代码中的统一事件流处理工具,捕捉埋点数据,根据埋点数据确定是否触发了事件配置信息对应的目标复杂事件;S302: Start the perception engine, capture the embedded point data based on the unified event stream processing tool in the front-end code, and determine whether the target complex event corresponding to the event configuration information is triggered according to the embedded point data;
S303:响应于目标复杂事件的触发,运行决策引擎,以依据时机配置信息针对埋点数据进行时机匹配,确定是否满足目标复杂事件的时机;S303: In response to the triggering of the target complex event, the decision engine is run to match the timing of the buried point data according to the timing configuration information to determine whether the timing of the target complex event is met;
S304:在时机匹配成功后,运行触点引擎,以触发目标复杂事件对应的体验监测处置方案。S304: After the timing is successfully matched, the contact engine is run to trigger the experience monitoring and handling solution corresponding to the target complex event.
复杂事件可以理解为组合事件,例如,在大数据分析领域实际应用中,可能需要检测“连续登录失败事件”的发生,该事件实际上是“登录失败”和“登录失败”的组合事件,再比如可能需要检测用户下单支付行为,其也是组合事件,“下单事件”之后一段时间内发生“支付事件”,其中还包括了时间上的限制。类似上述多个事件的组合事件,被称为复杂事件。Complex events can be understood as combined events. For example, in the actual application of big data analysis, it may be necessary to detect the occurrence of "continuous login failure events", which is actually a combination of "login failure" and "login failure". Another example is that it may be necessary to detect the user's order payment behavior, which is also a combined event. The "payment event" occurs within a period of time after the "order event", which also includes time restrictions. Combined events like the above multiple events are called complex events.
在本申请实施例中,复杂事件配置信息可以通过一个端智能配置平台预先或实时配置,该端智能配置平台可以是一个可视化平台,可以设置在服务端。通过该端智能配置平台,用户(例如研发人员)可进行复杂事件信息配置,例如,端智能配置平台提供时机决策的配置,包括事件配置和时机配置,事件配置指的是端上用户事件的匹配规则,比如使用“spm== a.b.c&&click”来对应某个固定位置的点击事件,时机配置是事件的序列,用来对端上的用户事件流的发生序列进行复杂匹配,比如“点击进店”然后“加购”然后“返回首页”。特别的,为了针对不同类型客户端进行个性化配置,可以通过端智能配置平台,针对不同类型客户端配置对应的复杂事件集合,其中,复杂事件集合包括多项复杂事件,每项复杂事件包括事件配置信息和时机配置信息。In an embodiment of the present application, complex event configuration information can be configured in advance or in real time through an end intelligent configuration platform, which can be a visualization platform and can be set on the server. Through the end intelligent configuration platform, users (such as R&D personnel) can configure complex event information. For example, the end intelligent configuration platform provides configuration of timing decisions, including event configuration and timing configuration. Event configuration refers to the matching rules of user events on the end, such as using "spm== a.b.c&&click" to correspond to a click event at a fixed position. The timing configuration is a sequence of events, which is used to perform complex matching on the occurrence sequence of user event streams on the end, such as "click to enter the store" then "add to cart" and then "return to homepage". In particular, in order to perform personalized configuration for different types of clients, the corresponding complex event set can be configured for different types of clients through the end intelligent configuration platform, wherein the complex event set includes multiple complex events, and each complex event includes event configuration information and timing configuration information.
参见图4,为端智能体验监测中复杂事件配置与匹配逻辑示意图。在该例子中,首先在配置管理平台进行复杂事件配置,包括事件配置和时机配置,其中,事件配置(可理解为特征配置)是指对用户行为的累积和统计,如3天内进入店铺的次数;时机配置是指可触发决策和响应的特定条件,如两次进入店铺并加购。在配置管理平台完成配置后,可以将配置信息写入一个数据库DB,然后,由一个配置网关服务从该DB读取数据。在客户端启动之后,客户端自动从该配置网关服务中加载配置信息。获取到配置信息后,客户端的端智能套件根据该配置信息进行相关决策。具体的,通过决策引擎进行事件映射/过滤、模式匹配、行为累积等,从而完成时机决策。决策引擎确定时机匹配成功后,运行触点引擎以触发对应的处置方案,例如,通UI交互方式在界面中进行实时消息推送,或者针对当前操作失败事件自动进行页面跳转操作(例如针对多次支付失败进行前置收银台跳转)。See Figure 4, which is a schematic diagram of complex event configuration and matching logic in end-to-end intelligent experience monitoring. In this example, complex event configuration is first performed on the configuration management platform, including event configuration and timing configuration, where event configuration (which can be understood as feature configuration) refers to the accumulation and statistics of user behaviors, such as the number of times a store is entered within 3 days; timing configuration refers to specific conditions that can trigger decisions and responses, such as entering a store twice and adding purchases. After the configuration management platform is configured, the configuration information can be written into a database DB, and then a configuration gateway service reads data from the DB. After the client is started, the client automatically loads the configuration information from the configuration gateway service. After obtaining the configuration information, the end-to-end intelligent suite of the client makes relevant decisions based on the configuration information. Specifically, the decision engine performs event mapping/filtering, pattern matching, behavior accumulation, etc. to complete the timing decision. After the decision engine determines that the timing match is successful, it runs the contact engine to trigger the corresponding disposal plan, for example, real-time message push in the interface through UI interaction, or automatic page jump operation for the current operation failure event (for example, front-end cashier jump for multiple payment failures).
当客户端启动之后,会自动加载复杂事件配置信息,如步骤S301中,通过向服务端发送请求,获取复杂事件配置信息并进行初始化,其中复杂事件配置信息包括至少一项目标复杂事件的事件配置信息和时机配置信息。其中,复杂事件配置请求中可携带有经纬度信息、端信息以及用户ID,其中端信息可以是指客户端类型信息,服务端接收到上述复杂事件配置请求后,可依据端信息进行客户端类型判断,从而匹配该类型客户端对应的复杂事件配置信息并下发。When the client is started, the complex event configuration information will be automatically loaded. For example, in step S301, by sending a request to the server, the complex event configuration information is obtained and initialized, wherein the complex event configuration information includes at least one event configuration information and timing configuration information of a target complex event. The complex event configuration request may carry latitude and longitude information, terminal information, and user ID, wherein the terminal information may refer to the client type information. After receiving the complex event configuration request, the server may determine the client type according to the terminal information, thereby matching the complex event configuration information corresponding to the type of client and issuing it.
本申请实施例中,统一事件流处理工具,是指基于超级位置埋点的事件流标准化处理工具,可以根据各类型客户端(APP、小程序、H5 页面等)的埋点信息,将用户行为统一归纳为标准的事件,包含埋点信息、事件ID(eventId)、参数信息(properties)等信息字段。其他的页面或插件里的函数通过监听统一事件,即可获得当前用户在端上进行的操作。In the embodiment of the present application, the unified event stream processing tool refers to an event stream standardization processing tool based on super location tracking, which can classify user behaviors into standard events based on tracking information of various types of clients (APP, mini-programs, H5 pages, etc.), including tracking information, event ID (eventId), parameter information (properties) and other information fields. Functions in other pages or plug-ins can obtain the operations performed by the current user on the terminal by listening to the unified event.
其中,超级位置埋点包含如下几个方面的设置。Among them, super location tracking includes the following settings.
事件标记例如,通过a.b.c.d用来标记某个页面中的某个事件,其中,a位代表用户端层级、b位代表端内的某个页面、c位代表某个页面中的某个区块、d位代表某个区块中的某个具体的点击位置。For example, event marking is used to mark an event in a page through a.b.c.d, where a represents the user-side level, b represents a page within the terminal, c represents a block in a page, and d represents a specific click position in a block.
事件类型上述abcd位仅能标记一个具体的位置,而区分不同的事件类型,基于特定事件类型记录不同的通用参数信息,才能覆盖到所有的统计需求,同时也有助于降低数据加工的难度和资源消耗,例如可采用如下三种类型:页面类型:为了统计页面颗粒度的用户行为,当进入和退出页面时,需要记录用户id、设备id、时间戳、进入还是退出等参数,则可以统计每个页面的UV、PV、用户停留时长等数据;点击类型:长按、滑动等都算作点击类型;曝光类型:指的是对于某个特定模块级别的曝光,比如说商品的曝光、视频的曝光,结合点击类型的事件一起分析,则可以计算出某个商品、帖子、视频的点击率。Event type The abcd bits above can only mark a specific location, and different event types are distinguished. Different general parameter information is recorded based on specific event types to cover all statistical needs. It also helps to reduce the difficulty of data processing and resource consumption. For example, the following three types can be used: Page type: In order to count user behavior at the page granularity, when entering and exiting the page, it is necessary to record parameters such as user id, device id, timestamp, entry or exit, etc., so that the UV, PV, user stay time and other data of each page can be counted; Click type: Long press, sliding, etc. are all counted as click types; Exposure type: refers to the exposure at a specific module level, such as product exposure and video exposure. By analyzing click-type events together, the click rate of a product, post, or video can be calculated.
跳转关系在跳转关系上,只要在URL中记录上一跳和上两跳的关系即可。例如,对于“在购物车页面点击了第一个商品”,则可以上报一次点击事件:但上一跳可能是从某个商品详情过来的,则可以将上一跳进行记录,上两跳可能是从首页的“猜你喜欢”信息流的某商品跳转过来的,则可以将上两跳进行记录,基于此,将用户的动线进行了串联。In terms of jump relationships, it is sufficient to record the relationship between the previous jump and the previous two jumps in the URL. For example, for "clicking the first product on the shopping cart page", a click event can be reported: but the previous jump may be from a product detail, in which case the previous jump can be recorded; the previous two jumps may be from a product in the "Guess You Like" information flow on the homepage, in which case the previous two jumps can be recorded. Based on this, the user's movement lines are connected in series.
流量通道例如,针对首页的某一个频道包含了多个页面,此时引入流量通道。比如,把一个秒杀频道包含的多个页面,都标记为一个流量通道,那只要将这三个页面的浏览人数进行去重,则得到了这个频道的总UV,其他的点击、页面总访问数等也是同理在统计逻辑上处理即可。Traffic channel For example, if a channel on the homepage contains multiple pages, traffic channels are introduced. For example, multiple pages contained in a flash sale channel are marked as a traffic channel. Then, as long as the number of visitors to these three pages is deduplicated, the total UV of this channel can be obtained. Other clicks, total page visits, etc. can also be processed in the same statistical logic.
其中,在上述步骤S302在统一事件流处理工具捕捉到埋点数据之后,还可以包括:对埋点数据进行客户端类型分析及格式分析,并对埋点数据进行标准化处理,使得不同类型客户端的数据具有统一的格式和结构,其中,对埋点数据进行标准化处理可具体包括:解析埋点数据的埋点信息、事件ID、参数信息;对埋点信息、事件ID以及参数信息进行统一格式封装,转换为标准格式的事件信息。Among them, after the unified event stream processing tool captures the buried point data in the above step S302, it can also include: performing client type analysis and format analysis on the buried point data, and standardizing the buried point data so that the data of different types of clients have a unified format and structure, wherein the standardized processing of the buried point data can specifically include: parsing the buried point information, event ID, and parameter information of the buried point data; encapsulating the buried point information, event ID and parameter information in a unified format, and converting them into event information in a standard format.
可见,本申请实施例中的统一事件流处理工具,可以理解为C端标准化事件流处理工具,利用跨端(APP、小程序或H5)源代码中的超级位置埋点,捕捉埋点数据,并根据埋点数据进行封装然后转化为标准化事件。通过引入统一事件流处理工具,监听处理工具触发的目标复杂事件,当目标复杂事件发生时,开始触发复杂事件时机决策引擎的过滤和匹配。这种统一事件流处理方式,是实现跨端处理复杂事件的重要一环,通过基于超级位置埋点捕获埋点数据,可以在C端捕获到各种类型各种位置的事件信息,并通过对埋点数据进行标准化处理,使得后续利用统一的复杂事件时机决策引擎基于同一套复杂事件匹配规则库和相同的匹配逻辑进行复杂事件检测和处置成为可能。It can be seen that the unified event stream processing tool in the embodiment of the present application can be understood as a standardized event stream processing tool for the C-end, which uses the super-position buried points in the cross-end (APP, mini-program or H5) source code to capture the buried point data, and encapsulates the buried point data and then converts it into standardized events. By introducing a unified event stream processing tool, the target complex events triggered by the monitoring processing tool are monitored. When the target complex event occurs, the filtering and matching of the complex event timing decision engine is triggered. This unified event stream processing method is an important part of realizing cross-end processing of complex events. By capturing buried point data based on super-position buried points, event information of various types and locations can be captured on the C-end, and by standardizing the buried point data, it makes it possible to use a unified complex event timing decision engine to detect and handle complex events based on the same set of complex event matching rule bases and the same matching logic.
本申请实施例中,决策引擎用于针对复杂事件进行时机决策(可称为“时机决策引擎”),可基于自研的复杂事件匹配规则库并被声明为静态函数的复杂事件处理组件,其中,自研的复杂事件匹配规则库可采用JavaScript开发以兼容多类型客户端。自研复杂事件匹配规则库的好处在于,可以根据场景需求进行个性化配置或更改,据此复杂事件匹配规则库,进行具体的个性化规则匹配。其中,为了实现跨端适配的时机决策引擎,可通过前述JS静态编译的处理方式,将复杂事件处理组件声明为静态函数,以去除多端之间的差异性,得到跨端时机决策引擎。In an embodiment of the present application, a decision engine is used to make timing decisions for complex events (which may be referred to as a "timing decision engine"), which may be based on a self-developed complex event matching rule library and declared as a complex event processing component of a static function, wherein the self-developed complex event matching rule library may be developed using JavaScript to be compatible with multiple types of clients. The advantage of the self-developed complex event matching rule library is that it can be personalized or modified according to scenario requirements, and specific personalized rule matching is performed based on this complex event matching rule library. Among them, in order to implement a cross-end adaptive timing decision engine, the complex event processing component can be declared as a static function through the aforementioned JS static compilation processing method to remove the differences between multiple ends and obtain a cross-end timing decision engine.
在一种实现方式中,复杂事件时机决策引擎的具体处理过程为:根据预先配置的复杂事件匹配规则,对目标复杂事件进行事件处理和时机匹配,其中,复杂事件匹配规则包括事件规则、模式规则和时机规则。例如,针对触发的目标复杂事件,根据事件规则进行事件过滤,并针对过滤后的事件进行事件转换,得到标准格式的事件ID;根据模式规则对转换后的事件进行模式过滤,保留时机规则对应的事件,以及,对保留下的事件进行模式匹配,其中,根据模式规则对应的多条rule规则和item规则进行规则匹配以确定一轮模式匹配是否成功,根据多轮模式匹配进度确定模式匹配是否成功;模式匹配成功之后,根据时机规则进行疲劳度检测,其中,根据疲劳度缓存信息进行最新疲劳度检测,若疲劳度检测通过则确定时机匹配成功。In one implementation, the specific processing process of the complex event timing decision engine is: according to the pre-configured complex event matching rules, the target complex event is subjected to event processing and timing matching, wherein the complex event matching rules include event rules, pattern rules and timing rules. For example, for the triggered target complex event, event filtering is performed according to the event rules, and event conversion is performed on the filtered events to obtain event IDs in a standard format; pattern filtering is performed on the converted events according to the pattern rules, and the events corresponding to the timing rules are retained, and pattern matching is performed on the retained events, wherein rule matching is performed according to multiple rule rules and item rules corresponding to the pattern rules to determine whether a round of pattern matching is successful, and whether the pattern matching is successful is determined according to the progress of multiple rounds of pattern matching; after the pattern matching is successful, fatigue detection is performed according to the timing rules, wherein the latest fatigue detection is performed according to the fatigue cache information, and if the fatigue detection passes, it is determined that the timing matching is successful.
其中,复杂事件处理中的模式匹配,可以理解为两方面:每个简单事件的特征以及简单事件之间的组合关系。此外,还可以扩展模式的功能,例如,匹配检测的时间限制,每个简单事件是否可以重复出现,对于事件可重复出现的模式,遇到一个匹配后是否跳过后面的匹配等。模式匹配根据各个事件中的近邻关系及条件,检测连续的事件或不连续但先后发生的事件,模式还可能有时间限制,如果在设定时间范围内没用满足匹配条件,就会导致模式匹配超时。Among them, pattern matching in complex event processing can be understood as two aspects: the characteristics of each simple event and the combination relationship between simple events. In addition, the function of the pattern can be expanded, such as the time limit for matching detection, whether each simple event can be repeated, and whether to skip the subsequent matches after encountering a match for the pattern of event recurrence. Pattern matching detects continuous events or discontinuous but sequential events based on the neighbor relationship and conditions in each event. The pattern may also have a time limit. If the matching conditions are not met within the set time range, the pattern matching will time out.
参见图5,示出了时机决策引擎处理过程的一个示例。Referring to FIG. 5 , an example of the timing decision engine processing is shown.
S501,事件触发:监听到统一事件流处理工具触发的目标复杂事件。S501, event triggering: monitoring a target complex event triggered by a unified event stream processing tool.
S502,事件过滤:根据事件规则进行过滤,比如当前只配置了点击事件,那么所有的曝光事件、滚动事件都将被过滤,减轻后续匹配压力。S502, event filtering: filtering according to event rules. For example, if only click events are configured currently, all exposure events and scrolling events will be filtered to reduce the subsequent matching pressure.
S503,事件转换:将过滤之后的事件转化为可以进行匹配的统一事件,其中把前端的事件映射为后台配置的事件的ID。S503, event conversion: converting the filtered events into unified events that can be matched, wherein the front-end events are mapped to the IDs of the events configured in the back-end.
S504,模式(Pattern)过滤:在一个时机中存在多个复杂规则,每个规则配置的事件不一样,为了降低匹配压力,这里进一步过滤,只留此规则用到的事件。S504, pattern filtering: There are multiple complex rules in one opportunity, and the events configured for each rule are different. In order to reduce the matching pressure, further filtering is performed here to keep only the events used by this rule.
S505,模式匹配:例如通过深度优先遍历规则,依次对事件进行匹配,包含多条rule规则。其中,模式匹配进一步包括rule匹配和item匹配,其中,rule规则是指复杂规则中的一条规则,包含多个item;item匹配:item与后台配置的事件一一对应,这里进行底层的事件匹配,完成后按层级返回匹配结果。S505, pattern matching: for example, by traversing the rules in depth first, the events are matched in sequence, including multiple rule rules. Among them, pattern matching further includes rule matching and item matching, wherein the rule rule refers to a rule in a complex rule, including multiple items; item matching: the item corresponds to the event configured in the background one by one, and the underlying event matching is performed here, and the matching results are returned by level after completion.
S506,查看匹配进度:每完成一个模式匹配进度加一,全部完成进入下一个环节。S506, check the matching progress: the progress is increased by one each time a pattern match is completed, and the next step is entered after all are completed.
S507,匹配结果:确定匹配成功或者失败。S507, matching result: determining whether the matching is successful or failed.
S508疲劳度检测:匹配成功之后检测疲劳度,比如规则设置为:3天内触发三次下单;若3天内如果下单小于等于3次,疲劳度为真(true),允许后续回调行为;若3天内如果下单大于3次,疲劳度为假(false),不再允许进行后续回调行为。其中,可将历史疲劳度缓存到本地,下次进入客户端会加载。S508 Fatigue detection: After the match is successful, fatigue is detected. For example, the rule is set as follows: trigger three orders within 3 days; if the order is less than or equal to 3 times within 3 days, fatigue is true (true), and subsequent callback behavior is allowed; if the order is more than 3 times within 3 days, fatigue is false (false), and subsequent callback behavior is no longer allowed. Among them, the historical fatigue can be cached locally and loaded next time the client is entered.
步骤509:决策完成。Step 509: Decision completed.
在一种实现方式中,可在时机匹配成功之后,自动调用复杂事件时机决策引擎预先注册的回调函数(例如callback函数),通过回调函数启动触点引擎,以执行与目标复杂事件对应的处置方案。其中,如前描述的,端智能配置平台可实现复杂事件配置,与此对应的,可以通过端智能配置平台,接收目标复杂事件的时机匹配成功信息,并根据目标复杂事件的场景属性和/或目标复杂事件对应类型客户端的端属性,确定对应的处置方案。其中,场景属性可以包括应用场景类型信息,客户端端属性用以区分客户端类型,因此,通过上述方式可以实现针对目标复杂事件进行个性化处置方案的处置,其中,处置方案例如可以是提示窗或浮层的方式。In one implementation, after the timing match is successful, the callback function (e.g., callback function) pre-registered by the complex event timing decision engine can be automatically called, and the contact engine can be started through the callback function to execute the disposal plan corresponding to the target complex event. Wherein, as described above, the terminal intelligent configuration platform can realize the configuration of complex events. Correspondingly, the terminal intelligent configuration platform can receive the timing match success information of the target complex event, and determine the corresponding disposal plan according to the scene attributes of the target complex event and/or the terminal attributes of the corresponding type of client of the target complex event. Wherein, the scene attributes can include the application scene type information, and the client terminal attributes are used to distinguish the client type. Therefore, the above method can be used to realize the disposal of personalized disposal plans for the target complex event, wherein the disposal plan can be, for example, a prompt window or a floating layer.
以“用户连续三次支付失败自动切换至前置收银台”为例,对体验监测进行示例性说明。Taking "user automatically switches to the front checkout counter when payment fails three times in a row" as an example, experience monitoring is explained illustratively.
步骤1:在端智能配置平台,配置用户支付失败事件(如果已经配置,可复用),此处假设该事件为事件F;Step 1: On the client intelligent configuration platform, configure the user payment failure event (if it has already been configured, it can be reused). Here, it is assumed that the event is event F.
步骤2:在端智能配置平台,配置用户支付失败事件发生次数为三次,事件D匹配次数为3;Step 2: On the end intelligent configuration platform, configure the number of times the user payment failure event occurs to three times and the number of times event D matches to 3;
步骤3:C端启动客户端之后,请求配置信息并进行初始化;Step 3: After starting the client, the C end requests configuration information and performs initialization;
步骤4:用户在支付失败一次(统一事件流处理工具通过埋点确定)之后,触发时机决策引擎进行时机匹配,次数记为1;Step 4: After the user fails to pay once (determined by the unified event stream processing tool through tracking), the timing decision engine is triggered to match the timing, and the number of times is recorded as 1;
步骤5:用户在支付失败两次之后,触发时机决策引擎进行时机匹配,次数记为2;Step 5: After the user fails to pay twice, the timing decision engine is triggered to perform timing matching, and the number of times is recorded as 2;
步骤6:用户在支付失败三次之后,触发时机决策引擎进行时机匹配,次数记为3;Step 6: After the user fails to pay three times, the timing decision engine is triggered to perform timing matching, and the number of times is recorded as 3;
步骤7:匹配度检测通过后,调用注册的回调函数(例如callback函数);Step 7: After the matching test is passed, the registered callback function (such as callback function) is called;
步骤8:运行触点引擎,自动切换至前置收银台,前置收银台能在商户页面选择具体支付平台完成支付,避免跳转到中间页,帮助优化网银支付体验。前置收银台支持在Web、WAP、App 端集成。Step 8: Run the touchpoint engine and automatically switch to the front cashier. The front cashier can select a specific payment platform on the merchant page to complete the payment, avoiding jumping to the intermediate page and helping to optimize the online banking payment experience. The front cashier supports integration on the Web, WAP, and App terminals.
在上述“用户连续三次登录失败”例子中,时机决策引擎是根据匹配规则进行匹配的引擎,只是进行数据解析和规则匹配,可以理解为被声明为静态函数但会缓存一部分执行过程的核心组件。其中关于匹配规则以及复杂事件之间的关联,可以在服务端进行预先配置,而执行过程中的中间环节(触发复杂事件与时机匹配)则没用关联,可以理解为各自为黑盒的实现方式。再以“监测页面同一位置反复点击无响应”为例,首先进行监测策略的配置,例如,先根据场景需要配置监测策略,约定匹配规则与触发时机:事件匹配逻辑:通过ab位区分页面,通过c位区分场景,通过d位 区分坑位,通过一个时机配置即可覆盖页面上所有可点击区域;触发策略:2s内连续3次及以上点击;然后,通过埋点将用户异常实时上报,对能做出处置的异常实时进行干预,例如,针对不同点位做出针对性处理,如页面降级,跳转至H5页面详情页等。由此,相比于传统监控很难感知偶发性异常相比,本申请实施例体验监测可基于用户会话第一时间发现问题,并在客诉产生前先行介入处理,改善用户体验。In the above example of "user failed to log in three times in a row", the timing decision engine is an engine that matches according to the matching rules. It only performs data parsing and rule matching. It can be understood as a core component that is declared as a static function but caches part of the execution process. The association between matching rules and complex events can be pre-configured on the server side, while the intermediate links in the execution process (triggering complex events and timing matching) are not associated, which can be understood as a black box implementation method. Taking "no response after repeated clicks at the same location on the monitoring page" as an example, the monitoring strategy is first configured. For example, the monitoring strategy is configured according to the needs of the scenario, and the matching rules and triggering timing are agreed upon: event matching logic: distinguish pages by ab positions, distinguish scenarios by c positions, and distinguish pit positions by d positions. All clickable areas on the page can be covered by a timing configuration; trigger strategy: 3 or more consecutive clicks within 2s; then, user anomalies are reported in real time through embedding points, and anomalies that can be handled are intervened in real time. For example, targeted processing is made for different points, such as page downgrade, jump to H5 page details page, etc. Therefore, compared with traditional monitoring that is difficult to perceive occasional anomalies, the experience monitoring in the embodiment of the present application can discover problems in the first time based on user sessions, and intervene in processing before customer complaints are generated, thereby improving user experience.
另外,以“提单手机号智能纠错”为例,在用户下单场景下,通过相似度分数分布进行决策,当确定用户错填手机号的可能性较高时(例如打分在0.7-1之间),通过手机号纠偏,提醒用户一键修改手机号(前端可实现),例如,通过气泡提示进行纠偏,并且可以预判用户将填入的手机号而给予一键填入的功能。In addition, taking "intelligent correction of bill of lading mobile phone number" as an example, in the scenario where the user places an order, a decision is made based on the similarity score distribution. When it is determined that the user is likely to have filled in the wrong mobile phone number (for example, the score is between 0.7-1), the mobile phone number is corrected to remind the user to modify the mobile phone number with one click (this can be achieved on the front end). For example, correction is performed through bubble prompts, and the mobile phone number that the user will fill in can be predicted and the one-click filling function can be provided.
此外,体验监测还有许多其他场景实例,例如弱WIF场景自动切换移动网络等,本申请实施例不一一说明。In addition, there are many other scenario instances of experience monitoring, such as automatic switching of mobile networks in weak WIF scenarios, etc., which are not described one by one in the embodiments of this application.
在一种实现方式中,上述方法还包括如下步骤:判断目标复杂事件是实时行为事件或累计行为事件,若是实时行为事件,则实时获取用户行为数据,并实时基于用户行为数据对应的埋点数据进行复杂事件触发判断及时机匹配,若是累计行为时机,则分多次获取用户行为数据,并对用户行为数据进行累积,以及,基于当前累积的用户行为数据对应的埋点数据进行复杂事件触发判断及时机匹配。可见通过上述方式,将用户行为数据作为匹配的依据,可以实现更智能化的决策。与针对用户的实时用户行为事件进行处理不同,针对累计行为事件(比如:一周内点单 5次)的处理,可以实现领域联动:时机决策的过程中可以使用累积的用户数据,并提供完善的接入方案。In one implementation, the method further includes the following steps: determining whether the target complex event is a real-time behavior event or a cumulative behavior event; if it is a real-time behavior event, obtaining user behavior data in real time, and performing complex event trigger judgment and timing matching based on the buried data corresponding to the user behavior data in real time; if it is a cumulative behavior timing, obtaining user behavior data in multiple times, accumulating the user behavior data, and performing complex event trigger judgment and timing matching based on the buried data corresponding to the currently accumulated user behavior data. It can be seen that through the above method, using user behavior data as the basis for matching can achieve more intelligent decision-making. Unlike processing real-time user behavior events for users, processing cumulative behavior events (for example: ordering 5 times in a week) can achieve domain linkage: accumulated user data can be used in the process of timing decision-making, and a complete access solution can be provided.
可见,通过上述体验监测技术方案,本申请实施例针对适用于多类型客户端的JavaScript前端代码,在前端检测复杂事件并处置,其中在客户端启动之后,向服务端发送复杂事件配置请求,获取复杂事件配置信息并进行初始化,然后基于前端代码中的统一事件流处理工具,捕捉埋点数据,根据所述埋点数据确定是否触发了所述事件配置信息对应的目标复杂事件;接着,响应于目标复杂事件的触发,运行决策引擎,以依据所述时机配置信息针对所述埋点数据进行时机匹配,确定是否满足所述目标复杂事件的时机;最后,在时机匹配成功后,触发回调函数,以执行目标复杂事件对应的处置方案。本申请实施例中,相较于主要依赖服务端进行复杂事件检测及处置的方式,在C端侧进行复杂事件处理,由此可针对实时获取的数据进行实时性的规则匹配,由此缩减处理时长,具有低延迟以及维护成本低的优势。It can be seen that through the above-mentioned experience monitoring technical solution, the embodiment of the present application is for the JavaScript front-end code applicable to multiple types of clients, and complex events are detected and handled at the front end, wherein after the client is started, a complex event configuration request is sent to the server, complex event configuration information is obtained and initialized, and then based on the unified event stream processing tool in the front-end code, the buried data is captured, and it is determined whether the target complex event corresponding to the event configuration information is triggered according to the buried data; then, in response to the triggering of the target complex event, the decision engine is run to match the timing for the buried data according to the timing configuration information to determine whether the timing of the target complex event is met; finally, after the timing is matched successfully, the callback function is triggered to execute the handling plan corresponding to the target complex event. In the embodiment of the present application, compared with the method of mainly relying on the server to detect and handle complex events, complex event processing is performed on the C-end side, thereby real-time rule matching can be performed for the real-time acquired data, thereby reducing the processing time, and having the advantages of low latency and low maintenance cost.
并且,与现有技术复杂事件处理方案仅能适用一个类型客户端的方式不同,本申请实施例也在此方面进行改进,以期实现跨端适用的一套复杂事件处理方案。为了达到适用于多类型客户端的复杂事件处理方案,本申请实施例依托JavaScript(JS)进行前端代码开发,由于JS 开发兼容APP、小程序、H5 各类型客户端,因此可实现跨端的目的,通过一套事件处理机制即可对各类型客户端通用,大大减轻了开发压力。Moreover, unlike the existing complex event processing scheme that can only be applied to one type of client, the embodiment of the present application also makes improvements in this regard, in order to achieve a set of complex event processing schemes applicable across terminals. In order to achieve a complex event processing scheme applicable to multiple types of clients, the embodiment of the present application relies on JavaScript (JS) for front-end code development. Since JS development is compatible with APP, mini-programs, and H5 clients, it can achieve the purpose of cross-terminal. Through a set of event processing mechanisms, it can be universal for various types of clients, greatly reducing the development pressure.
此外,为了方便地针对不同类型客户端进行个性化复杂事件配置,可通过一个端智能配置平台进行可视化配置,从而方便地配置复杂事件的匹配规则,使策略更加灵活和易用。借助端智能配置平台,达到“输入配置”-“输出时机匹配结果”的简单实现方式。In addition, in order to facilitate personalized complex event configuration for different types of clients, visual configuration can be performed through an end-to-end intelligent configuration platform, so as to easily configure the matching rules of complex events, making the strategy more flexible and easy to use. With the help of the end-to-end intelligent configuration platform, a simple implementation method of "input configuration" - "output timing matching results" can be achieved.
接下来,参考图6-图7,对体验分层进行说明。Next, the experience layering is explained with reference to FIG. 6 and FIG. 7 .
参见图6,为本申请实施例提供的端智能体验分层方法流程图。See Figure 6, which is a flow chart of the terminal intelligent experience layering method provided in an embodiment of the present application.
S601:启动客户端,向服务端发送端智能体验配置请求,获取到体验分层模型;S601: Start the client, send a request for intelligent experience configuration to the server, and obtain an experience layering model;
S602:启动感知引擎,获取设备硬件静态数据、设备实时状态数据以及场景实时运行数据;S602: Start the perception engine to obtain static data of device hardware, real-time status data of the device, and real-time operation data of the scene;
S603:触发决策引擎,将获取的设备硬件静态数据、设备实时状态数据以及场景实时运行数据输入至体验分层模型,预测设备运行状态;S603: triggering the decision engine to input the acquired static data of device hardware, real-time status data of the device, and real-time operation data of the scenario into the experience layering model to predict the operation status of the device;
S604:运行触点引擎,根据设备运行状态的预测结果触发对应的体验分层处置方案。S604: Run the contact engine to trigger the corresponding experience layering solution according to the prediction result of the device operation status.
在实际应用中,试图通过对用户设备的运行状态进行甄别,对低运行状态的设备给予策略上的优化,以期达到正常的运行状态及用户体验。以小程序为例,受限于小程序容器及框架,以及繁杂的场景逻辑,在性能、体验方面较难做到各个机型的体验一致,基于长尾理论,把解决的重点放在了低性能设备上,以少量的资源辅助,解决体验上的拉胯问题。现有方式中针对低性能设备的判断,通过基于以下几个关键因素:硬件规格、价格、性能和功能等,这些判断标准是相对静态的,并不能根据用户设备的实时运行状态做更细致的区分。比如一个高性能手机在打开了几个大型游戏app之后,再打开目标小程序,页面非常卡顿时,传统的判别方式仍认为此刻是高性能设备。而本申请实施例会结合页面渲染的表现来进行实时判断。而本申请实施例的体验分层方案中,从用户实际使用角度进行用户设备运行状态评估,与以往僵化地根据出厂硬件信息对设备不同,智能体分层以应用实际运行的多维度耗时数据为依据,利用端智能体验分层模型,对用户设备数据进行综合实时加权打分,并根据打分进行相应的处置。In actual applications, attempts are made to identify the operating status of user devices and to strategically optimize devices in low operating states in order to achieve normal operating status and user experience. Taking mini programs as an example, limited by the mini program container and framework, as well as the complicated scene logic, it is difficult to achieve consistent experience for each model in terms of performance and experience. Based on the long tail theory, the focus of the solution is placed on low-performance devices, with the assistance of a small amount of resources to solve the problem of poor experience. In the existing method, the judgment of low-performance devices is based on the following key factors: hardware specifications, price, performance and functions, etc. These judgment criteria are relatively static and cannot be distinguished more finely according to the real-time operating status of the user's device. For example, after a high-performance mobile phone opens several large-scale game apps, it opens the target mini program, and when the page is very stuck, the traditional judgment method still considers it to be a high-performance device at this moment. The embodiment of the present application will make real-time judgments in combination with the performance of page rendering. In the experience stratification scheme of the embodiment of the present application, the operating status of the user device is evaluated from the perspective of actual user use. Different from the previous rigid evaluation of devices based on factory hardware information, the intelligent body stratification is based on the multi-dimensional time-consuming data of the actual operation of the application, and uses the end-to-end intelligent experience stratification model to perform comprehensive real-time weighted scoring of user device data, and take corresponding measures based on the score.
针对体验分层方案,需要首先在服务端进行数据收集和处理,并训练完成体验分层模型,然后,将体验分层模型下发至前端,在客户端运行过程中,基于获取的目标数据,在前端实时地通过体验分层模型进行分层预测,并基于用户设备运行状态进行场景降级等处置。下面从数据收集和模型结构确定两个角度对方案进行介绍。For the experience stratification solution, it is necessary to first collect and process data on the server side, and train the experience stratification model. Then, the experience stratification model is sent to the front end. During the client operation, based on the acquired target data, the front end uses the experience stratification model to make stratification predictions in real time, and performs scene degradation and other measures based on the operating status of the user's device. The following introduces the solution from two perspectives: data collection and model structure determination.
一.数据收集及处理1. Data Collection and Processing
数据的采集和处理是模型训练的关键环节。针对数据处理可以做以下流程上的划分:特征维度划分、数据采集与上报、数据读取、数据清洗、数据划分、数据预处理。经过这些步骤给到模型标准的输入。Data collection and processing are key links in model training. Data processing can be divided into the following processes: feature dimension division, data collection and reporting, data reading, data cleaning, data division, and data preprocessing. These steps provide standard input to the model.
(1)数据维度划分(1) Data dimension division
与现有低性能设备判定方案不同,本方案中的数据不仅包括手机型号、像素比等静态数据,还包括手机实时动态运行的数据,如当前可用内存、告警次数、各页面加载耗时、各阶段内存的变化情况等。手机运行好坏更具实时性的特性,该方案能够及时捕捉到运行状态不佳的时刻,辅以降级手段,让运行状态不再劣化,甚至转好。Different from the existing low-performance device determination scheme, the data in this scheme includes not only static data such as mobile phone model and pixel ratio, but also real-time dynamic data of mobile phone operation, such as current available memory, number of alarms, time taken to load each page, memory changes at each stage, etc. The operation of mobile phones is more real-time, and this scheme can capture the moment of poor operation status in time, and use downgrade measures to prevent the operation status from deteriorating or even improving.
以体验分层模型为例,所收集的数据可分为静态数据和动态数据,静态数据包括用户手机的硬件条件,如手机型号、配置、像素比等,动态数据分为设备相关与场景相关数据。Taking the experience layering model as an example, the collected data can be divided into static data and dynamic data. Static data includes the hardware conditions of the user's mobile phone, such as mobile phone model, configuration, pixel ratio, etc., and dynamic data is divided into device-related data and scenario-related data.
本申请实施例中,采集的数据按照类型可划分为:设备硬件静态数据、设备实时状态数据以及场景实时运行数据,其中,设备硬件静态数据例如包括手机型号、内存容量等参数;设备实时状态数据,是指动态变化的设备数据,例如电量或网络状态等参数;场景实时运行数据,是指与场景运行有关的数据,包括但不限于首页场景、店铺场景等,例如包括首页加载耗时等参数。本申请实施例对于各类型数据的具体参数不作限定,例如包括参数a、参数b、参数c等。In the embodiment of the present application, the collected data can be divided into the following types: static data of device hardware, real-time status data of device, and real-time operation data of scenes, where static data of device hardware includes parameters such as mobile phone model and memory capacity; real-time status data of device refers to dynamically changing device data, such as parameters such as power or network status; real-time operation data of scenes refers to data related to scene operation, including but not limited to homepage scenes, store scenes, etc., such as parameters such as the time it takes to load the homepage. The embodiment of the present application does not limit the specific parameters of each type of data, such as parameters a, b, c, etc.
(2)数据采集与上报(2) Data collection and reporting
数据采集方式按照特征维度不同而不同。静态数据只读取一次进行缓存,减少耗时,动态数据在采集节点时做提取动作,保证精准。The data collection method varies according to the feature dimension. Static data is only read once for caching to reduce time consumption, and dynamic data is extracted at the collection node to ensure accuracy.
以小程序为例,数据上报方式支持不同维度:Taking the mini program as an example, data reporting methods support different dimensions:
普通埋点数据提供天维度报表,适用于T+1离线分析场景;Ordinary tracking data provides daily dimension reports, which are suitable for T+1 offline analysis scenarios;
highway可分钟级别回传数据,适用于在线实时分析的场景;Highway can transmit data back in minutes, which is suitable for online real-time analysis scenarios;
answer灵活度比较高,可自定义数据形态,适用于更丰富的场景;Answer is relatively flexible and can customize data formats, which is suitable for a wider range of scenarios;
mtop夹带,灵活度高,实时性高,但受限于接口qps及触发时机,适用于端云协同场景;mtop entrainment has high flexibility and real-time performance, but is limited by the interface QPS and trigger timing, and is suitable for end-cloud collaboration scenarios;
(3)数据预处理(3) Data preprocessing
数据的质量,直接决定了模型的预测效果和泛化能力,决定了模型的天花板。因此数据处理涉及到几个维度:准确性、完整性、一致性、实效性、可信性、可解释性。针对体验分层模型的数据虽然经过了基本的数据清洗,但仍包含了大量的噪音。The quality of data directly determines the prediction effect and generalization ability of the model, and determines the ceiling of the model. Therefore, data processing involves several dimensions: accuracy, completeness, consistency, effectiveness, credibility, and interpretability. Although the data for the experience layering model has undergone basic data cleaning, it still contains a lot of noise.
因此在模型之前需要进行预处理,通过填补缺失值、光滑噪音数据、平滑或者删除离群点、解决不一致数据等手段,从而获取到标准的、干净的、平滑的数据。另外,还可以通过分箱的方式将连续数据离散化,可按一定规则将连续的数据分到对应的桶中。分箱规则有无监督分箱(等频分箱、等距分箱)、有监督分箱(卡方分箱、决策树分箱)等。常用等频和等距。结合体验分层数据特点,可采取等频分箱。Therefore, preprocessing is required before the model is built. Standard, clean, and smooth data can be obtained by filling missing values, smoothing noise data, smoothing or deleting outliers, and resolving inconsistent data. In addition, continuous data can be discretized by binning, and continuous data can be divided into corresponding buckets according to certain rules. The binning rules include unsupervised binning (equal frequency binning, equal interval binning), supervised binning (chi-square binning, decision tree binning), etc. Equal frequency and equal interval are commonly used. Combined with the characteristics of experience stratified data, equal frequency binning can be adopted.
二.模型结构及训练2. Model structure and training
本申请实施例中,可采用卷积神经网络(CNN)构建体验分层模型。CNN的训练过程包括前向传播(网络根据输入数据和当前权重计算输出),计算损失(基于输出和真实标签),反向传播(根据损失计算每一层的梯度),以及权重更新(使用梯度下降算法或其他优化算法调整网络权重)。In the embodiment of the present application, a convolutional neural network (CNN) can be used to construct an experience layering model. The training process of CNN includes forward propagation (the network calculates the output based on the input data and the current weight), calculating the loss (based on the output and the true label), back propagation (calculating the gradient of each layer based on the loss), and weight update (adjusting the network weight using the gradient descent algorithm or other optimization algorithms).
经过进一步研究和探索发现,体验分层模型首先要解决的是分类问题,经典算法的如 GBDT、CNN、DNN等是候选模型。通过先后尝试了卷积神经网络(CNN)和深度神经网络(DNN)。他们各具优劣势。CNN主要设计用来处理具有空间连续性的数据(如图像),通过引入卷积操作和池化操作,能够有效地处理图像等空间数据,但是在其他类型的数据上可能不如DNN高效。DNN在结构上更加简单和通用,但可能面临巨大的参数空间和过拟合问题,但是可以优化避免这种问题。基于采集的是手机静态数据和内存等动态数据,在DNN上的综合表现优于CNN。结合两个算法的优势,在优化方案中,可以借助CNN进行特征提取,然后将提取的特征输入到DNN中进行最终的模型训练。After further research and exploration, it was found that the first problem to be solved in the experience layering model is the classification problem. Classic algorithms such as GBDT, CNN, and DNN are candidate models. We have tried convolutional neural networks (CNN) and deep neural networks (DNN) successively. They each have their own advantages and disadvantages. CNN is mainly designed to process data with spatial continuity (such as images). By introducing convolution operations and pooling operations, it can effectively process spatial data such as images, but it may not be as efficient as DNN on other types of data. DNN is simpler and more general in structure, but it may face huge parameter space and overfitting problems, but it can be optimized to avoid such problems. Based on the collection of static data of mobile phones and dynamic data such as memory, the comprehensive performance of DNN is better than CNN. Combining the advantages of the two algorithms, in the optimization scheme, CNN can be used for feature extraction, and then the extracted features can be input into DNN for the final model training.
在一种实现方式中,通过“白盒+黑盒模型”的方式训练得到体验分层模型。如前描述的,白盒模型,其在线运行时权重已经具体,无需加载推理模型进行推理。白盒模型主要是在用户打开客户端(例如小程序)的冷启阶段,用于初筛低性能设备,以避免模型运行给设备带来额外的负担。这一策略确保了在后续流程中可以通过更高级的模型进行进一步的运行状态诊断和体验优化。黑盒模型:这是一种通过多层非线性变换、抽象全局特征学习等方法构建的深层网络架构,模拟人脑神经系统的分层处理信息的方式,用于解决分类、回归等问题。具体的,可以通过“白盒模型训练GBDT结构+黑盒模型训练DNN结构”的方式,得到体验分层模型。这种方式的好处在于,首先通过使用白盒模型(如GBDT算法),来根据设备的运行状况对用户体验进行分层管理。通过分析设备的性能参数(如内存使用、处理器性能等),模型能够实时评估设备的性能水平,并据此调整应用的表现,比如降低图片质量或简化交互效果,以适应不同性能级别的设备。白盒模型的决策过程是透明的,允许开发者明确理解模型的决策逻辑和依据,便于调优和维护。然后,通过使用黑盒模型(如DNN)通常涉及复杂的网络结构和大量的参数,其内部决策逻辑对于用户来说是不透明的,这类模型预测能力强,旨在提升用户体验的流畅性和个性化水平。因此,通过“白盒+黑盒”分别训练不同网络结构得到体验分层模型的方式,可以发挥各自模型的特点,通过白盒模型初筛低性能设备,通过黑盒模型进行准确预测,以实时分级处理方案。In one implementation, the experience hierarchical model is trained by the "white box + black box model" method. As described above, the weight of the white box model is already specific when it is running online, and there is no need to load the inference model for inference. The white box model is mainly used to screen low-performance devices in the cold start phase when the user opens the client (such as the mini program) to avoid the model running bringing additional burden to the device. This strategy ensures that further operation status diagnosis and experience optimization can be performed through more advanced models in the subsequent process. Black box model: This is a deep network architecture built by methods such as multi-layer nonlinear transformation and abstract global feature learning. It simulates the hierarchical processing of information by the human brain nervous system and is used to solve classification, regression and other problems. Specifically, the experience hierarchical model can be obtained by the "white box model training GBDT structure + black box model training DNN structure" method. The advantage of this method is that first, by using a white box model (such as the GBDT algorithm), the user experience is hierarchically managed according to the operating status of the device. By analyzing the performance parameters of the device (such as memory usage, processor performance, etc.), the model can evaluate the performance level of the device in real time and adjust the performance of the application accordingly, such as reducing the image quality or simplifying the interaction effect to adapt to devices of different performance levels. The decision-making process of the white-box model is transparent, allowing developers to clearly understand the decision logic and basis of the model, which is convenient for tuning and maintenance. Then, by using black-box models (such as DNN), which usually involve complex network structures and a large number of parameters, their internal decision logic is opaque to users. Such models have strong predictive capabilities and are designed to improve the smoothness and personalization of user experience. Therefore, by using the "white box + black box" method to train different network structures to obtain the experience layering model, the characteristics of each model can be brought into play, low-performance devices can be initially screened through the white-box model, and accurate predictions can be made through the black-box model to achieve real-time hierarchical processing solutions.
因此在一种实现方式中,通过训练第一网络结构(例如GBDT或CNN)得到第一体验分模型,以及训练第二网络结构(如DNN)得到第二体验分层模型,在决策过程中,通过第一体验分层模型进行白盒预筛以及通过第二体验分层模型进行黑盒精筛,从而预测出设备运行状态。例如,通过白盒预筛,初步判定15%设备为运行状态不佳,可降级处置,然后,通过黑盒精筛,精细化判定剩余85%设备,仍有30%可降级处置。这种“白盒+黑盒”相结合的体验分层方式,可全面地进行设备分层处置,实验证明,可使50%设备显著节流,平均内存告警次数减少10%,大大提高客户端运行流畅度、改善用户体验。Therefore, in one implementation, the first experience score model is obtained by training the first network structure (such as GBDT or CNN), and the second experience hierarchical model is obtained by training the second network structure (such as DNN). In the decision-making process, the first experience hierarchical model is used for white box pre-screening and the second experience hierarchical model is used for black box fine screening, so as to predict the operation status of the device. For example, through white box pre-screening, 15% of the devices are initially determined to be in poor operation status and can be downgraded. Then, through black box fine screening, the remaining 85% of the devices are finely determined, and 30% can still be downgraded. This "white box + black box" combined experience stratification method can comprehensively perform device stratification. Experiments have shown that it can significantly save 50% of the devices and reduce the average number of memory alarms by 10%, greatly improving the smoothness of client operation and improving user experience.
在端智能体验分层方案中,还有一个技术关键在于,将在服务端训练好的体验分层模型进行发布和部署,使得客户端在运行过程中可以获取到体验分层模型并利用模型进行实时预测,相较于服务端或云端从前端获取数据然后再进行模型预测的方式,在前端进行预测可减少数据上报的步骤,从而加快预测的速度,减少延迟,并且,这种在前端进行模型预测方式,不限于网络状态,即使在网络卡顿或故障时,依托前端数据处理能力,也可以完成模型预测。因此,在客户端运行体验分层模型,是一个技术点。In the end-to-end intelligent experience stratification solution, another technical key is to publish and deploy the experience stratification model trained on the server side, so that the client can obtain the experience stratification model during operation and use the model for real-time prediction. Compared with the server or cloud obtaining data from the front end and then performing model prediction, prediction on the front end can reduce the steps of data reporting, thereby speeding up the prediction and reducing latency. Moreover, this model prediction method on the front end is not limited to the network status. Even when the network is stuck or fails, the model prediction can be completed by relying on the front-end data processing capabilities. Therefore, running the experience stratification model on the client side is a technical point.
参见图7,示出了本申请实施例提供的端智能体验分层实现逻辑示意图。整个过程包括模型准备、环境准备、参数准备、推理打分四个主要环节。Referring to Figure 7, a schematic diagram of the logic of implementing the terminal intelligent experience layering provided by the embodiment of the present application is shown. The whole process includes four main steps: model preparation, environment preparation, parameter preparation, and reasoning scoring.
模型准备环节,是离线训练得到体验分层模型,如前述的在服务端进行数据采集与处理,以及模型结构确定,从而利用处理后的数据训练模型结构,得到体验分层模型。The model preparation stage is to obtain the experience layering model through offline training, such as data collection and processing on the server side and determination of the model structure, so as to use the processed data to train the model structure and obtain the experience layering model.
环境准备环节,是指在客户端进行运行模型的环境准备,主要包括启动引擎。以小程序为例,首先,根据小程序启动之后,根据端智能配置信息进行模型下载(例如,通过端智能配置平台的配置能力,将模型及相关控制参数配置在平台上,然后,将模型保存在一个DB中,通过一个配置网关服务从该DB读取模型;在客户端启动之后,客户端自动从该配置网关服务中加载模型,可参考图4及说明),然后,进行Tensor(张量)准备;接着,通过接入图形程序库(例如webGL)、编程方案(例如WASM ,使用非 Java 编程语言编写代码并且能在浏览器上运行的技术方案)、图像处理(webGPU)等功能,以实现动态切换JS引擎和NA引擎。The environment preparation phase refers to the environment preparation for running the model on the client side, which mainly includes starting the engine. Taking the mini program as an example, first, after the mini program is started, the model is downloaded according to the terminal intelligent configuration information (for example, through the configuration capability of the terminal intelligent configuration platform, the model and related control parameters are configured on the platform, and then the model is saved in a DB, and the model is read from the DB through a configuration gateway service; after the client is started, the client automatically loads the model from the configuration gateway service, please refer to Figure 4 and the description), and then, Tensor is prepared; then, by accessing graphics libraries (such as webGL), programming solutions (such as WASM, a technical solution that uses non-Java programming languages to write code and can run on browsers), image processing (webGPU) and other functions, dynamic switching between the JS engine and the NA engine is achieved.
在参数准备环节,主要进行模型推理参数准备,可包括计算图解析、算子加载、权重加载、加载就绪等步骤。In the parameter preparation phase, the main work is to prepare model inference parameters, which may include calculation graph parsing, operator loading, weight loading, and loading ready steps.
在推理运行环节,主要将推理参数输入模型得出预测结果,可包括Tensor输入、输入预处理、算子运算、得出结果等步骤。In the inference operation phase, the inference parameters are mainly input into the model to obtain the prediction results, which may include steps such as Tensor input, input preprocessing, operator operation, and obtaining results.
由此,通过上述四个环节,即可采用体验分层模型进行实时推理和打分,由此判定用户设备(例如手机)实时运行状态的好坏。Therefore, through the above four steps, the experience layering model can be used for real-time reasoning and scoring, thereby determining the real-time operating status of the user's device (such as a mobile phone).
需要说明的是,以小程序为例,由于小程序场景可运行的模型文件格式受限为.xnn,因此需将其他格式的进行模型结构优化、异构模型编译,其本质是算子运算的转换。受限于小程序的运行环境与框架,模型的复杂度应简单为好,复杂的模型结构一是模型文件庞大加载耗时长,二是运算复杂耗费机器资源。故在模型设计时本着简单计算的原则进行设计,避免使用复杂算子及复杂流程。It should be noted that, taking the mini program as an example, since the model file format that can be run in the mini program scenario is limited to .xnn, it is necessary to optimize the model structure and compile heterogeneous models in other formats, which is essentially the conversion of operator operations. Limited by the operating environment and framework of the mini program, the complexity of the model should be simple. The complex model structure is that the model file is large and takes a long time to load, and the calculation is complex and consumes machine resources. Therefore, when designing the model, it is designed in accordance with the principle of simple calculation to avoid the use of complex operators and complex processes.
因此,在获取到体验分层模型之后,上述方法还可以包括:环境准备环节:基于下载的体验分层模型进行张量准备,基于模型数据预处理阶段的逻辑对应到JS中,载入XNN解析器,以实现动态JS引擎和NA引擎;参数准备环节,基于客户端支持的模型格式进行模型参数准备,包括模型结构优化以及异构模型编译。Therefore, after obtaining the experience layering model, the above method may also include: environment preparation stage: preparing tensors based on the downloaded experience layering model, corresponding to the logic of the model data preprocessing stage in JS, loading the XNN parser to implement dynamic JS engine and NA engine; parameter preparation stage: preparing model parameters based on the model format supported by the client, including model structure optimization and heterogeneous model compilation.
模型结构优化 指的是通过改进模型的架构来提高效率和减少资源消耗的过程。这通常涉及以下几个方面:剪枝(Pruning): 移除不重要的权重或神经元来减少模型大小。量化(Quantization): 降低模型参数的精度来减少模型大小和加速推理,例如从32位浮点数转为8位整数。结构化简(Simplification): 对模型进行简化,去除过于复杂的部分以提升运行效率。知识蒸馏(Knowledge Distillation): 将大型模型的知识转移到更小型的模型中。自动化模型压缩(AutoML for model compression): 使用自动化算法找到最优的模型压缩方法。Model structure optimization refers to the process of improving efficiency and reducing resource consumption by improving the architecture of the model. This usually involves the following aspects: Pruning: Removing unimportant weights or neurons to reduce model size. Quantization: Reducing the precision of model parameters to reduce model size and accelerate reasoning, such as converting from 32-bit floating point numbers to 8-bit integers. Simplification: Simplify the model and remove overly complex parts to improve operating efficiency. Knowledge Distillation: Transferring the knowledge of a large model to a smaller model. AutoML for model compression: Use automated algorithms to find the optimal model compression method.
异构模型编译: 与模型结构优化密切相关,指的是为不同的硬件平台(如 GPU、CPU、TPU 或者 FPGAs 等)编译深度学习模型的过程。随着硬件设备的多样化,特定硬件上高效运行的模型可能在另外一种硬件上性能不佳。异构编译通过转换模型使其适应不同硬件的特性,从而实现模型的可移植性和性能优化。Heterogeneous model compilation: Closely related to model structure optimization, it refers to the process of compiling deep learning models for different hardware platforms (such as GPU, CPU, TPU or FPGAs, etc.). With the diversification of hardware devices, a model that runs efficiently on a specific hardware may not perform well on another type of hardware. Heterogeneous compilation achieves model portability and performance optimization by converting the model to adapt it to the characteristics of different hardware.
总之,模型结构优化主要关注在模型内部减少复杂性和提高效率,而异构模型编译着重于跨不同硬件平台的模型可移植性和性能优化。这两个方面在将深度学习模型部署到实际生产环境中非常关键。In summary, model structure optimization focuses on reducing complexity and improving efficiency within the model, while heterogeneous model compilation focuses on model portability and performance optimization across different hardware platforms. These two aspects are critical in deploying deep learning models into actual production environments.
在一种实现方式中,体验分层模型是预先在服务端训练完成并发布至内容分发网络,其中,决策引擎根据体验分层模型的配置信息,访问内容分发网络,加载体验分层模型至本地。例如,通过端智能配置平台的配置能力,将模型及相关控制参数配置在平台上,然后,将模型保存在一个DB中,通过一个配置网关服务从该DB读取模型;在客户端启动之后,客户端自动从该配置网关服务中加载模型,可参考图4及说明。In one implementation, the experience layering model is pre-trained on the server side and published to the content distribution network, wherein the decision engine accesses the content distribution network and loads the experience layering model locally according to the configuration information of the experience layering model. For example, the model and related control parameters are configured on the platform through the configuration capability of the end intelligent configuration platform, and then the model is saved in a DB, and the model is read from the DB through a configuration gateway service; after the client is started, the client automatically loads the model from the configuration gateway service, as shown in Figure 4 and the description.
例如,体验分层模型预测结果分为运行状态良好、运行状态一般、运行状态差三个级别,针对后两个级别,可以采取路径简化、富交互降级、功能降级等处置方案。路径简化可以是关闭非关键功能或降低非关键功能的优先级,例如,如果非关键功能对用户下单或者完成订单履约没用影响,可以直接关闭这些功能,或者如果非关键功能对用户下单或完成订单履约影响较小,可以降低这些功能的优先级。富交互降级可包括降低动画帧率、降低图片分辨率、简化交互效果等方面。降低动画帧率:动画帧率越高,对机器性能要求越高,因此可以根据用户机器的性能实时调整动画帧率,以达到流畅运行的效果;降低图片分辨率:根据用户机器的性实时调整图片分辨率,减少图片渲染对内存的消耗;简化交互效果:一些交互效果对机器性能要求较高,可以根据用户机器的性能实时简化或关闭这些交互效果(如lottie动画效果)。功能降级,是指对客户端中非阻塞用户下单或完成订单履约的功能进行降级。For example, the prediction results of the experience stratification model are divided into three levels: good running status, general running status, and poor running status. For the latter two levels, path simplification, rich interaction degradation, and function degradation can be adopted. Path simplification can be to shut down non-critical functions or reduce the priority of non-critical functions. For example, if non-critical functions have no effect on users placing orders or completing order fulfillment, these functions can be directly shut down, or if non-critical functions have little effect on users placing orders or completing order fulfillment, the priority of these functions can be reduced. Rich interaction degradation can include reducing animation frame rate, reducing image resolution, simplifying interaction effects, etc. Reduce animation frame rate: The higher the animation frame rate, the higher the machine performance requirements. Therefore, the animation frame rate can be adjusted in real time according to the performance of the user's machine to achieve a smooth running effect; reduce image resolution: adjust the image resolution in real time according to the performance of the user's machine to reduce the memory consumption of image rendering; simplify interaction effects: Some interaction effects have high requirements for machine performance. These interaction effects (such as lottie animation effects) can be simplified or turned off in real time according to the performance of the user's machine. Function degradation refers to the degradation of non-blocking user order placement or order fulfillment functions in the client.
本申请实施例提供的体验分层方案中,是一种跨端、即时、动态、智能、全链路的低性能设备判别策略,它不仅关注于设备的静态数据,而且会从设备运行过程中的各个维度数据出发,通过实时感知计算,为低性能设备的判定提供更精准的数据依据。与传统评估低性能设备方式相比,传统方式更固化、不够灵活,而本申请实施例注重与通过实时的数据分析和算法决策,从用户真实体验出发,提供一种更智能、全面和精准的评估方案,该方案突破了传统方案的局限,更具个性化、智能化与即时性的特点。The experience stratification scheme provided in the embodiment of the present application is a cross-end, instant, dynamic, intelligent, and full-link low-performance device identification strategy, which not only focuses on the static data of the device, but also starts from the various dimensional data during the operation of the device, and provides more accurate data basis for the determination of low-performance devices through real-time perception calculation. Compared with the traditional way of evaluating low-performance devices, the traditional method is more rigid and not flexible enough, while the embodiment of the present application focuses on real-time data analysis and algorithm decision-making, starting from the real user experience, to provide a more intelligent, comprehensive and accurate evaluation scheme, which breaks through the limitations of traditional schemes and is more personalized, intelligent and immediate.
最后,结合图8介绍体验增强方案。Finally, the experience enhancement solution is introduced in conjunction with FIG8 .
参见图8,示出了本申请实施例提供的端智能体验增强方法流程图。Referring to FIG8 , a flow chart of a method for enhancing terminal intelligent experience provided in an embodiment of the present application is shown.
S801:启动客户端,向服务端发送端智能体验配置请求,获取到全链路动线预测模型;S801: Start the client, send a request for intelligent experience configuration to the server, and obtain a full-link traffic flow prediction model;
S802:启动感知引擎,获取用户行为数据、用户基础数据、场景数据及性能数据;S802: Start the perception engine to obtain user behavior data, user basic data, scenario data and performance data;
S803:触发决策引擎,将获取的用户行为数据、用户基础数据、场景数据及性能数据输入至全链路动线预测模型,预测用户未来行为轨迹;S803: triggering the decision engine to input the acquired user behavior data, user basic data, scenario data, and performance data into the full-link traffic flow prediction model to predict the user's future behavior trajectory;
S804:运行触点引擎,根据用户未来行为轨迹的预测结果触发对应的体验增强处置方案。S804: Run the contact engine to trigger a corresponding experience enhancement solution based on the prediction result of the user's future behavior trajectory.
体验增强,是指基于用户实时交互行为信息,利用全链路动线预测模型,实现实时用户未来轨迹预估,对用户可能访问的分包、页面进行预加载等干预,提升用户体验惊喜感。Experience enhancement refers to the use of a full-link traffic flow prediction model based on real-time user interactive behavior information to achieve real-time prediction of users' future trajectories, preload sub-packages and pages that users may visit, and enhance the user experience.
针对体验增强方案,需要首先在服务端进行数据收集和处理,并训练完成全链路动线预测模型,然后,将全链路动线预测模型下发至前端,在客户端运行过程中,基于获取的目标数据,在前端实时地通过全链路动线预测模型进行未来行为预测,并基于未来行为预测结果进行分包预加载等处置。For the experience enhancement solution, it is necessary to first collect and process data on the server side, and train the full-link traffic flow prediction model. Then, the full-link traffic flow prediction model is sent to the front end. During the client operation, based on the acquired target data, the full-link traffic flow prediction model is used to predict future behaviors in real time on the front end, and based on the future behavior prediction results, sub-packaging and preloading are performed.
关于数据收集和模型结构确定两个角度,与体验分层方案原理和处理过程类似,可参考体验分层方案相关描述,与之区别在于数据特征维度划分以及模型结构选取上。由于体验增强主要考虑预测用户未来行为,因此,数据特征维度主要包括用户行为数据、用户基础数据、场景数据以及性能数据,有关各种数据获取方式可参考前面描述。对于全链路动线预测模型的网络结构,通过研究和实践,可以选择计算能力较强的网络结构,例如深度学习网络,例如LSTM等,这种模型通过分析用户的历史行为数据,尝试预测用户接下来可能的操作或偏好,以此来预测用户的行为路径。由于深度学习模型通常涉及复杂的网络结构和大量的参数,其内部决策逻辑对于用户来说是不透明的,因此可采用黑盒模型的方式。因此在一种实现方式中,设置体验增强决策对应的全链路动线预测模型为黑盒模型模式,在客户端热启动阶段,运行黑盒模型模式的全链路动线预测模型。Regarding the two aspects of data collection and model structure determination, the principles and processing procedures of the experience layering scheme are similar, and reference can be made to the relevant description of the experience layering scheme. The difference lies in the division of data feature dimensions and the selection of model structure. Since experience enhancement mainly considers predicting future user behavior, the data feature dimensions mainly include user behavior data, user basic data, scenario data, and performance data. For various data acquisition methods, reference can be made to the previous description. For the network structure of the full-link dynamic line prediction model, through research and practice, a network structure with strong computing power can be selected, such as a deep learning network, such as LSTM, etc. This model analyzes the user's historical behavior data and tries to predict the user's next possible operation or preference, so as to predict the user's behavior path. Since deep learning models usually involve complex network structures and a large number of parameters, their internal decision logic is opaque to users, so a black box model can be used. Therefore, in one implementation method, the full-link dynamic line prediction model corresponding to the experience enhancement decision is set to a black box model mode, and in the client hot start phase, the full-link dynamic line prediction model in the black box model mode is run.
关于将在服务端训练好的全链路动线预测模型进行发布和部署,以及客户端下载并在本地进行实时预测,可参考体验分层方案相关描述(图7),其原理和实现过程类似,此处不赘述。Regarding publishing and deploying the full-link traffic flow prediction model trained on the server, as well as downloading it on the client and performing real-time prediction locally, please refer to the description of the experience tiering solution (Figure 7). The principles and implementation process are similar and will not be repeated here.
另外,在一种实现方式中,全链路动线预测模型是预先在服务端训练完成并发布至内容分发网络,其中,决策引擎根据体验分层模型的配置信息,访问内容分发网络,加载体验分层模型至本地。例如,通过端智能配置平台的配置能力,将模型及相关控制参数配置在平台上,然后,将模型保存在一个DB中,通过一个配置网关服务从该DB读取模型;在客户端启动之后,客户端自动从该配置网关服务中加载模型,可参考图4及说明。In addition, in one implementation, the full-link traffic prediction model is pre-trained on the server and published to the content distribution network, wherein the decision engine accesses the content distribution network and loads the experience layering model locally based on the configuration information of the experience layering model. For example, through the configuration capability of the end-to-end intelligent configuration platform, the model and related control parameters are configured on the platform, and then the model is saved in a DB, and the model is read from the DB through a configuration gateway service; after the client is started, the client automatically loads the model from the configuration gateway service, as shown in Figure 4 and the description.
例如,通过全链路动线预测模型出用户未来行为轨迹,可以针对预测结果进行相应的体验增强处置,例如体验增强处置方案包括:根据体验决策得到用户未来行为轨迹,确定用户可能访问的分包资源或页面资源,对分包资源或页面资源进行预加载操作。For example, the user's future behavior trajectory can be obtained through the full-link traffic flow prediction model, and corresponding experience enhancement measures can be taken based on the prediction results. For example, the experience enhancement measures include: obtaining the user's future behavior trajectory based on the experience decision, determining the sub-package resources or page resources that the user may access, and preloading the sub-package resources or page resources.
在一个具体场景下,可以针对频道分包进行智能预加载。在客户端界面中,首页下一跳页面通常为分包,硬性全量预加载不仅浪费流量,也会占用内存,甚至造成卡死。利用端端智能体验增强方案,预测下一跳跳地址,按就近原则做好分包预加载,就能较好平衡内存与体验间的矛盾。In a specific scenario, intelligent preloading can be performed for channel sub-packaging. In the client interface, the next hop page of the homepage is usually sub-packaging. Hard full preloading not only wastes traffic, but also occupies memory and even causes jamming. By using the end-to-end intelligent experience enhancement solution to predict the next hop address and preload sub-packaging according to the principle of proximity, the contradiction between memory and experience can be better balanced.
与上述在客户端应用的端智能体验实现方法相对应,本申请实施例还提供一种应用在服务端的端智能体验实现方法。参见图9,为应用于服务端的端智能体验实现方法流程图。Corresponding to the above-mentioned method for implementing the end intelligent experience applied on the client, the embodiment of the present application also provides a method for implementing the end intelligent experience applied on the server. See Figure 9, which is a flow chart of the method for implementing the end intelligent experience applied on the server.
该端智能体验实现方法,用于针对端智能体验前端代码进行配置和触点,其中,所述前端代码适用于多类型客户端并在前端进行用户体验的感知、决策和处置,所述方法应用于服务端,包括:The end intelligent experience implementation method is used to configure and touch the end intelligent experience front-end code, wherein the front-end code is applicable to multiple types of clients and performs perception, decision-making and processing of user experience at the front end. The method is applied to the server, including:
S901:接收客户端发送的端智能配置请求,匹配出端智能配置并下发至客户端,以使得客户端执行端智能体验决策和处置;S901: receiving a terminal intelligent configuration request sent by a client, matching the terminal intelligent configuration and sending it to the client, so that the client executes the terminal intelligent experience decision and processing;
其中客户端执行体验决策和处置包括:运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;并运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。The client executes experience decision and disposal, including: running the end intelligent suite in the front-end code, including: starting the perception engine in the end intelligent suite to obtain target data in real time; triggering the decision engine in the end intelligent suite to make experience decisions for the target data based on the end intelligent experience configuration; and running the contact engine in the end intelligent suite to trigger the corresponding disposal plan according to the experience decision result.
S902:响应于回调函数的触发,接收客户端反馈的处置方案执行结果。S902: In response to the triggering of the callback function, receiving the processing solution execution result fed back by the client.
在一种实现方式中,所述方法还包括:通过服务端的端智能配置平台,针对端智能体验进行配置,包括配置复杂事件配置信息、体验分层模型和/或全链路动线预测模型。In one implementation, the method further includes: configuring the end intelligent experience through the end intelligent configuration platform of the server, including configuring complex event configuration information, experience layering model and/or full-link traffic flow prediction model.
在一种实现方式中,所述方法还包括:接收客户端反馈的体验处置方案以及用户反馈数据,作为新输入端智能配置平台,以优化复杂事件配置信息、体验分层模型和/或全链路动线预测模型。In one implementation, the method further includes: receiving an experience handling solution and user feedback data from the client as a new input-end intelligent configuration platform to optimize complex event configuration information, an experience layering model and/or a full-link traffic flow prediction model.
在一种实现方式中,所述方法还包括:向客户端下发处置方案对应的网络资源。例如,在体验增强场景下,向客户端预先下发分包资源等。In one implementation, the method further includes: sending network resources corresponding to the handling solution to the client. For example, in an experience enhancement scenario, sending sub-packet resources to the client in advance.
关于在服务端执行的端智能体验实现方法,可参考前文原理及描述,此处不赘述。For the implementation method of the end-to-end intelligent experience executed on the server side, please refer to the previous principles and descriptions, which will not be repeated here.
参见图10,示出了本申请实施例提供的一种端智能体验实现装置结构示意图。Referring to FIG. 10 , there is shown a schematic diagram of the structure of a device for implementing a terminal intelligent experience provided in an embodiment of the present application.
该装置用于针对适用于多类型客户端的前端代码,在前端进行用户体验的感知、决策和处置,所述装置应用于多类型客户端中任意类型客户端中的一个客户端,包括:The device is used to perceive, decide and handle user experience at the front end for front end codes applicable to multiple types of clients. The device is applied to one client of any type of client among the multiple types of clients, and includes:
配置请求单元1001,用于启动客户端,向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;The configuration request unit 1001 is used to start the client, send a terminal intelligent experience configuration request to the server, obtain the terminal intelligent experience configuration and store it locally;
端智能执行单元1002,用于运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。The end intelligent execution unit 1002 is used to run the end intelligent suite in the front-end code, including: starting the perception engine in the end intelligent suite to obtain the target data in real time; triggering the decision engine in the end intelligent suite to make experience decisions for the target data based on the end intelligent experience configuration; and running the contact engine in the end intelligent suite to trigger the corresponding disposal plan according to the experience decision result.
在一种实现方式中,所述处置方案包括:体验监测处置方案、体验分层处置方案,和/或,体验增强处置方案;In one implementation, the processing scheme includes: an experience monitoring processing scheme, an experience layering processing scheme, and/or an experience enhancement processing scheme;
所述体验监测处置方案包括:根据体验决策确定发生复杂事件时,以UI交互方式在界面中进行实时消息推送和/或进行页面跳转操作;The experience monitoring and handling scheme includes: when a complex event is determined to occur according to the experience decision, real-time message push and/or page jump operation is performed in the interface in a UI interactive manner;
所述体验分层处置方案包括:根据体验决策确定设备运行状态为低运行状态时,进行接口加载优化和/或页面内容动态调整方案;The experience layering solution includes: when the device operation state is determined to be a low operation state according to the experience decision, performing interface loading optimization and/or page content dynamic adjustment solution;
所述体验增强处置方案包括:根据体验决策得到用户未来行为轨迹,确定用户可能访问的分包资源或页面资源,对所述分包资源或页面资源进行预加载操作。The experience enhancement solution includes: obtaining a user's future behavior trajectory based on the experience decision, determining sub-package resources or page resources that the user may access, and preloading the sub-package resources or page resources.
在一种实现方式中,还包括:In one implementation, the method further includes:
处置协同控制单元1003,用于设置不同处置方案对应不同的优先级,根据优先级确定不同处置方案之间的执行逻辑关系;其中,设置体验分层处置方案对应第一优先级;根据体验分层处置方案的处理结果,确定是否执行体验监测处理方案和/或体验增强处置方案。The handling collaborative control unit 1003 is used to set different handling schemes corresponding to different priorities, and determine the execution logic relationship between different handling schemes according to the priorities; wherein, the experience stratification handling scheme is set to correspond to the first priority; according to the processing results of the experience stratification handling scheme, determine whether to execute the experience monitoring handling scheme and/or the experience enhancement handling scheme.
在一种实现方式中,还包括:In one implementation, the method further includes:
处置协同控制单元1003,通过白盒模型或黑盒模型进行体验监控、体验分层或体验增强的体验决策,以及,根据白盒模型进行初步决策,并根据白盒模型初步决策结果确定是否利用黑盒模型进一步进行精细决策。The collaborative control unit 1003 performs experience monitoring, experience stratification or experience enhancement experience decisions through a white box model or a black box model, makes preliminary decisions based on the white box model, and determines whether to use the black box model to make further refined decisions based on the preliminary decision results of the white box model.
在一种实现方式中,处置协同控制单元1003具体用于:In one implementation, the treatment coordination control unit 1003 is specifically used to:
设置体验分层决策对应的体验分层模型为白盒模型模式,在所述客户端冷启动阶段,运行所述白盒模型模式的所述体验分层模型,根据所述体验分层模型的预测结果,确定是否继续执行端智能套件或关闭端智能套件;以及,Setting the experience layering model corresponding to the experience layering decision to a white box model mode, running the experience layering model in the white box model mode during the cold start phase of the client, and determining whether to continue to execute the terminal intelligence suite or shut down the terminal intelligence suite according to the prediction result of the experience layering model; and
设置体验增强决策对应的全链路动线预测模型为黑盒模型模式,在所述客户端热启动阶段,运行所述黑盒模型模式的所述全链路动线预测模型。The full-link traffic flow prediction model corresponding to the experience enhancement decision is set to a black box model mode, and during the client hot start phase, the full-link traffic flow prediction model of the black box model mode is run.
在一种实现方式中,所述端智能体验配置包括复杂事件配置信息,所述复杂事件配置信息包括至少一项目标复杂事件的事件配置信息和时机配置信息;In one implementation, the terminal intelligent experience configuration includes complex event configuration information, and the complex event configuration information includes event configuration information and timing configuration information of at least one target complex event;
端智能执行单元1002具体用于:启动感知引擎,基于前端代码中的统一事件流处理工具,捕捉埋点数据,根据所述埋点数据确定是否触发了所述事件配置信息对应的目标复杂事件;响应于目标复杂事件的触发,运行决策引擎,以依据所述时机配置信息针对所述埋点数据进行时机匹配,确定是否满足所述目标复杂事件的时机;以及,在时机匹配成功后,运行触点引擎,以触发目标复杂事件对应的体验监测处置方案。The end intelligent execution unit 1002 is specifically used for: starting the perception engine, capturing the embedded data based on the unified event stream processing tool in the front-end code, and determining whether the target complex event corresponding to the event configuration information is triggered according to the embedded data; in response to the triggering of the target complex event, running the decision engine to match the timing for the embedded data according to the timing configuration information to determine whether the timing of the target complex event is met; and, after the timing is successfully matched, running the contact engine to trigger the experience monitoring and disposal plan corresponding to the target complex event.
在一种实现方式中,统一事件流处理工具具体用于:In one implementation, the unified event stream processing tool is specifically used to:
对埋点数据进行客户端类型分析及格式分析,并对埋点数据进行标准化处理,使得不同类型客户端的数据具有统一的格式和结构;其中,所述对埋点数据进行标准化处理,包括:解析埋点数据的埋点信息、事件ID、参数信息;对所述埋点信息、事件ID以及参数信息进行统一格式封装,转换为标准格式的事件信息。Perform client type analysis and format analysis on the buried data, and standardize the buried data so that the data of different types of clients have a unified format and structure; wherein the standardized processing of the buried data includes: parsing the buried data's buried information, event ID, and parameter information; packaging the buried information, event ID, and parameter information in a unified format, and converting them into event information in a standard format.
在一种实现方式中,所述决策引擎,是基于自研的复杂事件匹配规则库并被声明为静态函数的复杂事件处理组件,其中,所述自研的复杂事件匹配规则库采用开发以兼容多类型客户端。In one implementation, the decision engine is a complex event processing component based on a self-developed complex event matching rule library and declared as a static function, wherein the self-developed complex event matching rule library is developed to be compatible with multiple types of clients.
在一种实现方式中,所述端智能体验配置包括体验分层模型;In one implementation, the terminal intelligent experience configuration includes an experience layering model;
端智能执行单元1002具体用于:启动感知引擎,获取设备硬件静态数据、设备实时状态数据以及场景实时运行数据;将获取的设备硬件静态数据、设备实时状态数据以及场景实时运行数据输入至所述体验分层模型,预测设备运行状态;以及,运行触点引擎,根据设备运行状态的预测结果触发对应的体验分层处置方案。The terminal intelligent execution unit 1002 is specifically used for: starting the perception engine, acquiring the static data of the device hardware, the real-time status data of the device, and the real-time operation data of the scene; inputting the acquired static data of the device hardware, the real-time status data of the device, and the real-time operation data of the scene into the experience layering model to predict the operation status of the device; and running the contact engine to trigger the corresponding experience layering disposal plan according to the prediction result of the operation status of the device.
在一种实现方式中,所述体验分层模型,是基于卷积神经网络对数据样本进行特征提取、将提取的特征输入到深度神经网络模型中进行训练而得到的。In one implementation, the experience layering model is obtained by extracting features from data samples based on a convolutional neural network and inputting the extracted features into a deep neural network model for training.
在一种实现方式中,所述体验分层模型,是通过训练第一网络结构得到第一体验分模型以及训练第二网络结构得到第二体验分层模型,在所述决策引擎决策过程中,通过第一体验分层模型进行白盒预筛以及通过第二体验分层模型进行黑盒精筛,从而预测出设备运行状态。In one implementation, the experience layering model is obtained by training a first network structure to obtain a first experience model and training a second network structure to obtain a second experience layering model. In the decision-making process of the decision engine, white box pre-screening is performed through the first experience layering model and black box fine screening is performed through the second experience layering model to predict the operating status of the device.
在一种实现方式中,所述端智能体验配置包括全链路动线预测模型;In one implementation, the terminal intelligent experience configuration includes a full-link dynamic line prediction model;
端智能执行单元1002具体用于:启动感知引擎,获取用户行为数据、用户基础数据、场景数据及性能数据;将获取的用户行为数据、用户基础数据、场景数据及性能数据输入至所述全链路动线预测模型,预测用户未来行为轨迹;以及,运行触点引擎,根据用户未来行为轨迹的预测结果触发对应的体验增强处置方案。The terminal intelligent execution unit 1002 is specifically used to: start the perception engine to obtain user behavior data, user basic data, scenario data and performance data; input the obtained user behavior data, user basic data, scenario data and performance data into the full-link traffic flow prediction model to predict the user's future behavior trajectory; and run the contact engine to trigger the corresponding experience enhancement disposal plan according to the prediction results of the user's future behavior trajectory.
本申请的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
启动客户端,向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;Start the client, send a request for the client intelligent experience configuration to the server, obtain the client intelligent experience configuration and store it locally;
运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。Running the end intelligence suite in the front-end code includes: starting the perception engine in the end intelligence suite to obtain target data in real time; triggering the decision engine in the end intelligence suite to make experience decisions for the target data based on the end intelligence experience configuration; and running the contact engine in the end intelligence suite to trigger corresponding disposal plans based on the experience decision results.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
本申请的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
可选地,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
启动客户端,向服务端发送端智能体验配置请求,获取端智能体验配置并存储到本地;Start the client, send a request for the client intelligent experience configuration to the server, obtain the client intelligent experience configuration and store it locally;
运行前端代码中的端智能套件,包括:启动端智能套件中的感知引擎,实时获取目标数据;触发端智能套件中的决策引擎,依据所述端智能体验配置,针对目标数据进行体验决策;以及,运行端智能套件中的触点引擎,根据体验决策结果触发对应的处置方案。Running the end intelligence suite in the front-end code includes: starting the perception engine in the end intelligence suite to obtain target data in real time; triggering the decision engine in the end intelligence suite to make experience decisions for the target data based on the end intelligence experience configuration; and running the contact engine in the end intelligence suite to trigger corresponding disposal plans based on the experience decision results.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410417291.8A CN118012432B (en) | 2024-04-09 | 2024-04-09 | Terminal intelligent experience realization method, device, medium and equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410417291.8A CN118012432B (en) | 2024-04-09 | 2024-04-09 | Terminal intelligent experience realization method, device, medium and equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN118012432A CN118012432A (en) | 2024-05-10 |
| CN118012432B true CN118012432B (en) | 2024-06-14 |
Family
ID=90959656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410417291.8A Active CN118012432B (en) | 2024-04-09 | 2024-04-09 | Terminal intelligent experience realization method, device, medium and equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118012432B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119397111B (en) * | 2025-01-03 | 2025-05-30 | 中邮消费金融有限公司 | Channel interaction method, device, equipment and storage medium |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050096950A1 (en) * | 2003-10-29 | 2005-05-05 | Caplan Scott M. | Method and apparatus for creating and evaluating strategies |
| US8103531B2 (en) * | 2004-03-26 | 2012-01-24 | Accenture Global Services Limited | Enhancing insight-driven customer interactions |
| WO2015006516A2 (en) * | 2013-07-09 | 2015-01-15 | Lf Technology Development Corporation Limited | Computer-aided decision systems |
| CN106779092B (en) * | 2016-12-16 | 2019-04-19 | 广州衡昊数据科技有限公司 | A kind of intelligent decision engine having industry specialists thoughtcast and operational capacity |
| CN110955438A (en) * | 2019-12-03 | 2020-04-03 | 北京博睿宏远数据科技股份有限公司 | Method, device and equipment for monitoring performance of small program and storage medium |
| CN112990953A (en) * | 2019-12-16 | 2021-06-18 | 上海邸客网络科技有限公司 | Personal intelligence decision engine based on artificial intelligence |
| CN111401722B (en) * | 2020-03-11 | 2023-10-17 | 第四范式(北京)技术有限公司 | Intelligent decision method and intelligent decision system |
| CN113395304A (en) * | 2020-03-12 | 2021-09-14 | 阿里巴巴集团控股有限公司 | Information pushing method and system, client, storage medium and computing terminal |
| CN112394922B (en) * | 2020-12-02 | 2022-02-22 | 成都新希望金融信息有限公司 | Decision configuration method, business decision method and decision engine system |
| CN112631679B (en) * | 2020-12-28 | 2024-08-20 | 北京三快在线科技有限公司 | Preloading method and device for micro-applications |
| CN113379529A (en) * | 2021-06-07 | 2021-09-10 | 广发银行股份有限公司 | Collaborative decision engine application framework |
| CN114968528B (en) * | 2022-05-30 | 2024-11-22 | 淘宝(中国)软件有限公司 | Policy-based information processing method, electronic device, and storage medium |
| CN116893886A (en) * | 2023-06-06 | 2023-10-17 | 支付宝(杭州)信息技术有限公司 | Decision confirmation method, decision confirmation device, electronic equipment and computer storage medium |
-
2024
- 2024-04-09 CN CN202410417291.8A patent/CN118012432B/en active Active
Non-Patent Citations (2)
| Title |
|---|
| Client-side Computational Optimization;Vittorio Maniezzo;ACM Transactions on Mathematical Software;20190429;第45卷(第2期);全文 * |
| Drools规则推理引擎在空中目标处置中的应用;郭弋;王文普;李祯;;电脑编程技巧与维护;20160518(第10期);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118012432A (en) | 2024-05-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Zhang et al. | New agent-based proactive migration method and system for big data environment (BDE) | |
| CN112948226B (en) | User portrait drawing method and device | |
| WO2022252363A1 (en) | Data processing method, computer device and readable storage medium | |
| CN111125519B (en) | User behavior prediction method, device, electronic equipment and storage medium | |
| CN112215171B (en) | Target detection method, device, equipment and computer readable storage medium | |
| CN118012432B (en) | Terminal intelligent experience realization method, device, medium and equipment | |
| CN115221396A (en) | Information recommendation method, device and electronic device based on artificial intelligence | |
| CN114172908A (en) | End cloud cooperative processing method and equipment | |
| CN118803348A (en) | An audio and video SDK interface for Hongmeng system | |
| CN115495677B (en) | Method and storage medium for spatio-temporal localization of video | |
| CN115115985B (en) | Video analysis method and device, electronic equipment and storage medium | |
| CN120045795A (en) | AI-based multi-platform media content optimization recommendation method and system | |
| CN114564283B (en) | Disk space management method and device, electronic equipment and storage medium | |
| CN112287799A (en) | Video processing method and device based on artificial intelligence and electronic equipment | |
| CN117274125A (en) | Image editing method, device, equipment and storage medium | |
| WO2025213690A1 (en) | Edge intelligence experience implementation method and apparatus, and medium and device | |
| CN115409109A (en) | A method and system for classifying WeChat applets based on convolutional neural network | |
| CN113435126B (en) | Knowledge sharing processing method, intelligent robot device, knowledge sharing system and task learning system | |
| CN115482019A (en) | Activity attention prediction method and device, electronic equipment and storage medium | |
| CN120151317B (en) | Video stream transmission method, device, electronic device and storage medium | |
| WO2025213687A1 (en) | Client experience handling method and apparatus, medium, and device | |
| CN116781965B (en) | Virtual article synthesis method, apparatus, electronic device, and computer-readable medium | |
| SanMiguel et al. | A semantic-guided and self-configurable framework for video analysis | |
| HK40079475A (en) | Data processing method, computer device and readable storage medium | |
| HK40067580A (en) | Video classification method based on the classification model, device, equipment, medium and product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |