IOS-based File Upload Method, Device, Equipment and Medium

The IOS-based file upload method improves flexibility and security by configuring and signing upload requests, addressing vulnerabilities and enhancing adaptability and integrity.

CN119854285BActive Publication Date: 2025-07-15SHENZHEN LEXIN SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510316669.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-07-15
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

The existing IOS side file upload method lacks encryption protection, resulting in security vulnerabilities and low flexibility during file upload.

Method used

By extracting file configuration from the file to be uploaded, generating upload domain names and scene values, performing upload request configurations and adding salt signatures, the security and flexibility of file upload are achieved.

Benefits of technology

Improves the flexibility and security of file uploads, supports file type and size restrictions in specific scenarios, blocks external attacks, and ensures data integrity and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854285B_ABST
    Figure CN119854285B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data transmission, and discloses a file upload method, device, equipment and medium based on the IOS side. The method includes: extracting a file configuration from the file to be uploaded, and applying for an upload format for the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value; generating an upload request according to the upload domain name and the upload scenario value; performing upload content configuration on the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request; performing salt signature on the configured upload request to obtain a signed upload request; performing file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result. The present invention can improve the flexibility during file upload on the IOS side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular, to a file uploading method, device, equipment and medium based on the IOS side. Background Art

[0002] The Internetworking Operating System - Cisco (IOS for short) is a complex operating system that has been widely used in production and life. When using the IOS system for social media interconnection and data backup operations, etc., it is often necessary to upload files on the IOS side to the server side or other device sides.

[0003] Existing file uploading methods on the IOS side are mostly uploading methods based on existing network library tools. For example, uploading methods through tools such as URLSession and AFNetworking. In practical applications, the uploading methods based on existing network library tools lack encryption protection for the transmitted data, resulting in security vulnerabilities in the file uploading process, being easily attacked, and there are no corresponding restrictive measures for file uploading, which may further lead to low flexibility when performing file uploading. Summary of the Invention

[0004] The present invention provides a file uploading method, device and computer-readable storage medium based on the IOS side, and its main purpose is to solve the problem of low flexibility when performing file uploading.

[0005] To achieve the above object, a file uploading method based on the IOS side provided by the present invention includes:

[0006] Extract a file configuration from the file to be uploaded, and apply for an upload format according to the file configuration for the file to be uploaded to obtain an upload domain name and an upload scenario value;

[0007] Generate an upload request according to the upload domain name and the upload scenario value;

[0008] Configure the upload content for the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request;

[0009] Perform salt signing on the configured upload request to obtain a signed upload request;

[0010] Perform file uploading and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result.

[0011] Optionally, the extracting a file configuration from the file to be uploaded includes:

[0012] Perform format recognition on the file to be uploaded to obtain the file type;

[0013] Perform size statistics on the file to be uploaded to obtain the file size;

[0014] Extract the name of the file to be uploaded to obtain the file name;

[0015] Perform file dependency analysis on the file to be uploaded to obtain the file dependency path;

[0016] Perform upload target analysis on the file to be uploaded to obtain the file upload target;

[0017] Perform scenario tracing on the file to be uploaded according to the file dependency path and the file upload target to obtain upload scenario data;

[0018] Generate a file configuration according to the file type, the file size, the file name, and the upload scenario data.

[0019] Optionally, the performing an upload format application on the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value includes:

[0020] Perform upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result;

[0021] Extract the file size, the file type, and the upload scenario data from the file configuration respectively according to the file test result;

[0022] Perform an upload domain name application on the file to be uploaded according to the file size and the file type to obtain an upload domain name;

[0023] Perform an upload scenario application on the file to be uploaded according to the upload scenario data to obtain an upload scenario value.

[0024] Optionally, the performing an upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result includes:

[0025] Extract the file type from the file configuration, and perform file structure splitting on the file to be uploaded according to the file type to obtain a local file set;

[0026] Perform file feature extraction on the local file set according to the file type to obtain a local file feature set;

[0027] Perform local security analysis on the local file feature set to obtain a local security score set;

[0028] Perform global dependency analysis on the local file feature set using a global attention mechanism to obtain a feature dependency weight set;

[0029] Perform weighted summation on the local security score set according to the feature dependency weight set to obtain a global security score;

[0030] Perform configuration security analysis on the file configuration to obtain a configuration security score;

[0031] Calculate a file security score based on the configuration security score and the global security score;

[0032] Perform security threshold verification on the file security score using a preset security threshold to obtain a file detection result.

[0033] Optionally, the configuring the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request includes:

[0034] Perform binary conversion on the file to be uploaded to obtain file data;

[0035] Initialize the download timeliness, and respectively extract the file name and file type from the file configuration;

[0036] Perform content configuration on the upload request according to the file data, the download timeliness, the file name, and the file type to obtain a configured upload request.

[0037] Optionally, the salting and signing the configured upload request to obtain a signed upload request includes:

[0038] Extract the file data, download timeliness, file name, and file type from the configured upload request;

[0039] Perform data padding on the file data to obtain padded file data;

[0040] Perform data block splitting on the padded file data to obtain a file data block set;

[0041] Perform non-linear operations, iterative confusion operations, and character splicing operations on each file data block in the file data block set to obtain a file signature;

[0042] Extract a dynamic timestamp from the upload request and generate a dynamic salt string according to the dynamic timestamp;

[0043] Perform character splicing operations on the dynamic salt string, the file signature, the download timeliness, the file name, and the file type to obtain a spliced salt string;

[0044] Perform data signature on the configuration upload request according to the spliced salt string to obtain a signed upload request.

[0045] Optionally, the performing data signature on the configuration upload request according to the spliced salt string to obtain a signed upload request includes:

[0046] Perform secondary data padding on the spliced salt string to obtain a padded salt string;

[0047] Perform secondary data block splitting on the padded salt string to obtain a set of salt string data blocks;

[0048] Perform Boolean operations, rotation iterations, and character splicing operations on each salt string data block in the salt string data block set to obtain a salted signature string;

[0049] Perform signature splicing on the configuration upload request according to the salted signature string to obtain a signed upload request.

[0050] Optionally, the generating an upload request according to the upload domain name and the upload scenario value includes:

[0051] Obtain a dynamic timestamp, and generate an upload address according to the dynamic timestamp, the upload domain name, and the upload scenario value;

[0052] Perform request initialization operations according to the upload address to obtain an upload request.

[0053] To solve the above problems, the present invention also provides a file upload device based on the IOS side, and the device includes:

[0054] A format application module, configured to extract a file configuration from a file to be uploaded, and perform an upload format application on the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value;

[0055] A request generation module, configured to generate an upload request according to the upload domain name and the upload scenario value;

[0056] A content configuration module, configured to perform upload content configuration on the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request;

[0057] A salted signature module, configured to perform salted signature on the configured upload request to obtain a signed upload request;

[0058] An upload verification module, configured to perform file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result.

[0059] To solve the above problems, the present invention also provides an electronic device, and the electronic device includes:

[0060] At least one processor; and,

[0061] A memory communicatively connected to the at least one processor; wherein,

[0062] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the above-mentioned IOS-side based file upload method.

[0063] To solve the above problems, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned IOS-side based file upload method.

[0064] In the embodiments of the present invention, by applying for an upload format for the file to be uploaded according to the file configuration and generating an upload request according to the upload domain name and the upload scenario value, it is possible to support file uploads with file type and file size limitations in specific scenarios, improving the flexibility of file upload. By configuring the upload content of the upload request according to the file to be uploaded and the file configuration, it is possible to configure the request body data for the upload request, thereby improving the integrity during file upload.

[0065] By performing salt signing on the configured upload request to obtain a signed upload request, it is convenient for the server side to implement signature verification of file data and request parameters, thereby effectively blocking external brute-force attacks. By performing upload verification, it is possible to determine whether the signed upload is successful based on whether an upload result is generated, thereby improving the flexibility of file upload. Therefore, the IOS-side based file upload method, device, equipment and medium proposed by the present invention can solve the problem of low flexibility during file upload. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a flowchart of the IOS-side based file upload method provided by an embodiment of the present invention;

[0067] Figure 2 It is a flowchart of extracting a file configuration provided by an embodiment of the present invention;

[0068] Figure 3 It is a flowchart of applying for an upload format provided by an embodiment of the present invention;

[0069] Figure 4 It is a device architecture diagram of the IOS-side based file upload device provided by an embodiment of the present invention;

[0070] Figure 5 A schematic structural diagram of an electronic device for implementing the file upload method based on the IOS side according to an embodiment of the present invention.

[0071] The implementation, functional features, and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments

[0072] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0073] An embodiment of the present application provides a file upload method based on the IOS side. The execution subject of the file upload method based on the IOS side includes, but is not limited to, at least one of an electronic device such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the file upload method based on the IOS side can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0074] Refer to Figure 1 As shown, it is a schematic flowchart of a file upload method based on the IOS side according to an embodiment of the present invention. In this embodiment, the file upload method based on the IOS side includes:

[0075] S1. Extract the file configuration from the file to be uploaded, and apply for an upload format for the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value.

[0076] Specifically, the file configuration refers to the configuration information of the file. The file configuration includes data such as the file type and the file size. Among them, the file type refers to the type of file to be uploaded, such as pictures, documents, videos, etc., which is used to help the server determine the required storage area and resources. The file size refers to the size of the file to be uploaded, which is used to help the server side determine whether it meets the specific file size upper limit requirement.

[0077] Specifically, the file to be uploaded refers to the file that needs to be uploaded. The file to be uploaded can be a multimedia file such as an image, a video, or a document. The upload domain name refers to the target server address of the file upload request. The upload domain name is the actual recipient of the file upload. For example, the upload domain name can be https: / / upload.example.com.

[0078] Specifically, the upload scenario value is a further refinement and classification of the file upload scenario, used to distinguish different types of file upload requirements. The upload scenario value is usually a predefined string or number, identifying the specific upload purpose or business scenario. Through the upload scenario value, the server can provide personalized configurations for the upload operation according to the file purpose, file type, or storage requirements. For example, when the file to be uploaded is a user profile image, the corresponding upload scenario value is profile image; when the file to be uploaded is a file or document, the corresponding upload scenario value is document.

[0079] In the embodiment of the present invention, referring to Figure 2 as shown, extracting the file configuration from the file to be uploaded includes:

[0080] S21. Perform format recognition on the file to be uploaded to obtain the file type;

[0081] S22. Perform size statistics on the file to be uploaded to obtain the file size;

[0082] S23. Extract the file name from the file to be uploaded to obtain the file name;

[0083] S24. Perform file dependency analysis on the file to be uploaded to obtain the file dependency path;

[0084] S25. Perform upload target analysis on the file to be uploaded to obtain the file upload target;

[0085] S26. Trace the scenario of the file to be uploaded according to the file dependency path and the file upload target to obtain the upload scenario data;

[0086] S27. Generate the file configuration according to the file type, the file size, the file name, and the upload scenario data.

[0087] Specifically, the format recognition refers to extracting the suffix name of the file to be uploaded and determining the file type according to the suffix name. For example, the file type corresponding to the suffix name jpg is the image type. The size statistics can be performed by the FileManager method or directly reading the file byte count method.

[0088] Specifically, the name can be extracted by querying the last component name in the local path of the file to be uploaded. The scenario traceability refers to tracing the usage scenario corresponding to the upload operation of the file to be uploaded.

[0089] Specifically, the file dependency analysis refers to extracting the API call path of the file to be uploaded and the dependency relationships between the various files called by the API. The upload target analysis refers to extracting the target node of the upload of the file to be uploaded as the file upload target.

[0090] Specifically, the scenario traceability according to the file dependency path and the file upload target means using a Heterogeneous Graph Neural Network (HGT) to generate an upload traceability graph based on the file dependency path and the file upload target, and performing scenario traceability on the file to be uploaded according to the upload traceability graph.

[0091] Specifically, by using a heterogeneous graph neural network for scenario traceability, it is possible to determine the upload scenario by combining the file calls of the file to be uploaded and the dependency relationships between files, thereby improving the accuracy of scenario traceability and further enhancing the accuracy of subsequent security detection.

[0092] Specifically, generating a file configuration according to the file type, the file size, the file name, and the upload scenario data means aggregating the file type, the file size, the file name, and the upload scenario data into a file configuration. Directly applying for a format by the file to be uploaded may lead to potential security vulnerabilities, such as erroneously uploading large files and malicious files. Generating a file configuration facilitates the unified management and review of IOS-side security policies and permission controls.

[0093] Specifically, referring to Figure 3 As shown, applying for an upload format for the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value includes:

[0094] S31. Perform an upload security check on the file to be uploaded according to the file configuration to obtain a file check result;

[0095] S32. Extract the file size, file type, and upload scenario data from the file configuration respectively according to the file test result;

[0096] S33. Apply for an upload domain name for the file to be uploaded according to the file size and the file type to obtain an upload domain name;

[0097] S34. Apply for an upload scenario for the file to be uploaded according to the uploaded scenario data to obtain an upload scenario value.

[0098] Specifically, the security detection of the file to be uploaded according to the file configuration to obtain a file detection result includes:

[0099] Extract the file type from the file configuration, and split the file structure of the file to be uploaded according to the file type to obtain a local file set;

[0100] Extract file features from the local file set according to the file type to obtain a local file feature set;

[0101] Perform local security analysis on the local file feature set to obtain a local security score set;

[0102] Use a global attention mechanism to perform global dependency analysis on the local file feature set to obtain a feature dependency weight set;

[0103] Perform weighted summation on the local security score set according to the feature dependency weight set to obtain a global security score;

[0104] Perform configuration security analysis on the file configuration to obtain a configuration security score;

[0105] Calculate a file security score according to the configuration security score and the global security score;

[0106] Use a preset security threshold to perform security threshold verification on the file security score to obtain a file detection result.

[0107] Specifically, the splitting of the file structure of the file to be uploaded according to the file type to obtain a local file set means splitting the file to be uploaded into a local file set composed of multiple Patches according to the file type, where each local file in the local file set corresponds to a Patch. For example, when the file type is text, the file to be uploaded is split by paragraph, and when the file type is an image, the file to be uploaded is split according to a preset image grid size.

[0108] Specifically, the extraction of file features from the local file set according to the file type to obtain a local file feature set means selecting an encoder of the corresponding type according to the file type to extract the file features of each local file in the local file set. For example, when the file type is text, encoders such as BERT, XLNet, or RoBERTa can be used for file feature extraction. When the file type is an image, CNN structures such as VGG, ResNet, and DenseNet can be used for file feature extraction.

[0109] Specifically, the local security analysis refers to calculating the local security scores of each local file feature in the local file feature set by using a hidden Markov model or by means of feature matching in a preset malicious feature library.

[0110] Specifically, the global dependency analysis refers to calculating the dependency weights between each local file feature in the local file feature set by using a global attention mechanism. The weighted summation means multiplying each feature dependency weight in the set of feature dependency weights by the corresponding local security score in the local security score set, and summing the results of each product to obtain the global security score.

[0111] Specifically, the configuration security analysis of the file configuration to obtain a configuration security score means dividing the file configuration vector into file configuration features, and using these file configuration features and models such as Transformer to calculate the configuration security score corresponding to the file configuration features.

[0112] Specifically, the security threshold is a preset threshold for determining whether there are abnormal situations in the file to be uploaded. The security threshold verification means determining whether the file security score is greater than the security threshold. If so, the file detection result is set to test success. If not, the file test result is set to test failure.

[0113] Specifically, the file test result includes test pass and test failure. Extracting the file size, file type, and upload scenario data from the file configuration according to the file test result means that when the file test result is test pass, the file size, file type, and upload scenario data are extracted. When the file test result is test failure, the file upload is terminated.

[0114] Specifically, through upload security detection, efficient file security detection of uploaded files can be achieved, reducing security risks on the server side and ensuring data security.

[0115] Specifically, the upload domain name application refers to sending the file size and the file type to the server side, and the server side allocates an upload domain name for the file size and the file type. For example, when the file type is an image type, the corresponding upload domain name is the image server domain name.

[0116] Specifically, the upload scenario application refers to sending the upload scenario data to the server side, and the server side allocates an upload scenario value for the upload scenario data. For example, when the upload scenario data is user avatar data, the corresponding upload scenario value is profile image.

[0117] In the embodiment of the present invention, by performing an upload format application on the file to be uploaded according to the file configuration, an upload domain name and an upload scenario value are obtained, which can support the upload of files with file type and file size limitations in specific scenarios, and improve the flexibility of file upload.

[0118] S2. Generate an upload request according to the upload domain name and the upload scenario value.

[0119] Specifically, the upload request refers to a request for data upload sent by the IOS side to the server side that needs to be uploaded.

[0120] Specifically, the generating of the upload request according to the upload domain name and the upload scenario value includes:

[0121] Obtain a dynamic timestamp, and generate an upload address according to the dynamic timestamp, the upload domain name, and the upload scenario value;

[0122] Perform a request initialization operation according to the upload address to obtain an upload request.

[0123] Specifically, the dynamic timestamp refers to the timestamp of the current time when the IOS side initiates an upload request, usually presented in the form of a Unix timestamp, that is, the number of seconds or milliseconds from 00:00:00 UTC on January 1, 1970 to the current time.

[0124] Specifically, the method of string concatenation can be used to generate an upload address according to the dynamic timestamp, the upload domain name, and the upload scenario value. For example, when the upload domain name is https: / / example.com / upload, the upload scenario value is profile image, and the dynamic timestamp is time, these values can be concatenated to generate a complete upload address, and the upload address is https: / / example.com / upload?scene=profile image&time=timestamp.

[0125] Specifically, the application programming interface of AFNetworking can be used to perform a request initialization operation according to the upload address, that is, use the AFHTTPSessionManager of AFNetworking to initialize the request, and specify the address of the request as the upload address to obtain an upload request.

[0126] In the embodiment of the present invention, by generating an upload request according to the upload domain name and the upload scenario value, it is possible to support the upload of file types and file size limits in specific scenarios, improving the flexibility of file upload.

[0127] S3. Configure the upload content of the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request.

[0128] Specifically, the configured upload request refers to the request data sent to the server side for file upload communication. In order for the server side to understand the file content of the file to be uploaded, the configured upload request includes data such as the request content and the upload address.

[0129] In the embodiment of the present invention, the step of configuring the upload content of the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request includes:

[0130] Perform binary conversion on the file to be uploaded to obtain file data;

[0131] Initialize the download time limit, and extract the file name and file type from the file configuration respectively;

[0132] Configure the content of the upload request according to the file data, the download time limit, the file name, and the file type to obtain a configured upload request.

[0133] Specifically, the binary conversion refers to converting the file character type of the file to be uploaded into a binary format, and the bin function or the bytearray function can be used for binary conversion. The download time limit refers to the time period during which the server side can save and support download operations after the file to be uploaded is uploaded to the server side.

[0134] Specifically, fileData can be used to configure the content according to the file data, fileName can be used to configure the content according to the file name, and mimeType can be used to configure the content according to the file type.

[0135] Specifically, fileData, fileName, and mimeType are fields in the request content of the configuration upload request. fileData is the binary data of the file to be uploaded, representing the actual content of the file. fileData can be any type of data, such as images, audio, video, documents, etc. fileName is the name of the file, such as example.jpg or document.pdf. fileName is the identifier when the file is uploaded, used for server-side storage or display. mimeType is the MIME type of the file, representing the content type of the file. Common MIME types include image or jpeg for image types, application or pdf for PDF document types, and video or mp4 for video types.

[0136] In an embodiment of the present invention, by configuring the upload content of the upload request according to the file to be uploaded and the file configuration, it is possible to configure the request body data for the upload request to be made, thereby improving the integrity during file upload.

[0137] S4. Perform salted signature on the configuration upload request to obtain a signed upload request.

[0138] Specifically, the configuration upload request lacks verification content and may have security vulnerabilities, making the file to be uploaded vulnerable to attacks. Therefore, it is necessary to perform salted signature on the configuration upload request. Among them, the signed upload request includes data such as request headers, request content, and upload addresses.

[0139] In an embodiment of the present invention, performing salted signature on the configuration upload request to obtain a signed upload request includes:

[0140] Extract file data, download time limit, file name, and file type from the configuration upload request;

[0141] Perform data padding on the file data to obtain padded file data;

[0142] Perform data block splitting on the padded file data to obtain a set of file data blocks;

[0143] Perform non-linear operations, iterative confusion operations, and character splicing operations on each file data block in the set of file data blocks to obtain a file signature;

[0144] Extract a dynamic timestamp from the upload request and generate a dynamic salt string based on the dynamic timestamp;

[0145] Perform a character concatenation operation on the dynamic salt string, the file signature, the download time limit, the file name, and the file type to obtain a concatenated salt string;

[0146] Perform data signing on the configuration upload request according to the concatenated salt string to obtain a signed upload request.

[0147] Specifically, the data padding refers to padding the bit length of the file data to a multiple of 512, which can be achieved by padding zeros at the end of the file data. The data block splitting refers to splitting the padded file data into 512-bit file data blocks, and each file data block contains 16 32-bit words. Generating the dynamic salt string according to the dynamic timestamp means generating a dynamic salt value through character concatenation based on the dynamic timestamp and the unique identifier of the upload server.

[0148] In detail, the four-round non-linear function of the MD5 cache can be used for non-linear operations, and the methods of circular left shift and addition operations can be used for iterative confusion for the file signature.

[0149] In detail, performing data signing on the configuration upload request according to the concatenated salt string to obtain a signed upload request includes:

[0150] Perform secondary data padding on the concatenated salt string to obtain a padded salt string;

[0151] Perform secondary data block splitting on the padded salt string to obtain a set of salt string data blocks;

[0152] Perform Boolean operations, rotation iterations, and character concatenation operations on each salt string data block in the set of salt string data blocks to obtain a salt signature string;

[0153] Perform signature concatenation on the configuration upload request according to the salt signature string to obtain a signed upload request.

[0154] Specifically, the secondary data padding refers to padding the bit length of the concatenated salt string to a multiple of 32, which can be achieved by padding zeros at the end. The secondary data block splitting refers to splitting the padded salt string into multiple 32-bit salt data blocks.

[0155] In detail, eight 32-bit constant registers of SM3 can be used for Boolean operations. The rotation iteration refers to performing iterative confusion operations on each salt string data block after Boolean operations by using data shift and exclusive OR methods. The signature concatenation refers to concatenating the salt signature string as the signature of the configuration upload request in the request body.

[0156] In the embodiment of the present invention, by performing salted signature on the configuration upload request to obtain a signed upload request, it is convenient for the server side to implement signature verification of file data and request parameters, thereby effectively blocking external brute-force attacks.

[0157] S5. Perform file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result.

[0158] Specifically, the upload result includes upload failure and upload success.

[0159] Specifically, upload verification means that after uploading the file to be uploaded to the server side according to the signed upload request, verifying the signed upload request on the server side. After the verification on the server side passes, it is judged whether a file download link corresponding to the signed upload request can be obtained; if so, the upload success is used as the upload result, and a file download link corresponding to the signed upload request is generated; if not, the upload failure is used as the upload result.

[0160] In the embodiment of the present invention, by performing upload verification, it is possible to judge whether the signed upload is successful according to whether an upload result is generated, thereby improving the flexibility of file upload.

[0161] In the embodiment of the present invention, by applying for an upload format for the file to be uploaded according to the file configuration and generating an upload request according to the upload domain name and the upload scenario value, it is possible to support file uploads with specific scenario file types and file size limitations, improving the flexibility of file upload. By configuring the upload content of the upload request according to the file to be uploaded and the file configuration, it is possible to configure request body data for the upload request, thereby improving the integrity during file upload.

[0162] By performing salted signature on the configuration upload request to obtain a signed upload request, it is convenient for the server side to implement signature verification of file data and request parameters, thereby effectively blocking external brute-force attacks. By performing upload verification, it is possible to judge whether the signed upload is successful according to whether an upload result is generated, thereby improving the flexibility of file upload. Therefore, the file upload method based on the IOS side proposed by the present invention can solve the problem of low flexibility during file upload.

[0163] As Figure 4 shown, it is the device architecture diagram of a file upload device based on the IOS side provided by an embodiment of the present invention.

[0164] The file upload device 100 based on the IOS side described in the present invention can be installed in an electronic device. According to the functions achieved, the file upload device 100 based on the IOS side can include a format application module 101, a request generation module 102, a content configuration module 103, a salt-added signature module 104, and an upload verification module 105. The modules described in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0165] In this embodiment, the functions of each module / unit are as follows:

[0166] The format application module 101 is used to extract file configuration from the file to be uploaded, and apply for an upload format for the file to be uploaded according to the file configuration, so as to obtain an upload domain name and an upload scenario value;

[0167] The request generation module 102 is used to generate an upload request according to the upload domain name and the upload scenario value;

