Data processing method, device, electronic device and readable storage medium
By generating video files to display log data, and using materials in the material information library combined with text information, the problem of singleness of log data analysis in the existing technology is solved, and the user experience is improved.
Patent Information
- Application Number
- CN201811324868.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-08
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2038-11-08
AI Technical Summary
The existing log data analysis method is single, difficult to intuitively display the historical behavior of network objects, and affects user experience.
By obtaining the log data of the target object, a video file corresponding to the historical behavior is generated, using keywords in the material information library to find pictures and animation materials, combining text information to generate a video file, and displaying the text simultaneously during video playback.
The historical behavior of the target object is displayed more intuitively and vividly through video files, which enriches the display method of log data and improves the user experience.
Smart Images

Figure CN109672909B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and readable storage medium. Background Art
[0002] Network objects such as network devices, systems, and applications will generate log data during operation to record the historical behavior of these network objects. Log data is crucial for users to understand the historical behavior of network objects. However, log data has an inherent format, and users cannot intuitively understand the historical behavior of network objects through log data. Further analysis of log data is required.
[0003] The existing log data analysis method obtains text analysis results based on log data. This method is relatively simple and is not conducive to improving user experience. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide a data processing method, device, electronic device and readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising: obtaining log data of a target object, the log data recording the historical behavior of the target object within a preset time period; and generating a video file corresponding to the historical behavior based on the log data.
[0006] Furthermore, generating a video file corresponding to the historical behavior based on the log data includes: obtaining keywords in the log data, and searching for materials corresponding to the keywords in a pre-stored material information library based on the keywords, wherein the material information library stores mapping information between multiple keywords and corresponding materials; generating the video file based on the materials corresponding to the keywords.
[0007] Furthermore, the obtaining of the keywords in the log data includes: generating a target text based on the log data, the target text being used to characterize the historical behavior of the target object within a preset time period; and obtaining the keywords by performing word segmentation processing on the target text.
[0008] Furthermore, after generating the video file according to the material corresponding to the keyword, the method further includes: adding the target text to the video file, so that the target text can be synchronously displayed during the playback of the video file.
[0009] Further, the material information library includes a picture information library and an animation information library, the material includes picture material and animation material, the keyword includes a first category of keywords and a second category of keywords, the first category of keywords is used to search for picture material from the picture information library, and the second category of keywords is used to search for animation material from the animation information library. The searching for the material corresponding to the keyword in the pre-stored material information library based on the keyword includes: searching for the picture material corresponding to the first category of keywords in the picture information library based on the first category of keywords, wherein the picture information library includes a plurality of mapping relationship information between the first category of keywords and the corresponding picture materials; searching for the animation material corresponding to the second category of keywords in the animation information library based on the second category of keywords, wherein the animation information library includes a plurality of mapping relationship information between the second category of keywords and the corresponding animation materials. The generating of the video file according to the material corresponding to the keyword includes: generating the video file based on the picture material corresponding to the first category of keywords and the animation material corresponding to the second category of keywords.
[0010] Furthermore, generating the video file according to the material corresponding to the keyword includes: obtaining user portrait information; and generating the video file based on the user portrait information and the material corresponding to the keyword.
[0011] Furthermore, after generating the video file corresponding to the historical behavior based on the log data, the method further includes: playing the video file when a preset instruction is detected.
[0012] In a second aspect, an embodiment of the present invention provides a data processing device, which includes: an acquisition module for acquiring log data of a target object, wherein the log data records the historical behavior of the target object within a preset time period; and a generation module for generating a video file corresponding to the historical behavior based on the log data.
[0013] Furthermore, the generation module includes: a material search submodule, used to obtain keywords in the log data, and based on the keywords, search for materials corresponding to the keywords in a pre-stored material information library, wherein the material information library stores mapping information between multiple keywords and corresponding materials; a generation submodule, used to generate the video file based on the materials corresponding to the keywords.
[0014] Furthermore, the material search submodule is specifically used to: generate a target text based on the log data, wherein the target text is used to characterize the historical behavior of the target object within a preset time period; and obtain the keyword by performing word segmentation processing on the target text.
[0015] Furthermore, the above-mentioned data processing device also includes: an adding module, which is used to add the target text to the video file, so that the target text can be synchronously displayed during the playback of the video file.
[0016] Furthermore, the material information library includes a picture information library and an animation information library, the material includes picture materials and animation materials, the keywords include first-category keywords and second-category keywords, the first-category keywords are used to search for picture materials from the picture information library, and the second-category keywords are used to search for animation materials from the animation information library. The material search submodule is specifically used to: search for picture materials corresponding to the first-category keywords in the picture information library based on the first-category keywords, and search for animation materials corresponding to the second-category keywords in the animation information library based on the second-category keywords, wherein the picture information library includes mapping relationship information between multiple first-category keywords and corresponding picture materials, and the animation information library includes mapping relationship information between multiple second-category keywords and corresponding animation materials. The generation submodule is specifically used to: generate the video file based on the picture materials corresponding to the first-category keywords and the animation materials corresponding to the second-category keywords.
[0017] Furthermore, the generation submodule is specifically used to: obtain user portrait information; and generate the video file based on the user portrait information and the material corresponding to the keyword.
[0018] Furthermore, the above-mentioned data processing device also includes: a video playing module, which is used to play the video file when a preset instruction is detected.
[0019] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device performs the steps of the above-mentioned data processing method.
[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned data processing method when executed by a processor.
[0021] In the technical solution provided by the embodiment of the present invention, the log data of the target object is obtained, and the log data records the historical behavior of the target object within a preset time period. Then, based on the log data, a video file corresponding to the historical behavior of the target object within the preset time period is generated to display the video file to the user. Through this solution, the log data of the target object is converted into a video file, and the historical behavior of the target object can be displayed to the user more intuitively and vividly through the video file, which enriches the display method of the log data and is conducive to improving the user experience.
[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0024] Figure 1 A schematic diagram of an operating environment applicable to an embodiment of the present invention is shown;
[0025] Figure 2 A method flow chart of a data processing method provided by a first embodiment of the present invention is shown;
[0026] Figure 3 A step flow chart of step S202 in the data processing method provided by the first embodiment of the present invention is shown;
[0027] Figure 4 A functional module block diagram of a data processing device provided by a second embodiment of the present invention is shown;
[0028] Figure 5 A schematic structural diagram of an electronic device provided by a third embodiment of the present invention is shown. DETAILED DESCRIPTION
[0029] See also Figure 1 , is a schematic diagram of an operating environment applicable to an embodiment of the present invention. Figure 1 As shown, one or more user terminals 100 ( Figure 1 Only one is shown) can communicate with one or more servers 300 ( Figure 1 The user terminal 100 may be a personal computer (PC), a laptop, a tablet computer, a smart phone, an e-reader, a vehicle-mounted device, an Internet-connected TV, a smart home device (e.g., a sweeping robot, an air purifier, etc.), a wearable device, or other smart device with network functions.
[0030] The user terminal is provided with a target object, which may be a third-party application software such as security protection software or smart home control software, or a browser. When the user terminal runs the target object, it generates and records log data of the target object, and also feeds the log data back to the server, which may analyze the received log data.
[0031] The data processing method provided by the embodiment of the present invention can be applied to the above-mentioned server to process the log data of the target object in the server. The specific processing process may include: obtaining the log data of the target object, the log data recording the historical behavior of the target object within a preset time period, and then, based on the log data, generating a video file corresponding to the historical behavior. In this way, the historical behavior of the target object within the preset time period can be more intuitively and vividly displayed to the user through the video file, which enriches the display method of the log data and is conducive to improving the user experience.
[0032] It should be noted that in other embodiments of the present invention, the data processing method can also be applied to a user terminal to process the log data of the target object recorded in the user terminal and generate a corresponding video file. The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0033] Figure 2 FIG. 1 is a flow chart of a data processing method provided by the first embodiment of the present invention. Figure 2 As shown, the method at least includes the following steps S201 to S202.
[0034] Step S201: obtaining log data of a target object, wherein the log data records historical behaviors of the target object within a preset time period.
[0035] It is understandable that the target object will record the completed work tasks during the work process to form log data, so that the historical behavior of the target object can be analyzed based on the log data later.
[0036] In this step, the preset time period can be set as needed, for example, it can be log data within a day, or log data within a month, etc.
[0037] Step S202: Generate a video file corresponding to the historical behavior based on the log data.
[0038] Based on the historical behavior records of the target object in the log data, a video file that can reflect the historical behavior is generated. For example, when the target object is security protection software, assuming that the log data records the interception of attacks, a video file that can reflect the working process of the security protection software intercepting attacks is generated accordingly. When the target object is smart home control software, assuming that the log data records the record of a sweeping robot cleaning the room, a video file that can reflect the working process of the sweeping robot cleaning the room is generated accordingly. In this way, the historical behavior of the target object within a preset time period can be intuitively and vividly displayed to the user through the generated video file.
[0039] Specifically, the log data contains keywords that reflect the historical behavior of the target object. By filtering out the keywords in the log data, corresponding video files are produced based on the filtered keywords. For example, when the target object is security protection software, the log data of the target object may contain keywords such as "interception", "harassment calls" and "attack". For another example, when the target object is smart home control software, the log data of the target object may contain keywords such as "sweeping robot", "cleaning" and "room".
[0040] After determining the keywords in the log data, a video file is created based on the keywords in the log data. For example, a video library can be pre-set, and multiple videos are set in the video library, and each video corresponds to a characteristic phrase. The keywords in the log data are matched with the characteristic phrases corresponding to each video in the video library, and the video that successfully matches is used as the target video. The target video can contain one or more videos. When the target video includes multiple videos, the multiple videos contained in the target video are spliced into one video, and the production of the video file is completed. The user can intuitively understand the historical behavior of the target object within the preset time period by watching the video.
[0041] The characteristic phrase may include one or more words. When there is a keyword matching the word in the log data for each word in the characteristic phrase, it is determined that the keyword in the log data matches the characteristic phrase. For example, the characteristic phrase corresponding to a video in the video library is "intercept-attack", then when the keywords in the log data include both "intercept" and "attack", it matches the characteristic phrase corresponding to the video.
[0042] Optional, such as Figure 3 As shown, in the above step S202, the specific implementation process of generating a video file corresponding to the historical behavior based on the log data may at least include the following steps:
[0043] Step S301, obtaining keywords in the log data;
[0044] Step S302, searching for a material corresponding to the keyword in a pre-stored material information library based on the keyword, wherein the material information library stores mapping information between a plurality of keywords and corresponding materials;
[0045] Step S303: Generate the video file according to the material corresponding to the keyword.
[0046] Specifically, the implementation process of obtaining the keywords in the log data described in the above step S301 may include: generating a target text based on the log data, the target text being used to characterize the historical behavior of the target object within a preset time period; and obtaining the keywords by performing word segmentation processing on the target text.
[0047] In this embodiment, a regular expression can be set to match the historical behavior records in the log data, and count them, and a target text can be generated based on these records and the counting results. In this way, the target text can reflect the historical behavior of the target object within a preset time period. The specific format of the target text can be set according to the actual application scenario.
[0048] Taking the target object as security protection software A, the historical behavior records in the log data of the target object may include, but are not limited to, one or more records of intercepting attacks, intercepting harassing text messages, intercepting harassing phone calls, and patching vulnerabilities. Accordingly, the generated target text may include, but is not limited to, one or more of "security protection software A intercepted N1 attacks", "security protection software A intercepted N2 harassing text messages", "security protection software A intercepted N3 harassing phone calls", and "security protection software A patched N4 vulnerabilities". Among them, N1, N2, N3, and N4 all represent positive integers.
[0049] Taking the target object as the smart home control software B, the historical behavior records in the log data of the target object may include but are not limited to one or more records of the sweeping robot's sweeping records, the air conditioner's working records, the air purifier's working records, etc. Accordingly, the generated target text may include but is not limited to one or more of "the sweeping robot cleaned M1% of the room", "the air conditioner adjusted the room temperature from M2 degrees to M3 degrees", and "the air purifier reduced the PM2.5 value in the room from M4 to M5", etc. Among them, M1, M2, M3, M4 and M5 all represent values greater than zero.
[0050] During the specific implementation process, a text template can be pre-configured for the historical behavior records involved in the log data of the target object. For example, for the record of security protection software A intercepting attacks, the pre-configured text template is "Security protection software A intercepted X attacks". By counting the number of records of intercepted attacks in the log data, the corresponding target text is generated based on the statistical results and the pre-configured text template, that is, the statistical results are replaced with "X" in the text template to obtain the target text; similarly, for the record of security protection software A patching vulnerabilities, the pre-configured text template is "Security protection software A patched X vulnerabilities".
[0051] After determining the target text corresponding to the log data, the target text is further segmented to obtain the keywords in the target text, and the keywords in the target text obtained are the keywords of the log data. Specifically, the target text can be processed using an existing segmentation algorithm to obtain multiple segmentations corresponding to the target text, and then the keywords corresponding to the target text are determined from the multiple segmentations obtained. As an implementation method, each segmentation can be matched with a feature word in a pre-set feature dictionary, and when there is a feature word that matches the segmentation, the segmentation is determined to be a keyword. The feature dictionary can be set according to the specific target object. Taking the target object as security protection software A as an example, the feature words in the feature dictionary may include: "security protection software A", "interception", "attack", "harassment text messages", "harassment calls", "patch" and "vulnerability", etc.
[0052] It should be noted that one or more target texts can be generated based on the log data of the target object. When multiple target texts are generated, it is necessary to perform word segmentation processing on each target text to obtain the keywords in each target text. After generating a video segment corresponding to the target text based on the keywords of each target text, the video segments corresponding to all target texts are spliced into a video file, and the historical behavior of the target object represented by each target text is displayed in turn by playing the video file.
[0053] Of course, in other embodiments of the present invention, preset conditions can also be set in advance, and records that meet the preset conditions in the log data can be screened based on the preset conditions, and keywords in the records that meet the preset conditions can be extracted as keywords of the log data. Among them, the preset conditions can be set according to the actual application scenario. For example, when the target object is security protection software, the records that meet the preset conditions may include but are not limited to records of intercepting harassing text messages and records of intercepting harassing calls.
[0054] In the above step S302, the material information library may be pre-set according to the actual application scenario. The material stored in the material information library is the material used to generate the video file, and may be pre-set according to the keywords that may be involved in the log data of the target object.
[0055] It should be noted that different target objects have different corresponding material information libraries. For some target objects, the materials in the material information library corresponding to different users may also be different. For example, when the target object is smart home control software, the materials stored in the material information library can be set according to the smart home devices used by the user, the device model, and the user's room specifications. Since different users have different rooms, smart home devices, and device models, the corresponding materials are also different.
[0056] For example, when the keywords that may be involved in the log data of the target object include "security protection software A", "attack", "harassment text messages", "harassment calls" and "vulnerabilities", the materials corresponding to these keywords can be pre-stored in a pre-set material information library. When the keywords that may be involved in the log data of the target object include "sweeping robot", "air conditioner" and "air purifier", the materials in the material information library can be set according to the device model actually used by the user.
[0057] In one embodiment of the present invention, the material used to generate the video file may include picture material and animation material. In this case, the material information library may include a picture information library and an animation information library, the picture information library includes mapping relationship information between a plurality of first-category keywords and corresponding picture materials, and the animation information library includes mapping relationship information between a plurality of second-category keywords and corresponding animation materials. Accordingly, the keywords in the log data may include first-category keywords and second-category keywords, wherein the first-category keywords are used to search for picture materials from the picture information library, and the second-category keywords are used to search for animation materials from the animation information library.
[0058] At this time, the specific implementation process of searching for materials corresponding to the keywords in a pre-stored material information library based on the keywords may include: searching for picture materials corresponding to the first category of keywords in the picture information library based on the first category of keywords; searching for animation materials corresponding to the second category of keywords in the animation information library based on the second category of keywords.
[0059] Correspondingly, in the above step S303, the specific implementation process of generating the video file according to the materials corresponding to the keywords may include: generating the video file based on the picture materials corresponding to the first category of keywords and the animation materials corresponding to the second category of keywords.
[0060] As an optional implementation, in the above process, the first and second keywords in the determined keywords can be distinguished first, and then the corresponding picture materials are searched in the picture information library based on the first keywords, and the corresponding animation materials are searched in the animation information library based on the second keywords. Of course, in other embodiments of the present invention, the keywords in the log data can also be directly matched with the picture information library and the animation information library to determine the picture materials and animation materials corresponding to the keywords in the log data.
[0061] In this embodiment, there are many ways to distinguish the first and second keywords in the determined keywords. For example, when the keywords in the log data are obtained by matching the preset feature dictionary to determine the keywords in the target file, the feature dictionary may include a first feature word list and a second feature word list, and the first feature word list may include multiple first feature words, and the second feature word list may include multiple second feature words. The first feature word list and the second feature word list can be specifically set according to the keywords involved in the log data in the actual application scenario. For example, the first feature word list may include words such as "security protection software A", "attack", "harassment text messages", "harassment calls" and "vulnerabilities" in the above example, and the second feature word list may include words such as "interception" and "patch" to represent execution actions. Based on this, among the multiple segmented words corresponding to the target text, the segmented words matching the first feature word in the first feature word list are marked as first-category keywords, and the segmented words matching the second feature word in the second feature word list are marked as second-category keywords.
[0062] In other embodiments of the present invention, other methods may be used to determine the first and second keywords. For example, a semantic recognition model may be trained to directly extract the first and second keywords from the target text determined based on the log data by model training.
[0063] In the picture information library, the picture material corresponding to each first-category keyword can be set according to the application scenario. In this embodiment, the picture materials in the picture information library corresponding to the target object can be uniformly set. For example, the icon of security protection software A or other pictures that can be used to represent security protection software A can be used as the picture material corresponding to "security protection software A", and a picture similar to a cannonball shape can be used as the picture material corresponding to "attack".
[0064] Alternatively, the user may also personalize the picture materials in the picture information library corresponding to the target object. For example, for each first-category keyword involved in the log data of the target object, multiple picture materials are displayed to the user, and the user selects one of them as the picture material corresponding to the first-category keyword. For another example, the user may determine the corresponding picture material for each first-category keyword by inputting relevant information. For example, when the first-category keyword is "sweeping robot", the relevant information may be the model of the sweeping robot, and the queried picture of the sweeping robot of this model may be used as the picture material corresponding to the "sweeping robot"; when the first-category keyword is "room", the relevant information may be the user's room design drawing, and the picture material corresponding to the "room" may be generated based on the room design drawing uploaded by the user.
[0065] Similarly, in the animation information library, the animation material corresponding to each second-category keyword may also be set according to the second-category keywords that may be involved in the log data of the target object in the application scenario.
[0066] In a specific application scenario, the target object is security protection software A. When the second-category keyword in the target text generated based on log data is "intercept", the corresponding animation material can be a material with an animation effect of intercepting a thrown object. For example, the animation material can include multiple frames of images. By setting the relative position of the thrown object and the interception subject in each frame of the image, an animation effect of the thrown object being thrown toward the interception subject according to a preset trajectory is achieved. At this time, a video file can be generated in combination with the picture material corresponding to the first-category keyword in the target text. For example, the picture material corresponding to the first-category keyword after "intercept" in the target text is used as a thrown object, and the picture material corresponding to the first-category keyword before "intercept" is used as an interception subject, and is set at the corresponding position in each frame of the animation material, thereby generating a video file based on the multiple frames of images obtained at this time.
[0067] Assuming that the target text is "Security protection software A intercepted 3 attacks", and the image material corresponding to "Security protection software A" is a picture similar to the shape of a protective wall, and the image material corresponding to "attack" is a picture similar to the shape of a cannonball, the generated video file will present an animation effect of a cannonball being thrown towards the protective wall along a preset trajectory and being intercepted by the protective wall.
[0068] In another specific application scenario, the target object is smart home control software B. When a certain target text is "the sweeping robot cleaned 80% of the room" and the second keyword is "cleaning", the corresponding animation material can be a material with an animation effect of the target object moving in the target area. For example, the animation material can include multiple frames of images, and the animation effect of the target object moving in the target area is achieved by setting the position of the target object and the target area in each frame of the image. The first category of keywords in the target file includes "sweeping robot" and "room". The picture material corresponding to "sweeping robot" is used as the target object, and the picture material corresponding to "room" is used as the target area. They are set at the corresponding positions in each frame of the animation material to generate a video file. The generated video file will present the animation effect of the sweeping robot cleaning the room.
[0069] Similarly, when the second-category keyword of a target text is "temperature", the corresponding animation material may be a material with an animation effect of a temperature change in the room. At this point, in the generated video file, different temperature gradients may be represented by different colors. For example, when the temperature in the room is adjusted from 33 degrees to 25 degrees, the color of the area in the room may gradually change from red to blue, which is not described in detail here. Similarly, when the second-category keyword of a target text is "PM2.5", the corresponding animation material may be a material with an animation effect of a temperature change in the room. At this point, in the generated video file, different air quality gradients may also be represented by different colors. For example, when the PM2.5 value in the room changes from 150 to 20, the color of the area in the room may gradually change from black to light gray and finally to green, which is not described in detail here.
[0070] Optionally, in order to more intuitively display the historical behavior of the target object, the keywords in the log data may include a third category of keywords in addition to the first category of keywords and the second category of keywords. The third category of keywords characterizes the number or degree of the target object executing the same historical behavior within a preset time period. In this embodiment, the third category of keywords may include a number such as 1 or 3. Alternatively, the third category of keywords may include percentages such as 50% or 80%, temperature values such as 30 degrees or 25 degrees, and PM2.5 values such as 120 or 27, which are specifically determined by the actual application scenario. When the keywords in the log data also include the third category of keywords, the specific implementation process of generating the video file based on the material corresponding to the keyword may include: generating the video file based on the third keyword, the picture material corresponding to the first category of keywords, and the animation material corresponding to the second category of keywords.
[0071] For example, in the above example, the target text is "Security protection software A intercepted 3 attacks". Since the target text includes the third category of keywords: 3, the process of setting three shells to be thrown at the protective wall in turn according to the preset trajectory and all being intercepted by the protective wall can be repeated, so that the video file can present the animation effect of three shells being thrown at the protective wall in turn according to the preset trajectory and all being intercepted by the protective wall. When the target text is "The sweeping robot cleaned 80% of the room", since the target text includes the third category of keywords: 80%, the movement trajectory of the sweeping robot in the room can be adjusted according to the third category of keywords, so that the video file can present the animation effect of the sweeping robot cleaning in the room and the total cleaning area accounting for 80% of the total area of the room.
[0072] It should be noted that in other embodiments of the present invention, the materials in the material information library may also include only picture materials. In this case, in the above step S303, a video file corresponding to the historical behavior of the target object recorded in the log data can be generated based on the picture materials corresponding to the keywords in the log data and the corresponding video generation rules pre-set based on each picture material. Among them, the video generation rules can be based on the picture material settings involved in the pre-configured material information library in the actual application scenario. For example, for the picture materials corresponding to the sweeping robot stored in the material information library, the corresponding video generation rules can be used to generate a video file of the sweeping robot cleaning the room.
[0073] Optionally, in order to improve user experience, personalized settings can be added during the process of generating the video file. Specifically, generating the video file according to the material corresponding to the keyword includes: obtaining user portrait information; generating the video file based on the user portrait information and the material corresponding to the keyword.
[0074] Among them, the user portrait information is information that can reflect the personalized characteristics of the user. For example, the user portrait information may include but is not limited to information such as the user's gender, age, city, and current weather conditions. At this time, the implementation process of generating the video file based on the user portrait information and the material corresponding to the keyword can specifically include: generating an initial video file based on the material corresponding to the keyword in the log data, and then adding background information to each frame image of the initial video file based on the user portrait information to obtain a target video file. Among them, the background information may include one or more combinations of background color, background picture, and background weather. Specifically, the background color can be determined according to the user's gender and age, the background picture such as a building picture or a landscape picture can be determined according to the user's city, and the background weather can be determined according to the current weather conditions. Of course, the above implementation is only an example. In other embodiments of the present invention, other implementations can also be used to determine the background information.
[0075] Optionally, in order to make it easier for users to understand the historical behavior of the target object, when a target text is generated based on the log data, after the video file is generated based on the material corresponding to the keyword, the data processing method provided by the embodiment of the present invention further includes: adding the target text to the video file so that the corresponding target text can be synchronously displayed during the playback of the video file. In this way, while watching the video file, the user can see the target text displayed in the video file, so that the user can understand the historical behavior of the target object.
[0076] Optionally, after generating a video file corresponding to the historical behavior based on the log data, the data processing method provided by the embodiment of the present invention may further include: when a preset instruction is detected, playing the video file to intuitively and vividly show the historical behavior of the target object within a preset time period to the user. Specifically, the above-mentioned preset instruction can be an instruction triggered when the user performs a preset trigger operation such as a click operation, or it can be an instruction generated periodically at a preset time interval. It can be understood that when the data processing method provided by the embodiment of the present invention is applied to a user terminal, when the user terminal detects a preset instruction, the video file generated by the data processing method provided by the embodiment of the present invention can be directly played; when the data processing method provided by the embodiment of the present invention is applied to a server, the server is required to send the generated video file to the user terminal, and the user terminal plays the video file.
[0077] To sum up, the data processing method provided by the embodiment of the present invention converts the log data of the target object into a video file, which can more intuitively and vividly display the historical behavior of the target object to the user, enriches the display method of the log data, and is conducive to improving the user experience.
[0078] Based on the same inventive concept as the data processing method provided in the first embodiment, the second embodiment of the present invention provides a data processing device. Figure 4 As shown, the data processing device 400 includes:
[0079] The acquisition module 401 is used to acquire log data of a target object, wherein the log data records historical behaviors of the target object within a preset time period;
[0080] The generating module 402 is used to generate a video file corresponding to the historical behavior based on the log data.
[0081] As an optional implementation, the generating module 402 may include:
[0082] A material search submodule, used to obtain keywords in the log data, and search for materials corresponding to the keywords in a pre-stored material information library based on the keywords, wherein the material information library stores mapping information between multiple keywords and corresponding materials;
[0083] The generation submodule is used to generate the video file according to the material corresponding to the keyword.
[0084] As an optional implementation, the material search submodule may be specifically used for:
[0085] Based on the log data, generate a target text, wherein the target text is used to characterize the historical behavior of the target object within a preset time period;
[0086] The keywords are obtained by performing word segmentation processing on the target text.
[0087] As an optional implementation, the data processing device 400 further includes: an adding module, configured to add the target text to the video file, so that the target text can be synchronously displayed during the playback of the video file.
[0088] As an optional implementation, the material information library includes a picture information library and an animation information library, the material includes picture material and animation material, and the keyword includes a first category of keywords and a second category of keywords. The first category of keywords is used to search for picture materials from the picture information library, and the second category of keywords is used to search for animation materials from the animation information library.
[0089] At this time, the material search submodule is specifically used to: search for picture materials corresponding to the first category of keywords in the picture information library based on the first category of keywords, and search for animation materials corresponding to the second category of keywords in the animation information library based on the second category of keywords, wherein the picture information library includes mapping relationship information between multiple first category keywords and corresponding picture materials, and the animation information library includes mapping relationship information between multiple second category keywords and corresponding animation materials. The generation submodule is specifically used to: generate the video file based on the picture materials corresponding to the first category of keywords and the animation materials corresponding to the second category of keywords.
[0090] As an optional implementation, the generation submodule is specifically used to: obtain user portrait information; and generate the video file based on the user portrait information and the material corresponding to the keyword.
[0091] As an optional implementation, the data processing device 400 further includes: a video playing module, configured to play the video file when a preset instruction is detected.
[0092] It should be noted that the specific implementation and technical effects of the data processing device 400 provided in the embodiment of the present invention are the same as those of the aforementioned first embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned first embodiment.
[0093] In addition, the third embodiment of the present invention also provides an electronic device, including a processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, which, when executed by the processor, enable the electronic device to execute the steps of the data processing method provided in the first embodiment above.
[0094] Figure 5 1 shows a block diagram of an exemplary electronic device 500. Figure 5 As shown, the electronic device 500 includes a memory 502, a storage controller 504, one or more (only one is shown in the figure) processors 506, a peripheral interface 508, a network module 510, an input and output module 512, and a display module 514. These components communicate with each other via one or more communication buses / signal lines 516.
[0095] The memory 502 can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiments of the present invention. The processor 506 executes various functional applications and data processing by running the software programs and modules stored in the memory 502, such as the data processing method provided in the embodiments of the present invention.
[0096] The memory 502 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. The processor 506 and other possible components may access the memory 502 under the control of the storage controller 504.
[0097] The peripheral interface 508 couples various input / output devices to the processor 506 and the memory 502. In some embodiments, the peripheral interface 508, the processor 506 and the memory controller 504 can be implemented in a single chip. In other embodiments, they can be implemented by separate chips.
[0098] The network module 510 is used to receive and send network signals, which may include wireless signals or wired signals.
[0099] The input / output module 512 is used to provide input data to the user to realize the interaction between the user and the electronic device. The input / output module 512 can be, but is not limited to, a mouse, a keyboard, a touch screen, etc.
[0100] The display module 514 provides an interactive interface (e.g., a user operation interface) between the electronic device 500 and the user or is used to display image data for the user's reference. In this embodiment, the display module 915 can be a liquid crystal display or a touch display. If it is a touch display, it can be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more positions on the touch display, and the sensed touch operations are handed over to the processor for calculation and processing.
[0101] Understandably, Figure 5 The structure shown is for illustration only. The electronic device 500 may also include Figure 5 More or fewer components as shown, or with Figure 5 Different configurations are shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0102] A fourth embodiment of the present invention provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the data processing method provided in the first embodiment are implemented.
[0103] The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0104] It should be noted that each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.
[0105] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0106] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0107] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0108] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0109] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0110] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in a gateway, proxy server, or system according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0111] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0112] The present invention discloses A1, a data processing method, the method comprising:
[0113] Obtaining log data of a target object, wherein the log data records historical behaviors of the target object within a preset time period;
[0114] Based on the log data, a video file corresponding to the historical behavior is generated.
[0115] A2. The method according to A1, wherein generating a video file corresponding to the historical behavior based on the log data comprises:
[0116] Acquire a keyword in the log data, and search for a material corresponding to the keyword in a pre-stored material information library based on the keyword, wherein the material information library stores mapping information between a plurality of keywords and corresponding materials;
[0117] The video file is generated according to the material corresponding to the keyword.
[0118] A3. According to the method described in A2, obtaining the keywords in the log data includes:
[0119] Based on the log data, generate a target text, wherein the target text is used to characterize the historical behavior of the target object within a preset time period;
[0120] The keywords are obtained by performing word segmentation processing on the target text.
[0121] A4. The method according to A3, after generating the video file based on the material corresponding to the keyword, further comprises: adding the target text to the video file so that the target text can be synchronously displayed during the playback of the video file.
[0122] A5. According to the method described in A2, the material information library includes a picture information library and an animation information library, the material includes picture material and animation material, and the keywords include first-category keywords and second-category keywords. The first-category keywords are used to search for picture materials from the picture information library, and the second-category keywords are used to search for animation materials from the animation information library.
[0123] The searching for a material corresponding to the keyword in a pre-stored material information library based on the keyword includes:
[0124] Based on the first category of keywords, searching the picture information library for picture materials corresponding to the first category of keywords, wherein the picture information library includes mapping relationship information between a plurality of first category of keywords and corresponding picture materials;
[0125] searching the animation material corresponding to the second-category keyword in the animation information library based on the second-category keyword, wherein the animation information library includes mapping relationship information between a plurality of second-category keywords and corresponding animation materials;
[0126] The step of generating the video file according to the material corresponding to the keyword includes:
[0127] The video file is generated based on the picture materials corresponding to the first category of keywords and the animation materials corresponding to the second category of keywords.
[0128] A6. The method according to A2, wherein generating the video file according to the material corresponding to the keyword comprises:
[0129] Obtain user portrait information;
[0130] The video file is generated based on the user portrait information and the material corresponding to the keyword.
[0131] A7. According to the method described in A1, after generating the video file corresponding to the historical behavior based on the log data, the method further includes: playing the video file when a preset instruction is detected.
[0132] The present invention discloses B8, a data processing device, the device comprising:
[0133] An acquisition module, used to acquire log data of a target object, wherein the log data records historical behaviors of the target object within a preset time period;
[0134] A generation module is used to generate a video file corresponding to the historical behavior based on the log data.
[0135] B9. According to the device described in B8, the generating module includes:
[0136] A material search submodule, used to obtain keywords in the log data, and search for materials corresponding to the keywords in a pre-stored material information library based on the keywords, wherein the material information library stores mapping information between multiple keywords and corresponding materials;
[0137] The generation submodule is used to generate the video file according to the material corresponding to the keyword.
[0138] B10. According to the device described in B9, the material search submodule is specifically used for:
[0139] Based on the log data, generate a target text, wherein the target text is used to characterize the historical behavior of the target object within a preset time period;
[0140] The keywords are obtained by performing word segmentation processing on the target text.
[0141] B11. The device according to B10 further includes: an adding module, configured to add the target text to the video file so that the target text can be displayed synchronously during the playback of the video file.
[0142] B12. According to the device described in B9, the material information library includes a picture information library and an animation information library, the material includes picture material and animation material, and the keywords include first-category keywords and second-category keywords, the first-category keywords are used to search for picture materials from the picture information library, and the second-category keywords are used to search for animation materials from the animation information library.
[0143] The material search submodule is specifically used for: searching the picture material corresponding to the first category keyword in the picture information library based on the first category keyword, and searching the animation material corresponding to the second category keyword in the animation information library based on the second category keyword, wherein the picture information library includes mapping relationship information between a plurality of first category keywords and corresponding picture materials, and the animation information library includes mapping relationship information between a plurality of second category keywords and corresponding animation materials;
[0144] The generating submodule is specifically used to generate the video file based on the picture materials corresponding to the first category of keywords and the animation materials corresponding to the second category of keywords.
[0145] B13. According to the device described in B9, the generation submodule is specifically used to: obtain user portrait information; and generate the video file based on the user portrait information and the material corresponding to the keyword.
[0146] B14. The device according to B8 further includes: a video playing module, configured to play the video file when a preset instruction is detected.
[0147] The present invention discloses C15, an electronic device, comprising a processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, which, when executed by the processor, enable the electronic device to perform the steps of any one of the methods described in A1-A7.
[0148] The present invention discloses D16, a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods described in A1-A7 when executed by a processor.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining log data of a target object, wherein the log data records historical behaviors of the target object within a preset time period; Based on the log data, generating a video file corresponding to the historical behavior; The step of generating a video file corresponding to the historical behavior based on the log data includes: Acquire a keyword in the log data, and search for a material corresponding to the keyword in a pre-stored material information library based on the keyword, wherein the material information library stores mapping information between a plurality of keywords and corresponding materials; Generate the video file according to the material corresponding to the keyword; The step of generating the video file according to the material corresponding to the keyword includes: Obtain user portrait information; The video file is generated based on the user portrait information and the material corresponding to the keyword.
2. The method according to claim 1, characterized in that: The obtaining of keywords in the log data includes: Based on the log data, generate a target text, wherein the target text is used to characterize the historical behavior of the target object within a preset time period; The keywords are obtained by performing word segmentation processing on the target text.
3. The method according to claim 2, characterized in that After generating the video file according to the material corresponding to the keyword, the method further includes: The target text is added to the video file so that the target text can be displayed synchronously during the playback of the video file.
4. The method according to claim 1, characterized in that: The material information library includes a picture information library and an animation information library, the material includes picture material and animation material, the keywords include first-category keywords and second-category keywords, the first-category keywords are used to search for picture material from the picture information library, and the second-category keywords are used to search for animation material from the animation information library, The searching for a material corresponding to the keyword in a pre-stored material information library based on the keyword includes: Based on the first category of keywords, searching the picture information library for picture materials corresponding to the first category of keywords, wherein the picture information library includes mapping relationship information between a plurality of first category of keywords and corresponding picture materials; searching the animation material corresponding to the second-category keyword in the animation information library based on the second-category keyword, wherein the animation information library includes mapping relationship information between a plurality of second-category keywords and corresponding animation materials; The step of generating the video file according to the material corresponding to the keyword includes: The video file is generated based on the picture materials corresponding to the first category of keywords and the animation materials corresponding to the second category of keywords.
5. The method according to claim 1, characterized in that After generating a video file corresponding to the historical behavior based on the log data, the method further includes: When the preset instruction is detected, the video file is played.
6. A data processing device, characterized in that: The device comprises: An acquisition module, used to acquire log data of a target object, wherein the log data records historical behaviors of the target object within a preset time period; A generation module, used to generate a video file corresponding to the historical behavior based on the log data; The generation module comprises: A material search submodule, used to obtain keywords in the log data, and search for materials corresponding to the keywords in a pre-stored material information library based on the keywords, wherein the material information library stores mapping information between multiple keywords and corresponding materials; A generating submodule, used to generate the video file according to the material corresponding to the keyword; The generation submodule is specifically used for: Obtain user portrait information; The video file is generated based on the user portrait information and the material corresponding to the keyword.
7. The device according to claim 6, characterized in that The material search submodule is specifically used for: Based on the log data, generate a target text, wherein the target text is used to characterize the historical behavior of the target object within a preset time period; The keywords are obtained by performing word segmentation processing on the target text.
8. The device according to claim 7, characterized in that Also includes: The adding module is used to add the target text to the video file so that the target text can be displayed synchronously during the playback of the video file.
9. The device according to claim 6, characterized in that The material information library includes a picture information library and an animation information library, the material includes picture material and animation material, the keywords include first-category keywords and second-category keywords, the first-category keywords are used to search for picture material from the picture information library, and the second-category keywords are used to search for animation material from the animation information library, The material search submodule is specifically used for: searching the picture material corresponding to the first category keyword in the picture information library based on the first category keyword, and searching the animation material corresponding to the second category keyword in the animation information library based on the second category keyword, wherein the picture information library includes mapping relationship information between a plurality of first category keywords and corresponding picture materials, and the animation information library includes mapping relationship information between a plurality of second category keywords and corresponding animation materials; The generating submodule is specifically used to generate the video file based on the picture materials corresponding to the first category of keywords and the animation materials corresponding to the second category of keywords.
10. The device according to claim 6, characterized in that Also includes: The video playing module is used to play the video file when a preset instruction is detected.
11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of the method according to any one of claims 1 to 5.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.
