CN115297102A - File export method, device and system - Google Patents

File export method, device and system Download PDF

Info

Publication number
CN115297102A
CN115297102A CN202210724137.6A CN202210724137A CN115297102A CN 115297102 A CN115297102 A CN 115297102A CN 202210724137 A CN202210724137 A CN 202210724137A CN 115297102 A CN115297102 A CN 115297102A
Authority
CN
China
Prior art keywords
file
export
stream
target
preset format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210724137.6A
Other languages
Chinese (zh)
Inventor
林雨洁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210724137.6A priority Critical patent/CN115297102A/en
Publication of CN115297102A publication Critical patent/CN115297102A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a file export method, a device and a system, which relate to the technical field of smart home/smart home, wherein the method comprises the following steps: sending a file export request of a target file to a data server; the file export request is determined based on file information of the target file; receiving a preset format file stream and response header information corresponding to the file export request sent by the data server; analyzing the preset format file stream, and determining an analysis result of the preset format file stream; and determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result. The method, the device and the system improve the safety of file export and improve the universality of file export.

Description

File export method, device and system
Technical Field
The application relates to the technical field of smart home/smart home, in particular to a file export method, device and system.
Background
With the popularization of the ToB (To business oriented) and ToC (To Consumer oriented) services, more and more network services need To export files for developers or clients To view.
The existing file export method only aims at a certain fixed type of file or a link of a directly exported file, is easy to intercept and acquire, and has relatively low safety and universality.
Disclosure of Invention
The application provides a file export method, a file export device and a file export system, which are used for solving the technical problems of low safety and poor universality of the existing file export method.
The application provides a file export method, which comprises the following steps:
sending a file export request of a target file to a data server; the file export request is determined based on file information of the target file;
receiving a preset format file stream and response header information corresponding to the file export request sent by the data server;
analyzing the preset format file stream, and determining an analysis result of the preset format file stream;
and determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result.
According to the file export method provided by the application, the preset format file stream is a binary file stream.
According to the file export method provided by the present application, the determining a file conversion result of the target file based on the parsing result of the preset format file stream and the response header information includes:
if the analysis result of the preset format file stream is normal, determining a file conversion result of the target file based on the preset format file stream and the response header information;
and if the analysis result of the preset format file stream is abnormal, determining that the file conversion result of the target file is abnormal, and generating export abnormal information of the target file.
According to the file export method provided by the present application, the determining a file conversion result of the target file based on the preset format file stream and the response header information includes:
determining an export file name and an export file type of the target file based on the response header information;
carrying out format conversion on the preset format file stream based on the file format corresponding to the exported file type, and determining the exported file content of the target file;
and determining a file conversion result of the target file based on the exported file name and the exported file content of the target file.
According to the file export method provided by the application, the sending of the file export request of the target file to the data server further comprises:
receiving file export request failure information sent by the data server;
wherein the file export request failure information is determined by the data server based on the query result of the target file.
The application provides a file export device, including:
a sending unit, configured to send a file export request of a target file to a data server; the file export request is determined based on file information of the target file;
a receiving unit, configured to receive a preset format file stream and response header information corresponding to the file export request sent by the data server;
the analysis unit is used for analyzing the preset format file stream and determining an analysis result of the preset format file stream;
and the exporting unit is used for determining the file conversion result of the target file and exporting the file conversion result based on the analysis result of the preset format file stream and the response header information.
The application provides a file export system, which comprises a client and a data server; the client comprises a human-computer interaction device and a file export device;
the human-computer interaction device is used for receiving file information of a target file input by a user, sending the file information to the file exporting device, receiving a file conversion result of the target file sent by the file exporting device, and displaying the file conversion result;
and the data server is in communication connection with the client and is used for storing the target file.
According to the file export system provided by the application, the data server is connected with the client based on a communication module;
the communication module comprises at least one of a local area network communication module, a 4G communication module and a 5G communication module.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the file export method.
The application provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the file export method when executing the program.
According to the file export method, the file export device and the file export system, a file export request of a target file is sent to a data server; the file export request is determined according to the file information of the target file; receiving a preset format file stream and response header information corresponding to a file export request sent by a data server; analyzing the preset format file stream, and determining an analysis result of the preset format file stream; the file conversion result of the target file is determined and the file conversion result is exported according to the analysis result of the preset format file stream and the response header information, and the export of the target file is not easy to intercept or acquire because the target file is transmitted by the preset format file stream in the file export process, so that the file export safety is improved, the file type of the target file is not limited, and the file export universality is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a file export method provided in the present application;
FIG. 2 is a second flowchart illustrating a file export method according to the present application;
FIG. 3 is a timing diagram illustrating a file export method according to the present application;
FIG. 4 is a schematic structural diagram of a file export apparatus provided in the present application;
FIG. 5 is a schematic diagram of a file export system provided in the present application;
FIG. 6 is a diagram illustrating a hardware environment of a file export method according to the present application;
fig. 7 is a schematic structural diagram of an electronic device provided in the present application.
Reference numerals:
601: a terminal device; 602: and (4) a server.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in this application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic flowchart of a file export method provided in the present application, and as shown in fig. 1, the method includes step 110, step 120, step 130, and step 140.
Step 110, sending a file export request of a target file to a data server; the file export request is determined based on the file information of the target file.
Specifically, an execution subject of the file export method provided by the embodiment of the present application may be a client in a file system. The File System may be a centralized File System or a Distributed File System (DFS). The client can run on a computer end and can also run on a mobile terminal. The file export method may be implemented in software, for example, may be written as a common component, invoked in a file export system.
The target file is a file that the user desires to export. For example, the target file may be text, pictures, tables, etc. that the user needs to view in the file export system. The file information is description information of the target file and may include a file name, file content, a storage link of the file in the file export system, a file type, and the like.
The data server is a server for storing the target file. The target file is stored in a data server in a certain data format. The file export request is a request for acquiring the file content of the target file, and may be determined according to the file information of the target file.
For example, a file export system includes a data server and a plurality of clients. The user can log in the file export system in a Web browser of the client, input the file information of the target file and initiate file export operation. The client generates a file export request of the target file according to the file information input by the user and sends the file export request to the data server.
And step 120, receiving a preset format file stream and response header information corresponding to the file export request sent by the data server.
Specifically, after receiving the file export request, the data server may parse the file export request to obtain the file information of the target file. And searching the target file in a database of the data server according to the file information.
If the target file is not stored in the data server, the file request fails. At this time, the data server may directly generate file export request failure information, send the file export request failure information to the client, and prompt the user.
If the target file is stored in the data server, the file request is successful. At this time, the data server may read the target file from the database, and generate a preset format file stream and response header information corresponding to the file export request.
The response header information is for a file describing the name, type, etc. of the target file.
A file stream is a stream that is input or output data to or from a computer using a file as a main object. The preset format file stream is obtained by converting the format of the file stream according to the preset data format. The preset format may include text, binary, and the like. Accordingly, the preset-format file stream may include a text file stream and a binary file stream. The text file stream stores the data in an ASCII code format, and the data reading is slow; the binary file stream stores data in a binary format, and the data is fast to read.
A preset format in which a file is transmitted in response to a file export request may be set in advance in the data server. For example, the preset format may be set to binary, and the data server generates a binary file stream of the target file after receiving the file export request.
The preset format of the transmission file may also be set in the file export request. And when the data server receives the file export request, processing the response data according to the preset format to obtain a preset format file stream.
And step 130, analyzing the file stream with the preset format, and determining an analysis result of the file stream with the preset format.
Specifically, after receiving a preset format file stream sent by the data server, the preset format file stream may be analyzed, and whether the file stream information sent by the data server is normal is determined according to an analysis result.
For example, the preset-format filestream is a Blob (Binary Large Object) data type. Reading a preset format file stream by constructing a new FileReader function, and performing JSON (JavaScript Object Notation) analysis on a read result. If the analyzed result is displayed as the common JSON object data, the preset format file stream is not the normal file stream information, and at the moment, the analyzed result of the preset format file stream can be determined to be abnormal. If the analyzed result is displayed as wrong JSON object data, the preset format file stream is normal file stream information, and at the moment, the analyzed result of the preset format file stream can be determined to be normal.
And 140, determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result.
Specifically, if the parsing result of the file stream in the preset format is normal, it indicates that the file stream in the preset format is normal file stream information. At this time, the client may analyze the response header information to obtain the file name and the file type of the target file. And then format conversion is carried out on the preset format file stream to obtain the file type determined in the response header information, so that the file conversion result of the target file is obtained, and the file conversion result is exported.
If the analysis result of the preset format file stream is abnormal, the target file is indicated to have a fault in the export process, and export abnormal information of the target file can be generated and sent to the client side to prompt a user.
The file export method provided by the embodiment of the application sends a file export request of a target file to a data server; the file export request is determined according to the file information of the target file; receiving a preset format file stream and response header information corresponding to a file export request sent by a data server; analyzing the preset format file stream, and determining an analysis result of the preset format file stream; the file conversion result of the target file is determined and the file conversion result is exported according to the analysis result and the response header information of the file stream with the preset format.
Based on the above embodiment, the file stream with the preset format is a binary file stream.
In particular, the binary file stream may be a stream that stores data in a Blob data type. The Blob data type stores any kind of binary data in the form of random access blocks; binary data typically consists of saved spreadsheets, program load modules, digitized voice patterns, and the like. The binary file stream stores the data in a binary format, so that the occupied storage capacity is small, and the data reading speed is high.
According to the file export method, the file stream with the preset format is set to be the binary file stream, the file export speed is increased, and the file export efficiency is improved.
Based on any of the above embodiments, step 130 includes:
if the analysis result of the preset format file stream is normal, determining a file conversion result of the target file based on the preset format file stream and the response header information;
and if the analysis result of the preset format file stream is abnormal, determining that the file conversion result of the target file is abnormal, and generating export abnormal information of the target file.
Specifically, if the parsing result of the preset-format file stream is normal, the file conversion result of the target file may be determined according to the preset-format file stream and the response header information. For example, a file stream in a preset format may be read by constructing a new Blob function, and a file conversion result of the target file may be created according to a file type described in the response header information after the reading. According to the file conversion result of the target file generated by the preset format file stream, the resource corresponding to the generated file link address may not have a file name, and at this time, a label can be created as the file name.
If the analysis result of the preset format file stream is abnormal, the file conversion result of the target file can be determined to be abnormal, at the moment, export abnormal information of the target file can be generated according to the information provided by the data server and sent to the client, and a user is prompted.
Based on any embodiment, determining a file conversion result of the target file based on the preset format file stream and the response header information includes:
determining an export file name and an export file type of the target file based on the response header information;
carrying out format conversion on the preset format file stream based on the file format corresponding to the exported file type, and determining the exported file content of the target file;
and determining a file conversion result of the target file based on the export file name and the export file content of the target file.
In particular, parsing the response header information (headers) may determine the export file name and the export file type of the target file. The file stream with the preset format can be subjected to format conversion according to the file format corresponding to the exported file type, so that the file stream information is converted from the preset format into the data format corresponding to the exported file type, and the exported file content of the target file is obtained.
The file conversion result of the target file can be generated by combining the export file name and the export file content of the target file.
Based on any of the above embodiments, step 110 further includes:
receiving file export request failure information sent by a data server;
wherein the file export request failure information is determined by the data server based on the query result of the target file.
Specifically, after receiving the file export request of the target file, the data server may analyze the file export request to obtain the file information of the target file. And then, inquiring in a database of the data server according to the file information. If the query result is null, the target file does not exist in the database of the data server, file export request failure information can be generated according to the query result and sent to the client, and the user is prompted.
Based on any of the above embodiments, fig. 2 is a second flowchart of the file export method provided by the present application, and as shown in fig. 2, the method is implemented by software codes and is written as a common component for application in the VUE. The VUE is an open source JavaScript framework for creating user interfaces, and is also a Web application framework for creating single-page applications. The method comprises the following steps:
step 210, a user inputs file information of a target file on a Web page of a client, the public component is called in the VUE, and the public component sends a file export request to a Server (data Server);
step 220, judging whether the file flow returned by the data server is normal by using the public component, if not, prompting abnormal information, and if so, entering the next step;
step 230, exporting the file stream;
step 240, recovering system resources after exporting the target file.
Fig. 3 is a timing diagram of the file export method provided in the present application, and as shown in fig. 3, a user initiates a file export operation at a web end of a client, the export operation is implemented by a common component encapsulated in a VUE, and specific logic is as follows:
(1) Axios in the browser sets a response type and calls a public component;
(2) Initiating a network request through a public component, and requesting network data from a Server side (data Server);
(3) The Server end can judge whether the data is correct according to the requested data. If the request is correct, generating correct file stream response information; if the request fails, generating a JSON object with the failed request;
(4) The public component reads the requested Blob information and performs subsequent conversion operation on the Blob information;
(5) Reading the Blob information through new FileReader (), and performing JSON analysis operation on the read result;
(6) And judging whether the analyzed object succeeds or not through the common component. If the analyzed object is common object data, the background conversion is failed, a text prompt of relevant failure information is made, and subsequent downloading operation cannot be carried out. If the analyzed object fails, the file flow information is normal, and the subsequent downloading operation is continued
(7) Reading successful headers information returned by a server end, and acquiring a file name and a file type;
(8) Reading the Blob information through new Blob (), creating a new label after reading the Blob information, using the new label as the name of a link resource of an export table, simulating a click event, and starting to transmit a file;
(9) Responding to the operation of exporting the form after clicking by the user;
(10) Recovering system resources;
(11) Elements are removed after the table is exported, and page memory consumption is reduced;
(12) The Blob object is released.
To this end, the common component implements a file export function.
The file export method provided by the embodiment of the application can uniformly package the whole method, is embodied in a component form and is applied to the VUE, so that the reusability and maintainability of codes are improved, and the code maintenance cost is reduced.
Based on any of the above embodiments, fig. 4 is a schematic structural diagram of a file exporting apparatus provided by the present application, as shown in fig. 4, the apparatus includes:
a sending unit 410, configured to send a file export request of a target file to a data server; the file export request is determined based on the file information of the target file;
a receiving unit 420, configured to receive a preset format file stream and response header information corresponding to a file export request sent by a data server;
the parsing unit 430 is configured to parse the preset format file stream, and determine a parsing result of the preset format file stream;
and an exporting unit 440, configured to determine a file conversion result of the target file based on the parsing result of the preset-format file stream and the response header information, and export the file conversion result.
In particular, the file exporting means may be embodied in the form of software, such as components and the like.
The sending unit may be configured to receive file information of a target file input by a user in a Web browser, generate a file export request, and send the file export request to the data server. The file information input by the user includes a file name, file contents, a storage link of the file in the file export system, a file type and the like.
After receiving the file export request, the data server may parse the file export request to obtain the file information of the target file. And searching the target file in a database of the data server according to the file information. If the target file is stored in the data server, the file request is successful. At this time, the data server may read the target file from the database, and generate the preset format file stream and the response header information corresponding to the file export request.
The receiving unit is used for receiving a preset format file stream and response header information corresponding to the file export request sent by the data server.
The analysis unit is used for analyzing the preset format file stream after receiving the preset format file stream sent by the data server, and determining an analysis result.
The analysis method can adopt JSON analysis. If the analyzed result is displayed as the common JSON object data, the preset format file stream is not the normal file stream information, and at the moment, the analyzed result of the preset format file stream can be determined to be abnormal. If the analyzed result is displayed as wrong JSON object data, the preset format file stream is normal file stream information, and at the moment, the analyzed result of the preset format file stream can be determined to be normal.
And the export unit is used for analyzing the response header information to obtain the file name and the file type of the target file. And then format conversion is carried out on the preset format file stream to obtain the file type determined in the response header information, so that the file conversion result of the target file is obtained, and the file conversion result is exported.
The file export device provided by the embodiment of the application sends a file export request of a target file to a data server; the file export request is determined according to the file information of the target file; receiving a preset format file stream and response header information corresponding to a file export request sent by a data server; analyzing the preset format file stream, and determining an analysis result of the preset format file stream; the file conversion result of the target file is determined according to the analysis result of the preset format file stream and the response header information, and the file conversion result is exported.
Based on any of the above embodiments, the file stream with the preset format is a binary file stream.
Based on any of the embodiments described above, the deriving unit is specifically configured to:
if the analysis result of the preset format file stream is normal, determining a file conversion result of the target file based on the preset format file stream and the response header information;
and if the analysis result of the preset format file stream is abnormal, determining that the file conversion result of the target file is abnormal, and generating export abnormal information of the target file.
Based on any of the embodiments, the deriving unit is further specifically configured to:
determining an export file name and an export file type of the target file based on the response header information;
carrying out format conversion on the preset format file stream based on the file format corresponding to the exported file type, and determining the exported file content of the target file;
and determining a file conversion result of the target file based on the export file name and the export file content of the target file, and exporting the file conversion result.
Based on any embodiment above, the apparatus further comprises:
the prompting unit is used for receiving file export request failure information sent by the data server;
wherein the file export request failure information is determined by the data server based on the query result of the target file.
Based on any of the above embodiments, fig. 5 is a schematic structural diagram of a file export system provided in the present application, and as shown in fig. 5, the system includes a client 510 and a data server 520; the client 510 includes a human-computer interaction device 511 and a file export device 512 in the above embodiments.
A human-computer interaction device 511, configured to receive file information of a target file input by a user, send the file information to the file export device 512, receive a file conversion result of the target file sent by the file export device 512, and display the file conversion result; and the data server 520 is in communication connection with the client 510 and is used for storing the target file.
Specifically, the human-computer interaction device 511 may be a touch display screen, and may also include a display, a keyboard, a mouse, and the like. The file export means 512 may be a hardware device to implement the file export method in the above embodiments.
The data server 520 and the client 510 may be connected through a communication module.
Based on any embodiment, the communication module comprises at least one of a local area network communication module, a 4G communication module and a 5G communication module.
In particular, if the file export system is a distributed file system, the data server 520 may be any one of a network of computers. The storage of the object file is no longer centrally stored in some central database but may be stored on any computer in the network.
The distributed file system disperses a large amount of data to different nodes for storage, thereby greatly reducing the risk of data loss. The distributed file system has redundancy, the failure of part of nodes does not affect the normal operation of the whole system, and even if the data stored in the failed computer is damaged, the damaged data can be recovered by other nodes.
When the file export method in the above embodiment is applied to a distributed file system, the file export security is further improved.
In addition, the data server 520 and the client 510 may be connected by a communication cable.
According to the file export system provided by the embodiment of the application, the target file is transmitted in the preset format file stream in the file export process, so that the export of the target file is not easy to intercept or acquire, the file export safety is improved, the file type of the target file is not limited, and the file export universality is improved.
Based on any of the above embodiments, the present application further provides a file export method. The file export method is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent Home (Intelligent House) ecology and the like. In this embodiment, fig. 6 is a schematic diagram of a hardware environment of a file export method provided in this application, and the file export method can be applied to a hardware environment formed by a terminal device 601 and a server 602 as shown in fig. 6. The server 602 is connected to the terminal device 601 through a network, and may be configured to provide services (such as application services) for the terminal or a client installed on the terminal, provide a database on the server or independent of the server, provide a data storage service for the server 602, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 602.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal device 601 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
Based on any of the above embodiments, fig. 7 is a schematic structural diagram of an electronic device provided in the present application, and as shown in fig. 7, the electronic device may include: a Processor (Processor) 710, a communication Interface (Communications Interface) 720, a Memory (Memory) 730, and a communication Bus (Communications Bus) 740, wherein the Processor 710, the communication Interface 720, and the Memory 730 communicate with each other via the communication Bus 740. Processor 710 may call logical commands in memory 730 to perform the following method:
sending a file export request of a target file to a data server; the file export request is determined based on the file information of the target file; receiving a preset format file stream and response header information corresponding to a file export request sent by a data server; analyzing the preset format file stream, and determining the analysis result of the preset format file stream; and determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result.
In addition, the logic commands in the memory 730 can be implemented in the form of software functional units and stored in a computer readable storage medium when the logic commands are sold or used as independent products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including commands for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
The processor in the electronic device provided in the embodiment of the present application may call a logic instruction in a memory to implement the method, and a specific implementation manner of the method is consistent with the implementation manner of the method, and may achieve the same beneficial effects, which are not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the methods provided by the foregoing embodiments when executed by a processor, for example:
sending a file export request of a target file to a data server; the file export request is determined based on the file information of the target file; receiving a preset format file stream and response header information corresponding to a file export request sent by a data server; analyzing the preset format file stream, and determining an analysis result of the preset format file stream; and determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result.
The specific implementation manner is the same as the implementation manner of the method, and the same beneficial effects can be achieved, which is not described herein again.
Embodiments of the present application provide a computer program product, which includes a computer program, and when executed by a processor, the computer program implements the method as described above, for example:
sending a file export request of a target file to a data server; the file export request is determined based on the file information of the target file; receiving a preset format file stream and response header information corresponding to a file export request sent by a data server; analyzing the preset format file stream, and determining an analysis result of the preset format file stream; and determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method of file export, comprising:
sending a file export request of a target file to a data server; the file export request is determined based on file information of the target file;
receiving a preset format file stream and response header information corresponding to the file export request sent by the data server;
analyzing the preset format file stream, and determining an analysis result of the preset format file stream;
and determining a file conversion result of the target file based on the analysis result of the preset format file stream and the response header information, and exporting the file conversion result.
2. The file export method according to claim 1, wherein said determining a file conversion result of the target file based on the parsing result of the preset-format file stream and the response header information comprises:
if the analysis result of the preset format file stream is normal, determining a file conversion result of the target file based on the preset format file stream and the response header information;
and if the analysis result of the preset format file stream is abnormal, determining that the file conversion result of the target file is abnormal, and generating export abnormal information of the target file.
3. The file export method of claim 2, wherein the determining the file conversion result of the target file based on the preset-format file stream and the response header information comprises:
determining an export file name and an export file type of the target file based on the response header information;
carrying out format conversion on the preset format file stream based on the file format corresponding to the exported file type, and determining the exported file content of the target file;
and determining a file conversion result of the target file based on the exported file name and the exported file content of the target file.
4. The file export method of any one of claims 1 to 3, wherein said sending a file export request of the target file to the data server, thereafter further comprises:
receiving file export request failure information sent by the data server;
wherein the file export request failure information is determined by the data server based on the query result of the target file.
5. The file export method according to any one of claims 1 to 3, wherein said file stream of predetermined format is a binary file stream.
6. A file export apparatus, comprising:
the sending unit is used for sending a file export request of the target file to the data server; the file export request is determined based on file information of the target file;
a receiving unit, configured to receive a preset format file stream and response header information corresponding to the file export request sent by the data server;
the analysis unit is used for analyzing the preset format file stream and determining an analysis result of the preset format file stream;
and the exporting unit is used for determining the file conversion result of the target file and exporting the file conversion result based on the analysis result of the preset format file stream and the response header information.
7. A file export system is characterized by comprising a client and a data server; the client comprises a human-computer interaction device and a file export device according to claim 6;
the human-computer interaction device is used for receiving file information of a target file input by a user, sending the file information to the file exporting device, receiving a file conversion result of the target file sent by the file exporting device, and displaying the file conversion result;
and the data server is in communication connection with the client and is used for storing the target file.
8. The file export system of claim 7, wherein the data server is connected to the client based communication module;
the communication module comprises at least one of a local area network communication module, a 4G communication module and a 5G communication module.
9. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing a file export method according to any one of claims 1 to 5.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the file export method according to any of claims 1 to 5 when executing the program.
CN202210724137.6A 2022-06-23 2022-06-23 File export method, device and system Pending CN115297102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210724137.6A CN115297102A (en) 2022-06-23 2022-06-23 File export method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210724137.6A CN115297102A (en) 2022-06-23 2022-06-23 File export method, device and system

Publications (1)

Publication Number Publication Date
CN115297102A true CN115297102A (en) 2022-11-04

Family

ID=83820488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210724137.6A Pending CN115297102A (en) 2022-06-23 2022-06-23 File export method, device and system

Country Status (1)

Country Link
CN (1) CN115297102A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147706A (en) * 2017-04-26 2017-09-08 努比亚技术有限公司 Data export method and device
CN111143462A (en) * 2019-12-31 2020-05-12 广州酷旅旅行社有限公司 Data export method and device, computer equipment and storage medium
CN111865881A (en) * 2019-04-30 2020-10-30 北京数聚鑫云信息技术有限公司 Interface conversion method, device, medium and computer equipment
CN113297153A (en) * 2021-06-18 2021-08-24 中国农业银行股份有限公司 Data export method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147706A (en) * 2017-04-26 2017-09-08 努比亚技术有限公司 Data export method and device
CN111865881A (en) * 2019-04-30 2020-10-30 北京数聚鑫云信息技术有限公司 Interface conversion method, device, medium and computer equipment
CN111143462A (en) * 2019-12-31 2020-05-12 广州酷旅旅行社有限公司 Data export method and device, computer equipment and storage medium
CN113297153A (en) * 2021-06-18 2021-08-24 中国农业银行股份有限公司 Data export method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2018126964A1 (en) Task execution method and apparatus and server
CN113259430B (en) Message calling method and device, electronic equipment and storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN112437047A (en) Remote server management method, system and related device
CN101894059A (en) Method and system for detecting operating condition
CN116048467A (en) Micro-service development platform and business system development method
CN116523457A (en) Workflow processing method, device, equipment and storage medium based on business process
CN116974948B (en) Service system testing method, system, equipment and medium
CN113205320A (en) Service processing method and device, electronic equipment and computer readable medium
CN103561113B (en) The generation method and device of Web Service interface
CN100359865C (en) Detecting method
CN115221033A (en) Interface protocol testing method and device, computer readable medium and electronic equipment
CN115297102A (en) File export method, device and system
CN115410580A (en) Voice recognition method, device, equipment and medium for command scheduling system
CN102594587B (en) Embedded WEB debugging and testing maintenance method and debugging and testing maintenance system
CN112667660B (en) Enterprise internal information system data leakage identification method based on complex event identification
CN116033006A (en) Data processing method, system, storage medium and electronic device
CN109981738B (en) Cloud server suitable for application of narrow-band Internet of things
CN108076067B (en) Method and system for authorized crawler configuration simulation login
CN113973139A (en) Message processing method and device
CN112433752A (en) Page parsing method, device, medium and electronic equipment
CN108429741B (en) Method and system for realizing NCSI protocol
CN112333262A (en) Data updating prompting method and device, computer equipment and readable storage medium
CN115174296B (en) Equipment function access method and device, storage medium and electronic device
CN115774573B (en) Application integration method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination