[go: up one dir, main page]

CN115883909A - Page operation process backtracking method and device, computer equipment and storage medium - Google Patents

Page operation process backtracking method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115883909A
CN115883909A CN202111129550.XA CN202111129550A CN115883909A CN 115883909 A CN115883909 A CN 115883909A CN 202111129550 A CN202111129550 A CN 202111129550A CN 115883909 A CN115883909 A CN 115883909A
Authority
CN
China
Prior art keywords
image information
data
pixel buffer
buffer
information object
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.)
Pending
Application number
CN202111129550.XA
Other languages
Chinese (zh)
Inventor
苟亚明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111129550.XA priority Critical patent/CN115883909A/en
Publication of CN115883909A publication Critical patent/CN115883909A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a page operation process backtracking method and device, computer equipment, storage medium and program product. The method comprises the following steps: responding to user page operation, and acquiring a screen recording object; recording the screen recording object; acquiring sampling buffer data in the process of recording a screen recording object; creating pixel buffer area reference according to the sampling buffer data, generating an image information object according to the pixel buffer area reference which is successfully created, and caching the image information object to a preset pixel buffer area, wherein the image information object comprises information required for generating an image; and when the user page operation is confirmed to be successful, acquiring the image information object from the preset pixel buffer area, and coding the image information object to obtain the backtracking video. By adopting the method, the accurate positioning of the page operation problem can be realized.

Description

页面操作过程回溯方法、装置、计算机设备和存储介质Page operation process backtracking method, device, computer equipment and storage medium

技术领域technical field

本申请涉及计算机技术领域,特别是涉及一种页面操作过程回溯方法、装置、计算机设备和存储介质。The present application relates to the field of computer technology, in particular to a page operation process backtracking method, device, computer equipment and storage medium.

背景技术Background technique

随着计算机技术的发展,出现了页面操作过程回溯技术,页面操作过程回溯技术用于对页面操作过程进行回溯。举例说明,页面操作过程具体可以是指用户在终端页面上进行操作的过程。With the development of computer technology, a page operation process backtracking technology appears, and the page operation process backtracking technology is used to backtrack the page operation process. For example, the page operation process may specifically refer to a process in which a user performs an operation on a terminal page.

传统技术中,主要采用的回溯方式为在页面操作过程中,采集各当前页面对应的静态页面文本数据,根据采集到的各静态页面文本数据的时间,为各静态页面文本数据添加时间戳,将添加有时间戳的各静态页面文本数据进行存储,按照时间戳顺序还原成对应的页面,实现页面操作过程的可视化日志回溯。In the traditional technology, the backtracking method mainly adopted is to collect the static page text data corresponding to each current page during the page operation process, and add a time stamp to each static page text data according to the time of the collected static page text data. Add the text data of each static page with a time stamp for storage, restore the corresponding pages according to the time stamp order, and realize the visual log backtracking of the page operation process.

然而,传统方法中,静态页面文本数据与每次操作的日志(点击、勾选、长按等行为)对应,在页面操作为在页面填写信息时只能获取对应的图文数据,若页面操作不正确产生程序错误时,难以对页面操作问题进行定位。However, in the traditional method, the static page text data corresponds to the log of each operation (click, check, long press, etc.). When the page operation is to fill in the information on the page, only the corresponding graphic data can be obtained. If the page operation When a program error is incorrectly generated, it is difficult to locate the page operation problem.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种能够准确定位页面操作问题的页面操作过程回溯方法、装置、计算机设备、存储介质和程序产品。Based on this, it is necessary to provide a page operation process retrospective method, device, computer equipment, storage medium and program product capable of accurately locating page operation problems for the above technical problems.

一种页面操作过程回溯方法,所述方法包括:A page operation process backtracking method, the method comprising:

响应用户页面操作,获取屏幕录制对象;Get the screen recording object in response to the user page operation;

对屏幕录制对象进行录制;Record the screen recording object;

获取对屏幕录制对象进行录制过程中的采样缓冲数据;Obtain the sample buffer data during the recording process of the screen recording object;

根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;Create a pixel buffer reference based on the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to the preset pixel buffer, and the image information object includes the information required to generate the image;

当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。When it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, and the image information object is encoded to obtain the backtracking video.

一种页面操作过程回溯装置,所述装置包括:A page operation process backtracking device, said device comprising:

响应模块,用于响应用户页面操作,获取屏幕录制对象;The response module is used to respond to user page operations and obtain screen recording objects;

录制模块,用于对屏幕录制对象进行录制;The recording module is used to record the screen recording object;

获取模块,用于获取对屏幕录制对象进行录制过程中的采样缓冲数据;An acquisition module, configured to acquire sampling buffer data in the process of recording a screen recording object;

处理模块,用于根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;The processing module is used to create a pixel buffer reference according to the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to a preset pixel buffer, and the image information object includes the information needed to generate the image information;

编码模块,用于当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。The encoding module is used to obtain the image information object from the preset pixel buffer when it is confirmed that the user page operation is successful, and encode the image information object to obtain the retrospective video.

一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

响应用户页面操作,获取屏幕录制对象;Get the screen recording object in response to the user page operation;

对屏幕录制对象进行录制;Record the screen recording object;

获取对屏幕录制对象进行录制过程中的采样缓冲数据;Obtain the sample buffer data during the recording process of the screen recording object;

根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;Create a pixel buffer reference based on the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to the preset pixel buffer, and the image information object includes the information required to generate the image;

当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。When it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, and the image information object is encoded to obtain the backtracking video.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

响应用户页面操作,获取屏幕录制对象;Get the screen recording object in response to the user page operation;

对屏幕录制对象进行录制;Record the screen recording object;

获取对屏幕录制对象进行录制过程中的采样缓冲数据;Obtain the sample buffer data during the recording process of the screen recording object;

根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;Create a pixel buffer reference based on the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to the preset pixel buffer, and the image information object includes the information required to generate the image;

当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。When it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, and the image information object is encoded to obtain the backtracking video.

一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer program product comprising a computer program which, when executed by a processor, implements the following steps:

响应用户页面操作,获取屏幕录制对象;Get the screen recording object in response to the user page operation;

对屏幕录制对象进行录制;Record the screen recording object;

获取对屏幕录制对象进行录制过程中的采样缓冲数据;Obtain the sample buffer data during the recording process of the screen recording object;

根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;Create a pixel buffer reference based on the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to the preset pixel buffer, and the image information object includes the information required to generate the image;

当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。When it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, and the image information object is encoded to obtain the backtracking video.

上述页面操作过程回溯方法、装置、计算机设备、存储介质和程序产品,通过响应用户页面操作,获取屏幕录制对象,对屏幕录制对象进行录制,获取对屏幕录制对象进行录制过程中的采样缓冲数据,能够实现对用户页面操作的实时响应,获取到与用户页面操作对应的采样缓冲数据,通过根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,能够通过创建像素缓冲区引用实现对采样缓冲数据的管理,进而可以利用创建成功的像素缓冲区引用实现对与用户页面操作对应的图像信息对象的获取,从而可以在当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,通过对图像信息对象进行编码,得到回溯视频,通过回溯视频即可实现对用户页面操作的回溯,还原用户在页面填写信息时的操作过程,能够实现对页面操作问题的准确定位。The method, device, computer equipment, storage medium, and program product for the above-mentioned page operation process obtain the screen recording object by responding to the user page operation, record the screen recording object, and obtain sampling buffer data during the recording process of the screen recording object, It can realize real-time response to user page operations, obtain the sampling buffer data corresponding to user page operations, create pixel buffer references based on sampling buffer data, generate image information objects according to successfully created pixel buffer references, and store image information The object is cached to the preset pixel buffer, and the sampling buffer data can be managed by creating a pixel buffer reference, and then the image information object corresponding to the user page operation can be obtained by using the successfully created pixel buffer reference, so that When it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, and the backtracking video is obtained by encoding the image information object. By backtracking the video, the backtracking of the user page operation can be realized, and the user's status on the page can be restored. The operation process when filling in information can realize accurate positioning of page operation problems.

附图说明Description of drawings

图1为一个实施例中页面操作过程回溯方法的应用环境图;Fig. 1 is an application environment diagram of a page operation process backtracking method in an embodiment;

图2为一个实施例中页面操作过程回溯方法的流程示意图;Fig. 2 is a schematic flow chart of a page operation process backtracking method in an embodiment;

图3为一个实施例中页面操作过程回溯方法的终端环境配置示意图;Fig. 3 is a schematic diagram of terminal environment configuration of a page operation process backtracking method in an embodiment;

图4为一个实施例中页面操作过程回溯方法的应用场景图;Fig. 4 is an application scenario diagram of a page operation process backtracking method in an embodiment;

图5为另一个实施例中页面操作过程回溯方法的应用场景图;FIG. 5 is an application scenario diagram of a page operation process backtracking method in another embodiment;

图6为另一个实施例中页面操作过程回溯方法的流程示意图;FIG. 6 is a schematic flowchart of a page operation process backtracking method in another embodiment;

图7为一个实施例中页面操作过程回溯装置的结构框图;FIG. 7 is a structural block diagram of a page operation process backtracking device in an embodiment;

图8为一个实施例中计算机设备的内部结构图。Figure 8 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

