Video traceable method and device based on iOS end, equipment and storage medium
By using SDK integration components on the iOS side, using the main thread and child thread parallel method, users' unconscious video backtracking management is realized, solving the unconscious and efficiency problems of iOS video backtracking management, and improving user experience and conversion rate.
Patent Information
- Application Number
- CN202311137246.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-05
- Publication Date
- 2025-03-07
AI Technical Summary
On the iOS side, there is a lack of a user-informed video backtracking management method, and it is impossible to achieve comprehensive, fast, and uninformed generation, transmission, storage and reproduction of video backtracking information.
Through the SDK integration component, the main thread and child thread are used to parallelize the video traceability process. The main thread is responsible for the generation of screen bitmap image data, the first child thread is responsible for data storage, and the second child thread is responsible for video generation and export.
It realizes unsensitized video backtracking management, improves user experience and conversion rates, and efficiently utilizes multi-core iOS client devices, ensuring the efficiency of video generation and real-time storage of data, and avoids recording loss.
Smart Images

Figure CN119576439A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video retracing technology, and in particular to an iOS-based video retracing method, apparatus, device and storage medium. Background Art
[0002] With the development of science and technology, the application of video backtracking technology is becoming more and more extensive. At present, with the clarification and rise of the concept of backtracking management of Internet insurance sales behavior, people have put forward higher requirements for the process and application of backtracking the video recorded on the client's screen.
[0003] In the current financial business App (Application) client, facing more stringent regulatory requirements, the use of traceable technology to record all customer behaviors on the App page, reproduce each page and each operation of the sales process, and render it into an effective video for regulatory review. Although there are currently methods for recording and tracing back the client's screen information, there is no method on the iOS side to generate, transmit, store, and reproduce the video tracing information of the recorded screen information in a comprehensive and rapid manner without user perception, which brings great inconvenience to users. Therefore, how to achieve user-insensitive video tracing management through a simple and efficient method is a technical problem that needs to be solved urgently. Summary of the invention
[0004] Based on this, it is necessary to provide a video retracing method, device, equipment and storage medium based on iOS to address at least one of the technical problems mentioned in the above background technology, which can simply and efficiently implement a video retracing management method without user perception.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, a video retracing method based on an iOS terminal is provided, which is applied to an iOS client and includes:
[0007] In response to detecting that the video traceability process starts, executing software development kit component initialization, setting a first sub-thread and a second sub-thread to wait for work;
[0008] In response to detecting that the video traceable start method of the software development kit is called, starting current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data;
[0009] Receiving the screen bitmap image data through the first sub-thread and storing it in a database;
[0010] In response to detecting that the video traceable end method of the software development kit is called, the current device screen drawing is stopped, video generation is performed according to the screen bitmap image data stored in the database by the second sub-thread, and the video is exported.
[0011] Furthermore, the process of starting the current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data includes:
[0012] Get the elements and position information of the current device screen;
[0013] The drawViewHierarchyInRect:afterScreenUpdates: method in UIView is called to draw and convert the elements and position information of the current device screen into screen bitmap image data.
[0014] Further, the execution of software development kit component initialization includes:
[0015] Configure the current video traceability process input parameters;
[0016] The current video traceability process input parameter includes a custom video mask, and the custom video mask is used to mask sensitive data in the current device screen.
[0017] Furthermore, the current video traceable process input parameter also includes at least one of a screen drawing frequency, a bit rate of a generated video, a frame rate of a generated video, and an exported video path.
[0018] Furthermore, the current video traceable process input parameter also includes a video generation strategy, and the video generation strategy includes at least one of different screen drawing frequencies, different bit rates of generated videos, and different frame rates of generated videos;
[0019] The execution of software development kit component initialization also includes:
[0020] Get the network environment status of the current device and the storage space size of the current device;
[0021] According to the network environment status and the storage space size of the current device, the corresponding video generation strategy is matched.
[0022] Furthermore, receiving the screen bitmap image data through the first sub-thread and storing it in a database includes:
[0023] The screen bitmap image data generated by the executed video is cleaned up at first preset time intervals by the first sub-thread.
[0024] Furthermore, before the video traceability process starts, the method further includes:
[0025] Initiate a request to start the video traceability process to the current user;
[0026] In response to receiving a confirmation instruction returned by the current user for the request to start the video traceable process, the video traceable process is started.
[0027] In a second aspect, a video retracing device based on an iOS terminal is provided, the device comprising:
[0028] An initialization module, for executing software development kit component initialization in response to detecting the start of a video traceability process, and setting a first sub-thread and a second sub-thread to wait for work;
[0029] A screen drawing module, for starting current device screen drawing through the main thread of the software development kit component in response to detecting that the video traceable start method of the software development kit is called, and converting the screen drawing into screen bitmap image data;
[0030] A data storage module, used for receiving the screen bitmap image data through the first sub-thread and storing it in a database;
[0031] The video generation module is used to stop drawing the current device screen in response to detecting that the video traceable end method of the software development kit is called, perform video generation according to the screen bitmap image data stored in the database through the second sub-thread, and export the video.
[0032] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0033] In response to detecting that the video traceability process starts, executing software development kit component initialization, setting a first sub-thread and a second sub-thread to wait for work;
[0034] In response to detecting that the video traceable start method of the software development kit is called, starting current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data;
[0035] Receiving the screen bitmap image data through the first sub-thread and storing it in a database;
[0036] In response to detecting that the video traceable end method of the software development kit is called, the current device screen drawing is stopped, video generation is performed according to the screen bitmap image data stored in the database by the second sub-thread, and the video is exported.
[0037] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0038] In response to detecting that the video traceability process starts, executing software development kit component initialization, setting a first sub-thread and a second sub-thread to wait for work;
[0039] In response to detecting that the video traceable start method of the software development kit is called, starting current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data;
[0040] Receiving the screen bitmap image data through the first sub-thread and storing it in a database;
[0041] In response to detecting that the video traceable end method of the software development kit is called, the current device screen drawing is stopped, video generation is performed according to the screen bitmap image data stored in the database by the second sub-thread, and the video is exported.
[0042] The embodiments of the present application have the following beneficial effects:
[0043] The video traceability method, apparatus, device and storage medium based on the iOS terminal provided in the embodiments of the present application can realize the video traceability process through the SDK integrated component, without obtaining system permissions, and can be used without user perception, which can improve the user experience and thus improve the user conversion rate; at the same time, the present application adopts a main thread and one or more sub-threads (including a first sub-thread and a second sub-thread) in parallel to realize the video traceability process. The main thread is only responsible for generating screen bitmap image data, and data storage and video generation are performed in the first sub-thread and the second sub-thread respectively. By adopting such technical means, the multi-core of the iOS client device can be efficiently utilized, and each thread handles its own affairs accordingly. Concurrent execution improves processing efficiency, and can also store screen bitmap image data in real time. In extreme cases, the entire record will not be lost, thereby improving the traceability arrival rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 The overall flow chart of the video traceability method based on the iOS terminal provided by the embodiment of the present application is shown;
[0046] Figure 2 A specific flow chart of a video traceability method based on an iOS terminal according to an embodiment of the present application is shown;
[0047] Figure 3 A schematic diagram showing the structure of a video retracing device based on an iOS terminal provided in an embodiment of the present application is shown;
[0048] Figure 4 An exemplary system is shown that can be used to implement the various embodiments described in this application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".
[0051] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.
[0052] Embodiment 1
[0053] This application provides a video retracing method based on iOS, which is applied to iOS clients. Figure 1 ,include:
[0054] S1, in response to detecting that the video traceability process starts, executing software development kit component initialization, setting a first sub-thread and a second sub-thread to wait for work;
[0055] S2, in response to detecting that the video traceable start method of the software development kit is called, starting the current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data;
[0056] S3, receiving the screen bitmap image data through the first sub-thread and storing it in the database;
[0057] S4. In response to detecting that the video traceable end method of the software development kit is called, stop drawing the current device screen, perform video generation according to the screen bitmap image data stored in the database through the second sub-thread, and export the video.
[0058] Specifically, this application uses SDK (Software Development Kit) integration. The user only needs to pay attention to the input parameters of the SDK software development kit components. The functional process is all completed within the SDK, which has little intrusion on the user's engineering. The SDK calls the underlying drawing method on the iOS side to achieve the video retracing process. There is no need to obtain system permissions, and the user is not aware of the use, which can improve the user experience and thus improve the user conversion rate. For example, the video retracing currently achieved through ReplayKit, ReplayKit generates video through RPScreenRecorder. Among them, RPScreenRecorder requires system recording permission. If the user does not agree to obtain the permission, this method cannot be executed and the traceability function cannot be completed. In addition, RPScreenRecorder cannot meet user configuration requirements. RPScreenRecorder cannot do some privacy processing on the video, and can only be completed manually through video editing at a later time. The privacy and flexibility are poor, and the user experience is poor. At the same time, RPScreenRecorder directly exports the video, records and writes at the same time, and operates in a single thread. Once an error is reported, the data will be lost, and the memory and CPU consumption are large. On old machines, excessive memory consumption is prone to cause freezes and errors. The generated video format is relatively large, and the requirements for mobile phone wireless signals are relatively high. Different from the video retracing achieved by the above-mentioned ReplayKit, the present application can implement the video retracing process by calling the underlying drawing method of the iOS side through the SDK. There is no need to obtain system permissions, and the user can use it without noticing, which can improve the user experience and thus improve the user conversion rate. At the same time, the present application adopts a main thread and one or more sub-threads (including the first sub-thread and the second sub-thread) in parallel to implement the video retracing process. The main thread is only responsible for generating screen bitmap image data, and data storage and video generation are performed in the first sub-thread and the second sub-thread respectively. By adopting such technical means, the multi-core of the iOS client device can be efficiently utilized, and each thread handles its own affairs accordingly. Concurrent execution improves processing efficiency. Compared with recording and writing at the same time, the screen bitmap image data can be stored in real time. In extreme cases, the entire record will not be lost, thereby improving the arrival rate of retracing.
[0059] The following is combined with Figure 2 For further explanation:
[0060] In some embodiments, S2 includes:
[0061] S21, obtaining the elements and position information of the current device screen;
[0062] S22. Call the drawViewHierarchyInRect:afterScreenUpdates: method in UIView to draw and convert the elements and position information of the current device screen into screen bitmap image data.
[0063] Specifically, when the recordVideo() method in the SDK is called externally to start the video retracing process, the SDK component will start acquiring the current device screen content in the main thread. For example, the screen content traverses the current Windows to obtain all elements and position information of the current device screen, and then calls the drawViewHierarchyInRect:afterScreenUpdates: method in UIView to generate a UIImage, draw it, and convert it into screen bitmap image data. The iOS client's underlying drawing method is used to obtain the current screen content, without obtaining system permissions, and the user can use it without feeling, thereby improving the user experience.
[0064] In some embodiments, S1 comprises:
[0065] S11. Configure the current video traceability process input parameters.
[0066] The current video traceability process input parameter includes a custom video mask, which is used to mask sensitive data on the current device screen.
[0067] Specifically, first execute the SDK component initialization. During the initialization process, the property configuration config will be passed in to configure the current video traceability process input parameter. Then create a local storage database, set the first sub-thread and the second sub-thread to wait for work. When the SDK video traceability start method recordVideo() is called externally, the SDK component calls the underlying method through the main thread to perform screen drawing, generate and convert it into screen bitmap image data. The first sub-thread will receive the screen bitmap image data and store it in the local storage database; when the SDK video traceability end method is called externally, the video traceability process ends, the current device screen drawing is stopped, and the second sub-thread executes video generation according to the screen bitmap image data stored in the database, and exports the video.
[0068] For example, by configuring the current video traceability process input parameters, you can customize the video mask according to the actual usage scenario and needs to block the sensitive data and privacy data of the current user on the current device screen. The traced video completes the privacy masking without human intervention, further ensuring the user's data security, while improving the user experience and increasing the user conversion rate.
[0069] In some implementations, the current video traceable process input parameter also includes at least one of a screen drawing frequency, a bit rate of a generated video, a frame rate of a generated video, and an exported video path.
[0070] In some implementations, the current video traceability process input also includes a video generation strategy, and the video generation strategy includes at least one of different screen drawing frequencies, different bit rates for generating videos, and different frame rates for generating videos. Based on this, S1 also includes:
[0071] S12, obtaining the network environment status of the current device and the storage space size of the current device;
[0072] S13. Matching a corresponding video generation strategy according to the network environment status and storage space size of the current device.
[0073] Specifically, the screen drawing frequency, the bit rate of the generated video, the frame rate of the generated video, and the exported video path can be set according to the actual usage requirements and / or actual business scenarios in the video traceability process to meet the user's daily definition needs; the network environment status and storage space size of the current device and the current user can also be actively obtained, and the preset video generation strategy mapping can be matched according to the network environment status and storage space size to provide video generation strategy recommendations for the current user. The current user can directly use the provided video generation strategy, or can adaptively adjust the video generation strategy and store preferences. By adopting such technical means, the clarity of the video can be guaranteed while meeting regulatory requirements, and the user experience can also be improved.
[0074] For example, the video traceability process parameter configuration can be implemented through the following code:
[0075] / / Video recording configuration class
[0076] class VideoRecorderConfig{
[0077] / / Frequency of recording video
[0078] var recordFrequency:Int
[0079] / / Recording video bitrate
[0080] var videoBitRate:Int
[0081] / / Frame rate of recorded video
[0082] var videoFrameRate:Int
[0083] / / Callback for exporting video path
[0084] var exportVideoPathCallback:(String)->Void
[0085] }
[0086] / / Video recorder
[0087] class VideoRecorder{
[0088] / / Configuration
[0089] var config:VideoRecorderConfig
[0090] / / Mask view array
[0091] var overlayViews:[UIView]=[]
[0092] / / initialization
[0093] init(config:VideoRecorderConfig){}
[0094] / / Add the mask view
[0095] func addOverlayView(_view:UIView){}
[0096] / / How to record video
[0097] func recordVideo(){}
[0098] / / Close, get the path to save the video
[0099] func close(completion:@escaping(String)->Void){}
[0100] }
[0101] / / Usage example:
[0102] let recorder=VideoRecorder(config:config)
[0103] / / The view that needs to be masked
[0104] recorder.addOverlayView(view)
[0105] recorder.recordVideo()
[0106] / / Get the video path
[0107] recorder.close{path in
[0108] }
[0109] In some embodiments, S3 includes:
[0110] S31. Cleaning up the screen bitmap image data generated by the executed video at first preset time intervals through a first sub-thread.
[0111] Specifically, the first subthread receives the screen bitmap image data and stores it in the database, which can store the screen bitmap image data in real time, and will not cause the entire record to be lost in extreme cases. The screen bitmap image data for which the video generation has been completed will be cleaned up at a first preset time interval to avoid occupying too much client memory and affecting the user experience.
[0112] In some embodiments, before S1, the method further comprises:
[0113] 101. Initiate a video traceability process start request to the current user;
[0114] 102. In response to receiving a confirmation instruction returned by the current user for requesting to start the video retracing process, start the video retracing process.
[0115] Specifically, before starting the video traceable process, a video traceable process start request or a video traceable process start notification needs to be initiated to the current user, informing him that the video traceable process is to be started in response to regulatory requirements. The video traceable process can only be started after the current user returns a confirmation instruction or consent request for the video traceable process start request.
[0116] In this embodiment, the underlying drawing method of the iOS side can be called through the SDK to realize the video traceability process. There is no need to obtain system permissions, and the user can use it without noticing, which can improve the user experience and thus improve the user conversion rate. At the same time, the present application adopts a main thread and one or more sub-threads (including a first sub-thread and a second sub-thread) in parallel to realize the video traceability process. The main thread is only responsible for generating screen bitmap image data, and data storage and video generation are performed in the first sub-thread and the second sub-thread respectively. By adopting such technical means, the multi-core of the iOS client device can be efficiently utilized, and each thread handles its own affairs accordingly. Concurrent execution improves processing efficiency. Compared with recording and writing at the same time, screen bitmap image data can be stored in real time. In extreme cases, the entire record will not be lost, thereby improving the traceability arrival rate.
[0117] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.
[0118] Embodiment 2
[0119] Corresponding to the above embodiment, the present application also provides a video retracing device based on iOS, referring to Figure 3 The device includes an initialization module, a screen drawing module, a data storage module and a video generation module.
[0120] Among them, the initialization module is used to execute the initialization of the software development kit component in response to detecting that the video traceability start method of the software development kit has been called, and set the first sub-thread and the second sub-thread to wait for work; the screen drawing module is used to start the current device screen drawing through the main thread of the software development kit component in response to detecting that the video traceability start method of the software development kit has been called, and convert it into screen bitmap image data; the data storage module is used to receive the screen bitmap image data through the first sub-thread and store it in the database; the video generation module is used to stop the current device screen drawing in response to detecting that the video traceability end method of the software development kit has been called, perform video generation according to the screen bitmap image data stored in the database through the second sub-thread, and export the video.
[0121] Furthermore, the screen drawing module is also used to obtain the elements and position information of the current device screen; and to call the drawViewHierarchyInRect:afterScreenUpdates: method in UIView to draw and convert the elements and position information of the current device screen into screen bitmap image data.
[0122] Furthermore, the initialization module is also used to configure the current video traceability process input parameter. The current video traceability process input parameter includes a custom video mask, and the custom video mask is used to shield sensitive data in the current device screen.
[0123] Furthermore, the current video traceable process input parameter also includes at least one of a screen drawing frequency, a bit rate of a generated video, a frame rate of a generated video, and an exported video path.
[0124] Furthermore, the current video traceable process input also includes a video generation strategy, which includes at least one of different screen drawing frequencies, different bit rates for generating videos, and different frame rates for generating videos; based on this, the initialization module is also used to obtain the network environment status of the current device and the storage space size of the current device; and is used to match the corresponding video generation strategy according to the network environment status of the current device and the storage space size.
[0125] Furthermore, the data storage module is also used to clean up the screen bitmap image data generated by the executed video at first preset time intervals through the first sub-thread.
[0126] Furthermore, the device also includes a communication module, which is used to initiate a request to start the video traceability process to the current user; the communication module is also used to start the video traceability process in response to receiving a confirmation instruction returned by the current user for the request to start the video traceability process.
[0127] For the specific limitations of the video traceability device based on the iOS terminal, please refer to the relevant limitations of the video traceability method based on the iOS terminal above, so it will not be repeated here. Each module in the above-mentioned video traceability device based on the iOS terminal 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, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0128] Embodiment 3
[0129] Corresponding to the above embodiment, the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned iOS-based video traceability method can be implemented.
[0130] like Figure 4 As shown, in some embodiments, the system can be used as any of the above-mentioned computer devices for the video traceability method based on the iOS end in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having instructions and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute instructions to implement the module to perform the actions described in this application.
[0131] For one embodiment, the system control module may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) and / or any suitable device or component in communication with the system control module.
[0132] The system control module may include a memory controller module to provide an interface to the system memory. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0133] The system memory may be used, for example, to load and store data and / or instructions for the system. For one embodiment, the system memory may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the system memory may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0134] For one embodiment, the system control module may include one or more input / output (I / O) controllers to provide interfaces to the NVM / storage devices and communication interface(s).
[0135] For example, the NVM / storage device may be used to store data and / or instructions. The NVM / storage device may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0136] The NVM / storage device may include storage resources that are physically part of the device on which the system is installed, or it may be accessible to the device without being part of the device. For example, the NVM / storage device may be accessed over a network via (one or more) communication interfaces.
[0137] The communication interface(s) may provide an interface for the system to communicate over one or more networks and / or with any other suitable device. The system may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0138] For one embodiment, at least one of the processor(s) may be packaged together with the logic of one or more controllers of a system control module (e.g., a memory controller module). For one embodiment, at least one of the processor(s) may be packaged together with the logic of one or more controllers of a system control module to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) may be integrated on the same die with the logic of one or more controllers of a system control module. For one embodiment, at least one of the processor(s) may be integrated on the same die with the logic of one or more controllers of a system control module to form a system on chip (SoC).
[0139] In various embodiments, the system may be, but is not limited to: a server, a workstation, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the system may have more or fewer components and / or a different architecture. For example, in some embodiments, the system includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application specific integrated circuit (ASIC), and a speaker.
[0140] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0141] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0142] Communication media include media by which communication signals containing, for example, computer readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media may include guided transmission media such as cables and wires (e.g., fiber optic, coaxial, etc.) and wireless (unguided transmission) media that can propagate energy waves, such as acoustic, electromagnetic, RF, microwave, and infrared. Computer readable instructions, data structures, program modules, or other data may be embodied as a modulated data signal in, for example, a wireless medium such as a carrier wave or similar mechanism such as embodied as part of spread spectrum technology. The term "modulated data signal" refers to a signal whose one or more characteristics are changed or set in such a manner as to encode information in the signal. Modulation may be analog, digital, or a hybrid modulation technique.
[0143] Here, according to one embodiment of the present application, a device is included, which includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the device is triggered to run the methods and / or technical solutions based on the aforementioned multiple embodiments of the present application.
[0144] Embodiment 4
[0145] Corresponding to the above embodiment, the present application also provides a computer-readable storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute a video traceability method based on an iOS end.
[0146] In this embodiment, the computer-readable storage medium may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memory, such as random access memory (RAM, DRAM, SRAM); and non-volatile memory, such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or developed in the future that can store computer-readable information / data for use by computer systems.
[0147] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0148] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A video traceability method based on iOS, applied to iOS client, characterized in that: include: In response to detecting that the video traceability process starts, executing software development kit component initialization, setting a first sub-thread and a second sub-thread to wait for work; In response to detecting that the video traceable start method of the software development kit is called, starting current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data; Receiving the screen bitmap image data through the first sub-thread and storing it in a database; In response to detecting that the video traceable end method of the software development kit is called, the current device screen drawing is stopped, video generation is performed according to the screen bitmap image data stored in the database by the second sub-thread, and the video is exported.
2. The video retracing method based on iOS according to claim 1 is characterized in that: The process of starting the current device screen drawing through the main thread of the software development kit component and converting it into screen bitmap image data includes: Get the elements and position information of the current device screen; The drawViewHierarchyInRect:afterScreenUpdates: method in UIView is called to draw and convert the elements and position information of the current device screen into screen bitmap image data.
3. The video retracing method based on iOS according to claim 1 is characterized in that: The execution software development kit component initialization includes: Configure the current video traceability process input parameters; The current video traceability process input parameter includes a custom video mask, and the custom video mask is used to mask sensitive data in the current device screen.
4. The video retracing method based on iOS according to claim 3 is characterized in that: The current video traceable process input parameter also includes at least one of a screen drawing frequency, a bit rate of a generated video, a frame rate of a generated video, and an exported video path.
5. The video retracing method based on iOS according to claim 4 is characterized in that: The current video traceable process input parameter also includes a video generation strategy, and the video generation strategy includes at least one of different screen drawing frequencies, different bit rates of generated videos, and different frame rates of generated videos; The execution of software development kit component initialization also includes: Get the network environment status of the current device and the storage space size of the current device; According to the network environment status and the storage space size of the current device, the corresponding video generation strategy is matched.
6. The video retracing method based on iOS according to claim 1, characterized in that: The receiving the screen bitmap image data through the first sub-thread and storing it in a database includes: The screen bitmap image data generated by the executed video is cleaned up at first preset time intervals by the first sub-thread.
7. The video retracing method based on iOS according to claim 1, characterized in that: Before the video traceability process starts, the method further includes: Initiate a request to start the video traceability process to the current user; In response to receiving a confirmation instruction returned by the current user for the request to start the video traceable process, the video traceable process is started.
8. A video retracing device based on iOS, characterized in that: The device comprises: An initialization module, for executing software development kit component initialization in response to detecting the start of a video traceability process, and setting a first sub-thread and a second sub-thread to wait for work; A screen drawing module, for starting current device screen drawing through the main thread of the software development kit component in response to detecting that the video traceable start method of the software development kit is called, and converting the screen drawing into screen bitmap image data; A data storage module, used for receiving the screen bitmap image data through the first sub-thread and storing it in a database; The video generation module is used to stop drawing the current device screen in response to detecting that the video traceable end method of the software development kit is called, perform video generation according to the screen bitmap image data stored in the database through the second sub-thread, and export the video.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, 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.