CN115174555A - File transmission method and device, electronic equipment and storage medium - Google Patents

File transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115174555A
CN115174555A CN202210753075.1A CN202210753075A CN115174555A CN 115174555 A CN115174555 A CN 115174555A CN 202210753075 A CN202210753075 A CN 202210753075A CN 115174555 A CN115174555 A CN 115174555A
Authority
CN
China
Prior art keywords
file
screening
data
transmitted
transmission
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
CN202210753075.1A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210753075.1A priority Critical patent/CN115174555A/en
Publication of CN115174555A publication Critical patent/CN115174555A/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]

Abstract

The invention relates to a data processing technology, and discloses a file transmission method, which comprises the following steps: receiving a trigger instruction of a file transmission task corresponding to a target server; acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction; extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data; packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted; and acquiring a file transmission address of the target server, and transmitting the file to be transmitted to the target server according to the transmission address. The invention also relates to a block chain technology, and the target data can be stored in block chain nodes. The invention also provides a file transmission device, equipment and a medium. The invention can improve the efficiency of file transmission.

Description

File transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to data processing technologies, and in particular, to a file transmission method and apparatus, an electronic device, and a storage medium.
Background
In the internet era, different systems cooperate with each other, and many services or functions are connected in a file form. The same company may correspond to a plurality of different companies, and the related services may be similar or different. If every business company is accessed, a great amount of resources and cost are invested to carry out a great amount of docking and system construction work, which is also a great waste for the company.
For example, in the loan industry, a plurality of partners cooperate together to offer loans to common people, the partners for docking may be banks, cash-consuming companies, security companies, etc., and the main docking manner is a document, so that a response document needs to be sent to a target server of the dockee.
However, the current file transmission method packages all data docked with the dockee into files and sends the files to the corresponding dockee target server, and the file transmission efficiency is low.
Disclosure of Invention
The invention provides a file transmission method, a file transmission device, electronic equipment and a storage medium, and mainly aims to improve the efficiency of file transmission.
Receiving a trigger instruction of a file transmission task corresponding to a target server;
acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction;
extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
and acquiring a file transmission address of the target server, and transmitting the file to be transmitted to the target server according to the transmission address.
Optionally, the field screening based on time information is performed on the data in the preset database according to the screening field and the screening time to obtain target data, and the method includes:
acquiring the receiving time of the trigger instruction;
constructing a time interval according to the receiving time and the screening time;
and screening the data in the database by taking the screening fields and the time interval as screening conditions to obtain target data corresponding to each screening field.
Optionally, the screening the data in the database by using the screening fields and the time interval as screening conditions to obtain target data corresponding to each screening field includes:
constructing a query statement by using an SQL language, the screening field and the time interval;
and executing the query statement to query the data corresponding to the screening field in the database within the time interval of the data writing time to obtain the target data.
Optionally, the encapsulating the target data into a preset file format according to the data encapsulation rule to obtain a file to be transmitted includes:
and extracting a file template in the data packaging rule, wherein the file template is a template file with a preset file format.
Extracting fields to be filled in the file template;
determining a field to be filled corresponding to each screening field according to a preset mapping relation between the field to be filled and the screening fields;
and replacing the target data corresponding to each screening field with the data of the field to be filled corresponding to the screening field in the file template to obtain the file to be transmitted.
Optionally, the transmitting the file to be transmitted to the target server according to the transmission address includes:
sequentially segmenting the files to be transmitted to obtain a segmented file set;
constructing a fragment transmission identifier for each fragment file according to the name of the file to be transmitted, the number of fragment files in the fragment file set and the sequence of fragment file segmentation;
calculating a file signature of the fragment file;
inquiring whether the fragment file exists in the target server or not according to the fragment transmission identifier and the file signature, and marking the transmitted label or the untransmitted label on the fragment file according to an inquiry result;
determining the fragment files marked with the non-transmission labels in all the fragment files as target transmission files;
and transmitting all the target transmission files to the target server so that the target server combines all the received target transmission files and all the fragment files existing in the target server to obtain the received files.
Optionally, the sequentially segmenting the files to be transmitted to obtain a fragmented file set, including:
cutting out files with the size of a preset cutting threshold value from the files to be transmitted to obtain segmented files;
judging whether the size of the file to be transmitted after segmentation is larger than the segmentation threshold value or not;
when the size of the file to be transmitted after segmentation is larger than the segmentation threshold, determining the file to be transmitted after segmentation as an updated file to be transmitted, and returning to the step of segmenting the file with the size of a preset segmentation threshold from the file to be transmitted;
and when the size of the segmented file to be transmitted is not larger than the segmentation threshold value, determining the segmented file to be transmitted as a fragmented file, and summarizing all the fragmented files to obtain the fragmented file set.
In order to solve the above problem, the present invention also provides a file transfer apparatus, including:
the data screening module is used for receiving a trigger instruction of a file transmission task corresponding to the target server; acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction; extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
the data packaging module is used for packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
and the file transmission module is used for acquiring a file transmission address of the target server and transmitting the file to be transmitted to the target server according to the transmission address.
Optionally, the encapsulating the target data into a preset file format according to the data encapsulation rule to obtain a file to be transmitted includes:
and extracting a file template in the data packaging rule, wherein the file template is a template file with a preset file format.
Extracting fields to be filled in the file template;
determining a field to be filled corresponding to each screening field according to a preset mapping relation between the field to be filled and the screening fields;
and replacing the target data corresponding to each screening field with the data of the field to be filled corresponding to the screening field in the file template to obtain the file to be transmitted.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and the processor executes the computer program stored in the memory to realize the file transmission method.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the file transfer method described above.
Extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data; packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted; screening the data in the database based on the time information, thereby eliminating useless data, reducing the size of the file to be transmitted and further improving the file transmission efficiency; therefore, the file transmission method, the file transmission device, the electronic equipment and the readable storage medium provided by the embodiment of the invention improve the file transmission efficiency.
Drawings
Fig. 1 is a schematic flowchart of a file transmission method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a file transfer device according to an embodiment of the present invention;
fig. 3 is a schematic internal structural diagram of an electronic device implementing a file transmission method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a file transmission method. The executing body of the file transmission method includes, but is not limited to, at least one of electronic devices such as a server and a terminal, which can be configured to execute the method provided by the embodiment of the present application. In other words, the file transfer method may be performed by software installed in a terminal device or a server device, or hardware, and the software may be a block chain platform. The server includes but is not limited to: the cloud server can be an independent server, or can be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Referring to fig. 1, which is a schematic flow diagram of a file transmission method according to an embodiment of the present invention, in an embodiment of the present invention, the file transmission method includes:
s1, receiving a trigger instruction of a file transmission task corresponding to a target server;
in the embodiment of the invention, the file transmission task is a task which needs to transmit a file to a target server, the trigger instruction is a timing execution notice of the file transmission task related to the target server, and the file transmission task trigger instruction comprises a task identifier of the file transmission task which needs to be executed.
S2, acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction;
in order to realize dynamic transmission of files, the data pairs corresponding to each file transmission task are screened in real time according to the preset data screening rules and can be dynamically adjusted according to different task requirements, so that the data screening rules and the data encapsulation rules of the data transmission tasks corresponding to the trigger instructions are obtained according to the trigger instructions.
Further, the obtaining of the data screening rule and the data encapsulation rule corresponding to the file transmission task according to the trigger instruction in the embodiment of the present invention includes:
extracting a task identifier in the trigger instruction;
the task identifier in the embodiment of the present invention is a mark for identifying the file transmission task, and has uniqueness.
And screening rules of a preset type corresponding to the task identification in a preset rule base to obtain the data screening rules and the data encapsulation rules.
Specifically, the rule base in the embodiment of the present invention includes a database of preset rules corresponding to different task identifiers, and the preset types include a data screening type and a data encapsulation type.
Further, in the embodiment of the present invention, the data filtering rule is a rule for filtering data in a file to be transmitted, and the data encapsulating rule is a rule for encapsulating the filtered data into a preset file format.
S3, extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
in the embodiment of the present invention, field screening is performed on data in a preset database according to the screening field and the screening time to obtain target data, and the field screening includes:
acquiring the receiving time of the trigger instruction;
constructing a time interval according to the receiving time and the screening time;
specifically, in the embodiment of the present invention, the receiving time and the screening time are respectively used as interval endpoint construction intervals to obtain the time interval.
And screening the data in the database by taking the screening fields and the time interval as screening conditions to obtain target data corresponding to each screening field.
Further, in the embodiment of the present invention, the screening the data in the database using the screening field and the time interval as the screening conditions to obtain the target data includes:
constructing a query statement by utilizing an SQL language, the screening fields and the time interval;
and executing the query statement to query the data corresponding to the screening field in the database within the time interval of the data writing time to obtain the target data.
In another embodiment of the invention, the target data can be stored in the blockchain nodes, and the data taking efficiency is improved by utilizing the characteristic of high throughput of the blockchain nodes.
S4, packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
in the embodiment of the present invention, the encapsulating the target data into a file format according to the data encapsulation rule to obtain a file to be transmitted, includes:
extracting a file template in the data packaging rule;
in the embodiment of the invention, the file template is a template file with a preset file format.
Extracting fields to be filled in the file template;
determining a field to be filled corresponding to each screening field according to a preset mapping relation between the field to be filled and the screening fields;
in the embodiment of the invention, in order to ensure the uniformity of the format of the transmission file, the original field classification cannot be used when the screening fields are written into the file template, and in order to determine the fields to be filled corresponding to each screening field according to the preset mapping relationship between the fields to be filled and the screening fields, the fields to be filled are determined.
And replacing the target data corresponding to each screening field with the data of the field to be filled corresponding to the screening field in the file template to obtain the file to be transmitted.
And S5, acquiring a file transmission address of the target server, and transmitting the file to be transmitted to the target server according to the transmission address.
In order to transmit the target transmission data to the target server in the embodiment of the present invention, a file transmission address of the target server needs to be obtained, and optionally, the file transmission address in the embodiment of the present invention may be an IP address of the target server.
In the embodiment of the present invention, transmitting the file to be transmitted to the target server according to the transmission address includes:
sequentially segmenting the files to be transmitted to obtain a segmented file set;
constructing fragment transmission identification for each fragment file according to the name of the file to be transmitted, the number of fragment files in the fragment file set and the sequence of the fragment file segmentation;
calculating a file signature of the fragment file;
inquiring whether the fragment file exists in the target server or not according to the fragment transmission identifier and the file signature, and marking the transmitted label or the untransmitted label on the fragment file according to an inquiry result;
determining the fragment files marked with the non-transmission labels in all the fragment files as target transmission files;
and transmitting all the target transmission files to the target server so that the target server combines all the received target transmission files and all the fragment files existing in the target server to obtain the received files.
Further, in the embodiment of the present invention, sequentially segmenting the files to be transmitted to obtain a fragmented file set, including:
cutting out files with the size of a preset cutting threshold value from the files to be transmitted to obtain segmented files;
for example: the size of the file to be transmitted is 5kb, the segmentation threshold is 1kb, then the file with the size of 1kb is segmented from the file to be transmitted to serve as a segmented file, and the size of the segmented file to be transmitted is 4kb.
Judging whether the size of the file to be transmitted after segmentation is larger than the segmentation threshold value or not;
when the size of the file to be transmitted after segmentation is larger than the segmentation threshold value, determining the file to be transmitted after segmentation as an updated file to be transmitted, and returning to the step of segmenting the file with the size of a preset segmentation threshold value from the file to be transmitted;
and when the size of the segmented file to be transmitted is not larger than the segmentation threshold value, determining the segmented file to be transmitted as a fragmented file, and summarizing all the fragmented files to obtain the fragmented file set.
In detail, in order to better perform identifier transmission on each fragmented file, in the embodiment of the present invention, a fragmented file transmission identifier is constructed for each fragmented file according to the name of the file to be transmitted, the number of fragmented files in the fragmented file set, and the sequence of fragmented file fragments, and the method includes:
determining the segmentation sequence of each fragment file as the fragment sequence number of the fragment file;
for example: the fragment file is obtained by first segmenting the file to be transmitted, the segmentation sequence of the fragment file is 1, and the corresponding fragment sequence number is 1.
Connecting the name of the file to be transmitted with the number of the fragmented files in the fragmented file set by using a preset first connection symbol to obtain a basic transmission identifier;
and connecting the fragment serial number corresponding to the fragment file with the basic transmission identifier by using a preset second connection symbol to obtain the fragment transmission identifier corresponding to the fragment file. The connection symbol is not limited in the embodiment of the present invention.
Further, in order to determine whether the fragmented files have been transmitted and avoid repeated transmission of the fragmented files, in the embodiment of the present invention, it is queried whether each fragmented file exists in a preset target server according to the fragmented transmission identifier and the file signature, and the fragmented files are marked with transmitted tags or non-transmitted tags according to a query result.
Specifically, in the embodiment of the present invention, querying whether each fragmented file exists in a preset target server according to the fragment transmission identifier and the file signature includes:
inquiring whether a file with a file name as the fragment transmission identifier exists in the target server;
in this distribution embodiment, when the target server receives a first fragmented file of a file to be transmitted, the target server may create a folder with a name of the file to be transmitted, then store the received fragmented file in the created folder, and store other fragmented files of the file to be transmitted that are subsequently received in the folder.
When the target server does not have a file with the file name of the fragment transmission identifier, the fragment file corresponding to the fragment transmission identifier does not exist in the target server;
when the target server has a file with the file name of the fragment transmission identifier;
determining the file with the file name as the fragment transmission identifier in the target server as a transmitted file;
comparing whether the file signature of the transmitted file corresponding to the fragment transmission identifier is consistent with the file signature of the fragment file corresponding to the fragment transmission identifier of the file;
if the comparison result is consistent, the fragment file corresponding to the fragment transmission identifier exists in the target server;
and when the comparison result is inconsistent, the fragment file corresponding to the fragment transmission identifier does not exist in the target server.
In the embodiment of the invention, when the comparison result is inconsistent, the transmitted file corresponding to the fragment transmission identifier is deleted from the target server, so that the influence on the subsequent combination of the received fragment files is avoided.
Further, in the embodiment of the present invention, the marking the fragmented file with a transmitted label or a non-transmitted label according to the query result includes:
when the query result of the fragment file is present, marking the fragment file with a transmitted label;
in the embodiment of the present invention, when the query result of the fragmented file is existing, it indicates that the same fragmented file exists in the target server, that is, the fragmented file has already been transmitted, and therefore, the fragmented file is marked with a transmitted tag to identify that the fragmented file has already been transmitted, and repeated transmission is not required.
And when the query result of the fragment file does not exist, marking the fragment file with an untransmitted label.
In the embodiment of the present invention, when the query result of the fragmented file is that the fragmented file does not exist, it indicates that the target server does not exist the same fragmented file, that is, the fragmented file has not been transmitted, and therefore, the fragmented file is marked with an untransmitted tag to identify that the fragmented file has not been transmitted yet and needs to be transmitted.
Further, the fragmented file marked with the transmitted label in the embodiment of the present invention indicates that the same fragmented file exists in the target server and the corresponding fragmented file has been transmitted; the fragment file marked with the label which is not transmitted identifies that the target server does not have the same fragment file and needs to transmit, so that the fragment file marked with the label which is not transmitted in all the fragment files is determined as the target transmission file.
In the embodiment of the invention, all the target transmission files are transmitted to the target server so that the target server combines all the received target transmission files and all the fragment files existing in the target server to obtain the received files.
Specifically, in the embodiment of the present invention, transmitting all the target transmission files to the target server includes:
and constructing a transmission path according to the transmission address, and transmitting all the target transmission files to the target server according to the transmission path.
Further, after the transmission is completed in the embodiment of the present invention, the target server extracts all characters on the left side of the first connector in the file name of the target transmission file to obtain the name of the target folder; determining a folder with the name of the target folder in the target server as a receiving folder; and merging all files in the receiving folder to obtain the receiving file. Specifically, in the embodiment of the present invention, all files in the receiving folder are sequentially merged according to the size of the number on the right of the second connector in each file name to obtain the receiving file, and the target folder is deleted.
Fig. 2 is a functional block diagram of the file transfer device according to the present invention.
The file transmission device 100 of the present invention can be installed in an electronic device. According to the implemented functions, the file transfer apparatus may include a data screening module 101, a data packaging module 102, and a file transfer module 103, which may also be referred to as a unit, and refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, and are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data screening module 101 is configured to receive a trigger instruction of a file transmission task corresponding to a target server; acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction; extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
the data encapsulation module 102 is configured to encapsulate the target data into a preset file format according to the data encapsulation rule, so as to obtain a file to be transmitted;
the file transmission module 103 is configured to obtain a file transmission address of the target server, and transmit the file to be transmitted to the target server according to the file transmission address.
In detail, when the modules in the file transmission device 100 according to the embodiment of the present invention are used, the same technical means as the file transmission method described in fig. 1 are used, and the same technical effects can be produced, which is not described herein again.
Fig. 3 is a schematic structural diagram of an electronic device implementing the file transfer method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a file transfer program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a file transfer program, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., file transfer programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication bus 12 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
Fig. 3 shows only an electronic device with components, and those skilled in the art will appreciate that the structure shown in fig. 3 is not limiting to the electronic device, and may include fewer or more components than shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power source may also include any component of one or more dc or ac power sources, recharging devices, power failure classification circuits, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the communication interface 13 may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further include a user interface, which may be a Display (Display), an input unit (such as a Keyboard (Keyboard)), and optionally, a standard wired interface, or a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The file transfer program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, and when running in the processor 10, can realize:
receiving a trigger instruction of a file transmission task corresponding to a target server;
acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction;
extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
and acquiring a file transmission address of the target server, and transmitting the file to be transmitted to the target server according to the transmission address.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
receiving a trigger instruction of a file transmission task corresponding to a target server;
acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction;
extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
and acquiring a file transmission address of the target server, and transmitting the file to be transmitted to the target server according to the transmission address.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for file transfer, the method comprising:
receiving a trigger instruction of a file transmission task corresponding to a target server;
acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction;
extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
and acquiring a file transmission address of the target server, and transmitting the file to be transmitted to the target server according to the transmission address.
2. The file transmission method according to claim 1, wherein the field screening based on time information is performed on data in a preset database according to the screening field and the screening time to obtain target data, and the method comprises:
acquiring the receiving time of the trigger instruction;
constructing a time interval according to the receiving time and the screening time;
and screening the data in the database by taking the screening fields and the time interval as screening conditions to obtain target data corresponding to each screening field.
3. The file transmission method according to claim 2, wherein the step of screening the data in the database by using the screening fields and the time intervals as screening conditions to obtain target data corresponding to each of the screening fields comprises:
constructing a query statement by using an SQL language, the screening field and the time interval;
and executing the query statement to query the data corresponding to the screening field in the database within the time interval of the data writing time to obtain the target data.
4. The file transmission method according to claim 1, wherein the encapsulating the target data into a preset file format according to the data encapsulation rule to obtain a file to be transmitted includes:
extracting a file template in the data packaging rule, wherein the file template is a template file with a preset file format;
extracting fields to be filled in the file template;
determining fields to be filled corresponding to each screening field according to a mapping relation between preset fields to be filled and the screening fields;
and replacing the target data corresponding to each screening field with the data of the to-be-filled field corresponding to the screening field in the file template to obtain the to-be-transmitted file.
5. The file transmission method according to any one of claims 1 to 4, wherein the transmitting the file to be transmitted to the target server according to the transmission address includes:
sequentially segmenting the files to be transmitted to obtain a segmented file set;
constructing fragment transmission identification for each fragment file according to the name of the file to be transmitted, the number of fragment files in the fragment file set and the sequence of the fragment file segmentation;
calculating a file signature of the fragment file;
inquiring whether the fragment file exists in the target server or not according to the fragment transmission identifier and the file signature, and marking the transmitted label or the untransmitted label on the fragment file according to an inquiry result;
determining the fragment files marked with the non-transmission labels in all the fragment files as target transmission files;
and transmitting all the target transmission files to the target server so that the target server combines all the received target transmission files and all the fragment files existing in the target server to obtain the received files.
6. The file transmission method according to claim 5, wherein the sequentially segmenting the files to be transmitted to obtain a fragmented file set comprises:
cutting out files with the size of a preset cutting threshold value from the files to be transmitted to obtain sliced files;
judging whether the size of the file to be transmitted after segmentation is larger than the segmentation threshold value or not;
when the size of the file to be transmitted after segmentation is larger than the segmentation threshold, determining the file to be transmitted after segmentation as an updated file to be transmitted, and returning to the step of segmenting the file with the size of a preset segmentation threshold from the file to be transmitted;
and when the size of the file to be transmitted after segmentation is not larger than the segmentation threshold value, determining the file to be transmitted after segmentation as a fragmented file, and summarizing all the fragmented files to obtain the fragmented file set.
7. A file transfer apparatus, comprising:
the data screening module is used for receiving a trigger instruction of a file transmission task corresponding to the target server; acquiring a data screening rule and a data packaging rule corresponding to the file transmission task according to the trigger instruction; extracting a screening field and screening time in the data screening rule, and carrying out field screening based on time information on data in a preset database according to the screening field and the screening time to obtain target data;
the data packaging module is used for packaging the target data into a preset file format according to the data packaging rule to obtain a file to be transmitted;
and the file transmission module is used for acquiring a file transmission address of the target server and transmitting the file to be transmitted to the target server according to the transmission address.
8. The file transmission apparatus according to claim 7, wherein said encapsulating the target data into a preset file format according to the data encapsulation rule to obtain a file to be transmitted includes:
extracting a file template in the data packaging rule, wherein the file template is a template file with a preset file format;
extracting fields to be filled in the file template;
determining a field to be filled corresponding to each screening field according to a preset mapping relation between the field to be filled and the screening fields;
and replacing the target data corresponding to each screening field with the data of the field to be filled corresponding to the screening field in the file template to obtain the file to be transmitted.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the file transfer method of any of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the file transfer method according to any one of claims 1 to 6.
CN202210753075.1A 2022-06-28 2022-06-28 File transmission method and device, electronic equipment and storage medium Pending CN115174555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210753075.1A CN115174555A (en) 2022-06-28 2022-06-28 File transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210753075.1A CN115174555A (en) 2022-06-28 2022-06-28 File transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115174555A true CN115174555A (en) 2022-10-11

Family

ID=83489114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210753075.1A Pending CN115174555A (en) 2022-06-28 2022-06-28 File transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115174555A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271411A (en) * 2018-09-28 2019-01-25 中国平安财产保险股份有限公司 Report form generation method, device, computer equipment and storage medium
CN109309734A (en) * 2018-11-27 2019-02-05 北京百度网讯科技有限公司 It is used for transmission the method and device of data
CN109361754A (en) * 2018-11-05 2019-02-19 中国广核电力股份有限公司 A kind of document transmission method and device based on browser
CN109409817A (en) * 2018-09-03 2019-03-01 中国平安人寿保险股份有限公司 Insurance data checking method, device, computer equipment and storage medium
CN110782240A (en) * 2019-10-12 2020-02-11 上海陆家嘴国际金融资产交易市场股份有限公司 Service data processing method and device, computer equipment and storage medium
CN111177174A (en) * 2018-11-09 2020-05-19 百度在线网络技术(北京)有限公司 SQL statement generation method, device, equipment and computer readable storage medium
CN111404990A (en) * 2020-02-14 2020-07-10 Oppo(重庆)智能科技有限公司 File transmission method, device, client and storage medium
CN111666259A (en) * 2020-06-06 2020-09-15 智同道合(苏州)信息技术服务有限公司 Document management method, management system, readable storage medium, and electronic device
CN112347042A (en) * 2020-11-05 2021-02-09 中国平安人寿保险股份有限公司 File uploading method and device, electronic equipment and storage medium
CN113836145A (en) * 2021-09-29 2021-12-24 中电金信软件有限公司 Method and device for requesting data, electronic equipment and computer-readable storage medium
CN114154020A (en) * 2021-12-01 2022-03-08 南方电网深圳数字电网研究院有限公司 Large-capacity data processing method and device based on dynamic label mapping
CN114490137A (en) * 2022-02-16 2022-05-13 平安普惠企业管理有限公司 Service data real-time statistical method and device, electronic equipment and readable storage medium
CN114490715A (en) * 2022-01-28 2022-05-13 中国农业银行股份有限公司 Data extraction method and device, electronic equipment and storage medium
CN114611481A (en) * 2022-03-18 2022-06-10 中国建设银行股份有限公司 Template configuration method and device, computer equipment and storage medium
CN114661671A (en) * 2022-04-14 2022-06-24 中国工商银行股份有限公司 File processing method and device, computer readable storage medium and electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409817A (en) * 2018-09-03 2019-03-01 中国平安人寿保险股份有限公司 Insurance data checking method, device, computer equipment and storage medium
CN109271411A (en) * 2018-09-28 2019-01-25 中国平安财产保险股份有限公司 Report form generation method, device, computer equipment and storage medium
CN109361754A (en) * 2018-11-05 2019-02-19 中国广核电力股份有限公司 A kind of document transmission method and device based on browser
CN111177174A (en) * 2018-11-09 2020-05-19 百度在线网络技术(北京)有限公司 SQL statement generation method, device, equipment and computer readable storage medium
CN109309734A (en) * 2018-11-27 2019-02-05 北京百度网讯科技有限公司 It is used for transmission the method and device of data
CN110782240A (en) * 2019-10-12 2020-02-11 上海陆家嘴国际金融资产交易市场股份有限公司 Service data processing method and device, computer equipment and storage medium
CN111404990A (en) * 2020-02-14 2020-07-10 Oppo(重庆)智能科技有限公司 File transmission method, device, client and storage medium
CN111666259A (en) * 2020-06-06 2020-09-15 智同道合(苏州)信息技术服务有限公司 Document management method, management system, readable storage medium, and electronic device
CN112347042A (en) * 2020-11-05 2021-02-09 中国平安人寿保险股份有限公司 File uploading method and device, electronic equipment and storage medium
CN113836145A (en) * 2021-09-29 2021-12-24 中电金信软件有限公司 Method and device for requesting data, electronic equipment and computer-readable storage medium
CN114154020A (en) * 2021-12-01 2022-03-08 南方电网深圳数字电网研究院有限公司 Large-capacity data processing method and device based on dynamic label mapping
CN114490715A (en) * 2022-01-28 2022-05-13 中国农业银行股份有限公司 Data extraction method and device, electronic equipment and storage medium
CN114490137A (en) * 2022-02-16 2022-05-13 平安普惠企业管理有限公司 Service data real-time statistical method and device, electronic equipment and readable storage medium
CN114611481A (en) * 2022-03-18 2022-06-10 中国建设银行股份有限公司 Template configuration method and device, computer equipment and storage medium
CN114661671A (en) * 2022-04-14 2022-06-24 中国工商银行股份有限公司 File processing method and device, computer readable storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN112653760B (en) Cross-server file transmission method and device, electronic equipment and storage medium
CN112329419A (en) Document editing method, device, server, terminal and storage medium
CN112418798A (en) Information auditing method and device, electronic equipment and storage medium
CN112417503A (en) Method and device for authorizing post authority, electronic equipment and storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN113806434A (en) Big data processing method, device, equipment and medium
CN114386509A (en) Data fusion method and device, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN114844792A (en) Dynamic monitoring method, device, equipment and storage medium based on LUA language
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN113868528A (en) Information recommendation method and device, electronic equipment and readable storage medium
CN114491646A (en) Data desensitization method and device, electronic equipment and storage medium
CN113722533A (en) Information pushing method and device, electronic equipment and readable storage medium
CN114547011A (en) Data extraction method and device, electronic equipment and storage medium
CN115496166A (en) Multitasking method and device, electronic equipment and storage medium
CN114840388A (en) Data monitoring method and device, electronic equipment and storage medium
CN115145870A (en) Method and device for positioning reason of failed task, electronic equipment and storage medium
CN113918305A (en) Node scheduling method and device, electronic equipment and readable storage medium
CN115174555A (en) File transmission method and device, electronic equipment and storage medium
CN115174698B (en) Market data decoding method, device, equipment and medium based on table entry index
CN115002100B (en) File transmission method and device, electronic equipment and storage medium
CN113421009B (en) Accessory approval method and device, electronic equipment and readable storage medium
CN113452785B (en) Service access method and device based on offline resources, electronic equipment and medium
CN113438221B (en) Local end file loading method and device, electronic equipment and 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