本申请提供的页面操作过程回溯方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信。终端102响应用户页面操作,获取屏幕录制对象,对屏幕录制对象进行录制,获取对屏幕录制对象进行录制过程中的采样缓冲数据,根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息,当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频,将回溯视频上传至服务器104。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现,还可以是区块链中的节点。The page operation process backtracking method provided in this application can be applied to the application environment shown in FIG. 1 . Wherein, the terminal 102 communicates with the server 104 through the network. Terminal 102 responds to the user page operation, obtains the screen recording object, records the screen recording object, obtains the sampling buffer data during the recording process of the screen recording object, creates a pixel buffer reference according to the sampling buffer data, and creates a pixel buffer reference according to the successfully created pixel buffer The area references to generate an image information object, and caches the image information object to the preset pixel buffer. The image information object includes the information required to generate the image. When it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer. The image information object is encoded to obtain a retrospective video, and the retroactive video is uploaded to the server 104 . Among them, the terminal 102 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104 can be realized by an independent server or a server cluster composed of multiple servers, or can be nodes in the blockchain.

在一个实施例中,如图2所示,提供了一种页面操作过程回溯方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2 , a page operation process backtracking method is provided. The method is applied to the terminal in FIG. 1 as an example for illustration, including the following steps:

步骤202,响应用户页面操作,获取屏幕录制对象。Step 202, in response to the user's page operation, acquire a screen recording object.

其中,用户页面操作是指用户对终端上显示页面的操作。比如,用户页面操作具体可以是指滑动、点击等操作行为。屏幕录制对象是指用于对屏幕进行录制的单例对象。比如,屏幕录制对象具体可以是包装的RPScreenRecorder(共享记录器对象,它提供录制应用程序的音频和视频的能力)。Wherein, the user page operation refers to the user's operation on the page displayed on the terminal. For example, the user page operation may specifically refer to operation behaviors such as sliding and clicking. The screen recording object is a singleton object used to record the screen. For example, the screen recording object may specifically be a packaged RPScreenRecorder (a shared recorder object that provides the ability to record audio and video of an application).

具体的,当侦测到用户对显示页面的操作时,终端会响应用户页面操作,获取屏幕录制对象。举例说明,当屏幕录制对象为包装的RPScreenRecorder时,获取屏幕录制对象的方式可以为通过sharedRecorder函数获取,sharedRecorder函数用于返回应用程序的共享屏幕记录器实例。Specifically, when the user's operation on the displayed page is detected, the terminal will respond to the user's page operation to obtain a screen recording object. For example, when the screen recording object is a packaged RPScreenRecorder, the method of obtaining the screen recording object can be obtained through the sharedRecorder function, and the sharedRecorder function is used to return the shared screen recorder instance of the application.

步骤204,对屏幕录制对象进行录制。Step 204, recording the screen recording object.

具体的,在获取到屏幕录制对象后,终端会调用开始录制方法,对屏幕录制对象进行录制。其中,开始录制方法用于开始进行屏幕录制。举例说明,开始录制方法具体可以是startRecording函数,startRecording函数用于开始录制应用程序显示。Specifically, after obtaining the screen recording object, the terminal will call the start recording method to record the screen recording object. Among them, the start recording method is used to start screen recording. For example, the method for starting recording may specifically be a startRecording function, and the startRecording function is used to start recording an application display.

步骤206,获取对屏幕录制对象进行录制过程中的采样缓冲数据。Step 206, acquiring sample buffer data during the recording process of the screen recording object.

其中,采样缓冲数据是指录制画面的原始数据。比如,采样缓冲数据具体可以是指sampleBuffer数据,sampleBuffer数据是一个CMSampleBuffer对象,本实施例中,sampleBuffer数据包含视频数据。Wherein, the sampling buffer data refers to the original data of the recorded picture. For example, the sampling buffer data may specifically refer to sampleBuffer data, and the sampleBuffer data is a CMSampleBuffer object. In this embodiment, the sampleBuffer data includes video data.

具体的,在对屏幕录制对象进行录制时,终端会调用获取录制图像方法,在回调中获取采样缓冲数据。其中,这里的回调具体可以是指block回调,回调函数可预先添加在屏幕录制对象中。其中,获取录制图像方法用于获取采样缓冲数据。比如,获取录制图像方法具体可以是指startCaptureWithHandler方法,startCaptureWithHandler方法用于启动屏幕捕获。Specifically, when recording the screen recording object, the terminal will call the method of obtaining the recorded image, and obtain the sampling buffer data in the callback. Wherein, the callback here may specifically refer to a block callback, and the callback function may be pre-added in the screen recording object. Among them, the method of acquiring recorded images is used to acquire sampling buffer data. For example, the method for obtaining a recorded image may specifically refer to the startCaptureWithHandler method, which is used to start screen capture.

进一步的,终端会开启异步任务,调用获取录制图像方法,在block回调中获取采样缓冲数据。此处需要说明的是,block回调可在系统预先设定的时间间隔内持续执行,当预先设定的时间间隔为60FPS(Frames Per Second,每秒传输帧数)时,终端每秒会调用60次,顺序执行调用获取录制图像方法,在回调中获取采样缓冲数据、根据采样缓冲数据生成图像信息对象的步骤,即每秒会有60个图像信息对象生成。Furthermore, the terminal will start an asynchronous task, call the method of obtaining the recorded image, and obtain the sampling buffer data in the block callback. What needs to be explained here is that the block callback can be continuously executed within the preset time interval of the system. When the preset time interval is 60FPS (Frames Per Second, the number of frames per second), the terminal will call 60 times, sequentially execute the steps of calling the method of obtaining recorded images, obtaining sampling buffer data in the callback, and generating image information objects based on the sampling buffer data, that is, 60 image information objects will be generated per second.

步骤208,根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息。Step 208, create a pixel buffer reference according to the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to a preset pixel buffer, and the image information object includes information required to generate an image.

其中,图像信息对象是指包括生成图像所需要的所有信息的对象。比如,图像信息对象具体可以是指CIImage对象,CIImage对象是指由核心图像过滤器处理或生成的图像的表示,但是它虽然具有与图像关联的图像数据,却不是图像,可以将CIImage对象作为图像“菜谱”,一个CIImage对象具有生成图像所需的所有信息。预设像素缓冲区是指预先设置的像素缓冲区,用于缓存图像信息对象。Wherein, the image information object refers to an object including all information required to generate an image. For example, an image information object can specifically refer to a CIImage object, which refers to the representation of an image processed or generated by a core image filter, but although it has image data associated with the image, it is not an image, and the CIImage object can be used as an image The "recipe", a CIImage object has all the information needed to generate an image. The preset pixel buffer refers to a preset pixel buffer for caching image information objects.

具体的,在得到采样缓冲数据后,终端会调用捕获采样缓冲区到图像缓冲区方法,根据采样缓冲数据,创建像素缓冲区引用,再根据创建成功的像素缓冲区引用生成图像信息对象。在得到图像信息对象后,终端会将图像信息对象缓存至预设像素缓冲区中备用。其中,像素缓冲区引用是一种像素图片类型,它是图像帧的像素点的集合,包含的是像素点的信息,举例说明,像素点的信息具体可以是指每个像素点的起始坐标等。比如,像素缓冲区引用具体可以是指CVPixelBufferRef,由于CV开头,所以它是属于CoreVideo模块的,里面包括所有压缩的图片信息以及视频帧格式。Specifically, after obtaining the sampling buffer data, the terminal will call the capture sampling buffer to image buffer method, create a pixel buffer reference according to the sampling buffer data, and then generate an image information object according to the successfully created pixel buffer reference. After obtaining the image information object, the terminal will cache the image information object in the preset pixel buffer for standby. Among them, the pixel buffer reference is a type of pixel picture, which is a collection of pixel points of the image frame, and contains the information of the pixel points. For example, the information of the pixel points can specifically refer to the starting coordinates of each pixel point wait. For example, the pixel buffer reference can specifically refer to CVPixelBufferRef. Since it starts with CV, it belongs to the CoreVideo module, which includes all compressed image information and video frame formats.

步骤210,当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。Step 210, when it is confirmed that the user page operation is successful, obtain the image information object from the preset pixel buffer, encode the image information object, and obtain the retroactive video.

其中,用户页面操作成功是指用户已成功提交信息。举例说明,在购买保险时,用户页面操作成功具体可以是指用户已成功订购保险。Wherein, the successful operation of the user page means that the user has successfully submitted information. For example, when purchasing insurance, the successful operation of the user page may specifically mean that the user has successfully ordered the insurance.

具体的,在确认用户页面操作成功时,终端会从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。进一步的,在得到回溯视频后,终端还会把回溯视频上传至服务器,以使得服务器可以根据回溯视频进行页面操作过程回溯。需要说明的是,由于图像信息对象是按照时间顺序被存储至预设像素缓冲区中的,此处只要依照图像信息对象进入预设像素缓冲区的顺序直接编码即可。若用户页面操作未成功时,终端会将像素缓冲区的位图数据直接移除。Specifically, when confirming that the user page operation is successful, the terminal will obtain the image information object from the preset pixel buffer, encode the image information object, and obtain the retroactive video. Further, after obtaining the backtracking video, the terminal will also upload the backtracking video to the server, so that the server can backtrack the page operation process according to the backtracking video. It should be noted that since the image information objects are stored in the preset pixel buffer according to time sequence, it is sufficient to directly encode the image information objects in the order in which they enter the preset pixel buffer. If the user page operation is unsuccessful, the terminal will directly remove the bitmap data in the pixel buffer.

举例说明,本实施例中具体可以采用H264编码生成视频流。H264是由ITU-T(ITU-Tfor ITU Telecommunication Standardization Sector,国际电信联盟电信标准分局)视频编码专家组(VCEG)和ISO/IEC(International Organization for Standardization,国际标准化组织)动态图像专家组(MPEG)联合组成的联合视频组(JVT,Joint Video Team)提出的高度压缩数字视频编解码器标准。For example, in this embodiment, H264 encoding may be used specifically to generate a video stream. H264 is developed by ITU-T (ITU-Tfor ITU Telecommunication Standardization Sector, International Telecommunication Union Telecommunication Standardization Branch) Video Coding Experts Group (VCEG) and ISO/IEC (International Organization for Standardization, International Organization for Standardization) Motion Picture Experts Group (MPEG) A highly compressed digital video codec standard proposed by the joint Joint Video Team (JVT, Joint Video Team).

上述页面操作过程回溯方法,通过响应用户页面操作,获取屏幕录制对象,对屏幕录制对象进行录制,获取对屏幕录制对象进行录制过程中的采样缓冲数据,能够实现对用户页面操作的实时响应,获取到与用户页面操作对应的采样缓冲数据,通过根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,能够通过创建像素缓冲区引用实现对采样缓冲数据的管理,进而可以利用创建成功的像素缓冲区引用实现对与用户页面操作对应的图像信息对象的获取,从而可以在当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,通过对图像信息对象进行编码,得到回溯视频,通过回溯视频即可实现对用户页面操作的回溯,还原用户在页面填写信息时的操作过程,能够实现对页面操作问题的准确定位。The above method of backtracking the page operation process, by responding to the user page operation, obtaining the screen recording object, recording the screen recording object, and obtaining the sampling buffer data during the recording process of the screen recording object, can realize real-time response to the user page operation, obtain To the sampling buffer data corresponding to the user page operation, create a pixel buffer reference according to the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, and cache the image information object to the preset pixel buffer, which can be passed Create a pixel buffer reference to manage the sampling buffer data, and then use the successfully created pixel buffer reference to obtain the image information object corresponding to the user page operation, so that when it is confirmed that the user page operation is successful, from the preset Assuming that the image information object is obtained in the pixel buffer, by encoding the image information object, a backtracking video can be obtained. Through the backtracking video, the backtracking of the user's page operation can be realized, and the operation process when the user fills in the information on the page can be restored, and the page can be realized. Accurate location of operational issues.

在一个实施例中,根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象包括:In one embodiment, creating a pixel buffer reference according to the sampling buffer data, and generating an image information object according to the successfully created pixel buffer reference includes:

调用捕获采样缓冲区到图像缓冲区方法,根据采样缓冲数据,创建像素缓冲区引用;Call the capture sample buffer to image buffer method, and create a pixel buffer reference based on the sample buffer data;

当像素缓冲区引用创建成功时,根据像素缓冲区引用以及预设像素缓冲区的预设属性信息,生成图像信息对象。When the pixel buffer reference is successfully created, an image information object is generated according to the pixel buffer reference and preset attribute information of the preset pixel buffer.

其中,捕获采样缓冲区到图像缓冲区方法用于根据采样缓冲数据创建像素缓冲区引用。比如,捕获采样缓冲区到图像缓冲区方法具体可以是指CMSampleBufferGetImageBuffer方法,CMSampleBufferGetImageBuffer方法用于根据CMSampleBuffer(即采样缓冲数据)返回CVImageBuffer媒体数据(即像素缓冲区引用)。需要说明的是,如果CMSampleBuffer不包含CVImageBuffer、CMSampleBuffer包含CMBlockBuffer,或者有其他错误,返回值为空(即NULL),则不能创建像素缓冲区引用,因此在调用捕获采样缓冲区到图像缓冲区方法,根据采样缓冲数据,创建像素缓冲区引用时,需要判断像素缓冲区引用是否为空,当像素缓冲区引用不为空时,才可以进行下一步处理。Among them, the capture sample buffer to image buffer method is used to create a pixel buffer reference according to the sample buffer data. For example, the method of capturing the sampling buffer to the image buffer may specifically refer to the CMSampleBufferGetImageBuffer method, and the CMSampleBufferGetImageBuffer method is used to return the CVImageBuffer media data (ie, the pixel buffer reference) according to the CMSampleBuffer (ie, the sampling buffer data). It should be noted that if CMSampleBuffer does not contain CVImageBuffer, CMSampleBuffer contains CMBlockBuffer, or there are other errors, the return value is empty (ie NULL), the pixel buffer reference cannot be created, so when calling the capture sample buffer to image buffer method, According to the sampling buffer data, when creating a pixel buffer reference, it is necessary to determine whether the pixel buffer reference is empty. When the pixel buffer reference is not empty, the next step can be processed.

其中,预设属性信息是指预先配置的预设像素缓冲区的属性,包括像素缓冲区的类型、是否有生成位图能力、像素点的宽度、像素点的高度等。举例说明,像素缓冲区的类型用kCVPixelBufferPixelFormatTypeKey表示,对应的预设属性信息具体可以是kCVPixelFormatType_32BGRA,表示32位RGBA的像素点,是否有生成位图能力用kCVPixelBufferCGBitmapContextCompatibilityKey表示,具体可以预设属性信息为通过32位像素点来生成位图,像素点的宽度用kCVPixelBufferWidthKey表示,像素点的高度用kCVPixelBufferHeightKey表示,根据预设属性信息,终端可调用CVPixelBufferPoolCreate(像素缓冲池创建)方法来创建CVPixelBufferPoolRef(像素缓冲池引用),CVPixelBufferPoolRef是CoreVideo框架中的一种技术,用于管理CVPixelBufferRef(像素缓冲区引用),能够操作图像中的像素缓冲区,操作图像存储的各种存储器,利用该接口能够操作yuv(一种颜色编码技术),像素点和所占的内存空间。The preset attribute information refers to the attributes of the pre-configured preset pixel buffer, including the type of the pixel buffer, whether it has the ability to generate a bitmap, the width of the pixel, the height of the pixel, and the like. For example, the type of pixel buffer is represented by kCVPixelBufferPixelFormatTypeKey, and the corresponding preset attribute information can be kCVPixelFormatType_32BGRA, which means 32-bit RGBA pixels. Whether it has the ability to generate bitmaps is represented by kCVPixelBufferCGBitmapContextCompatibilityKey. The pixel is used to generate a bitmap. The width of the pixel is represented by kCVPixelBufferWidthKey, and the height of the pixel is represented by kCVPixelBufferHeightKey. According to the preset attribute information, the terminal can call the CVPixelBufferPoolCreate (pixel buffer pool creation) method to create a CVPixelBufferPoolRef (pixel buffer pool reference) , CVPixelBufferPoolRef is a technology in the CoreVideo framework, used to manage CVPixelBufferRef (pixel buffer reference), can operate the pixel buffer in the image, operate various memory storage of the image, use this interface to operate yuv (a color coding technology), pixels and memory space occupied.

具体的,终端会调用捕获采样缓冲区到图像缓冲区方法,根据采样缓冲数据来尝试创建像素缓冲区引用,当采样缓冲数据中包含CVImageBuffer(对核心视频图像缓冲区的引用)时,像素缓冲区引用可以创建成功,即不为空,终端会进一步根据像素缓冲区引用以及预设像素缓冲区的预设属性信息,生成图像信息对象。其中,在像素缓冲区引用中包含所有像素点的信息,包括每个像素点的坐标等,终端根据像素缓冲区引用以及预设属性信息就可以对图像的像素点进行填充,实现初始化图像信息对象。Specifically, the terminal will call the capture sample buffer to image buffer method, and try to create a pixel buffer reference based on the sample buffer data. When the sample buffer data contains CVImageBuffer (a reference to the core video image buffer), the pixel buffer The reference can be created successfully, that is, it is not empty, and the terminal will further generate an image information object according to the pixel buffer reference and the preset attribute information of the preset pixel buffer. Among them, the pixel buffer reference contains all pixel information, including the coordinates of each pixel, etc., and the terminal can fill the pixel points of the image according to the pixel buffer reference and preset attribute information, and realize the initialization of the image information object. .

本实施例中,通过调用捕获采样缓冲区到图像缓冲区方法,能够根据采样缓冲数据实现对像素缓冲区引用的创建,从而可以在像素缓冲区引用创建成功时,根据像素缓冲区引用以及预设像素缓冲区的预设属性信息,生成图像信息对象。In this embodiment, by calling the method of capturing the sample buffer to the image buffer, the pixel buffer reference can be created according to the sample buffer data, so that when the pixel buffer reference is created successfully, according to the pixel buffer reference and preset The preset attribute information of the pixel buffer generates an image information object.

在一个实施例中,根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象之后,还包括:In one embodiment, after creating a pixel buffer reference according to the sampling buffer data, and generating an image information object according to the successfully created pixel buffer reference, it further includes:

获取与图像信息对象对应的位图上下文;Get the bitmap context corresponding to the image info object;

根据位图上下文对图像信息对象进行渲染,得到位图数据;Render the image information object according to the bitmap context to obtain bitmap data;

将位图数据写入预设的图像缓冲区。Write bitmap data to preset image buffer.

其中,位图上下文是指将图像信息对象转换为UI(User Interface,用户界面)图像的基础信息。位图数据是指基于位图上下文和图像信息对象所生产的用户界面图像。信号量是指在多线程环境下使用的一种设施,是可以用来保证两个或多个关键代码段不被并发调用。在进入一个关键代码段之前,线程必须获取一个信号量,一旦该关键代码段完成了,那么该线程必须释放信号量。预设的图像缓冲区是指预先设置的用于存储位图数据的区域。Wherein, the bitmap context refers to basic information for converting an image information object into a UI (User Interface, user interface) image. Bitmap data refers to user interface images produced based on bitmap context and image information objects. Semaphore refers to a facility used in a multi-threaded environment, which can be used to ensure that two or more critical code segments are not called concurrently. Before entering a critical code section, a thread must acquire a semaphore, and once the critical code section is complete, the thread must release the semaphore. The preset image buffer refers to a preset area for storing bitmap data.

具体的,在根据采样缓冲数据生成图像信息对象之后,终端会调用创建上下文函数获取与图像信息对象对应的位图上下文,根据位图上下文对图像信息对象进行渲染,以完成对位图数据的绘制,得到位图数据,开启信号量控制队列中的位图写入,以保证位图写入不被并发调用,将位图数据写入预设的图像缓冲区中。其中,创建上下文函数具体可以是指UIGraphicsBeginImageContextWithOptions函数,它能够使用指定的选项创建基于位图的图形上下文。进一步的,在获取位图上下文之前,终端还会封装创建像素缓存函数,利用封装后的创建像素缓存函数实现对获取到的位图上下文的管理。举例说明,终端可以采用RPScreenRecorder相关函数进行封装。Specifically, after the image information object is generated according to the sampling buffer data, the terminal will call the create context function to obtain the bitmap context corresponding to the image information object, and render the image information object according to the bitmap context to complete the drawing of the bitmap data , get the bitmap data, turn on the bitmap write in the semaphore control queue to ensure that the bitmap write is not called concurrently, and write the bitmap data into the preset image buffer. Wherein, the creating context function may specifically refer to a UIGraphicsBeginImageContextWithOptions function, which can use specified options to create a graphics context based on a bitmap. Furthermore, before acquiring the bitmap context, the terminal will also encapsulate the function of creating a pixel cache, and use the encapsulated function of creating a pixel cache to manage the acquired bitmap context. For example, the terminal can be encapsulated by using RPScreenRecorder related functions.

举例说明,根据位图上下文对图像信息对象进行渲染的方式可以为:终端先调用UIGraphicsPushContext函数传入位图上下文,再调用UIImage的drawInRect方法,根据位图上下文以及图像信息对象绘制这帧图像,得到位图数据,最后调用CGContextRelease方法释放位图上下文内存。其中,UIGraphicsPushContext函数用于使指定的图形上下文(本实施例中即位图上下文)成为当前上下文,drawInRect方法用于在指定的矩形(位图上下文的坐标系)中绘制整个图像,根据需要进行缩放以适应。For example, the way to render the image information object according to the bitmap context can be as follows: the terminal first calls the UIGraphicsPushContext function to pass in the bitmap context, and then calls the drawInRect method of UIImage to draw the frame of image according to the bitmap context and the image information object, and obtains Bitmap data, and finally call the CGContextRelease method to release the bitmap context memory. Among them, the UIGraphicsPushContext function is used to make the specified graphics context (that is, the bitmap context in this embodiment) the current context, and the drawInRect method is used to draw the entire image in the specified rectangle (the coordinate system of the bitmap context), and scale it as needed adapt.

本实施例中,通过获取与图像信息对象对应的位图上下文,能够根据位图上下文实现对图像信息对象的渲染,得到位图数据,通过开启信号量控制队列中的位图写入,能够在保证位图写入不被并发调用的情况下将位图数据写入预设的图像缓冲区,实现对位图数据的正确写入。In this embodiment, by acquiring the bitmap context corresponding to the image information object, the rendering of the image information object can be realized according to the bitmap context, and the bitmap data can be obtained. By enabling the semaphore to control the writing of the bitmap in the queue, the Write the bitmap data into the preset image buffer when the bitmap write is not called concurrently, so as to realize the correct writing of the bitmap data.

在一个实施例中,页面操作过程回溯方法还包括:In one embodiment, the page operation process backtracking method further includes:

当确认用户页面操作失败时,生成、并显示获取位图数据提示;When confirming that the user page operation fails, generate and display a prompt to obtain bitmap data;

当接收到与获取位图数据提示对应的同意反馈时,从预设的图像缓冲区中获取位图数据;When receiving the consent feedback corresponding to the prompt for obtaining bitmap data, obtain the bitmap data from the preset image buffer;

上传携带位图数据的问题定位提示至服务器,问题定位提示用于提示服务器根据位图数据确认操作失败原因。Upload the problem location prompt carrying the bitmap data to the server, and the problem location prompt is used to prompt the server to confirm the cause of the operation failure based on the bitmap data.

具体的,当确认用户页面操作失败时,终端以及服务器需要确认操作失败原因,此时终端会生成、并显示获取位图数据提示,位图数据提示用于提示使用终端的用户,终端想要获取位图数据并上传至服务器,当接收到与获取位图数据提示对应的同意反馈时,表示用户授权终端获取位图数据并上传至服务器,终端会从预设的图像缓冲区中获取位图数据,上传携带位图数据的问题定位提示至服务器,以提示服务器根据位图数据确认操作失败原因。进一步的,服务器在确认操作失败原因之后,会反馈操作失败原因至终端,从而使用终端的用户可以确认操作失败原因,以便在下一次进行页面操作时避免再次犯同样的错误导致操作失败。Specifically, when confirming that the operation on the user page fails, the terminal and the server need to confirm the reason for the operation failure. At this time, the terminal will generate and display a prompt for obtaining bitmap data. The bitmap data prompt is used to remind the user of the terminal that the terminal wants to obtain Bitmap data is uploaded to the server. When the consent feedback corresponding to the prompt for obtaining bitmap data is received, it means that the user authorizes the terminal to obtain bitmap data and upload it to the server. The terminal will obtain bitmap data from the preset image buffer , upload the problem location prompt carrying the bitmap data to the server, so as to prompt the server to confirm the cause of the operation failure according to the bitmap data. Furthermore, after the server confirms the reason for the operation failure, it will feed back the reason for the operation failure to the terminal, so that the user using the terminal can confirm the reason for the operation failure, so as to avoid making the same mistake again and causing the operation to fail when performing a page operation next time.

本实施例中,通过在接收到同意反馈时,获取位图数据,上传携带位图数据的问题定位提示至服务器,以提示服务器根据位图数据确认操作失败原因,能够使得服务器反馈对应的操作失败原因至终端,从而使得使用终端的用户可以确认操作失败原因,以便在下一次进行页面操作时避免再次犯同样的错误导致操作失败,能够实现问题定位,并提高用户页面操作的成功率。In this embodiment, when the consent feedback is received, the bitmap data is obtained, and the problem location prompt carrying the bitmap data is uploaded to the server to prompt the server to confirm the cause of the operation failure according to the bitmap data, so that the server can feedback that the corresponding operation failed The reason goes to the terminal, so that the user using the terminal can confirm the cause of the operation failure, so as to avoid making the same mistake again and cause the operation to fail when the next page operation is performed, which can realize problem location and improve the success rate of user page operation.

在一个实施例中,根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区之后,还包括:In one embodiment, a pixel buffer reference is created according to the sampling buffer data, an image information object is generated according to the successfully created pixel buffer reference, and after the image information object is cached to the preset pixel buffer, the method further includes:

当未侦测到调用停止录制方法时,返回对屏幕录制对象进行录制的步骤;When no call to the stop recording method is detected, return to the step of recording the screen recording object;

当侦测到用户页面操作时间间隔大于预设操作时间阈值、和/或目标埋点的点击事件时,确认用户操作结束,调用停止录制方法。When it is detected that the user page operation time interval is greater than the preset operation time threshold and/or the click event of the target buried point, it is confirmed that the user operation is completed, and the stop recording method is called.

其中,停止录制方法用于停止对屏幕录制对象的录制。比如,停止录制方法具体可以是指stopCaptureWithHandler方法,stopCaptureWithHandler方法用于停止屏幕捕获。用户页面操作时间间隔是指用户在完成一次页面操作之后与下一次页面操作之前所间隔的时间,预设操作时间阈值可按照需要自行设置。目标埋点是指预先设置的与在页面确认提交信息对应的埋点。比如,目标埋点具体可以是指与提交、确认等事件对应的埋点。Wherein, the stop recording method is used to stop the recording of the screen recording object. For example, the stop recording method may specifically refer to the stopCaptureWithHandler method, and the stopCaptureWithHandler method is used to stop screen capture. The user page operation time interval refers to the time interval between the user completing one page operation and the next page operation, and the preset operation time threshold can be set according to the needs. The target tracking point refers to the preset tracking point corresponding to the confirmed submission information on the page. For example, the target tracking point may specifically refer to tracking points corresponding to events such as submission and confirmation.

具体的,终端在确认用户操作结束时,需要调用停止录制方法,在未侦测到调用停止录制方法时,表示用户操作未结束,终端会返回调用开始录制方法,对屏幕录制对象进行录制的步骤,再次获取图像信息对象,直到侦测到调用停止录制方法,表示用户操作已结束,终端会根据预设像素缓冲区中所有图像信息对象生成对应的回溯视频。其中,终端可通过预设操作确认用户操作结束,预设操作可按照需要自行设置,比如,预设操作具体可以是用户在屏幕超过一定时长未产生交互、在页面确认提交信息等,一定时间可按照需要自行设置。Specifically, when the terminal confirms that the user operation is over, it needs to call the stop recording method. If the call to the stop recording method is not detected, it means that the user operation is not over, and the terminal will return to the step of calling the start recording method to record the screen recording object. , get the image information object again until it detects that the stop recording method is called, indicating that the user operation is over, and the terminal will generate the corresponding backtracking video according to all the image information objects in the preset pixel buffer. Among them, the terminal can confirm the end of the user's operation through the preset operation, and the preset operation can be set according to the needs. Set it up yourself as needed.

其中,终端可通过增加监听方法对录制属性进行监听,监听录制属性的变化,以实现侦测调用停止录制方法。举例说明,增加监听方法具体可以是指addObserver方法,对录制属性进行监听具体可以是指对RPScreenRecorder的recording属性的监听。进一步的,在对录制属性进行监听时主要是监听录制属性的变化,因此除了可以在录制结束的时候监听到之后,也可以监听到录制中断的情况,比方说在用户页面操作过程中有电话进来时就会录制中断,在监听到录制中断时,终端会暂停录制,等待录制中断结束,再继续录制。Wherein, the terminal can monitor the recording attribute by adding a monitoring method, and monitor the change of the recording attribute, so as to implement the detection and call stop recording method. For example, adding a monitoring method may specifically refer to the addObserver method, and monitoring recording properties may specifically refer to monitoring the recording property of RPScreenRecorder. Furthermore, when monitoring the recording properties, it is mainly to monitor the changes of the recording properties, so in addition to monitoring when the recording ends, you can also monitor the interruption of the recording, for example, a call comes in during the operation of the user page When the recording is interrupted, the terminal will pause the recording and wait for the recording interruption to end before continuing to record.

具体的,终端会实时侦测用户页面操作是否结束,用户页面操作结束具体可以是指用户在屏幕超过一定时长未产生交互、在页面确认提交信息等,因此终端在侦测到用户页面操作时间间隔大于预设操作时间阈值(表示用户在屏幕超过一定时长未产生交互)和/或目标埋点的点击事件(表示在页面确认提交信息)时,会确认用户操作结束,调用停止录制方法,以停止录制。Specifically, the terminal will detect in real time whether the user's page operation is over. The end of the user's page operation can specifically refer to the user not interacting on the screen for a certain period of time, confirming the submitted information on the page, etc. Therefore, the terminal detects the user's page operation time interval When it is greater than the preset operation time threshold (indicating that the user has not interacted with the screen for a certain period of time) and/or the click event of the target buried point (indicating that the submission information is confirmed on the page), it will confirm that the user operation is over, and call the stop recording method to stop recording.

本实施例中,通过侦测用户页面操作时间间隔和目标埋点的点击事件,能够实现对用户操作结束的确认,从而可以在确认用户操作结束,调用停止录制方法实现停止录制。In this embodiment, by detecting the user page operation time interval and the click event of the target buried point, the confirmation of the end of the user operation can be realized, so that the stop recording method can be called to stop the recording after confirming the end of the user operation.

在一个实施例中,当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频之后,还包括:In one embodiment, when it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, the image information object is encoded, and after the retrospective video is obtained, it also includes:

获取与用户页面操作对应的操作信息,将操作信息以及回溯视频上传至服务器。Obtain the operation information corresponding to the user page operation, and upload the operation information and the backtracking video to the server.

其中,操作信息是指用户在页面操作时所填写的信息。比如,在购买保险时,操作信息具体可以是指用户所填写的表单数据。Wherein, the operation information refers to the information filled in by the user when operating the page. For example, when purchasing insurance, the operation information may specifically refer to the form data filled in by the user.

具体的,用户在对页面进行操作时,终端会记录与页面操作对应的埋点,在得到回溯视频之后,终端会根据所记录的与页面操作对应的埋点,得到与用户页面操作对应的操作信息,将操作信息以及回溯视频上传至服务器。进一步的,在将操作信息以及回溯视频上传至服务器时,终端会产生一个URL(Uniform Resource Locator,统一资源定位器)本地地址,将操作信息上传至服务器,同时异步将回溯视频上传至服务器。需要说明的是,若回溯视频上传失败,则在下次开始响应用户页面操作时进行重试。Specifically, when the user operates on the page, the terminal will record the buried point corresponding to the page operation. After obtaining the backtracking video, the terminal will obtain the operation corresponding to the user's page operation according to the recorded buried point corresponding to the page operation Information, upload operation information and backtracking video to the server. Further, when uploading the operation information and the backtracking video to the server, the terminal will generate a URL (Uniform Resource Locator, Uniform Resource Locator) local address, upload the operation information to the server, and simultaneously upload the backtracking video to the server asynchronously. It should be noted that if the backtracking video upload fails, it will try again the next time it starts to respond to user page operations.

本实施例中,通过获取与用户页面操作对应的操作信息,将操作信息以及回溯视频上传至服务器,能够使得服务器根据回溯视频实现对用户页面操作的回溯,根据操作信息确认用户信息。In this embodiment, by obtaining the operation information corresponding to the user page operation, and uploading the operation information and the traceback video to the server, the server can realize the traceback of the user page operation according to the traceback video, and confirm the user information according to the operation information.

在一个实施例中,页面操作过程回溯方法还包括:In one embodiment, the page operation process backtracking method further includes:

发送页面数据获取请求;Send page data acquisition request;

接收与页面数据获取请求对应的页面数据;receiving page data corresponding to the page data acquisition request;

根据页面数据生成、并显示待操作页面。Generate and display pages to be operated based on page data.

其中,页面数据获取请求是指向服务器获取页面数据的请求,页面数据是指用于生成待显示页面的数据。Wherein, the page data acquisition request is a request directed to the server to acquire page data, and the page data refers to data used to generate a page to be displayed.

具体的,当需要进行页面操作时,用户会通过终端发送页面数据获取请求至服务器,服务器在接收到页面数据获取请求后,会下发与页面数据获取请求对应的页面数据至终端,从而终端可以根据接收到的与页面数据获取请求对应的页面数据生成、并显示待操作页面。Specifically, when a page operation is required, the user will send a page data acquisition request to the server through the terminal, and the server will send the page data corresponding to the page data acquisition request to the terminal after receiving the page data acquisition request, so that the terminal can Generate and display the page to be operated according to the received page data corresponding to the page data acquisition request.

举例说明,当页面操作为进行保险购买时,用户会进入终端的保险购买页面并填写用户资料信息,终端根据用户资料信息会发送页面数据获取请求至服务器,服务器根据用户资料信息会下发对应的保险表单页面数据,终端在接收到保险表单页面数据后,会创建表单序列化解析器,针对不同用户解析不同的保险项目,将保障计划、保险详情、投保须知、信息披露等信息都转化为json(JavaScript Object Notation,JS对象简谱)数据中的字段进行数据关系对应的建立,通过应用程序对外提供的toDataObj方法将json的字段值转化为对象类型,创建tableView(表格视图),根据对象数据生成表单cell(单元格),以根据表单cell进一步生成待操作页面。进一步的,表单创建完成后,终端会对当前的数据环境进行配置。举例说明,在IOS端的配置可以如图3所示。For example, when the page operation is to purchase insurance, the user will enter the insurance purchase page of the terminal and fill in the user profile information, the terminal will send a page data acquisition request to the server according to the user profile information, and the server will issue the corresponding Insurance form page data, after the terminal receives the insurance form page data, it will create a form serialization parser to analyze different insurance items for different users, and convert insurance plans, insurance details, insurance notices, information disclosure and other information into json (JavaScript Object Notation, JS Object Notation) The fields in the data are established to correspond to the data relationship, and the toDataObj method provided by the application program is used to convert the json field value into an object type, create a tableView (table view), and generate a form based on the object data cell (cell), to further generate the page to be operated according to the form cell. Furthermore, after the form is created, the terminal will configure the current data environment. For example, the configuration on the IOS side may be as shown in FIG. 3 .

本实施例中,通过发送页面数据获取请求,接收与页面数据获取请求对应的页面数据,根据页面数据生成、并显示待操作页面,能够实现对待操作页面的显示。In this embodiment, by sending a page data acquisition request, receiving page data corresponding to the page data acquisition request, generating and displaying the page to be operated according to the page data, the display of the page to be operated can be realized.

本申请还提供一种订单确认的应用场景,该应用场景应用上述的页面操作过程回溯方法。如图4所示,具体地,该页面操作过程回溯方法在该应用场景的应用如下:The present application also provides an application scenario for order confirmation, which applies the above-mentioned backtracking method for the page operation process. As shown in Figure 4, specifically, the application of the page operation process backtracking method in this application scenario is as follows:

终端发送表单页面数据获取请求至服务器,服务器下发表单页面数据至终端,终端根据表单页面数据进行加载,创建解析器生成表单视图(即待操作页面),接收用户操作表单行为,对录制系统进行初始化设置(即响应用户页面操作,获取屏幕录制对象,对屏幕录制对象进行录制),开启队列并创建像素缓冲区,在block回调中对每一帧数据写入图形缓冲区(获取对屏幕录制对象进行录制过程中的采样缓冲数据,根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区),产生订单、结束录制,编码成视频流、与订单产生对应关系(当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频),上传视频流以及与订单产生的对应关系到服务器(即将操作信息以及回溯视频上传至服务器)。The terminal sends a form page data acquisition request to the server, the server publishes the form page data to the terminal, the terminal loads the form page data, creates a parser to generate a form view (that is, the page to be operated), receives user operation form behavior, and records the recording system. Initialize the settings (that is, respond to user page operations, obtain the screen recording object, and record the screen recording object), open the queue and create a pixel buffer, and write each frame of data to the graphics buffer in the block callback (obtaining the screen recording object Sampling buffer data during the recording process, create a pixel buffer reference based on the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to the preset pixel buffer), generate an order, end Record, encode into a video stream, and generate a corresponding relationship with the order (when confirming that the user page operation is successful, obtain the image information object from the preset pixel buffer, encode the image information object, and obtain the backtracking video), upload the video stream, and communicate with The correspondence generated by the order is related to the server (that is, the operation information and the backtracking video are uploaded to the server).

本申请还另外提供一种应用场景,即在基于IOS系统的终端实现保险购买,该应用场景应用上述的页面操作过程回溯方法。如图5所示,具体地,该页面操作过程回溯方法在该应用场景的应用如下:The present application further provides an application scenario, that is, realizing insurance purchase on a terminal based on the IOS system, and this application scenario applies the above-mentioned backtracking method of the page operation process. As shown in Figure 5, specifically, the application of the page operation process backtracking method in this application scenario is as follows:

用户操作终端进入保险购买页面,终端发送携带用户信息的页面数据获取请求至服务器,服务器根据用户信息下发保险表单数据,终端接收保险表单数据,利用解析器解析成数据对象,生成表单视图,配置数据环境,添加观察者模式监听RPScreenRecorder的recording属性,调用应用程序(即图中的TMF)基础录制对象的sharedRecorder获取获取屏幕录制对象,调用startRecording(开始录制方法),对屏幕录制对象开始进行录制,并预设kCVPixelBuffer(像素缓冲)属性(即预设像素缓冲区的预设属性信息)。The user operates the terminal to enter the insurance purchase page, the terminal sends a page data acquisition request carrying user information to the server, the server sends the insurance form data according to the user information, the terminal receives the insurance form data, uses the parser to parse it into data objects, generates a form view, configures Data environment, add observer mode to monitor the recording property of RPScreenRecorder, call the sharedRecorder of the basic recording object of the application (ie TMF in the figure) to obtain the screen recording object, call startRecording (start recording method), and start recording the screen recording object, And preset the kCVPixelBuffer (pixel buffer) attribute (that is, the preset attribute information of the preset pixel buffer).

开始串行队列,通过dispatch_async开启异步任务执行渲染,终端会调用startCaptureWithHandler(获取录制图像方法),在block回调中获取sampleBuffer(采样缓冲数据),调用CMSampleBufferGetImageBuffer(捕获采样缓冲区到图像缓冲区方法)传入sampleBuffer来尝试创建CVPixelBufferRef(像素缓冲区引用),当CVPixelBufferRef不为空时(即像素缓冲区引用创建成功时),根据CVPixelBufferRef初始化CIImage对象(图像信息对象),将CIImage对象缓存至预设像素缓冲区,CIImage对象包括生成图像所需要的信息,生成位图上下文,调用UIGraphicsPushContext传入位图上下文,调用UIImage的drawInRect方法绘制这帧图像,调用CGContextRelease释放位图上下文内存(即根据位图上下文对图像信息对象进行渲染,得到位图数据),开启信号量控制队列中的位图写入,将位图数据写入预设的图像缓冲区,判断是否调用stop,当调用未结束时,返回调用startRecording(开始录制方法),对屏幕录制对象开始进行录制,当调用结束时,执行recording属性的回调(即当未侦测到调用停止录制方法时,返回对屏幕录制对象进行录制的步骤,当侦测到用户页面操作时间间隔大于预设操作时间阈值、和/或目标埋点的点击事件时,确认用户操作结束,调用停止录制方法),在用户页面操作成功时,进行视频编码并上传数据,(即从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频,获取与用户页面操作对应的操作信息,将操作信息以及回溯视频上传至服务器)。Start the serial queue, start the asynchronous task to perform rendering through dispatch_async, the terminal will call startCaptureWithHandler (the method of obtaining the recorded image), obtain the sampleBuffer (sampling buffer data) in the block callback, and call CMSampleBufferGetImageBuffer (the method of capturing the sample buffer to the image buffer) to transfer Enter sampleBuffer to try to create CVPixelBufferRef (pixel buffer reference). When CVPixelBufferRef is not empty (that is, when the pixel buffer reference is created successfully), initialize the CIImage object (image information object) according to CVPixelBufferRef, and cache the CIImage object to the preset pixel buffer. Area, the CIImage object includes the information needed to generate the image, generate the bitmap context, call UIGraphicsPushContext to pass in the bitmap context, call the drawInRect method of UIImage to draw the frame image, and call CGContextRelease to release the memory of the bitmap context (that is, the image is processed according to the bitmap context Render the information object to get the bitmap data), open the bitmap write in the semaphore control queue, write the bitmap data into the preset image buffer, judge whether to call stop, and return to call startRecording when the call is not over (Start recording method), start recording the screen recording object, when the call ends, execute the callback of the recording property (that is, when the stop recording method is not detected, return to the step of recording the screen recording object, when detected When the user page operation time interval is greater than the preset operation time threshold and/or the click event of the target buried point, confirm the end of the user operation and call the stop recording method), and when the user page operation is successful, perform video encoding and upload data, ( That is to obtain the image information object from the preset pixel buffer, encode the image information object, obtain the retrospective video, obtain the operation information corresponding to the user page operation, and upload the operation information and the retroactive video to the server).

在一个实施例中,如图6所示,本申请还提供一个流程示意图来说明上述的页面操作过程回溯方法,该页面操作过程回溯方法具体包括以下步骤:In one embodiment, as shown in FIG. 6 , the present application also provides a schematic flowchart to illustrate the above-mentioned page operation process backtracking method. The page operation process backtracking method specifically includes the following steps:

步骤602,发送页面数据获取请求;Step 602, sending a page data acquisition request;

步骤604,接收与页面数据获取请求对应的页面数据;Step 604, receiving page data corresponding to the page data acquisition request;

步骤606,根据页面数据生成、并显示待操作页面;Step 606, generating and displaying the page to be operated according to the page data;

步骤608,响应用户页面操作,获取屏幕录制对象;Step 608, responding to the user's page operation, and obtaining the screen recording object;

步骤610,对屏幕录制对象进行录制;Step 610, recording the screen recording object;

步骤612,获取对屏幕录制对象进行录制过程中的采样缓冲数据;Step 612, acquiring the sampling buffer data during the recording process of the screen recording object;

步骤614,调用捕获采样缓冲区到图像缓冲区方法,根据采样缓冲数据,创建像素缓冲区引用;Step 614, call the method of capturing the sample buffer to the image buffer, and create a pixel buffer reference according to the sample buffer data;

步骤616,当像素缓冲区引用创建成功时,根据像素缓冲区引用以及预设像素缓冲区的预设属性信息,生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;Step 616, when the pixel buffer reference is successfully created, an image information object is generated according to the pixel buffer reference and the preset attribute information of the preset pixel buffer, and the image information object is cached in the preset pixel buffer, and the image information object includes the information needed to generate the image;

步骤618,获取与图像信息对象对应的位图上下文;Step 618, acquire the bitmap context corresponding to the image information object;

步骤620,根据位图上下文对图像信息对象进行渲染,得到位图数据;Step 620, render the image information object according to the bitmap context to obtain bitmap data;

步骤622,将位图数据写入预设的图像缓冲区;Step 622, write the bitmap data into the preset image buffer;

步骤624,当未侦测到调用停止录制方法时,返回对屏幕录制对象进行录制的步骤;Step 624, return to the step of recording the screen recording object when calling the stop recording method is not detected;

步骤626,当侦测到用户页面操作时间间隔大于预设操作时间阈值、和/或目标埋点的点击事件时,确认用户操作结束,调用停止录制方法;Step 626, when it is detected that the user page operation time interval is greater than the preset operation time threshold and/or the click event of the target buried point, confirm that the user operation is completed, and call the stop recording method;

