[go: up one dir, main page]

CN113656103A - Configuration method, device, computer equipment and storage medium for file uploading - Google Patents

Configuration method, device, computer equipment and storage medium for file uploading Download PDF

Info

Publication number
CN113656103A
CN113656103A CN202110944703.XA CN202110944703A CN113656103A CN 113656103 A CN113656103 A CN 113656103A CN 202110944703 A CN202110944703 A CN 202110944703A CN 113656103 A CN113656103 A CN 113656103A
Authority
CN
China
Prior art keywords
application interface
interface
development project
file
function
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
CN202110944703.XA
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.)
Weikun Shanghai Technology Service Co Ltd
Original Assignee
Weikun Shanghai Technology Service 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 Weikun Shanghai Technology Service Co Ltd filed Critical Weikun Shanghai Technology Service Co Ltd
Priority to CN202110944703.XA priority Critical patent/CN113656103A/en
Publication of CN113656103A publication Critical patent/CN113656103A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

本申请涉及人工智能计算机领域,揭示了一种文件上传的配置方法、装置、计算机设备及存储介质,方法包括:获取单文件上传功能的第一应用接口以及多文件上传功能的第二应用接口;将所述第一应用接口与所述第二应用接口整合封装,得到统一应用接口;获取待接入的开发工程的配置信息,根据所述配置信息获取所述开发工程的配置参数;所述开发工程中不包含多文件上传功能;根据所述配置参数生成所述开发工程的所述统一应用接口的输入与输出,并根据所述统一应用接口的输入与输出将所述统一应用接口关联应用至所述开发工程中。本申请能够提高了代码的高可用性,快速地将文件上传功能适配至不同的开发工程中,提高开发工程的开发效率。

Figure 202110944703

The present application relates to the field of artificial intelligence computers, and discloses a configuration method, device, computer equipment and storage medium for file uploading. The method includes: obtaining a first application interface for a single file upload function and a second application interface for a multi-file upload function; Integrate and encapsulate the first application interface and the second application interface to obtain a unified application interface; obtain configuration information of the development project to be accessed, and obtain configuration parameters of the development project according to the configuration information; The project does not contain a multi-file upload function; the input and output of the unified application interface of the development project are generated according to the configuration parameters, and the unified application interface is associated and applied to the unified application interface according to the input and output of the unified application interface. in the development project. The present application can improve the high availability of the code, quickly adapt the file upload function to different development projects, and improve the development efficiency of the development projects.

Figure 202110944703

Description

Configuration method and device for uploading files, computer equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence computers, and in particular, to a configuration method and apparatus for file upload, a computer device, and a storage medium.
Background
With the development of internet technology, some functions of the former old system cannot meet the current use requirements, for example, a technology that one picture is uploaded once and then is submitted uniformly after being uploaded for multiple times is adopted for a picture uploading function in the system, when multiple pictures need to be uploaded, the uploading operation of the next picture can be carried out after the uploading of one picture is finished, a long time is consumed for repeated things, the performance is consumed very low, the efficiency is low, the system needs to be upgraded, the system can upload multiple pictures or multiple files simultaneously, the upgrading and developing of the system at present are totally reversed for the development project, and the development efficiency is low when multiple development projects exist.
Disclosure of Invention
The application mainly aims to provide a configuration method and device for uploading files, computer equipment and a storage medium, and aims to solve the problem of low development efficiency caused by repeated development of file uploading functions in different current development projects.
In order to achieve the above object, the present application provides a configuration method for uploading a file, including:
acquiring a first application interface with a single file uploading function and a second application interface with a multi-file uploading function;
integrating and packaging the first application interface and the second application interface to obtain a uniform application interface;
acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function;
and generating the input and the output of the unified application interface of the development project according to the configuration parameters, and associating and applying the unified application interface to the development project according to the input and the output of the unified application interface.
Further, after the obtaining of the configuration information of the development project to be accessed, the method further includes:
determining a file format supported by the development project according to the configuration information;
configuring the format conversion interface according to the file format supported by the development project;
and accessing the format conversion interface at the front end of the unified application interface.
Further, the integrating and packaging the first application interface and the second application interface to obtain a unified application interface includes:
storing the uniform application interface in a preset local area network;
the acquiring configuration information of the development project to be accessed includes:
and acquiring configuration information of the development project to be accessed in the preset local area network.
Further, the applying the unified application interface into the development engineering in association with the input and the output of the unified application interface includes:
judging whether the development project contains a native single file uploading function or not;
if so, reserving a native interface of the native single file uploading function, and configuring the unified application interface as an interface of a multi-file uploading function;
and according to the input and the output of the uniform application interface, the uniform application interface is used as an interface association of a multi-file uploading function to be applied to the development project.
Further, the applying the unified application interface into the development engineering in association with the input and the output of the unified application interface includes:
judging whether the development project contains a native single file uploading function or not;
if so, outputting a selection instruction of a native interface of the native single file uploading function and the unified application interface;
if a first selected instruction of the native interface is received, the native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if a second selected instruction of the unified application interface is received, shielding the native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
Further, the applying the unified application interface into the development engineering in association with the input and the output of the unified application interface includes:
judging whether the development project contains a native single file uploading function or not;
if so, acquiring a first uploading efficiency of a native interface of the native single file uploading function and a second uploading efficiency of a single file uploading function of the unified application interface;
if the first uploading efficiency is greater than the second uploading efficiency, a native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if the first uploading efficiency is smaller than the second uploading efficiency, shielding a native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
Further, after the applying the unified application interface as an interface association of a multi-file upload function to the development project according to the input and the output of the unified application interface, the method further includes:
acquiring single test file data;
inputting the single test file data into the development project;
monitoring a first output result of the native interface and a second output result of the unified application interface;
and if the first output result of the native interface is the same as the expected result and the second output result of the unified application interface is null, determining that the unified application interface is correctly applied to the development project as an interface of the multi-file uploading function.
The present application further provides a configuration device for uploading a file, including:
the interface acquisition module is used for acquiring a first application interface with a single file uploading function and a second application interface with a multi-file uploading function;
the interface integration module is used for integrating and packaging the first application interface and the second application interface to obtain a uniform application interface;
the parameter configuration module is used for acquiring configuration information of a development project to be accessed and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function;
and the associated application module is used for generating the input and the output of the unified application interface of the development project according to the configuration parameters and associating and applying the unified application interface to the development project according to the input and the output of the unified application interface.
The application also provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the configuration method for uploading the file in any one of the above modes when executing the computer program.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the above-mentioned configuration methods for file upload.
The embodiment of the application provides a method for configuring a file uploading function for development engineering, which comprises the steps of firstly obtaining a first application interface with a single file uploading function and a second application interface with a multi-file uploading function, integrating and packaging the first application interface and the second application interface to obtain a unified application interface, namely performing API integration and packaging on the single file uploading function and the multi-file uploading function to enable the single file uploading function and the multi-file uploading function to form a module or an independent system as a fixed tool; acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain the uploading function of multiple files, the input and the output of the unified application interface of the development project are generated according to the configuration parameters, the unified application interface is applied to the development project in a correlation mode according to the input and the output of the unified application interface, code addition does not need to be carried out on the original development project, codes do not need to be modified on the original development project, development of the multi-file uploading technology is carried out on the basis that the single-file uploading technology of the development project is not modified, rewriting of logic codes is avoided, high availability of the codes is improved, the multi-file uploading technology is rapidly adapted to different systems, and development efficiency of the development project is improved.
Drawings
Fig. 1 is a schematic flowchart illustrating an embodiment of a configuration method for uploading a document according to the present disclosure;
FIG. 2 is a schematic structural diagram of an embodiment of a configuration device for uploading a document of the present application;
FIG. 3 is a block diagram illustrating a computer device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, an embodiment of the present application provides a configuration method for file upload, including steps S10-S40, and the detailed description of each step of the configuration method for file upload is as follows.
And S10, acquiring a first application interface of the single file uploading function and a second application interface of the multi-file uploading function.
In order to adapt to the development of the uploading functions of different systems, an independent uploading function module is developed in the embodiment, an Interface of a single file uploading function is developed at first, namely a first Application Interface of the single file uploading function is obtained at first, an Interface of a multi-file uploading function is developed, namely a second Application Interface of the multi-file uploading function is obtained, the first Application Interface and the second Application Interface are Application Program Interfaces (APIs), the single file uploading function of the uploading function module can be used by calling the first Application Interface, and the multi-file uploading function of the uploading function module can be used by calling the second Interface.
S20, integrating and packaging the first application interface and the second application interface to obtain a unified application interface.
In this embodiment, after a first application interface with a single file upload function and a second application interface with a multi-file upload function are obtained, the first application interface and the second application interface are integrated and packaged, specifically, a new application interface is configured and linked to the first application interface, so as to invoke the single file upload function of the upload function module, and meanwhile, the new application interface is also linked to the second application interface, so as to invoke the multi-file upload function of the upload function module, where the new application interface is defined as a unified application interface. In one embodiment, the artificial intelligence big data processing method is used for learning formats and requirements of different interfaces for integration and packaging, so that packaging format requirements of a first application interface and a second application interface are obtained, and then the first application interface and the second application interface are integrated and packaged according to the packaging format requirements, so that a uniform application interface is obtained.
S30, acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not include a multi-file uploading function.
In this embodiment, after the first application interface and the second application interface are integrated and encapsulated to obtain a unified application interface, obtaining configuration information of a development project to be accessed, and obtaining configuration parameters of the development project according to the configuration information, where the development project to be accessed needs to develop an upload function, and the development project does not include a multi-file upload function, in one embodiment, the configuration information of the development project only includes a single-file upload function and does not include the multi-file upload function, that is, only a single-file upload function module is developed in the development project; in another embodiment, the configuration information of the development project does not include a single file upload function and does not include a multi-file upload function. After the configuration information of the development project to be accessed is obtained, the configuration parameters of the development project are obtained according to the configuration information, the configuration parameters comprise access and output rules of each functional module in the development project, and interfaces of other functional modules can be accessed into the development project according to the configuration parameters.
S40, generating the input and the output of the unified application interface of the development project according to the configuration parameters, and applying the unified application interface to the development project in a correlation manner according to the input and the output of the unified application interface.
In this embodiment, after obtaining the configuration parameters of the development project, the input and the output of the unified application interface of the development project are generated according to the configuration parameters, that is, an input path and an output path are configured for the unified application interface according to the configuration parameters, the unified application interface is applied to the development project in association with the input and the output of the unified application interface, and the configuration file of the development project is updated, the file upload function is called in the development project through the unified application interface based on the configuration file, the back-end logic code of the development project only needs to call the unified application interface, does not need to add the logic code, does not need to modify the logic code, avoids rewriting of the logic code, improves the high availability of the code, and is quickly adapted to different systems, the development efficiency of the development project is improved.
The embodiment provides a method for configuring a file uploading function for development engineering, which comprises the steps of firstly obtaining a first application interface with a single file uploading function and a second application interface with a multi-file uploading function, integrating and packaging the first application interface and the second application interface to obtain a unified application interface, namely performing API integration and packaging on the single file uploading function and the multi-file uploading function to form a module or an independent system as a fixed tool; acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain the uploading function of multiple files, the input and the output of the unified application interface of the development project are generated according to the configuration parameters, the unified application interface is applied to the development project in a correlation mode according to the input and the output of the unified application interface, code addition does not need to be carried out on the original development project, codes do not need to be modified on the original development project, development of the multi-file uploading technology is carried out on the basis that the single-file uploading technology of the development project is not modified, rewriting of logic codes is avoided, high availability of the codes is improved, the multi-file uploading technology is rapidly adapted to different systems, and development efficiency of the development project is improved.
In an embodiment, after obtaining the configuration information of the development project to be accessed, the method further includes:
determining a file format supported by the development project according to the configuration information;
configuring the format conversion interface according to the file format supported by the development project;
and accessing the format conversion interface at the front end of the unified application interface.
In this embodiment, after the configuration information of the development project to be accessed is acquired, in order to enable the unified application interface to support the file uploading function required by the development project, the file format supported by the development project is determined according to the configuration information, determining which format files are supported by a development project, and then configuring the format conversion interface according to the format of the files supported by the development project, wherein the format conversion interface is used for converting the files in different formats into the files in the same format, then the format conversion interface is accessed at the front end of the uniform application interface, and then when any file is transmitted into a development project, the format conversion interface is converted into a format corresponding to the requirement, and then, the file is uploaded into the unified application interface, and the file uploading function of the unified application interface is called to upload the corresponding file, so that the file uploading efficiency is improved.
In an embodiment, after the integrating and encapsulating the first application interface and the second application interface to obtain a unified application interface, the method includes:
storing the uniform application interface in a preset local area network;
the acquiring configuration information of the development project to be accessed includes:
and acquiring configuration information of the development project to be accessed in the preset local area network.
In this embodiment, after the first application interface and the second application interface are integrated and encapsulated to obtain a unified application interface, the unified application interface is stored in a server of a preset local area network, that is, the unified application interface is stored in the local area network and is used by different development projects in the local area network, and when configuration information of a development project to be accessed is obtained, configuration information of the development project to be accessed is obtained in the preset local area network, so that development efficiency of the different development projects in the local area network is improved.
In one embodiment, the applying the unified application interface association to the development project according to the input and output of the unified application interface includes:
judging whether the development project contains a native single file uploading function or not;
if so, reserving a native interface of the native single file uploading function, and configuring the unified application interface as an interface of a multi-file uploading function;
and according to the input and the output of the uniform application interface, the uniform application interface is used as an interface association of a multi-file uploading function to be applied to the development project.
In this embodiment, the unified application interface is applied to the development project in association with the input and output of the unified application interface, whether the development project to be accessed includes a single file upload function is detected, the original single file upload function of the development project is defined as the original single file upload function, in one embodiment, whether the single file upload function exists in the development project is determined according to configuration information of the development project, if the development project includes the original single file upload function, a native interface of the original single file upload function is reserved, the unified application interface is configured as an interface of a multi-file upload function, the single file upload function in the unified application interface is shielded, only the multi-file upload function is reserved, and the unified application interface is applied to the development project as an interface association of the multi-file upload function according to the input and output of the unified application interface In the process, the original single file uploading function of the development project is reserved, the multi-file uploading function is added for the development project, errors possibly caused by searching different uploading interfaces during single file uploading are avoided, and the accuracy of single file uploading and multi-file uploading is improved.
In one embodiment, the applying the unified application interface association to the development project according to the input and output of the unified application interface includes:
judging whether the development project contains a native single file uploading function or not;
if so, outputting a selection instruction of a native interface of the native single file uploading function and the unified application interface;
if a first selected instruction of the native interface is received, the native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if a second selected instruction of the unified application interface is received, shielding the native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
In this embodiment, after determining whether the development project includes a native single file upload function, if it is determined that the development project includes the native single file upload function, a selection instruction of a native interface of the native single file upload function and the unified application interface is output, a window is provided for a user to select, the native interface may be selected as an interface of the single file upload function, or a unified application interface may be selected as an interface of the single file upload function, specifically, if a first selected instruction of the native interface is received, the native interface of the native single file upload function is retained, and the unified application interface is configured as an interface of a multi-file upload function; and if a second selected instruction of the unified application interface is received, shielding the native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function, so that the flexibility of adapting the single-file uploading function interface in the development project is improved.
In one embodiment, the applying the unified application interface association to the development project according to the input and output of the unified application interface includes:
judging whether the development project contains a native single file uploading function or not;
if so, acquiring a first uploading efficiency of a native interface of the native single file uploading function and a second uploading efficiency of a single file uploading function of the unified application interface;
if the first uploading efficiency is greater than the second uploading efficiency, a native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
if the first uploading efficiency is smaller than the second uploading efficiency, shielding the native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function
In this embodiment, after determining whether the development project includes a native single file upload function, if it is determined that the development project includes the native single file upload function, obtaining a first upload efficiency of a native interface of the native single file upload function and a second upload efficiency of a single file upload function of a unified application interface, where the upload efficiencies are obtained by counting times of uploading a single file, and respectively testing the first upload efficiency of the native interface and the second upload efficiency of the single file upload function of the unified application interface, and if the first upload efficiency is greater than the second upload efficiency, retaining the native interface of the native single file upload function and configuring the unified application interface as an interface of a multi-file upload function; and if the first uploading efficiency is smaller than the second uploading efficiency, shielding the native interface of the native single-file uploading function, configuring the unified application interface into an interface of a single-file uploading function and a multi-file uploading function, and automatically configuring an application program interface with higher uploading efficiency for the development project, so that the uploading efficiency of the files is improved.
In one embodiment, after the applying the unified application interface as an interface association of a multi-file upload function to the development project according to the input and the output of the unified application interface, the method further includes:
acquiring single test file data;
inputting the single test file data into the development project;
monitoring a first output result of the native interface and a second output result of the unified application interface;
and if the first output result of the native interface is the same as the expected result and the second output result of the unified application interface is null, determining that the unified application interface is correctly applied to the development project as an interface of the multi-file uploading function.
In this embodiment, after the unified application interface is applied to the development project as an interface association of a multi-file upload function according to the input and output of the unified application interface, a single test file data is obtained, at this time, the single test file data is input to the development project in order to test the single file upload function of the development project, when the single test file is input to the development project to be uploaded, the single file upload function that should be a native interface is called, at this time, a first output result of the native interface and a second output result of the unified application interface are monitored, and if the first output result of the native interface is the same as an expected result and the second output result of the unified application interface is empty, it is determined that the upload function of the native interface is used at this time instead of the upload function of the unified application interface, therefore, the unified application interface is determined to be correctly applied to the development project as an interface of the multi-file uploading function, and the correct operation of the development function is ensured.
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. The application is operational with numerous general purpose or special purpose computing system environments or configurations. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Referring to fig. 2, the present application further provides a configuration apparatus for uploading a file, including:
the interface acquisition module 10 is configured to acquire a first application interface with a single file upload function and a second application interface with a multi-file upload function;
the interface integration module 20 is configured to integrate and package the first application interface and the second application interface to obtain a unified application interface;
the parameter configuration module 30 is configured to obtain configuration information of a development project to be accessed, and obtain configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function;
and the associated application module 40 is configured to generate input and output of the unified application interface of the development project according to the configuration parameters, and associate and apply the unified application interface to the development project according to the input and output of the unified application interface.
In one embodiment, the configuration device for uploading the file further includes a format conversion module, configured to perform:
determining a file format supported by the development project according to the configuration information;
configuring the format conversion interface according to the file format supported by the development project;
and accessing the format conversion interface at the front end of the unified application interface.
In one embodiment, the configuration apparatus for uploading the file further includes a local area network configuration module, configured to perform:
storing the uniform application interface in a preset local area network;
and acquiring configuration information of the development project to be accessed in the preset local area network.
In one embodiment, the associated application module 40 further comprises a first application unit for performing:
judging whether the development project contains a native single file uploading function or not;
if so, reserving a native interface of the native single file uploading function, and configuring the unified application interface as an interface of a multi-file uploading function;
and according to the input and the output of the uniform application interface, the uniform application interface is used as an interface association of a multi-file uploading function to be applied to the development project.
In one embodiment, the associated application module 40 further comprises a second application unit for performing:
judging whether the development project contains a native single file uploading function or not;
if so, outputting a selection instruction of a native interface of the native single file uploading function and the unified application interface;
if a first selected instruction of the native interface is received, the native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if a second selected instruction of the unified application interface is received, shielding the native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
In one embodiment, the associated application module 40 further comprises a third application unit, configured to perform:
judging whether the development project contains a native single file uploading function or not;
if so, acquiring a first uploading efficiency of a native interface of the native single file uploading function and a second uploading efficiency of a single file uploading function of the unified application interface;
if the first uploading efficiency is greater than the second uploading efficiency, a native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if the first uploading efficiency is smaller than the second uploading efficiency, shielding a native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
In one embodiment, the apparatus further comprises a test unit for performing:
acquiring single test file data;
inputting the single test file data into the development project;
monitoring a first output result of the native interface and a second output result of the unified application interface;
and if the first output result of the native interface is the same as the expected result and the second output result of the unified application interface is null, determining that the unified application interface is correctly applied to the development project as an interface of the multi-file uploading function.
As described above, it can be understood that the components of the configuration device for uploading files proposed in the present application may implement the functions of any one of the configuration methods for uploading files described above.
Referring to fig. 3, a computer device, which may be a mobile terminal and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer equipment comprises a processor, a memory, a network interface, a display device and an input device which are connected through a system bus. Wherein, the network interface of the computer equipment is used for communicating with an external terminal through network connection. The input means of the computer device is for receiving input from a user. The computer designed processor is used to provide computational and control capabilities. The memory of the computer device includes a storage medium. The storage medium stores an operating system, a computer program, and a database. The database of the computer device is used for storing data. The computer program is executed by a processor to implement a configuration method for file upload.
The configuration method for the processor to execute the file uploading comprises the following steps: acquiring a first application interface with a single file uploading function and a second application interface with a multi-file uploading function; integrating and packaging the first application interface and the second application interface to obtain a uniform application interface; acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function; and generating the input and the output of the unified application interface of the development project according to the configuration parameters, and associating and applying the unified application interface to the development project according to the input and the output of the unified application interface.
The computer equipment provides a method for configuring file uploading function for development engineering, first a first application interface with single file uploading function and a second application interface with multiple file uploading function are obtained, the first application interface and the second application interface are integrated and packaged to obtain a uniform application interface, namely, API integration and packaging are carried out on the single file uploading function and the multiple file uploading function to enable the single file uploading function and the multiple file uploading function to become a module or an independent system as a fixed tool; acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain the uploading function of multiple files, the input and the output of the unified application interface of the development project are generated according to the configuration parameters, the unified application interface is applied to the development project in a correlation mode according to the input and the output of the unified application interface, code addition does not need to be carried out on the original development project, codes do not need to be modified on the original development project, development of the multi-file uploading technology is carried out on the basis that the single-file uploading technology of the development project is not modified, rewriting of logic codes is avoided, high availability of the codes is improved, the multi-file uploading technology is rapidly adapted to different systems, and development efficiency of the development project is improved.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by the processor, implements a configuration method for uploading a file, and the method includes: acquiring a first application interface with a single file uploading function and a second application interface with a multi-file uploading function; integrating and packaging the first application interface and the second application interface to obtain a uniform application interface; acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function; and generating the input and the output of the unified application interface of the development project according to the configuration parameters, and associating and applying the unified application interface to the development project according to the input and the output of the unified application interface.
The computer readable storage medium provides a method for configuring file uploading function for development engineering, first obtaining a first application interface with single file uploading function and a second application interface with multi-file uploading function, integrating and packaging the first application interface and the second application interface to obtain a uniform application interface, namely performing API integration and packaging on the single file uploading function and the multi-file uploading function to form a module or an independent system as a fixed tool; acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain the uploading function of multiple files, the input and the output of the unified application interface of the development project are generated according to the configuration parameters, the unified application interface is applied to the development project in a correlation mode according to the input and the output of the unified application interface, code addition does not need to be carried out on the original development project, codes do not need to be modified on the original development project, development of the multi-file uploading technology is carried out on the basis that the single-file uploading technology of the development project is not modified, rewriting of logic codes is avoided, high availability of the codes is improved, the multi-file uploading technology is rapidly adapted to different systems, and development efficiency of the development project is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above.
Any reference to memory, storage, database, or other medium provided herein and used in the embodiments may include non-volatile and/or volatile memory.
Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the scope of the present application.
All the equivalent structures or equivalent processes performed by using the contents of the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields, are included in the scope of protection of the present application.

