Task execution method, device, storage medium and electronic device
By identifying and converting the format of the design source file and generating preview files, the problem that the design source file cannot be previewed online is solved, and efficient data asset management is achieved.
Patent Information
- Application Number
- CN202411615764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-11-12
AI Technical Summary
In the prior art, design source files such as PSD, UE editor files, 3D models, font files, audio and video files cannot be previewed online in the data asset management system due to the special file format, resulting in frequent downloads to local areas and viewing, which reduces work efficiency.
By obtaining the target data file, identifying its file type, and using matching format conversion tools to convert, generate preview files, support online preview, and reduce download frequency.
It improves the efficiency of users accessing data assets, improves user experience and work efficiency, and reduces the number of downloads of design source files.
Smart Images

Figure CN119576885B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a task execution method, device, storage medium, and electronic device. Background Art
[0002] At present, data asset management systems have been widely used in many fields. Through the data asset management system, users can be provided with basic functions such as file storage, classification and retrieval, so as to systematically manage and store various types of data assets, thereby improving the efficiency of data asset utilization and helping enterprises to efficiently manage large amounts of digital assets.
[0003] However, since design source file digital assets such as PSD, UE editor files, 3D models, font files, audio and video files often have special file formats, when managing these digital assets, specific professional software is required to open these digital asset files for browsing, which forces users to frequently download files to the local computer for viewing, thereby reducing user work efficiency.
[0004] Therefore, how to improve the management efficiency of data assets is an urgent problem to be solved. Summary of the Invention
[0005] This specification provides a task execution method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a task execution method, including:
[0008] Acquiring a target data file, wherein the target data file includes at least one of an image data file that requires specific software to browse, an audio data file that requires specific software to play, and a video data file that requires specific software to browse;
[0009] Identifying the target data file to determine a file type corresponding to the target data file, and determining, based on the file type, a format conversion tool that matches the file type from among various preset format conversion tools as a target conversion tool;
[0010] Convert the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file;
[0011] The preview file is presented to the user so that the task is executed according to the management operation performed by the user on the preview file.
[0012] Optionally, the step of obtaining the target data file specifically includes:
[0013] In response to the start request, presenting a preset user interface to the user;
[0014] According to the upload operation performed by the user on the user interface, a file uploaded by the user is determined as a target data file.
[0015] Optionally, the step of identifying the target data file to determine the file type corresponding to the target data file specifically includes:
[0016] For each preset file type identification strategy, the target data file is identified according to the file type identification strategy to obtain a candidate identification result, wherein the file type identification strategy includes: at least one of a first file type identification strategy, a second file type identification strategy, and a third file type identification strategy, the first file type identification strategy being used to identify the target data file according to a file signature contained in the target data file, the second file type identification strategy being used to identify the target data file according to a specified field in a download link corresponding to the target data file, and the third file type identification strategy being used to identify the target data file according to a file extension of the target data file;
[0017] According to each candidate recognition result, the file type corresponding to the target data file is determined.
[0018] Optionally, the step of identifying the target data file to determine the file type corresponding to the target data file specifically includes:
[0019] When it is determined that the target data file contains multiple types of data, performing content parsing on the target data file to split the target data file into sub-data files corresponding to different types of data;
[0020] Identify each sub-data file to determine the file type corresponding to each sub-data file;
[0021] The step of converting the file type of the target data file according to the format conversion tool to obtain a preview file corresponding to the target data file specifically includes:
[0022] For each sub-data file, convert the sub-data file according to the format conversion tool to obtain a sub-preview file corresponding to the sub-data file;
[0023] According to each sub-preview file, a preview file corresponding to the target data file is obtained.
[0024] Optionally, the step of converting the file type of the target data file according to the format conversion tool to obtain a preview file corresponding to the target data file specifically includes:
[0025] Parsing the target data file to generate a thumbnail preview image corresponding to the target data file;
[0026] The thumbnail preview image is displayed to the user, and after the thumbnail preview image is displayed to the user, the file type of the target data file is converted according to the format conversion tool to obtain a preview file corresponding to the target data file.
[0027] Optionally, before the step of presenting the preview file to the user, the method further includes:
[0028] Get the user's permission information;
[0029] Performing permission verification on the user according to the permission information to obtain a verification result, wherein the verification result is used to indicate whether the user has browsing permission to view the preview file;
[0030] The step of presenting the preview file to the user specifically includes:
[0031] If it is determined according to the verification result that the user has the browsing authority to view the preview file, the preview file is displayed to the user.
[0032] Optionally, before the step of converting the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file, the method further includes:
[0033] Acquire format conversion configuration information input by the user in a preset user interface, where the format conversion configuration information is used to reflect the type of preview file required by the user;
[0034] The step of converting the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file specifically includes:
[0035] Converting the target data file type using the target conversion tool to obtain an initial preview file corresponding to the target data file;
[0036] The initial preview file is parsed according to the format conversion configuration information, and the type of the initial preview file is converted into the type of the preview file required by the user according to the parsing result to obtain a preview file.
[0037] This specification provides a task execution device, including:
[0038] an acquisition module, configured to acquire a target data file, wherein the target data file includes at least one of an image data file that requires specific software to browse, an audio data file that requires specific software to play, and a video data file that requires specific software to browse;
[0039] an identification module for identifying the target data file to determine the file type corresponding to the target data file, and, based on the file type, determining a format conversion tool that matches the file type from among various preset format conversion tools as a target conversion tool;
[0040] a conversion module, configured to convert the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file;
[0041] The execution module is used to display the preview file to the user so as to execute the task according to the management operation performed by the user on the preview file.
[0042] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0043] In the task execution method provided in this specification, a target data file is obtained, wherein the obtained target data file includes at least one of an image data file that requires specific software to browse, an audio data file that requires specific software to play, and a video data file that requires specific software to browse. The target data file is then identified to determine the file type corresponding to the target data file, and based on the file type, a format conversion tool that matches the file type is determined from preset format conversion tools as the target conversion tool. According to the target conversion tool, the file type of the target data file is converted to obtain a preview file corresponding to the target data file, and the preview file is displayed to the user so that the task is executed according to the management operation performed by the user on the preview file.
[0044] As can be seen from the above method, the server can support online preview of multiple design source files through file format recognition and conversion functions, thereby improving the efficiency of users' access to data assets and reducing the frequency of users downloading design source files, thereby improving user experience and work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0046] Figure 1 A flowchart of a task execution method provided in this manual;
[0047] Figure 2 A schematic diagram of the overall process of the task execution method provided in this specification;
[0048] Figure 3 A schematic diagram of a task execution device provided in this specification;
[0049] Figure 4 This manual provides a corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0050] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.
[0051] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0052] Currently, when users design digital assets such as PSD, UE editor files, 3D models, font files, audio and video files, they usually need to first create an initial design source file. Then, based on the initial design source file, they can repeatedly modify and improve it to obtain the final design source file.
[0053] For example, a user may upload an initial design source file to a preset data asset management system to display the initial design source file to a designated user for browsing, to obtain the designated user's modification suggestions for the initial design source file, and to update the initial design source file according to the designated user's modification suggestions for the initial design source file.
[0054] During this process, users usually need to repeatedly open and browse the initial design source files. At this time, initial design source files with special file formats cannot be previewed online in the data resource management system. Instead, users and / or designated users are required to download the initial design source files to a local computer and use professional software to view them, which reduces user work efficiency.
[0055] Figure 1 This is a flowchart of a task execution method provided in this specification, which includes the following steps:
[0056] S101: Acquire a target data file, where the target data file refers to at least one of an image data file that requires specific software to browse, an audio data file that requires specific software to play, and a video data file that requires specific software to browse.
[0057] In this specification, the business platform can display a preset user interface to the user in response to a startup request, so that the user can upload the design source file to the business platform through the user interface to manage the design source file through the business platform.
[0058] Specifically, the business platform may determine the file uploaded by the user as the target data file based on the upload operation performed by the user on the user interface, and then may display the target data file to the user in an online preview manner in response to a preview request sent by the user.
[0059] The startup request can be sent to the service platform by the user's terminal device based on the user's touch operation on the designated application. The designated application can be provided by the service platform and pre-installed on the user's terminal device. The designated application can be of various types, such as client applications (Applications, Apps), web applications, etc.
[0060] The above-mentioned target data files can be determined according to the actual task scenario, for example: image data files that require specific software to browse (such as: PSD type source files used for designing graphic graphics, INDD type type layout design source files used for designing books and magazines, AI type source files used for designing vector graphics, blend type 3D source files obtained by 3D modeling, HTML type basic code source files used for web design, etc.), audio data files that require specific software to play (such as: Logic Pro source files containing audio tracks, editing information, plug-in settings, etc.), video data files that require specific software to browse (such as: FLV type source files used for network video streaming transmission, etc.), font files that require specific software traffic at least one.
[0061] In this specification, the execution subject used to implement the task execution method can refer to a designated device such as a server set up on the business platform, or it can refer to a terminal device such as a desktop computer or a laptop computer. For the sake of convenience of description, the task execution method provided in this specification is explained below using the server as the execution subject as an example.
[0062] It should be noted that an asset data management system may be deployed in the above-mentioned server, so that the server can receive target data files uploaded by users through the asset data management system and manage the target data files uploaded by users.
[0063] S102: Identify the target data file to determine the file type corresponding to the target data file, and determine, based on the file type, a format conversion tool that matches the file type from preset format conversion tools as a target conversion tool.
[0064] In this specification, after obtaining the target data file, the server can identify the target data file according to each preset file type identification strategy, and obtain the candidate identification result corresponding to the file type identification strategy, and then determine the file type corresponding to the target data file based on each candidate identification result. The candidate identification result here can be the file type corresponding to the target data file determined according to the file type identification strategy.
[0065] Among them, the above-mentioned preset file type identification strategies include: at least one of a first file type identification strategy, a second file type identification strategy, and a third file type identification strategy. Here, the first file type identification strategy is used to identify the target data file based on the file signature contained in the target data file, the second file type identification strategy is used to identify the target data file based on the specified field in the download link corresponding to the target data file, and the third file type identification strategy is used to identify the target data file based on the file extension of the target data file.
[0066] In the above content, there may be multiple methods for the server to determine the file type corresponding to the target data file based on each candidate recognition result. For example, the server can determine, for each candidate recognition result, whether the total number of other candidate recognition results that are consistent with the candidate recognition result exceeds a preset threshold. If so, the server can determine the file type corresponding to the target data file based on the candidate recognition result.
[0067] Furthermore, after determining the file type corresponding to the target data file, the server may determine a format conversion tool that matches the file type from among various preset format conversion tools according to the file type corresponding to the target data file as the target conversion tool.
[0068] The above-mentioned format conversion tools can be set according to actual application scenarios, including: ImageMagick image conversion tool for converting different types of image data into JPEG type that supports online preview, FastForward Mpeg (FFmpeg) fast audio and video conversion tool for converting different types of audio data into FF mpeg type that supports online preview, etc. This manual does not limit this.
[0069] S103: Convert the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file.
[0070] Furthermore, after determining the target conversion tool, the server can use the target conversion tool to convert the file type of the target data file into a designated type corresponding to the file type of the target data file and supporting online preview, so as to obtain a preview file corresponding to the target data file.
[0071] In addition, users can also enter format conversion configuration information in the preset user interface according to actual needs to configure the file type of the required preview file, so that the server can convert the file type of the target data file through the format conversion tool according to the file type configured by the user.
[0072] It should be noted that the above-mentioned user configuration of the file type of the required preview file can be divided into two situations. The first situation is that for a type of target data file, there may be multiple designated types that support online preview and match the target data file of this type. In this case, the user can configure the file type of the required preview file to select a designated type from the designated types that support online preview and match the target data file of this type as the target designated type, so that the server can convert the file type of the target data file into the target designated type.
[0073] For example: if the target data file is PSD type image data, the specified types that support online preview and match the target data file can be JPEG type and PNG type that support online preview. At this time, the user can enter the format conversion configuration information in the preset user interface to set the PNG type as the target specified type, so that the server can convert the PSD type image data into PNG type.
[0074] The second situation is that the user configures the file type of the required preview file to set a specified type as the target specified type, so that the server converts the target data file or at least part of the content in the target data file into the target specified type to obtain a preview file and display the preview file to the user.
[0075] At this time, the server can convert the file type of the target data file according to the target conversion tool to obtain the initial preview file corresponding to the target data file, and then parse the content of the initial preview file according to the format conversion configuration information, and convert the type of the initial preview file into the type of preview file required by the user according to the parsing result to obtain the preview file.
[0076] For example, when the target data file is a PSD-type image data file, the user can configure the file type of the required preview file to set the txt type as the target specified type, and then the server can convert the PSD-type target data file into a JPEG-type image according to the target conversion tool, as the initial preview file of the text-type target data file, and then perform content parsing on the initial preview file to extract the text content contained in the JPEG-type initial preview file as the parsing result, and generate a txt-type file based on the extracted text content as the preview file corresponding to the target data file.
[0077] Another example: when the target data file is an FLV type video data file, the user can configure the file type of the required preview file to set the JPEG type as the target specified type, so that the server can convert the FLV type target data file into an MP4 type video data file that supports online preview as the initial preview file, and then perform content parsing on the MP4 type video data file to obtain each frame of image data contained in the MP4 type video data file, and then use each frame of image data contained in the MP4 type video data file as the preview file corresponding to the target data file.
[0078] In actual application scenarios, the target data file mentioned above may contain multiple types of data. For example, the document data uploaded by the user contains both text data and image data. Another example is that the target data file uploaded by the user is virtual reality (VR) application data or augmented reality (AR) application data. VR application data or AR application data usually contains multiple types of data such as video data (such as 360-degree panoramic video), audio data (such as ambient sound effects), and image data (such as static scene graphs).
[0079] For another example, the target data file uploaded by the user is a folder containing multiple types of data, or a compressed package containing multiple types of data.
[0080] Based on this, the server can also perform content parsing on the target data file when determining that the target data file contains multiple types of data, so as to split the target data file into sub-data files corresponding to different types of data, so as to identify each sub-data file to determine the file type corresponding to each sub-data file, and then, for each sub-data file, according to a format conversion tool that matches the file type of the sub-data file, convert the file type of the sub-data file to obtain a sub-preview file corresponding to the sub-data file, and then, according to each sub-preview file, obtain a preview file corresponding to the target data file.
[0081] In addition, the server can also parse the content of the target data file before converting it to generate a thumbnail preview image corresponding to the target data file, and then display the thumbnail preview image corresponding to the target data file to the user for browsing while the server is converting the target data file.
[0082] For different types of target data files, the thumbnail preview images are different.
[0083] For example, for a target data file of text type, the thumbnail preview image may be an image containing the first page of text in the target data file.
[0084] For another example, for a target data file of the video type, the thumbnail preview image may be the first frame of the target data file.
[0085] For another example, for an audio-type target data file, the thumbnail preview image may be an amplitude image that reflects the temporal characteristics of the audio signal in the target data file.
[0086] For another example, for a 3D target data file, the thumbnail preview image may be a view of a three-dimensional model corresponding to the target data file at any viewing angle.
[0087] S104: Display the preview file to the user so that the task is executed according to the management operation performed by the user on the preview file.
[0088] In this specification, the server can display the preview file corresponding to the target data file to the user or other users in an online preview manner, so that the user or other users can perform management operations on the preview file based on the preview effect of the preview file, and then determine the management instructions for the preview file based on the management operations performed by the user or other users, and perform tasks according to the management instructions.
[0089] The above management operations can be set according to actual needs, such as updating the preview file, deleting the preview file, etc.
[0090] In addition, the user or other users can also perform management operations on the target data file based on the preview effect of the preview file, so that the server can determine the management instructions for the target data file based on the management operations performed by the user or other users, and perform tasks according to the management instructions.
[0091] It should be noted that before displaying the preview file to the user or other users, the server can also use the user or other users who need to browse the preview file as the target user, and then obtain the target user's permission information, and then perform permission verification on the target user based on the target user's permission information to obtain a verification result. If it is determined according to the verification result that the target user has the browsing permission to view the preview file, the preview file will be displayed to the target user.
[0092] The above verification result is used to indicate whether the target user has the browsing permission to view the preview file.
[0093] For ease of understanding, the overall process of the above task execution method is described in detail below. Figure 2 shown.
[0094] Figure 2 This is a schematic diagram of the overall process of the task execution method provided in this specification.
[0095] Combine Figure 2 It can be seen that the server can receive the file uploaded by the user as the target data file, and then store the target data file in a designated storage location and generate a file identifier. Then, in response to the user's preview request for the target data file, the server can identify and convert the file type of the target data file, thereby obtaining a preview file corresponding to the target data file. Then, after determining the user's permission information, the server can display the preview file to the user, and can perform tasks based on the management operations performed by the user on the preview file.
[0096] From the above content, it can be seen that the server can support online preview of multiple design source files through file format recognition and conversion functions, thereby improving the efficiency of user access to data assets and reducing the frequency of users downloading design source files, thereby improving user experience and work efficiency.
[0097] The above are one or more implementation task execution methods of this specification. Based on the same idea, this specification also provides corresponding task execution devices, such as Figure 3 shown.
[0098] Figure 3 A schematic diagram of a task execution device provided in this specification includes:
[0099] An acquisition module 301 is configured to acquire a target data file, wherein the target data file includes at least one of an image data file that requires specific software to browse, an audio data file that requires specific software to play, and a video data file that requires specific software to browse;
[0100] an identification module 302 for identifying the target data file to determine the file type corresponding to the target data file, and, based on the file type, determining a format conversion tool that matches the file type from among various preset format conversion tools as a target conversion tool;
[0101] The conversion module 303 is configured to convert the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file;
[0102] The execution module 304 is configured to display the preview file to the user so as to execute the task according to the management operation performed by the user on the preview file.
[0103] Optionally, the acquisition module 301 is specifically configured to, in response to a start request, display a preset user interface to the user; and determine, based on an upload operation performed by the user on the user interface, a file uploaded by the user as the target data file.
[0104] Optionally, the identification module 302 is specifically used to identify the target data file according to each preset file type identification strategy to obtain a candidate identification result, wherein the file type identification strategy includes: at least one of a first file type identification strategy, a second file type identification strategy, and a third file type identification strategy, the first file type identification strategy is used to identify the target data file according to the file signature contained in the target data file, the second file type identification strategy is used to identify the target data file according to a specified field in the download link corresponding to the target data file, and the third file type identification strategy is used to identify the target data file according to the file extension of the target data file; and according to each candidate identification result, determine the file type corresponding to the target data file.
[0105] Optionally, the identification module 302 is specifically configured to, when it is determined that the target data file contains multiple types of data, perform content parsing on the target data file to split the target data file into sub-data files corresponding to different types of data; and identify each sub-data file to determine the file type corresponding to each sub-data file;
[0106] The conversion module 303 is specifically configured to convert each sub-data file according to the format conversion tool to obtain a sub-preview file corresponding to the sub-data file; and obtain a preview file corresponding to the target data file according to each sub-preview file.
[0107] Optionally, the conversion module 303 is specifically used to perform content analysis on the target data file to generate a thumbnail preview image corresponding to the target data file; display the thumbnail preview image to the user, and after displaying the thumbnail preview image to the user, convert the file type of the target data file according to the format conversion tool to obtain a preview file corresponding to the target data file.
[0108] Optionally, the acquisition module 301 is specifically configured to acquire permission information of a user; perform permission verification on the user according to the permission information to obtain a verification result, wherein the verification result is used to indicate whether the user has browsing permission to view the preview file;
[0109] The execution module 304 is specifically configured to display the preview file to the user if it is determined according to the verification result that the user has the browsing authority to view the preview file.
[0110] Optionally, the acquisition module 301 is specifically configured to acquire format conversion configuration information input by a user in a preset user interface, where the format conversion configuration information is used to reflect the type of preview file required by the user;
[0111] The conversion module 303 is specifically configured to convert the file type of the target data file according to the target conversion tool to obtain an initial preview file corresponding to the target data file; parse the content of the initial preview file according to the format conversion configuration information, and convert the type of the initial preview file into the type of the preview file required by the user according to the parsing result to obtain the preview file.
[0112] This specification also provides a computer-readable storage medium, which stores a computer program that can be used to execute the above Figure 1 Provides a task execution method.
[0113] This manual also provides Figure 4 The one shown corresponds to Figure 1 Schematic diagram of the electronic equipment. Figure 4 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0114] Improvements to a technology can be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with technological advancements, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always program the improved process flow into the hardware circuit to obtain the corresponding hardware circuit structure. Therefore, it cannot be said that a process flow improvement cannot be implemented using a hardware module. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0115] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0116] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0117] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0118] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0122] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0123] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0124] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0125] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0126] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0128] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0129] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A task execution method, characterized in that: include: Get the target data file; Identifying the target data file to determine a file type corresponding to the target data file, including: identifying the target data file according to each preset file type identification strategy according to the file type identification strategy to obtain candidate identification results, and determining the file type corresponding to the target data file based on each candidate identification result; wherein each file type identification strategy is used to identify the target data file based on one of a file signature of the target data file, a specified field in a download link corresponding to the target data file, and a file extension of the target data file; According to the file type, determining a format conversion tool that matches the file type from various preset format conversion tools as a target conversion tool; Convert the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file; The preview file is presented to the user so that the task is executed according to the management operation performed by the user on the preview file.
2. The method according to claim 1, wherein The step of obtaining the target data file specifically includes: In response to the start request, presenting a preset user interface to the user; According to the upload operation performed by the user on the user interface, a file uploaded by the user is determined as a target data file.
3. The method according to claim 1, wherein The target data file includes at least one of an image data file that needs to be browsed by specific software, an audio data file that needs to be played by specific software, and a video data file that needs to be browsed by specific software.
4. The method according to claim 1, wherein The step of identifying the target data file to determine the file type corresponding to the target data file specifically includes: When it is determined that the target data file contains multiple types of data, performing content parsing on the target data file to split the target data file into sub-data files corresponding to different types of data; Identify each sub-data file to determine the file type corresponding to each sub-data file; The step of converting the file type of the target data file according to the format conversion tool to obtain a preview file corresponding to the target data file specifically includes: For each sub-data file, convert the sub-data file according to the format conversion tool to obtain a sub-preview file corresponding to the sub-data file; According to each sub-preview file, a preview file corresponding to the target data file is obtained.
5. The method according to claim 1, wherein The step of converting the file type of the target data file according to the format conversion tool to obtain a preview file corresponding to the target data file specifically includes: Parsing the target data file to generate a thumbnail preview image corresponding to the target data file; The thumbnail preview image is displayed to the user, and after the thumbnail preview image is displayed to the user, the file type of the target data file is converted according to the format conversion tool to obtain a preview file corresponding to the target data file.
6. The method according to claim 1, wherein Before the step of presenting the preview file to the user, the method further includes: Get the user's permission information; Performing permission verification on the user according to the permission information to obtain a verification result, wherein the verification result is used to indicate whether the user has browsing permission to view the preview file; The step of presenting the preview file to the user specifically includes: If it is determined according to the verification result that the user has the browsing authority to view the preview file, the preview file is displayed to the user.
7. The method according to claim 1, wherein Before the step of converting the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file, the method further includes: Acquire format conversion configuration information input by the user in a preset user interface, where the format conversion configuration information is used to reflect the type of preview file required by the user; The step of converting the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file specifically includes: Converting the target data file type using the target conversion tool to obtain an initial preview file corresponding to the target data file; The initial preview file is parsed according to the format conversion configuration information, and the type of the initial preview file is converted into the type of the preview file required by the user according to the parsing result to obtain a preview file.
8. A task execution device, characterized in that: include: Acquisition module, used to obtain target data files; an identification module, configured to identify the target data file to determine the file type corresponding to the target data file, comprising: identifying the target data file according to each preset file type identification strategy according to the file type identification strategy to obtain candidate identification results, and determining the file type corresponding to the target data file based on each candidate identification result; wherein each file type identification strategy is configured to identify the target data file based on a file signature of the target data file, a specified field in a download link corresponding to the target data file, and a file extension of the target data file; and determining, based on the file type, a format conversion tool that matches the file type from among various preset format conversion tools as the target conversion tool; a conversion module, configured to convert the file type of the target data file according to the target conversion tool to obtain a preview file corresponding to the target data file; The execution module is used to display the preview file to the user so as to execute the task according to the management operation performed by the user on the preview file.
9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
A file preview method, apparatus and storage medium
CN110582764A