步骤628,判断用户页面操作是否成功,当确认用户页面操作失败时跳转至步骤630,当确认用户页面操作成功时跳转至步骤636;Step 628, determine whether the user page operation is successful, jump to step 630 when it is confirmed that the user page operation fails, and jump to step 636 when it is confirmed that the user page operation is successful;

步骤630,生成、并显示获取位图数据提示;Step 630, generating and displaying a prompt for acquiring bitmap data;

步骤632,当接收到与获取位图数据提示对应的同意反馈时,从预设的图像缓冲区中获取位图数据;Step 632, when receiving the consent feedback corresponding to the prompt for acquiring bitmap data, acquire the bitmap data from the preset image buffer;

步骤634,上传携带位图数据的问题定位提示至服务器,问题定位提示用于提示服务器根据位图数据确认操作失败原因;Step 634, uploading the problem location prompt carrying the bitmap data to the server, the problem location prompt is used to prompt the server to confirm the cause of the operation failure according to the bitmap data;

步骤636,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频;Step 636, acquire the image information object from the preset pixel buffer, encode the image information object, and obtain the backtracking video;

步骤638,获取与用户页面操作对应的操作信息,将操作信息以及回溯视频上传至服务器。Step 638, obtaining the operation information corresponding to the user's page operation, and uploading the operation information and the backtracking video to the server.

应该理解的是,虽然上述实施例涉及的各流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述实施例涉及的各流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts involved in the above embodiments are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be executed at different times. These steps Or the execution sequence of the stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.

在一个实施例中,如图7所示,提供了一种页面操作过程回溯装置,该装置可以采用软件模块或硬件模块,或者是二者的结合成为计算机设备的一部分,该装置具体包括:响应模块702、录制模块704、获取模块706、处理模块708、和编码模块710,其中:In one embodiment, as shown in FIG. 7 , a page operation process backtracking device is provided. The device can adopt a software module or a hardware module, or a combination of the two becomes a part of the computer device. The device specifically includes: a response Module 702, recording module 704, acquisition module 706, processing module 708, and encoding module 710, wherein:

响应模块702,用于响应用户页面操作,获取屏幕录制对象;Response module 702, configured to respond to user page operations and acquire screen recording objects;

录制模块704,用于对屏幕录制对象进行录制;Recording module 704, for recording the screen recording object;

获取模块706,用于获取对屏幕录制对象进行录制过程中的采样缓冲数据;An acquisition module 706, configured to acquire sample buffer data during the recording process of the screen recording object;

处理模块708,用于根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,图像信息对象包括生成图像所需要的信息;The processing module 708 is used to create a pixel buffer reference according to the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, and cache the image information object to a preset pixel buffer. Information;

编码模块710,用于当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,对图像信息对象进行编码,得到回溯视频。The encoding module 710 is configured to obtain the image information object from the preset pixel buffer when it is confirmed that the user page operation is successful, and encode the image information object to obtain a retrospective video.

上述页面操作过程回溯装置,通过响应用户页面操作,获取屏幕录制对象,对屏幕录制对象进行录制,获取对屏幕录制对象进行录制过程中的采样缓冲数据,能够实现对用户页面操作的实时响应,获取到与用户页面操作对应的采样缓冲数据,通过根据采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将图像信息对象缓存至预设像素缓冲区,能够通过创建像素缓冲区引用实现对采样缓冲数据的管理,进而可以利用创建成功的像素缓冲区引用实现对与用户页面操作对应的图像信息对象的获取,从而可以在当确认用户页面操作成功时,从预设像素缓冲区中获取图像信息对象,通过对图像信息对象进行编码,得到回溯视频,通过回溯视频即可实现对用户页面操作的回溯,还原用户在页面填写信息时的操作过程,能够实现对页面操作问题的准确定位。The above-mentioned page operation process backtracking device, by responding to the user page operation, obtains the screen recording object, records the screen recording object, and obtains the sampling buffer data during the recording process of the screen recording object, which can realize the real-time response to the user page operation, obtain To the sampling buffer data corresponding to the user page operation, create a pixel buffer reference according to the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, and cache the image information object to the preset pixel buffer, which can be passed Create a pixel buffer reference to manage the sampling buffer data, and then use the successfully created pixel buffer reference to obtain the image information object corresponding to the user page operation, so that when it is confirmed that the user page operation is successful, from the preset Assuming that the image information object is obtained in the pixel buffer, by encoding the image information object, a backtracking video can be obtained. Through the backtracking video, the backtracking of the user's page operation can be realized, and the operation process when the user fills in the information on the page can be restored, and the page can be realized. Accurate location of operational issues.

在一个实施例中,处理模块还用于调用捕获采样缓冲区到图像缓冲区方法,根据采样缓冲数据,创建像素缓冲区引用,当像素缓冲区引用创建成功时,根据像素缓冲区引用以及预设像素缓冲区的预设属性信息,生成图像信息对象。In one embodiment, the processing module is also used to call the method of capturing the sample buffer to the image buffer, create a pixel buffer reference according to the sample buffer data, and when the pixel buffer reference is created successfully, according to the pixel buffer reference and preset The preset attribute information of the pixel buffer generates an image information object.

在一个实施例中,页面操作过程回溯装置还包括绘图模块,绘图模块用于获取与图像信息对象对应的位图上下文,根据位图上下文对图像信息对象进行渲染,得到位图数据,将位图数据写入预设的图像缓冲区。In one embodiment, the page operation process backtracking device further includes a drawing module, the drawing module is used to obtain the bitmap context corresponding to the image information object, render the image information object according to the bitmap context, obtain bitmap data, and convert the bitmap Data is written to the preset image buffer.

在一个实施例中,页面操作过程回溯装置还包括上传模块,上传模块用于当确认用户页面操作失败时,生成、并显示获取位图数据提示,当接收到与获取位图数据提示对应的同意反馈时,从预设的图像缓冲区中获取位图数据,上传携带位图数据的问题定位提示至服务器,问题定位提示用于提示服务器根据位图数据确认操作失败原因。In one embodiment, the device for tracing back the page operation process further includes an upload module. The upload module is used to generate and display a prompt for obtaining bitmap data when it is confirmed that the user page operation fails. When feedback, the bitmap data is obtained from the preset image buffer, and the problem location prompt carrying the bitmap data is uploaded to the server. The problem location prompt is used to prompt the server to confirm the cause of the operation failure based on the bitmap data.

在一个实施例中,页面操作过程回溯装置还包括侦测模块,侦测模块用于当未侦测到调用停止录制方法时,返回对屏幕录制对象进行录制的步骤,当侦测到用户页面操作时间间隔大于预设操作时间阈值、和/或目标埋点的点击事件时,确认用户操作结束,调用停止录制方法。In one embodiment, the device for tracing back the page operation process further includes a detection module, and the detection module is used to return to the step of recording the screen recording object when the call to stop recording method is not detected, and when the user page operation is detected When the time interval is greater than the preset operation time threshold and/or the click event of the target buried point, confirm the end of the user operation and call the stop recording method.

在一个实施例中,上传模块还用于获取与用户页面操作对应的操作信息,将操作信息以及回溯视频上传至服务器。In one embodiment, the uploading module is further configured to obtain operation information corresponding to user page operations, and upload the operation information and the backtracking video to the server.

在一个实施例中,页面操作过程回溯装置还包括页面生成模块,页面生成模块用于发送页面数据获取请求,接收与页面数据获取请求对应的页面数据,根据页面数据生成、并显示待操作页面。In one embodiment, the device for tracing back the page operation process further includes a page generation module, configured to send a page data acquisition request, receive page data corresponding to the page data acquisition request, generate and display the page to be operated according to the page data.

关于页面操作过程回溯装置的具体限定可以参见上文中对于页面操作过程回溯方法的限定,在此不再赘述。上述页面操作过程回溯装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitations of the page operation process backtracking device, refer to the above-mentioned definition of the page operation process backtracking method, which will not be repeated here. Each module in the above-mentioned page operation process backtracking device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种页面操作过程回溯方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure may be as shown in FIG. 8 . The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, NFC (Near Field Communication) or other technologies. When the computer program is executed by the processor, a method for backtracking the page operation process is realized. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the casing of the computer device , and can also be an external keyboard, touchpad, or mouse.

本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of a partial structure related to the solution of this application, and does not constitute a limitation on the computer equipment to which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.

在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, there is also provided a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

在一个实施例中,提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, storing a computer program, and implementing the steps in the foregoing method embodiments when the computer program is executed by a processor.

在一个实施例中,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各方法实施例中的步骤。In one embodiment there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the steps in the foregoing method embodiments.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile memory and volatile memory. The non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, and the like. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several implementation modes of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (11)