Claims (10)

1. A configuration method for uploading files is characterized by comprising the following steps:
acquiring a first application interface with a single file uploading function and a second application interface with a multi-file uploading function;
integrating and packaging the first application interface and the second application interface to obtain a uniform application interface;
acquiring configuration information of a development project to be accessed, and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function;
and generating the input and the output of the unified application interface of the development project according to the configuration parameters, and associating and applying the unified application interface to the development project according to the input and the output of the unified application interface.
2. The configuration method for uploading files according to claim 1, further comprising, after obtaining configuration information of a development project to be accessed:
determining a file format supported by the development project according to the configuration information;
configuring the format conversion interface according to the file format supported by the development project;
and accessing the format conversion interface at the front end of the unified application interface.
3. The configuration method for uploading files according to claim 1, wherein the integrating and packaging the first application interface and the second application interface to obtain a unified application interface comprises:
storing the uniform application interface in a preset local area network;
the acquiring configuration information of the development project to be accessed includes:
and acquiring configuration information of the development project to be accessed in the preset local area network.
4. The configuration method for file upload according to claim 1, wherein the applying the unified application interface association to the development project according to the input and output of the unified application interface comprises:
judging whether the development project contains a native single file uploading function or not;
if so, reserving a native interface of the native single file uploading function, and configuring the unified application interface as an interface of a multi-file uploading function;
and according to the input and the output of the uniform application interface, the uniform application interface is used as an interface association of a multi-file uploading function to be applied to the development project.
5. The configuration method for file upload according to claim 1, wherein the applying the unified application interface association to the development project according to the input and output of the unified application interface comprises:
judging whether the development project contains a native single file uploading function or not;
if so, outputting a selection instruction of a native interface of the native single file uploading function and the unified application interface;
if a first selected instruction of the native interface is received, the native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if a second selected instruction of the unified application interface is received, shielding the native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
6. The configuration method for file upload according to claim 1, wherein the applying the unified application interface association to the development project according to the input and output of the unified application interface comprises:
judging whether the development project contains a native single file uploading function or not;
if so, acquiring a first uploading efficiency of a native interface of the native single file uploading function and a second uploading efficiency of a single file uploading function of the unified application interface;
if the first uploading efficiency is greater than the second uploading efficiency, a native interface of the native single file uploading function is reserved, and the unified application interface is configured to be an interface of a multi-file uploading function;
and if the first uploading efficiency is smaller than the second uploading efficiency, shielding a native interface of the native single-file uploading function, and configuring the unified application interface as an interface of the single-file uploading function and the multi-file uploading function.
7. The configuration method for file upload according to claim 4, wherein after applying the unified application interface as an interface association of a multi-file upload function to the development project according to the input and output of the unified application interface, the method further comprises:
acquiring single test file data;
inputting the single test file data into the development project;
monitoring a first output result of the native interface and a second output result of the unified application interface;
and if the first output result of the native interface is the same as the expected result and the second output result of the unified application interface is null, determining that the unified application interface is correctly applied to the development project as an interface of the multi-file uploading function.
8. A configuration device for uploading a file, comprising:
the interface acquisition module is used for acquiring a first application interface with a single file uploading function and a second application interface with a multi-file uploading function;
the interface integration module is used for integrating and packaging the first application interface and the second application interface to obtain a uniform application interface;
the parameter configuration module is used for acquiring configuration information of a development project to be accessed and acquiring configuration parameters of the development project according to the configuration information; the development project does not contain a multi-file uploading function;
and the associated application module is used for generating the input and the output of the unified application interface of the development project according to the configuration parameters and associating and applying the unified application interface to the development project according to the input and the output of the unified application interface.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the configuration method for file upload according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the configuration method for file upload according to any one of claims 1 to 7.
CN202110944703.XA 2021-08-17 2021-08-17 Configuration method, device, computer equipment and storage medium for file uploading Pending CN113656103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110944703.XA CN113656103A (en) 2021-08-17 2021-08-17 Configuration method, device, computer equipment and storage medium for file uploading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110944703.XA CN113656103A (en) 2021-08-17 2021-08-17 Configuration method, device, computer equipment and storage medium for file uploading