[0168] The content configuration module 103 is used to perform upload content configuration on the upload request according to the file to be uploaded and the file configuration, so as to obtain a configured upload request;

[0169] The salt-added signature module 104 is used to perform salt-added signature on the configured upload request to obtain a signed upload request;

[0170] The upload verification module 105 is used to perform file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result.

[0171] Specifically, each module in the file upload device 100 based on the IOS side described in the embodiment of the present invention adopts the same technical means as the Figures 1 to 3 file upload method based on the IOS side described above, and can produce the same technical effects, which will not be elaborated here.

[0172] As Figure 5 shown, it is a schematic structural diagram of an electronic device for implementing a file upload method based on the IOS side provided by an embodiment of the present invention.

[0173] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a file upload program based on the IOS side.

[0174] Among them, in some embodiments, the processor 10 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and circuits. By running or executing programs or modules stored in the memory 11 (such as executing a file upload program based on the IOS side), and calling data stored in the memory 11, it performs various functions of the electronic device and processes data.

[0175] The memory 11 includes at least one type of readable storage medium. The readable storage medium includes flash memory, mobile hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), magnetic memories, magnetic disks, optical disks, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the mobile hard disk of the electronic device. In some other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped 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 can not only be used to store application software installed on the electronic device and various types of data, such as the code of a file upload program based on the IOS side, but also be used to temporarily store data that has been output or will be output.

[0176] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is set to achieve connection communication between the memory 11 and at least one processor 10, etc.

[0177] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between this electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an organic light-emitting diode (OLED) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device and to display a visual user interface.

[0178] Only the electronic device with components is shown in the figure. Those skilled in the art can understand that the structure shown in the figure does not constitute a limitation on the electronic device, and it may include fewer or more components than those shown in the figure, or combine some components, or have different component arrangements.

[0179] For example, although not shown, the electronic device may further include a power source (such as a battery) for powering each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or an inverter, and a power status indicator. The electronic device may also include a variety of sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0180] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0181] The text analysis program optimized based on length stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0182] Extract the file configuration from the file to be uploaded, and apply for an upload format for the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value;

[0183] Generate an upload request according to the upload domain name and the upload scenario value;

[0184] Perform upload content configuration on the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request;

[0185] Perform salted signature on the configured upload request to obtain a signed upload request;

[0186] Perform file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result.

[0187] Specifically, for the specific implementation method of the above instructions by the processor 10, reference may be made to the description of the relevant steps in the corresponding embodiments of the attached drawings, which will not be elaborated here.

[0188] Further, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM for short).

[0189] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement:

[0190] Extract the file configuration from the file to be uploaded, and perform an upload format application on the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value;

[0191] Generate an upload request according to the upload domain name and the upload scenario value;

[0192] Perform upload content configuration on the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request;

[0193] Perform salted signature on the configured upload request to obtain a signed upload request;

[0194] Perform file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result.

[0195] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.

[0196] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, in each embodiment of the present invention, each functional module can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.

[0198] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0199] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claims involved.

[0200] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI for short) is a theory, method, technology and application device that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0201] In addition, obviously, the word "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices described in the device embodiments can also be implemented by one unit or device through software or hardware. Words such as first, second, etc. are used to represent names and do not represent any specific order.