1.一种页面操作过程回溯方法,其特征在于,所述方法包括:1. A page operation process backtracking method, characterized in that the method comprises: 响应用户页面操作,获取屏幕录制对象;Get the screen recording object in response to the user page operation; 对所述屏幕录制对象进行录制;record the screen recording object; 获取对所述屏幕录制对象进行录制过程中的采样缓冲数据;Acquiring sample buffer data during recording of the screen recording object; 根据所述采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将所述图像信息对象缓存至预设像素缓冲区,所述图像信息对象包括生成图像所需要的信息;Create a pixel buffer reference according to the sampling buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to a preset pixel buffer, and the image information object includes the information needed to generate the image Information; 当确认用户页面操作成功时,从所述预设像素缓冲区中获取所述图像信息对象,对所述图像信息对象进行编码,得到回溯视频。When it is confirmed that the user page operation is successful, the image information object is acquired from the preset pixel buffer, and the image information object is encoded to obtain a retrospective video. 2.根据权利要求1所述的方法,其特征在于,所述根据所述采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象包括:2. The method according to claim 1, wherein said creating a pixel buffer reference according to said sampling buffer data, and generating an image information object according to a successfully created pixel buffer reference comprises: 调用捕获采样缓冲区到图像缓冲区方法,根据所述采样缓冲数据,创建像素缓冲区引用;Call the capture sample buffer to image buffer method, and create a pixel buffer reference according to the sample buffer data; 当所述像素缓冲区引用创建成功时,根据所述像素缓冲区引用以及预设像素缓冲区的预设属性信息,生成图像信息对象。When the pixel buffer reference is created successfully, an image information object is generated according to the pixel buffer reference and the preset attribute information of the preset pixel buffer. 3.根据权利要求1所述的方法,其特征在于,所述根据所述采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象之后,还包括:3. The method according to claim 1, wherein, according to the sampling buffer data, creating a pixel buffer reference, after generating an image information object according to the successfully created pixel buffer reference, further comprising: 获取与所述图像信息对象对应的位图上下文;Acquiring a bitmap context corresponding to the image information object; 根据所述位图上下文对所述图像信息对象进行渲染,得到位图数据;Rendering the image information object according to the bitmap context to obtain bitmap data; 将所述位图数据写入预设的图像缓冲区。Write the bitmap data into a preset image buffer. 4.根据权利要求3所述的方法,其特征在于,还包括:4. The method according to claim 3, further comprising: 当确认用户页面操作失败时,生成、并显示获取位图数据提示;When confirming that the user page operation fails, generate and display a prompt to obtain bitmap data; 当接收到与所述获取位图数据提示对应的同意反馈时,从所述预设的图像缓冲区中获取位图数据;When receiving the consent feedback corresponding to the prompt for acquiring bitmap data, acquire the bitmap data from the preset image buffer; 上传携带位图数据的问题定位提示至服务器,所述问题定位提示用于提示所述服务器根据所述位图数据确认操作失败原因。Uploading a problem location prompt carrying bitmap data to the server, the problem location prompt is used to prompt the server to confirm the cause of the operation failure according to the bitmap data. 5.根据权利要求1所述的方法,其特征在于,所述根据所述采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将所述图像信息对象缓存至预设像素缓冲区之后,还包括:5. The method according to claim 1, wherein, according to the sampling buffer data, a pixel buffer reference is created, an image information object is generated according to the successfully created pixel buffer reference, and the image information object is cached After presetting the pixel buffer, also include: 当未侦测到调用停止录制方法时,返回所述对所述屏幕录制对象进行录制的步骤;When it is not detected that calling the stop recording method, return to the step of recording the screen recording object; 当侦测到用户页面操作时间间隔大于预设操作时间阈值、和/或目标埋点的点击事件时,确认用户操作结束,调用停止录制方法。When it is detected that the user page operation time interval is greater than the preset operation time threshold and/or the click event of the target buried point, it is confirmed that the user operation is completed, and the stop recording method is called. 6.根据权利要求1所述的方法,其特征在于,所述当确认用户页面操作成功时,从所述预设像素缓冲区中获取所述图像信息对象,对所述图像信息对象进行编码,得到回溯视频之后,还包括:6. The method according to claim 1, wherein when it is confirmed that the user page operation is successful, the image information object is obtained from the preset pixel buffer, and the image information object is encoded, After getting the backtracking video, also include: 获取与用户页面操作对应的操作信息,将所述操作信息以及所述回溯视频上传至服务器。Obtain operation information corresponding to user page operations, and upload the operation information and the backtracking video to the server. 7.根据权利要求1所述的方法,其特征在于,还包括:7. The method of claim 1, further comprising: 发送页面数据获取请求;Send page data acquisition request; 接收与所述页面数据获取请求对应的页面数据;receiving page data corresponding to the page data acquisition request; 根据所述页面数据生成、并显示待操作页面。A page to be operated is generated and displayed according to the page data. 8.一种页面操作过程回溯装置,其特征在于,所述装置包括:8. A page operation process backtracking device, characterized in that the device comprises: 响应模块,用于响应用户页面操作,获取屏幕录制对象;The response module is used to respond to user page operations and obtain screen recording objects; 录制模块,用于对所述屏幕录制对象进行录制;A recording module, configured to record the screen recording object; 获取模块,用于获取对所述屏幕录制对象进行录制过程中的采样缓冲数据;An acquisition module, configured to acquire sampling buffer data in the process of recording the screen recording object; 处理模块,用于根据所述采样缓冲数据,创建像素缓冲区引用,根据创建成功的像素缓冲区引用生成图像信息对象,将所述图像信息对象缓存至预设像素缓冲区,所述图像信息对象包括生成图像所需要的信息;The processing module is configured to create a pixel buffer reference according to the sample buffer data, generate an image information object according to the successfully created pixel buffer reference, cache the image information object to a preset pixel buffer, and the image information object Include the information needed to generate the image; 编码模块,用于当确认用户页面操作成功时,从所述预设像素缓冲区中获取所述图像信息对象,对所述图像信息对象进行编码,得到回溯视频。The encoding module is configured to obtain the image information object from the preset pixel buffer when it is confirmed that the user page operation is successful, and encode the image information object to obtain a retrospective video. 9.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述的方法的步骤。9. A computer device, comprising a memory and a processor, the memory stores a computer program, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program step. 10.一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。10. A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented. 11.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7任一项所述方法的步骤。11. A computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN202111129550.XA 2021-09-26 2021-09-26 Page operation process backtracking method and device, computer equipment and storage medium Pending CN115883909A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111129550.XA CN115883909A (en) 2021-09-26 2021-09-26 Page operation process backtracking method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111129550.XA CN115883909A (en) 2021-09-26 2021-09-26 Page operation process backtracking method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115883909A true CN115883909A (en) 2023-03-31

Family

ID=85762574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111129550.XA Pending CN115883909A (en) 2021-09-26 2021-09-26 Page operation process backtracking method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115883909A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078451A1 (en) * 2002-10-17 2004-04-22 International Business Machines Corporation Separating and saving hyperlinks of special interest from a sequence of web documents being browsed at a receiving display station on the web
CN110020320A (en) * 2017-12-29 2019-07-16 北京京东尚科信息技术有限公司 The method and apparatus for caching page pictures
CN110457624A (en) * 2019-06-26 2019-11-15 网宿科技股份有限公司 Video generation method, device, server and storage medium
CN110865843A (en) * 2018-08-09 2020-03-06 阿里巴巴集团控股有限公司 Page backtracking, information backup and problem solving method, system and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078451A1 (en) * 2002-10-17 2004-04-22 International Business Machines Corporation Separating and saving hyperlinks of special interest from a sequence of web documents being browsed at a receiving display station on the web
CN110020320A (en) * 2017-12-29 2019-07-16 北京京东尚科信息技术有限公司 The method and apparatus for caching page pictures
CN110865843A (en) * 2018-08-09 2020-03-06 阿里巴巴集团控股有限公司 Page backtracking, information backup and problem solving method, system and equipment
CN110457624A (en) * 2019-06-26 2019-11-15 网宿科技股份有限公司 Video generation method, device, server and storage medium

Similar Documents

Publication Publication Date Title
CN109618225B (en) Video frame extraction method, device, equipment and medium
CN106572139B (en) Multi-terminal control method, terminal, server and system
JP5242349B2 (en) Image display device
US20140143299A1 (en) Systems and methods for medical imaging viewing
CN111163345A (en) Image rendering method and device
US10656806B2 (en) Display interface systems and methods
CN110688286B (en) Application program operation information transmission method and device, storage medium and electronic equipment
CN104462125A (en) Method and device for generating webpage screenshot
CN110347319B (en) Method and device for screenshot in application
JP2012133586A (en) Display device, screen image transfer method and program
CN108334429A (en) Method, apparatus and system for investigating front end page problem
KR101984825B1 (en) Method and Apparatus for Encoding a Cloud Display Screen by Using API Information
CN117914957A (en) Multi-protocol interactive communication method, device, equipment, storage medium and product
CN114003473A (en) Page operation behavior backtracking method and device and electronic equipment
CN114071190A (en) Cloud application video stream processing method, related device and computer program product
CN110727481A (en) Picture editing method and device, computer equipment and storage medium
CN107451056B (en) Method and device for monitoring interface test result
CN115883909A (en) Page operation process backtracking method and device, computer equipment and storage medium
CN109960562B (en) Information display method and device and computer readable storage medium
WO2020093879A1 (en) Video synthesis method and apparatus, computer device and readable storage medium
US9367931B1 (en) Motion vectors for cross-platform display
HK40084183A (en) Page operation process retrospective method, device, computer equipment and storage medium
CN116932352A (en) Service track acquisition method, device, computer equipment and storage medium
US9161009B2 (en) System, terminal device, and image capturing method
CN103970521A (en) Icon generative system and icon generative method

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40084183

Country of ref document: HK