Publications (1)

Publication Number Publication Date
CN113656103A true CN113656103A (en) 2021-11-16

Family

ID=78491807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110944703.XA Pending CN113656103A (en) 2021-08-17 2021-08-17 Configuration method, device, computer equipment and storage medium for file uploading

Country Status (1)

Country Link
CN (1) CN113656103A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320441A1 (en) * 2007-06-23 2008-12-25 Azadeh Ahadian Extensible rapid application development for disparate data sources
CN103595769A (en) * 2013-10-29 2014-02-19 北京奇虎科技有限公司 Method and device for achieving file uploading through SDK
CN104423786A (en) * 2013-09-07 2015-03-18 镇江雅迅软件有限责任公司 Implementation method for asynchronously uploading multiple pictures based on Ajax (Asynchronous Java Scrip and XML) technology
CN104580298A (en) * 2013-10-17 2015-04-29 北大方正集团有限公司 File uploading processing method and device
WO2015062494A1 (en) * 2013-10-29 2015-05-07 北京奇虎科技有限公司 Method and device for sdk uploading and downloading of a file
CN106126276A (en) * 2016-06-17 2016-11-16 浪潮电子信息产业股份有限公司 A kind of call the device of transmitting assembly, method and system
CN107977243A (en) * 2017-11-27 2018-05-01 海尔优家智能科技(北京)有限公司 A kind of third party's interface call method and device
CN111930354A (en) * 2020-08-12 2020-11-13 创意信息技术股份有限公司 Framework component for software development and construction method thereof
CN112068925A (en) * 2020-07-30 2020-12-11 中国建设银行股份有限公司 File uploading method and device based on WebUploader component, electronic equipment and readable storage medium
CN112631694A (en) * 2020-12-11 2021-04-09 远光软件股份有限公司 API (application programming interface) packaging calling method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320441A1 (en) * 2007-06-23 2008-12-25 Azadeh Ahadian Extensible rapid application development for disparate data sources
CN104423786A (en) * 2013-09-07 2015-03-18 镇江雅迅软件有限责任公司 Implementation method for asynchronously uploading multiple pictures based on Ajax (Asynchronous Java Scrip and XML) technology
CN104580298A (en) * 2013-10-17 2015-04-29 北大方正集团有限公司 File uploading processing method and device
CN103595769A (en) * 2013-10-29 2014-02-19 北京奇虎科技有限公司 Method and device for achieving file uploading through SDK
WO2015062494A1 (en) * 2013-10-29 2015-05-07 北京奇虎科技有限公司 Method and device for sdk uploading and downloading of a file
CN106126276A (en) * 2016-06-17 2016-11-16 浪潮电子信息产业股份有限公司 A kind of call the device of transmitting assembly, method and system
CN107977243A (en) * 2017-11-27 2018-05-01 海尔优家智能科技(北京)有限公司 A kind of third party's interface call method and device
CN112068925A (en) * 2020-07-30 2020-12-11 中国建设银行股份有限公司 File uploading method and device based on WebUploader component, electronic equipment and readable storage medium
CN111930354A (en) * 2020-08-12 2020-11-13 创意信息技术股份有限公司 Framework component for software development and construction method thereof
CN112631694A (en) * 2020-12-11 2021-04-09 远光软件股份有限公司 API (application programming interface) packaging calling method and system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
【已注销】: "单文件与多文件的上传封装", 《CSDN-HTTPS://DOWNLOAD.CSDN.NET/DOWNLOAD/QQ_34529878/9827508?OPS_REQUEST_MISC=%257B%2522REQUEST%255FID%2522%253A%2522172363090616800226524387%2522%252C%2522SCM%2522%253A%252220140713.130102334.PC%255FCOMMERCIAL.%2522%257D&REQUEST_ID=17236309061680022, 27 April 2017 (2017-04-27) *
IT_XIAO小巫: "Retrofit2&RxJava2实现单文件和多文件上传", 《简书-HTTPS://WWW.JIANSHU.COM/P/7E16B942A4A6》, 4 September 2017 (2017-09-04) *
SENTHIL J: "Automatic Code Generation for Recurring Code Patterns in Web Based Applications and Increasing Efficiency of Data Access Code", 《INTERNATIONAL JOURNAL OF COMPUTER SCIENCE ISSUES》, 30 September 2012 (2012-09-30) *
秃头哥编程: "Vue实现多文件上传功能(前端+后端代码)", 《CSDN-HTTPS://BLOG.CSDN.NET/A_HELLOWORD/ARTICLE/DETAILS/119697557》, 14 August 2021 (2021-08-14) *

Similar Documents

Publication Publication Date Title
CN108446116B (en) Application program page generation method and device, computer equipment and storage medium
CN111679965B (en) Automated testing method, device, computer equipment and storage medium
US20210279115A1 (en) Automated api code generation
CN110187902B (en) Project transformation method, device, equipment and storage medium based on spring boot
CN112114808B (en) Page rendering method and device and electronic equipment
CN111949342B (en) Page generation method and device
US20200183683A1 (en) Application architecture generation
CN109597618B (en) Program development method, program development device, computer device, and storage medium
CN110362356B (en) Function data processing method and device, computer equipment and storage medium
CN111858101A (en) Cloud architecture system-oriented adaptation method, device, equipment and storage medium
CN109492144B (en) Association relation analysis method, device and storage medium for software system
CN111124544A (en) Interface display method and device, electronic equipment and storage medium
CN112685023A (en) Front-end development processing method, device, equipment and storage medium based on basic library
CN113282300A (en) Volume optimization method, device, equipment and storage medium for application installation package
CN112714148A (en) Interface configuration method, device, equipment and medium
CN109062906B (en) Translation method and device for program language resources
CN113656103A (en) Configuration method, device, computer equipment and storage medium for file uploading
CN113934752B (en) Spark component-based data processing method, device, equipment and medium
CN110865943A (en) Interface testing method and device, computer equipment and storage medium
CN114721929B (en) Test method, device, storage medium and equipment
CN114996249B (en) Data processing method, device, electronic equipment, storage medium and product
CN110990078B (en) Application initialization method and device, storage medium and mobile terminal
CN115543279A (en) Method, device, equipment and storage medium for binding data objects in page
CN107092601B (en) Resource file construction method, resource file application method and device
CN113608745A (en) Method for initializing user authority 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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20211116

WD01 Invention patent application deemed withdrawn after publication