[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A file upload method based on the IOS side, characterized in that, IOS is a network configuration system, and the method includes: Extract the file configuration from the file to be uploaded, and apply for the upload format for the file to be uploaded according to the file configuration to obtain the upload domain name and the upload scenario value; wherein, the file configuration is generated according to the file type, file size, file name, and upload scenario data; Generate an upload request according to the upload domain name and the upload scenario value; Configure the upload content for the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request; Perform salted signature on the configured upload request to obtain a signed upload request; Perform file upload and upload verification on the file to be uploaded according to the signed upload request to obtain an upload result; wherein, applying for the upload format for the file to be uploaded according to the file configuration to obtain the upload domain name and the upload scenario value includes: performing upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result, extracting the file size, file type, and upload scenario data from the file configuration respectively according to the file detection result, applying for the upload domain name for the file to be uploaded according to the file size and the file type to obtain the upload domain name, and applying for the upload scenario for the file to be uploaded according to the upload scenario data to obtain the upload scenario value.

2. The file upload method based on the IOS side according to claim 1, wherein The extracting the file configuration from the file to be uploaded includes: Perform format recognition on the file to be uploaded to obtain the file type; Perform size statistics on the file to be uploaded to obtain the file size; Extract the name of the file to be uploaded to obtain the file name; Perform file dependency analysis on the file to be uploaded to obtain the file dependency path; Perform upload target analysis on the file to be uploaded to obtain the file upload target; Perform scenario tracing on the file to be uploaded according to the file dependency path and the file upload target to obtain the upload scenario data.

3. The file upload method based on the IOS side according to claim 1, characterized in that, The performing upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result includes: Extract the file type from the file configuration, and split the file structure of the file to be uploaded according to the file type to obtain a set of local files; Extract file features from the set of local files according to the file type to obtain a set of local file features; Perform local security analysis on the set of local file features to obtain a set of local security scores; Perform global dependency analysis on the set of local file features by using a global attention mechanism to obtain a set of feature dependency weights; Perform weighted summation on the set of local security scores according to the set of feature dependency weights to obtain a global security score; Perform configuration security analysis on the file configuration to obtain a configuration security score; Calculate the file security score according to the configuration security score and the global security score; Perform security threshold verification on the file security score by using a preset security threshold to obtain the file detection result.

4. The file upload method based on the IOS side according to claim 1, characterized in that, The configuring the upload content for the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request includes: Perform binary conversion on the file to be uploaded to obtain file data; Initialize the download timeliness, and extract the file name and file type from the file configuration respectively; Perform content configuration on the upload request according to the file data, the download timeliness, the file name, and the file type to obtain a configured upload request.

5. The file upload method based on the IOS side according to claim 1, characterized in that, The step of performing salt addition and signature on the configured upload request to obtain a signed upload request includes: Extract the file data, the download timeliness, the file name, and the file type from the configured upload request; Perform data padding on the file data to obtain padded file data; Perform data block splitting on the padded file data to obtain a set of file data blocks; Perform non-linear operations, iterative confusion operations, and character splicing operations on each file data block in the set of file data blocks to obtain a file signature; Extract the dynamic timestamp from the upload request, and generate a dynamic salt string according to the dynamic timestamp; Perform character splicing operations on the dynamic salt string, the file signature, the download timeliness, the file name, and the file type to obtain a spliced salt string; Perform data signature on the configured upload request according to the spliced salt string to obtain a signed upload request.

6. The file uploading method based on the IOS side according to claim 5, wherein The step of performing data signature on the configured upload request according to the spliced salt string to obtain a signed upload request includes: Perform secondary data padding on the spliced salt string to obtain a padded salt string; Perform secondary data block splitting on the padded salt string to obtain a set of salt string data blocks; Perform Boolean operations, rotation iterations, and character splicing operations on each salt string data block in the set of salt string data blocks to obtain a salt signature string; Perform signature splicing on the configured upload request according to the salt signature string to obtain a signed upload request.

7. A file upload device based on the IOS side, characterized in that, IOS is a network configuration system, and the device includes: A format application module, configured to extract a file configuration from a file to be uploaded, and perform an upload format application on the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value; wherein, the file configuration is generated according to the file type, the file size, the file name, and the upload scenario data; A request generation module, configured to generate an upload request according to the upload domain name and the upload scenario value; A content configuration module, configured to perform upload content configuration on the upload request according to the file to be uploaded and the file configuration to obtain a configured upload request; A salt addition and signature module, configured to perform salt addition and signature on the configured upload request to obtain a signed upload request; An upload verification module, configured to perform file upload and upload verification on the file to be uploaded according to the signature upload request, and obtain an upload result; wherein, the step of applying for an upload format for the file to be uploaded according to the file configuration to obtain an upload domain name and an upload scenario value includes: performing an upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result, extracting the file size, file type, and upload scenario data from the file configuration respectively according to the file detection result, applying for an upload domain name for the file to be uploaded according to the file size and the file type to obtain an upload domain name, and applying for an upload scenario for the file to be uploaded according to the upload scenario data to obtain an upload scenario value.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the IOS-based file upload method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the IOS-based file upload method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • File uploading method and device, file issuing method and device, equipment and storage medium

    CN116743736A

  • File transmission method and system, storage medium and electronic equipment

    CN118433171A