CN113163256B - Method and device for generating operation flow file based on video - Google Patents
Method and device for generating operation flow file based on video Download PDFInfo
- Publication number
- CN113163256B CN113163256B CN202110475020.4A CN202110475020A CN113163256B CN 113163256 B CN113163256 B CN 113163256B CN 202110475020 A CN202110475020 A CN 202110475020A CN 113163256 B CN113163256 B CN 113163256B
- Authority
- CN
- China
- Prior art keywords
- event
- preset
- image
- touch point
- index
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000006399 behavior Effects 0.000 claims description 102
- 238000003860 storage Methods 0.000 claims description 11
- 230000004044 response Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4334—Recording operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44213—Monitoring of end-user related data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47205—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Social Psychology (AREA)
- Computer Networks & Wireless Communication (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a method and a device for generating an operation flow file based on video, wherein the method comprises the following steps: acquiring a video file containing preset information; processing the video file to determine an operation behavior event; acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image; obtaining an operation flow file based on the operation image; wherein, the preset information includes: touch point data or click operation data. According to the method and the device for processing the operation flow, the operation behavior event is determined by acquiring the video file containing the preset information, the key frame corresponding to the operation behavior event is acquired, the image corresponding to the key frame is processed based on the operation behavior event, the operation image is obtained, the operation flow can be well expressed, and a user can obtain the operation flow chart directly through the screen recording, so that the operation is simple and quick.
Description
Technical Field
The application belongs to the technical field of computers, and particularly relates to a method and a device for generating an operation flow file based on video.
Background
At present, the operation on a smart phone is more and more complex, sometimes a user needs to record the operation flow carried out on the smart phone and send the operation flow to other people, or the user operates the screenshot while editing the screenshot manually to manufacture an operation instruction graph.
However, the video files recorded on the screen are too large, time is consumed for transmission, and the video files recorded on the screen cannot express the operation flow well under certain conditions; the manual screenshot editing of the operation flow is too tedious and time-consuming, and is not easy to sort.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating an operation flow file based on video, which can solve the defects of overlarge file, time-consuming transmission and time-consuming manufacture existing in the existing operation flow file based on screen recording video files and manual editing.
In a first aspect, an embodiment of the present application provides a method for generating an operation flow file based on video, where the method includes:
acquiring a video file containing preset information;
processing the video file to determine an operation behavior event;
acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
Obtaining an operation flow file based on the operation image;
wherein, the preset information includes: touch point data or click operation data.
In a second aspect, an embodiment of the present application provides an apparatus for generating an operation flow file based on a video, where the apparatus includes:
the video acquisition unit is used for acquiring a video file containing preset information;
the event determining unit is used for processing the video file and determining an operation behavior event;
the processing unit is used for acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
the generating unit is used for obtaining an operation flow file based on the operation image;
wherein, the preset information includes: touch point data or click operation data.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions implementing the steps of the method for generating an operational flow file based on video according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method of generating an operational flow file based on video as described in the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement a method for generating an operation flow file based on a video according to the first aspect.
In the embodiment of the application, the operation behavior event is determined by acquiring the video file containing the preset information, the key frame corresponding to the operation behavior event is acquired, and the image corresponding to the key frame is processed based on the operation behavior event to obtain the operation image, so that the operation flow can be well expressed, the user can obtain the operation flow chart directly through the screen recording, and the operation is simple and quick.
Drawings
FIG. 1 is a flowchart of a method for generating an operation flow file based on video according to an embodiment of the present application;
fig. 2 is a schematic diagram of an array structure of a saved image according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of a first queue according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an add click event icon provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of an add long press event icon provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of adding a multi-click event icon provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of an add sliding event icon provided in an embodiment of the present application;
FIG. 8 is a second flowchart of a method for generating an operation flowchart file based on video according to an embodiment of the present application;
FIG. 9 is a third flow chart of a method for generating an operation flow file based on video according to the embodiment of the present application;
fig. 10 is a schematic structural diagram of an apparatus for generating an operation flow file based on video according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 12 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
The term "plurality" in the embodiments of the present application means two or more, and other adjectives are similar thereto.
The method for generating the operation flow file based on the video provided by the embodiment of the application is described in detail below with reference to the accompanying drawings through some embodiments and application scenes thereof. The method for generating the operation flow file based on the video provided by the embodiment of the application, the execution subject is electronic equipment, and the electronic equipment mentioned by the embodiment of the application comprises but is not limited to a mobile phone, a tablet computer, a wearable device and the like.
Fig. 1 is a schematic flow chart of a method for generating an operation flow file based on video according to an embodiment of the present application, where the method includes:
step 100, obtaining a video file containing preset information;
wherein, the preset information includes: touch point data or click operation data. The electronic device obtains a video file containing touch point data or click operation data.
Optionally, the touch point data includes a touch track, or coordinates corresponding to the touch point and an index of a frame image where the touch point is located.
Optionally, the user opens a screen recording function of the electronic device, selects and displays the touch track in the screen recording setting, and starts screen recording. The touch track is formed by the touch points moving in the screen recording preview picture.
Alternatively, the click operation data refers to data formed by a user clicking a screen of the electronic device.
Optionally, when the video file is larger, a large amount of memory and computation power are required to be occupied, the time consumption is long, meanwhile, the judgment accuracy of the user behavior is poor, and misjudgment is possible. Therefore, in another embodiment, the click operation data formed by clicking the screen of the electronic device by the user can be collected while recording the screen, and the function of recording the click operation data can be also understood as being started while recording the screen.
Step 101, processing the video file to determine an operation behavior event;
optionally, if the preset information is touch point data, performing image recognition on the video file, recognizing a touch point in the video file, acquiring the touch point data, and determining an operation behavior event.
Optionally, if the preset information is click operation data, analyzing the click operation data to determine an operation behavior event.
Optionally, the operational behavior event includes a click, double click, long press, slide, etc. type event.
102, acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
Optionally, the electronic device extracts a key frame corresponding to the operation behavior event from the video file based on the operation behavior event, and then adds an operation icon corresponding to the operation behavior event on an image corresponding to the key frame, thereby obtaining an operation image.
Step 103, obtaining an operation flow file based on the operation image;
optionally, the electronic device stores the operation images obtained based on the operation behavior events in the result set according to the time sequence, and synthesizes all the operation images in the result set to obtain the operation flow file.
Alternatively, the operation flow file may be a PDF file generated in the operation flow order.
Optionally, the user may preview the operation flow file and edit it again, for example, adding a description to the operation icon, blocking the privacy content, and the like.
In the embodiment of the application, the operation behavior event is determined by acquiring the video file containing the preset information, the key frame corresponding to the operation behavior event is acquired, and the image corresponding to the key frame is processed based on the operation behavior event to obtain the operation image, so that the operation flow can be well expressed, the user can obtain the operation flow chart directly through the screen recording, and the operation is simple and quick.
Optionally, the processing the video file to determine an operational behavior event includes:
acquiring preset information contained in the video file;
and under the condition that the preset information meets the judging condition corresponding to the preset event type, determining the operation behavior event corresponding to the preset information as the event of the preset event type.
In the embodiment of the application, the electronic device determines whether the preset information meets the judgment condition corresponding to the preset event type by acquiring the preset information contained in the video file, and if yes, determines that the operation behavior event corresponding to the preset information is the preset event type.
Optionally, when the preset information is touch point data, the acquiring preset information included in the video file includes:
extracting images from the video file to obtain multi-frame images, and storing the multi-frame images according to indexes of each frame of images;
and sequentially identifying the multi-frame images, and acquiring coordinates of the touch points and indexes of the frame images where the touch points are located under the condition that the touch points are identified.
Alternatively, the user may choose to process the fine granularity, which determines the number of images extracted per second, m, which is a factor of the number of video frames, and the larger m, the longer the processing time, the less likely the user operation trajectory will be lost.
The electronic device extracts the image from the video file. Let the video total t seconds, extract m frame image from every second in the video file, totally extract t x m frame image, every frame image extracted corresponds to an index frame_index.
Optionally, the extracted t×m frame images are saved in the form of an array. Fig. 2 is a schematic diagram of an array structure of a saved image according to an embodiment of the present application.
And sequentially identifying touch points in the multi-frame images. Optionally, performing traversal search on the multi-frame image, firstly finding out an area with the same color as the touch point in the image, and then comparing the geometric shapes of the area, so as to determine whether the area is the same as the color and the shape of the touch point, and if so, determining that the touch point exists in the image.
And under the condition that the touch point is identified, acquiring the coordinates of the touch point and the index of the frame where the touch point is located.
Optionally, the coordinates of the touch point and the index of the frame where the touch point is located are stored in a first queue. Fig. 3 is a schematic structural diagram of a first queue according to an embodiment of the present application.
Optionally, when the preset information meets the judgment condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type includes:
And under the condition that the coordinates of the touch points and the index meet the judging conditions corresponding to the preset event types, determining the operation behavior event corresponding to the preset information as the event of the preset event types.
Optionally, the electronic device determines, based on the coordinates of each touch point and the index of the frame in which the touch point is located, whether a determination condition corresponding to a preset event type is satisfied, and if so, determines that the operation behavior event corresponding to the corresponding touch point is an event of the preset event type.
For example, the preset event types include click, long press, multiple click, slide, and the like. The preset event type can also be other event types, and can be expanded according to the requirement. The present application does not specifically limit the preset event type.
The judging condition corresponding to the preset event type is determined according to the characteristics of the preset event type.
In the embodiment of the application, the screen recording video file is subjected to image extraction, the touch points are identified, then the coordinates of the touch points and the index of the frame where the touch points are located are obtained, the operation behavior event is determined based on the coordinates of the touch points and the index of the frame where the touch points are located, and the identification of the operation behavior event is realized by utilizing an image identification technology.
Optionally, when the preset information is click operation data, the obtaining preset information contained in the video file includes:
and acquiring click operation data contained in the video file, wherein the click operation data comprises coordinates of click operation and indexes of frame images where the click operation is located.
Optionally, when the preset information meets the judgment condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type includes:
and under the condition that the coordinates of the clicking operation and the index of the frame image where the clicking operation is positioned meet the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type.
On the basis of the foregoing embodiments, optionally, in a case where the preset information meets a judgment condition corresponding to a preset event type, determining that an operation behavior event corresponding to the preset information is an event of the preset event type includes:
when indexes corresponding to an ith touch point or clicking operation A [ i ] are discontinuous with indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1], and differences among indexes corresponding to A [ i ], indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1] are larger than a first preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
Under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are the same, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
when the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1], and the continuous times of the index is multiplied by the time length corresponding to each frame of image to be larger than a second preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a long press event;
determining that the ith touch point or clicking operation A [ i ] corresponds to a multi-click event under the condition that the index corresponding to A [ i ] is discontinuous with the index corresponding to A [ i-1] or the index corresponding to A [ i+1], the difference value between the indexes is smaller than a third preset threshold value, and the distance between the coordinate of A [ i ] and the coordinate of A [ i-1] or the coordinate of A [ i+1] is smaller than a fourth preset threshold value;
under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are different, determining that the ith touch point or clicking operation A [ i ] corresponds to a sliding event;
wherein i represents the sequence number of a touch point or a clicking operation, and A is a queue for storing indexes and coordinates corresponding to the touch point or the clicking operation.
Wherein, A [ i ] represents the ith data in the queue, i.e. the ith touch point or click operation, and the coordinates of the ith touch point or click operation and the index of the frame image where the coordinates of the ith touch point or click operation are stored in A [ i ]. The coordinates of the i-1 th touch point or click operation and the index of the frame image are stored in A [ i-1 ]. The coordinates of the (i+1) th touch point or click operation and the index of the frame image where the coordinates are located are stored in A [ i+1 ].
Optionally, when the index corresponding to a [ i ] is discontinuous with the index corresponding to a [ i-1] and the index corresponding to a [ i+1], and the difference between the index corresponding to a [ i ], the index corresponding to a [ i-1] and the index corresponding to a [ i+1] is greater than a first preset threshold value, determining that the i-th touch point or clicking operation a [ i ] corresponds to a clicking event;
table 1 examples of A [ i-1], A [ i ], A [ i+1] in the queue
For example, table 1 is an example one of a [ i-1], a [ i ], and a [ i+1] in the queue, as shown in table 1, the index frame_index=20 corresponding to a [ i ] is discontinuous with the index frame_index=5 corresponding to a [ i-1] and the index frame_index=30 corresponding to a [ i+1], the difference between the index corresponding to a [ i ] and the index corresponding to a [ i-1] is 15 greater than a first preset threshold, the difference between the index corresponding to a [ i ] and the index corresponding to a [ i+1] is 10 greater than the first preset threshold, and then it is determined that the i-th touch point or click operation a [ i ] corresponds to one click event.
Optionally, when the index corresponding to a [ i ] is continuous with the index corresponding to a [ i-1] or the index corresponding to a [ i+1], and the coordinates of a [ i ], a [ i-1] and a [ i+1] are the same, determining that the i-th touch point or click operation a [ i ] corresponds to a click event;
table 2 example two of A [ i-1], A [ i ], A [ i+1] in the queue
For example, table 2 is an example two of a [ i-1], a [ i ], and a [ i+1] in the queue, as shown in table 2, index frame_index=21 corresponding to a [ i ] is continuous with index frame_index=20 corresponding to a [ i-1], and coordinates of a [ i ] are the same as coordinates of a [ i-1], and it is determined that the i-th touch point or click operation a [ i ] corresponds to one click event.
Optionally, when the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1], and the continuous times of the index is multiplied by the time length corresponding to each frame of image to be greater than a second preset threshold value, determining that the data A [ i ] corresponds to a long press event;
table 3 example three of A [ i-1], A [ i ], A [ i+1] in the queue
For example, table 3 is an example three of a [ i-1], a [ i ], and a [ i+1] in the queue, as shown in table 3, the index corresponding to a [ i ] is continuous with the index corresponding to a [ i-1] or the index corresponding to a [ i+1], and the continuous number of times of the index is multiplied by the time length corresponding to each frame of image is greater than a second preset threshold, so as to determine that the i-th touch point or clicking operation a [ i ] corresponds to one long press event.
For example, if the default long time is 500ms, the frame index is multiplied by the time length corresponding to each frame of image by the continuous number of times, and the time length is greater than 500ms, it can be considered that a long press event occurs.
Optionally, when the index corresponding to a [ i ] is discontinuous with the index corresponding to a [ i-1] or the index corresponding to a [ i+1], the difference between the indexes is smaller than a third preset threshold, and the distance between the coordinate of a [ i ] and the coordinate of a [ i-1] or the coordinate of a [ i+1] is smaller than a fourth preset threshold, determining that the i-th touch point or clicking operation a [ i ] corresponds to one multi-clicking event.
Table 4 example four of A [ i-1], A [ i ], A [ i+1] in the queue
For example, table 4 is an example four of a [ i-1], a [ i ], a [ i+1] in the queue, and as shown in table 4, index frame_index=22 corresponding to a [ i ] is discontinuous with index frame_index=20 corresponding to a [ i-1], but is very close, i.e. the difference between the indexes is smaller than the third preset threshold, and the change between the coordinates of a [ i ] and the coordinates of a [ i-1] is smaller, i.e. the distance between the coordinates of a [ i ] and the coordinates of a [ i-1] is smaller than the fourth preset threshold, indicating that a [ i ] and a [ i-1] correspond to one multi-click event.
Under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are different, determining that the ith touch point or clicking operation A [ i ] corresponds to a sliding event;
Table 5 example five of A [ i-1], A [ i ], A [ i+1] in the queue
For example, table 5 shows an example five of A [ i-1], A [ i ], A [ i+1] in the queue, and as shown in Table 5, data A [ i ], A [ i-1], A [ i+1] is determined when index frame_index=21 corresponding to A [ i-1] is continuous with index frame_index=20 corresponding to A [ i+1] or index frame_index=22 corresponding to A [ i+1] and the coordinates of A [ i ] are changed from the coordinates of A [ i-1], and the coordinates of A [ i+1] are changed from the coordinates of A [ i ].
Optionally, after the operation behavior event is obtained, a key frame corresponding to the operation behavior event is obtained from the video file.
Optionally, the processing the image corresponding to the key frame based on the operation behavior event to obtain an operation image includes:
and adding an icon corresponding to the operation behavior event on the image corresponding to the key frame at the coordinate position corresponding to the operation behavior event to obtain an operation image.
It can be understood that the single click event corresponds to one or a small number of images, the first image may be taken as a key frame, and an icon representing "click" is added at the coordinate position of the touch point corresponding to the single click event, as shown in fig. 4, which is a schematic diagram for adding the icon of the single click event provided in the embodiment of the present application. After icon adding is finished, sequentially storing the pictures obtained through processing into a result set.
The long-press event corresponds to a plurality of images, a first image in the long-press event can be taken as a key frame, and a long-press icon is added at a touch point coordinate position of the corresponding image, as shown in fig. 5, which is a schematic diagram for adding the long-press event icon provided in the embodiment of the present application. After the icon is added, the images obtained through processing are sequentially stored in a result set.
The multi-click event may correspond to multiple images, where the first image in the multi-click event is taken as the keyframe. And adding a multi-click icon at the touch point position of the corresponding image, wherein the icon is a schematic diagram for adding the multi-click event icon provided by the embodiment of the application. After the icon is added, the images obtained through processing are sequentially stored in a result set.
A sliding event will correspond to multiple images as well. Optionally, in the case that the operation behavior event is a sliding event, the processing, based on the operation behavior event, the image corresponding to the key frame to obtain an operation image includes:
acquiring a first image initiated by a sliding event;
adding a first icon on the first image at the starting position of the sliding event, and adding a second icon on the first image at the ending position of the sliding event;
And connecting the first icon with the second icon to obtain an operation image.
Optionally, a first image of the beginning of a swipe event is taken, and a "swipe" icon is added at the beginning touch point location of the swipe event. An "end" icon is added at the coordinates of the slide event end position of the same image. The "slide" and "end" icons are connected by arrows. Fig. 7 is a schematic diagram of adding a sliding event icon according to an embodiment of the present application. It should be noted that the processing manner of fig. 7 can only exhibit a linear sliding track. Embodiments of the present application may also exhibit more complex trajectories.
Optionally, the obtaining an operation flow 6-way file based on the operation image includes:
receiving a first input of an icon in the operation image;
displaying an edit box in response to the first input;
receiving a second input to the edit box;
and responding to the second input, and generating an operation flow file according to the content of the second input.
Optionally, the first input is a click, long press, double click, etc.; the second input is an operation to input audio, video, text, pictures or other formatted files.
Optionally, clicking on the generated icons such as "single click", "double click", "long press", etc. by the user pops up an edit box next to the icon, where the user can add additional instructions or draw simple graffiti.
Optionally, the user may also input voice in the edit box or record in real time, and finally generate a file in a custom format. Users who receive files in this format can broadcast the audio they contain by clicking on the markup icon.
Fig. 8 is a second flowchart of a method for generating an operation flow file based on video according to an embodiment of the present application, as shown in fig. 8, the method includes the following steps:
step 800, obtaining a screen recording video file;
step 801, extracting images of the video file to obtain multi-frame images, and storing the multi-frame images according to indexes of each frame of images;
step 802, sequentially identifying touch points in the multi-frame image, acquiring coordinates of the touch points and indexes of frames where the touch points are located when the touch points are identified, and storing the coordinates of the touch points and the indexes of the frames where the touch points are located into a first queue;
803, analyzing the first queue to determine an operation behavior event;
Step 804, acquiring a key frame corresponding to the operation behavior event, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
and step 805, obtaining an operation flow file based on the operation image.
Optionally, the operation images generated by various click event processing are stored in the result set, and the user can preview and edit again, such as adding description to the icon and shielding privacy content.
The method based on the video generating operation flow file shown in fig. 8 needs to identify the image, and when the video is large, a large amount of memory and calculation power are required to be occupied, which takes a long time, and meanwhile, the judgment accuracy of the user behavior depends on the accuracy of the image identification technology. Therefore, the embodiment of the application also provides another solution idea, wherein the click operation data is collected during screen recording, key frames in the screen recording video are collected according to different operation behaviors such as clicking, sliding and the like, special identification processing is carried out on the key frames, and an operation flow file is generated.
Optionally, when the preset information is click operation data, the processing the video file, and determining an operation behavior event includes:
Acquiring click operation data contained in the video file, wherein the click operation data comprises coordinates of click operation and indexes of frame images where the click operation is located;
and under the condition that the coordinates of the clicking operation and the index of the frame image where the clicking operation is positioned meet the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type.
That is, in the process of recording the screen by the user, the function of collecting click operation data is started, including the data of clicking, double clicking, long pressing, sliding and the like. And (3) finishing screen recording, and storing click operation data and screen recording video together.
It may be understood that, according to the frame index and/or the coordinates corresponding to each data in the click operation data, whether the judgment condition corresponding to the preset event type is satisfied is judged, and if so, the operation behavior event corresponding to the corresponding click operation data is determined to be an event of the preset event type.
Fig. 9 is a third flowchart of a method for generating an operation flow file based on video according to an embodiment of the present application, as shown in fig. 9, the method includes the following steps:
step 900, acquiring click operation data in a screen recording video file;
Step 901, analyzing the click operation data to determine an operation behavior event;
step 902, acquiring a key frame corresponding to the operation behavior event from the screen recording video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
and 903, obtaining an operation flow file based on the operation image.
Optionally, the operation images generated by various clicking operation data are stored in the result set, and the user can preview and edit again, such as adding description to the icon and shielding privacy content.
According to the method for generating the operation flow file based on the video, the operation behavior event is determined based on the click operation data collected in the screen recording process, the key frame is acquired based on the operation behavior event, and the key frame is processed to obtain the operation image.
It should be noted that, in the method for generating an operation flow file based on a video provided in the embodiment of the present application, the execution subject may be a device for generating an operation flow file based on a video, or a control module in the device for generating an operation flow file based on a video for executing a method for loading an operation flow file based on a video. In the embodiment of the present application, a method for executing a video-based operation flow file by using a video-based operation flow file device is taken as an example, and the video-based operation flow file device provided in the embodiment of the present application is described.
Fig. 10 is a schematic structural diagram of an apparatus for generating an operation flow file based on video according to an embodiment of the present application, where, as shown in fig. 10, the apparatus includes: a video acquisition unit 1010, an event determination unit 1020, a processing unit 1030, and a generation unit 1040, wherein,
a video acquisition unit 1010 for acquiring a video file containing preset information;
an event determining unit 1020, configured to process the video file and determine an operational behavior event;
the processing unit 1030 is configured to obtain a key frame corresponding to the operation behavior event from the video file, and process an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
a generating unit 1040, configured to obtain an operation flow file based on the operation image;
wherein, the preset information includes: touch point data or click operation data.
Optionally, the event determining unit 1020 includes:
the first acquisition subunit is used for acquiring preset information contained in the video file;
the first determining subunit is configured to determine that an operation behavior event corresponding to the preset information is an event of the preset event type when the preset information meets a judgment condition corresponding to the preset event type.
Optionally, the first acquisition subunit is configured to:
extracting images from the video file to obtain multi-frame images, and storing the multi-frame images according to indexes of each frame of images;
sequentially identifying the multi-frame images, and acquiring coordinates of the touch points and indexes of the frame images where the touch points are located under the condition that the touch points are identified;
optionally, the first determining subunit is configured to:
and under the condition that the coordinates of the touch points and the index meet the judging conditions corresponding to the preset event types, determining the operation behavior event corresponding to the preset information as the event of the preset event types.
Optionally, the first determining subunit is configured to:
under the condition that the preset information meets the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type comprises the following steps:
when indexes corresponding to an ith touch point or clicking operation A [ i ] are discontinuous with indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1], and differences among indexes corresponding to A [ i ], indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1] are larger than a first preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
Under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are the same, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
when the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1], and the continuous times of the index is multiplied by the time length corresponding to each frame of image to be larger than a second preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a long press event;
determining that the ith touch point or clicking operation A [ i ] corresponds to a multi-click event under the condition that the index corresponding to A [ i ] is discontinuous with the index corresponding to A [ i-1] or the index corresponding to A [ i+1], the difference value between the indexes is smaller than a third preset threshold value, and the distance between the coordinate of A [ i ] and the coordinate of A [ i-1] or the coordinate of A [ i+1] is smaller than a fourth preset threshold value;
under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are different, determining that the ith touch point or clicking operation A [ i ] corresponds to a sliding event;
wherein i represents the sequence number of a touch point or a clicking operation, and A is a queue for storing indexes and coordinates corresponding to the touch point or the clicking operation.
Optionally, the processing unit 1030 is configured to:
and adding an icon corresponding to the operation behavior event on the image corresponding to the key frame at the coordinate position corresponding to the operation behavior event to obtain an operation image.
Optionally, the processing unit 1030 is configured to:
acquiring a first image initiated by a sliding event;
adding a first icon on the first image at the starting position of the sliding event, and adding a second icon on the first image at the ending position of the sliding event;
and connecting the first icon with the second icon to obtain an operation image.
Optionally, the generating unit 1040 is configured to:
receiving a first input of an icon in the operation image;
displaying an edit box in response to the first input;
receiving a second input to the edit box;
and responding to the second input, and generating an operation flow file according to the content of the second input.
The device for generating the operation flow file based on the video in the embodiment of the application may be a device or an electronic device with an operating system, and may also be a component, an integrated circuit, or a chip in a terminal. The electronic device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The device for generating the operation flow file based on the video provided in the embodiment of the present application can implement each process implemented by the method for generating the operation flow file based on the video in the method embodiment of fig. 1 to 9, and in order to avoid repetition, a description is omitted here.
In the embodiment of the application, the video file is acquired, the operation behavior event is determined, the key frame corresponding to the operation behavior event is acquired, the image corresponding to the key frame is processed based on the operation behavior event, the operation image is obtained, the operation flow can be well expressed, and the user can obtain the operation flow chart directly through the screen recording, so that the operation is simple and quick.
Optionally, as shown in fig. 11, the embodiment of the present application further provides an electronic device 1100, where the electronic device includes a processor 1101, a memory 1102, and a program or an instruction stored in the memory 1102 and capable of being executed on the processor 1101, where the program or the instruction implements each process of the method embodiment of generating an operation flow file based on video when executed by the processor 1101, and the process can achieve the same technical effect, and is not repeated herein.
It should be noted that, the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 12 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1200 includes, but is not limited to: at least some of the components of the radio frequency unit 1201, the network module 1202, the audio output unit 1203, the input unit 1204, the sensor 1205, the display unit 1206, the user input unit 1207, the interface unit 1208, the memory 1209, and the processor 1210.
Those skilled in the art will appreciate that the electronic device 1200 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 1210 by a power management system, such as to perform functions such as managing charging, discharging, and power consumption by the power management system. The electronic device structure shown in fig. 12 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than illustrated, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
It should be understood that in the embodiment of the present application, the input unit 1204 may include a graphics processor (Graphics Processing Unit, GPU) 12041 and a microphone 12042, and the graphics processor 12041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 1206 may include a display panel 12061, and the display panel 12061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1207 includes a touch panel 12071 and other input devices 12072. The touch panel 12071 is also called a touch screen. The touch panel 12071 may include two parts, a touch detection device and a touch controller. Other input devices 12072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
In this embodiment, the radio frequency unit 1201 acquires information and then processes the information to the processor 1210. Typically, the radio frequency unit 1201 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
Memory 1209 may be used to store software programs or instructions as well as various data. The memory 1209 may mainly include a storage program or instruction area and a storage data area, wherein the storage program or instruction area may store an operating system, an application program or instruction (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. In addition, the Memory 1209 may include a high-speed random access Memory, and may also include a nonvolatile Memory, where the nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an Electrically Erasable Programmable EPROM (EEPROM), or a flash Memory. Such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device.
Processor 1210 may include one or more processing units; alternatively, processor 1210 may integrate an application processor that primarily processes operating systems, user interfaces, and applications or instructions, etc., with a modem processor that primarily processes wireless communications, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 1210.
Wherein the processor 1210 is configured to:
acquiring a video file containing preset information;
processing the video file to determine an operation behavior event;
acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
obtaining an operation flow file based on the operation image;
wherein, the preset information includes: touch point data or click operation data.
According to the electronic equipment provided by the embodiment of the application, the operation behavior event is determined by acquiring the video file containing the preset information, the key frame corresponding to the operation behavior event is acquired, the image corresponding to the key frame is processed based on the operation behavior event, the operation image is obtained, the operation flow can be well expressed, the user can obtain the operation flow chart directly through the screen recording, and the operation is simple and quick.
Optionally, the processing the video file to determine an operational behavior event includes:
acquiring preset information contained in the video file;
and under the condition that the preset information meets the judging condition corresponding to the preset event type, determining the operation behavior event corresponding to the preset information as the event of the preset event type.
Optionally, when the preset information is touch point data, the acquiring preset information included in the video file includes:
extracting images from the video file to obtain multi-frame images, and storing the multi-frame images according to indexes of each frame of images;
sequentially identifying the multi-frame images, and acquiring coordinates of the touch points and indexes of the frame images where the touch points are located under the condition that the touch points are identified;
under the condition that the preset information meets the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type comprises the following steps:
and under the condition that the coordinates of the touch points and the index meet the judging conditions corresponding to the preset event types, determining the operation behavior event corresponding to the preset information as the event of the preset event types. Optionally, the determining that the operation behavior event corresponding to the preset information is the event of the preset event type when the preset information meets the judgment condition corresponding to the preset event type includes:
when indexes corresponding to an ith touch point or clicking operation A [ i ] are discontinuous with indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1], and differences among indexes corresponding to A [ i ], indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1] are larger than a first preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
Under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are the same, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
when the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1], and the continuous times of the index is multiplied by the time length corresponding to each frame of image to be larger than a second preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a long press event;
determining that the ith touch point or clicking operation A [ i ] corresponds to a multi-click event under the condition that the index corresponding to A [ i ] is discontinuous with the index corresponding to A [ i-1] or the index corresponding to A [ i+1], the difference value between the indexes is smaller than a third preset threshold value, and the distance between the coordinate of A [ i ] and the coordinate of A [ i-1] or the coordinate of A [ i+1] is smaller than a fourth preset threshold value;
under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are different, determining that the ith touch point or clicking operation A [ i ] corresponds to a sliding event;
wherein i represents the sequence number of a touch point or a clicking operation, and A is a queue for storing indexes and coordinates corresponding to the touch point or the clicking operation.
Optionally, the processing the image corresponding to the key frame based on the operation behavior event to obtain an operation image includes:
and adding an icon corresponding to the operation behavior event on the image corresponding to the key frame at the coordinate position corresponding to the operation behavior event to obtain an operation image.
Optionally, in the case that the operation behavior event is a sliding event, the processing, based on the operation behavior event, the image corresponding to the key frame to obtain an operation image includes:
acquiring a first image initiated by a sliding event;
adding a first icon on the first image at the starting position of the sliding event, and adding a second icon on the first image at the ending position of the sliding event;
and connecting the first icon with the second icon to obtain an operation image.
Alternatively, the user input unit 1207 is configured to receive a first input of an icon in the operation image;
processor 1210, further configured to: displaying an edit box in response to the first input;
the user input unit 1207 is further configured to receive a second input to the edit box;
processor 1210, further configured to: and responding to the second input, and generating an operation flow file according to the content of the second input.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the processes of the method embodiment based on the video generation operation flow file are implemented, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is configured to run a program or instructions, implement each process of the method embodiment based on the video generation operation flow file, and achieve the same technical effect, so that repetition is avoided, and no further description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the described methods in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.
Claims (6)
1. A method for generating an operational flow file based on video, comprising:
acquiring a video file containing preset information;
processing the video file to determine an operation behavior event;
acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
obtaining an operation flow file based on the operation image;
wherein, the preset information includes: touch point data or click operation data;
the obtaining an operation flow file based on the operation image includes:
receiving a first input of an icon in the operation image;
displaying an edit box in response to the first input;
Receiving a second input to the edit box;
generating an operation flow file according to the content of the second input in response to the second input;
the processing the video file to determine an operation behavior event comprises the following steps:
acquiring preset information contained in the video file;
under the condition that the preset information meets the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type;
and when the preset information is touch point data, acquiring the preset information contained in the video file includes:
extracting images from the video file to obtain multi-frame images, and storing the multi-frame images according to indexes of each frame of images;
sequentially identifying the multi-frame images, and acquiring coordinates of the touch points and indexes of the frame images where the touch points are located under the condition that the touch points are identified;
under the condition that the preset information meets the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type comprises the following steps:
determining that the operation behavior event corresponding to the preset information is an event of the preset event type under the condition that the coordinates of the touch point and the index meet the judging condition corresponding to the preset event type;
Under the condition that the preset information meets the judgment condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type comprises the following steps:
when indexes corresponding to an ith touch point or clicking operation A [ i ] are discontinuous with indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1], and differences among indexes corresponding to A [ i ], indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1] are larger than a first preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are the same, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
when the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1], and the continuous times of the index is multiplied by the time length corresponding to each frame of image to be larger than a second preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a long press event;
determining that the ith touch point or clicking operation A [ i ] corresponds to a multi-click event under the condition that the index corresponding to A [ i ] is discontinuous with the index corresponding to A [ i-1] or the index corresponding to A [ i+1], the difference value between the indexes is smaller than a third preset threshold value, and the distance between the coordinate of A [ i ] and the coordinate of A [ i-1] or the coordinate of A [ i+1] is smaller than a fourth preset threshold value;
Under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are different, determining that the ith touch point or clicking operation A [ i ] corresponds to a sliding event;
wherein i represents the sequence number of a touch point or a clicking operation, and A is a queue for storing indexes and coordinates corresponding to the touch point or the clicking operation.
2. The method for generating an operation flow file based on a video according to claim 1, wherein the processing the image corresponding to the key frame based on the operation behavior event to obtain an operation image includes:
and adding an icon corresponding to the operation behavior event on the image corresponding to the key frame at the coordinate position corresponding to the operation behavior event to obtain an operation image.
3. The method for generating an operation flow file based on a video according to claim 1, wherein, in the case that the operation behavior event is a sliding event, the processing the image corresponding to the key frame based on the operation behavior event to obtain an operation image includes:
acquiring a first image initiated by a sliding event;
Adding a first icon on the first image at the starting position of the sliding event, and adding a second icon on the first image at the ending position of the sliding event;
and connecting the first icon with the second icon to obtain an operation image.
4. An apparatus for generating an operational flow file based on video, comprising:
the video acquisition unit is used for acquiring a video file containing preset information;
the event determining unit is used for processing the video file and determining an operation behavior event;
the processing unit is used for acquiring a key frame corresponding to the operation behavior event from the video file, and processing an image corresponding to the key frame based on the operation behavior event to obtain an operation image;
the generating unit is used for obtaining an operation flow file based on the operation image;
wherein, the preset information includes: touch point data or click operation data;
the obtaining an operation flow file based on the operation image includes:
receiving a first input of an icon in the operation image;
displaying an edit box in response to the first input;
receiving a second input to the edit box;
Generating an operation flow file according to the content of the second input in response to the second input;
the processing the video file to determine an operation behavior event comprises the following steps:
acquiring preset information contained in the video file;
under the condition that the preset information meets the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type;
and when the preset information is touch point data, acquiring the preset information contained in the video file includes:
extracting images from the video file to obtain multi-frame images, and storing the multi-frame images according to indexes of each frame of images;
sequentially identifying the multi-frame images, and acquiring coordinates of the touch points and indexes of the frame images where the touch points are located under the condition that the touch points are identified;
under the condition that the preset information meets the judging condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type comprises the following steps:
determining that the operation behavior event corresponding to the preset information is an event of the preset event type under the condition that the coordinates of the touch point and the index meet the judging condition corresponding to the preset event type;
Under the condition that the preset information meets the judgment condition corresponding to the preset event type, determining that the operation behavior event corresponding to the preset information is the event of the preset event type comprises the following steps:
when indexes corresponding to an ith touch point or clicking operation A [ i ] are discontinuous with indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1], and differences among indexes corresponding to A [ i ], indexes corresponding to A [ i-1] and indexes corresponding to A [ i+1] are larger than a first preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are the same, determining that the ith touch point or clicking operation A [ i ] corresponds to a clicking event;
when the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1], and the continuous times of the index is multiplied by the time length corresponding to each frame of image to be larger than a second preset threshold value, determining that the ith touch point or clicking operation A [ i ] corresponds to a long press event;
determining that the ith touch point or clicking operation A [ i ] corresponds to a multi-click event under the condition that the index corresponding to A [ i ] is discontinuous with the index corresponding to A [ i-1] or the index corresponding to A [ i+1], the difference value between the indexes is smaller than a third preset threshold value, and the distance between the coordinate of A [ i ] and the coordinate of A [ i-1] or the coordinate of A [ i+1] is smaller than a fourth preset threshold value;
Under the condition that the index corresponding to the A [ i ] is continuous with the index corresponding to the A [ i-1] or the index corresponding to the A [ i+1] and the coordinates of the A [ i ], the A [ i-1] and the A [ i+1] are different, determining that the ith touch point or clicking operation A [ i ] corresponds to a sliding event;
wherein i represents the sequence number of a touch point or a clicking operation, and A is a queue for storing indexes and coordinates corresponding to the touch point or the clicking operation.
5. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the video-based method of generating an operational flow file as claimed in any one of claims 1 to 3.
6. A readable storage medium having stored thereon a program or instructions which when executed by a processor performs the steps of the method of generating an operational flow file based on video as claimed in any of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110475020.4A CN113163256B (en) | 2021-04-29 | 2021-04-29 | Method and device for generating operation flow file based on video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110475020.4A CN113163256B (en) | 2021-04-29 | 2021-04-29 | Method and device for generating operation flow file based on video |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113163256A CN113163256A (en) | 2021-07-23 |
CN113163256B true CN113163256B (en) | 2024-01-23 |
Family
ID=76872445
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110475020.4A Active CN113163256B (en) | 2021-04-29 | 2021-04-29 | Method and device for generating operation flow file based on video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113163256B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428582B (en) * | 2021-12-31 | 2024-07-23 | 联想(北京)有限公司 | Image generation method and electronic equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1588302A (en) * | 2004-08-05 | 2005-03-02 | 深圳市友邻通讯设备有限公司 | Computer screen catching monitoring and recording method |
CN101916245A (en) * | 2010-08-30 | 2010-12-15 | 中国电信股份有限公司 | Method and device for realizing e-book annotation on electronic reader |
CN101930779A (en) * | 2010-07-29 | 2010-12-29 | 华为终端有限公司 | Video commenting method and video player |
CN102279739A (en) * | 2011-06-10 | 2011-12-14 | 吴东辉 | Recording method and application of screen operation |
CN102479216A (en) * | 2010-11-30 | 2012-05-30 | 上海博路信息技术有限公司 | Multimedia annotation method for electronic book |
WO2014044164A1 (en) * | 2012-09-19 | 2014-03-27 | 腾讯科技(深圳)有限公司 | Content recording method and device |
CN104020986A (en) * | 2013-02-28 | 2014-09-03 | 腾讯科技(深圳)有限公司 | Method and device for screen recording |
CN108681483A (en) * | 2018-05-16 | 2018-10-19 | 维沃移动通信有限公司 | A kind of task processing method and device |
-
2021
- 2021-04-29 CN CN202110475020.4A patent/CN113163256B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1588302A (en) * | 2004-08-05 | 2005-03-02 | 深圳市友邻通讯设备有限公司 | Computer screen catching monitoring and recording method |
CN101930779A (en) * | 2010-07-29 | 2010-12-29 | 华为终端有限公司 | Video commenting method and video player |
CN101916245A (en) * | 2010-08-30 | 2010-12-15 | 中国电信股份有限公司 | Method and device for realizing e-book annotation on electronic reader |
CN102479216A (en) * | 2010-11-30 | 2012-05-30 | 上海博路信息技术有限公司 | Multimedia annotation method for electronic book |
CN102279739A (en) * | 2011-06-10 | 2011-12-14 | 吴东辉 | Recording method and application of screen operation |
WO2014044164A1 (en) * | 2012-09-19 | 2014-03-27 | 腾讯科技(深圳)有限公司 | Content recording method and device |
CN104020986A (en) * | 2013-02-28 | 2014-09-03 | 腾讯科技(深圳)有限公司 | Method and device for screen recording |
CN108681483A (en) * | 2018-05-16 | 2018-10-19 | 维沃移动通信有限公司 | A kind of task processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113163256A (en) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112954046B (en) | Information transmission method, information transmission device and electronic equipment | |
CN111857508B (en) | Task management method and device and electronic equipment | |
EP3528140A1 (en) | Picture processing method, device, electronic device and graphic user interface | |
CN112672061B (en) | Video shooting method and device, electronic equipment and medium | |
CN112083854A (en) | Application program running method and device | |
CN113918522A (en) | File generation method and device and electronic equipment | |
CN113163256B (en) | Method and device for generating operation flow file based on video | |
CN112399010B (en) | Page display method and device and electronic equipment | |
CN113271378A (en) | Image processing method and device and electronic equipment | |
CN112818094A (en) | Chat content processing method and device and electronic equipment | |
CN111954076A (en) | Resource display method and device and electronic equipment | |
CN112822394A (en) | Display control method and device, electronic equipment and readable storage medium | |
CN113794943B (en) | Video cover setting method and device, electronic equipment and storage medium | |
CN113271379B (en) | Image processing method and device and electronic equipment | |
CN112882624B (en) | Process management method and device, electronic equipment and storage medium | |
CN113436297A (en) | Picture processing method and electronic equipment | |
CN113794833A (en) | Shooting method and device and electronic equipment | |
CN113779293A (en) | Image downloading method, device, electronic equipment and medium | |
CN113835598A (en) | Information acquisition method and device and electronic equipment | |
CN112486650A (en) | Operation path switching method and device and electronic equipment | |
CN112596646B (en) | Information display method and device and electronic equipment | |
CN115278378B (en) | Information display method, information display device, electronic apparatus, and storage medium | |
CN112860147B (en) | Electronic equipment operation method and device and electronic equipment | |
CN111984173B (en) | Expression package generation method and device | |
CN111857467B (en) | File processing method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |