File uploading method and device based on IOS end, equipment and medium
By extracting file configurations to generate upload requests and adding salt to the configuration upload requests, the security vulnerabilities and insufficient flexibility of the existing IOS side file upload methods are solved, and efficient and secure file uploads are achieved.
Patent Information
- Application Number
- CN202510316669.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-18
AI Technical Summary
The existing IOS file upload method lacks encryption protection for the transmitted data, has security vulnerabilities, and is low in flexibility, making it difficult to meet the file type and file size limitations of specific scenarios.
By extracting file configuration from the file to be uploaded, generating upload requests, and adding salt signatures to the configuration upload requests, file upload and upload verification is realized, and file type and file size limitations are supported in specific scenarios.
Improve the flexibility and security of file uploads, effectively block external attacks by adding salt signatures, ensuring the integrity and security of file uploads.
Smart Images

Figure CN119854285A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to an IOS-based file uploading method, device, equipment and medium. Background Art
[0002] The Internetworking Operating System-Cisco (IOS) is a complex operating system that is widely used in production and life. When using the IOS system for social media interconnection and data backup, it is often necessary to upload files on the IOS side to the server or other device side.
[0003] Most of the existing IOS file upload methods are based on existing network library tools, such as upload methods through URLSession, AFNetworking and other tools. In actual applications, the upload methods based on existing network library tools lack encryption protection for transmitted data, which makes the file upload process have security vulnerabilities and vulnerable to attacks. There are no corresponding restrictions on file uploads, which may lead to low flexibility when uploading files. Summary of the invention
[0004] The present invention provides an IOS-based file uploading method, device and computer-readable storage medium, the main purpose of which is to solve the problem of low flexibility when uploading files.
[0005] To achieve the above purpose, the present invention provides a file uploading method based on an IOS terminal, comprising: Extracting file configuration from the file to be uploaded, and applying an upload format to the file to be uploaded according to the file configuration, to obtain an upload domain name and an upload scenario value; Generate 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 configuration upload request; Performing a salted signature on the configuration upload request to obtain a signed upload request; The file to be uploaded is uploaded and verified according to the signature upload request to obtain an upload result.
[0006] Optionally, extracting the file configuration from the file to be uploaded includes: Performing format identification 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; Performing file dependency analysis on the file to be uploaded to obtain a file dependency path; Performing upload target analysis on the file to be uploaded to obtain the file upload target; According to the file dependency path and the file upload target, the scene source of the file to be uploaded is traced to obtain the upload scene data; Generate a file configuration according to the file type, the file size, the file name and the uploaded scene data.
[0007] Optionally, 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 check on the file to be uploaded according to the file configuration to obtain a file check result; Extracting the file size, file type and upload scenario data from the file configuration according to the file test results; 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; An upload scene application is performed on the file to be uploaded according to the upload scene data to obtain an upload scene value.
[0008] Optionally, performing upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result includes: Extracting a file type from the file configuration, and performing file structure splitting on the file to be uploaded according to the file type to obtain a partial file set; Extracting file features from the local file set according to the file type to obtain a local file feature set; Performing local security analysis on the local file feature set to obtain a local security score set; Performing global dependency analysis on the local file feature set using a global attention mechanism to obtain a feature dependency weight set; Performing weighted summation on the local security score set according to the feature dependency weight set to obtain a global security score; Performing a configuration security analysis on the file configuration to obtain a configuration security score; Calculate a file security score based on the configuration security score and the global security score; The file security score is verified using a preset security threshold to obtain a file detection result.
[0009] Optionally, 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: Performing binary conversion on the file to be uploaded to obtain file data; Initialize the download time, extract the file name and file type from the file configuration respectively; The upload request is content configured according to the file data, the download time limit, the file name, and the file type to obtain a configured upload request.
[0010] Optionally, the step of performing a salted signature on the configuration upload request to obtain a signed upload request includes: Extract file data, download time, file name and file type from the configuration upload request; Performing data padding on the file data to obtain padding file data; Splitting the fill-in file data into data blocks to obtain a file data block set; Performing nonlinear operation, iterative obfuscation operation and character concatenation operation on each file data block in the file data block set to obtain a file signature; Extracting a dynamic timestamp from the upload request, and generating a dynamic salt string according to the dynamic timestamp; Performing 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; The configuration upload request is data signed according to the concatenated salt string to obtain a signed upload request.
[0011] Optionally, performing data signing on the configuration upload request according to the concatenated salt string to obtain a signed upload request includes: Performing secondary data padding on the spliced salted string to obtain a padding salted string; Splitting the padded salt string into secondary data blocks to obtain a salt string data block set; Performing Boolean operations, rotation iterations, and character concatenation operations on each of the salted string data blocks to obtain a salted signature string; The configuration upload request is signed and concatenated according to the salted signature string to obtain a signed upload request.
[0012] Optionally, generating an upload request according to the upload domain name and the upload scenario value includes: Obtain a dynamic timestamp, and generate an upload address according to the dynamic timestamp, the upload domain name, and the upload scenario value; A request initialization operation is performed according to the upload address to obtain an upload request.
[0013] In order to solve the above problems, the present invention also provides a file uploading device based on an IOS terminal, the device comprising: The format application module is used to extract the file configuration from the file to be uploaded, and apply the upload format to the file to be uploaded according to the file configuration to obtain the upload domain name and the upload scenario value; A request generation module, used to generate an upload request according to the upload domain name and the upload scenario value; A content configuration module, used to perform upload content configuration on the upload request according to the file to be uploaded and the file configuration, to obtain a configuration upload request; A salted signature module, used to perform a salted signature on the configuration upload request to obtain a signed upload request; The upload verification module is used to upload and verify the file to be uploaded according to the signature upload request to obtain an upload result.
[0014] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned file uploading method based on the IOS end.
[0015] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned IOS-based file uploading method.
[0016] The embodiment of the present invention can support the uploading of files with file types and file size restrictions in specific scenarios by applying for the upload format of 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, thereby improving the flexibility of file uploading. By configuring the upload content of the upload request according to the file to be uploaded and the file configuration, the request body data can be configured for the request to be uploaded, thereby improving the integrity of the file when uploading.
[0017] By performing salted signature on the configuration upload request to obtain a signature upload request, the server can conveniently 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 signature upload is successful based on whether an upload result is generated, thereby improving the flexibility of file upload. Therefore, the file upload method, device, equipment and medium based on the IOS end proposed by the present invention can solve the problem of low flexibility when uploading files. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a file uploading method based on an IOS terminal provided by an embodiment of the present invention; Figure 2 A schematic diagram of a process for extracting file configuration provided by an embodiment of the present invention; Figure 3 A schematic diagram of a process for applying for an upload format according to an embodiment of the present invention; Figure 4 A device architecture diagram of a file upload device based on an IOS terminal provided by an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an electronic device for implementing the IOS-based file uploading method provided in one embodiment of the present invention.
[0019] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0020] 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.
[0021] The embodiment of the present application provides a file upload method based on the IOS end. The execution subject of the file upload method based on the IOS end includes but is not limited to at least one of the electronic devices such as the server end, the terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the file upload method based on the IOS end can be executed by software or hardware installed on the terminal device or the 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 it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, referred to as CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0022] Reference Figure 1FIG. 1 is a flowchart of a method for uploading files based on an IOS terminal according to an embodiment of the present invention. In this embodiment, the method for uploading files based on an IOS terminal includes: S1. 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 to obtain an upload domain name and an upload scenario value.
[0023] Specifically, the file configuration refers to the configuration information of the file, and the file configuration includes data such as file type and file size. The file type refers to the file type that needs 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 determine whether it meets the specific file size upper limit requirements.
[0024] In detail, the file to be uploaded refers to the file that needs to be uploaded. The file to be uploaded can be multimedia files such as images, videos and documents. 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.
[0025] Specifically, the upload scenario value is a further refinement and classification of the file upload scenario, which is used to distinguish different types of file upload requirements. The upload scenario value is usually a predefined string or number that identifies the specific upload purpose or business scenario. Through the upload scenario value, the server can provide personalized configuration 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 picture, 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.
[0026] In the embodiment of the present invention, refer to Figure 2 As shown, the step of extracting the file configuration from the file to be uploaded includes: S21, identifying the format of the file to be uploaded to obtain the file type; S22, performing size statistics on the file to be uploaded to obtain the file size; S23, extracting the name of the file to be uploaded to obtain the file name; S24, performing file dependency analysis on the file to be uploaded to obtain a file dependency path; S25, analyzing the upload target of the file to be uploaded to obtain the file upload target; S26, tracing the scene source of the file to be uploaded according to the file dependency path and the file upload target to obtain upload scene data; S27: Generate a file configuration according to the file type, the file size, the file name, and the uploaded scene data.
[0027] In detail, the format recognition refers to extracting the suffix of the file to be uploaded, and determining the file type according to the suffix. For example, the file type corresponding to the suffix jpg is the image type. The size statistics can be performed through the FileManager method or by directly reading the number of file bytes.
[0028] Specifically, the name can be extracted by querying the last component name in the local path of the file to be uploaded, and the scenario tracing refers to tracing the usage scenario corresponding to the upload operation of the file to be uploaded.
[0029] In detail, the file dependency analysis refers to extracting the API call path of the file to be uploaded and the dependency relationship between the various files called by the API, and the upload target analysis refers to extracting the upload target node of the file to be uploaded as the file upload target.
[0030] Specifically, the scene tracing according to the file dependency path and the file upload target refers to using a heterogeneous graph neural network (HGT) to generate an upload tracing graph according to the file dependency path and the file upload target, and tracing the scene of the file to be uploaded according to the upload tracing graph.
[0031] In detail, by using heterogeneous graph neural networks to trace the scene, the uploaded scene can be determined by combining the file calls of the files to be uploaded and the dependencies between the files, thereby improving the accuracy of scene tracing and further improving the accuracy of subsequent security detection.
[0032] In detail, generating the file configuration according to the file type, the file size, the file name and the upload scenario data refers to aggregating the file type, the file size, the file name and the upload scenario data into a file configuration. Directly applying for the format of the file to be uploaded may lead to potential security vulnerabilities, such as erroneous uploading of large files and malicious files. By generating the file configuration, unified management and review of IOS security policies and permission control are facilitated.
[0033] Specifically, refer to Figure 3As shown, the upload format application is performed on the file to be uploaded according to the file configuration to obtain the upload domain name and the upload scenario value, including: S31, performing an upload security check on the file to be uploaded according to the file configuration to obtain a file check result; S32, extracting the file size, file type and upload scenario data from the file configuration according to the file test result; S33, 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; S34: Apply an upload scenario for the file to be uploaded according to the upload scenario data to obtain an upload scenario value.
[0034] In detail, performing upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result includes: Extracting a file type from the file configuration, and performing file structure splitting on the file to be uploaded according to the file type to obtain a partial file set; Extracting file features from the local file set according to the file type to obtain a local file feature set; Performing local security analysis on the local file feature set to obtain a local security score set; Performing global dependency analysis on the local file feature set using a global attention mechanism to obtain a feature dependency weight set; Performing weighted summation on the local security score set according to the feature dependency weight set to obtain a global security score; Performing a configuration security analysis on the file configuration to obtain a configuration security score; Calculate a file security score based on the configuration security score and the global security score; The file security score is verified using a preset security threshold to obtain a file detection result.
[0035] Specifically, splitting 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 consisting of multiple Patches according to the file type, wherein 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 into paragraphs, and when the file type is an image, the file to be uploaded is split according to a preset image grid size.
[0036] In detail, performing file feature extraction on the local file set according to the file type to obtain the local file feature set means selecting an encoder of a corresponding type according to the file type to extract 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 to extract file features. When the file type is an image, CNN structures such as VGG, ResNet, DenseNet can be used to extract file features.
[0037] Specifically, the local security analysis refers to calculating the local security score of each local file feature in the local file feature set by using a hidden Markov model or by using feature matching of a preset malicious feature library.
[0038] In detail, the global dependency analysis refers to using the global attention mechanism to calculate the dependency weights between the local file features in the local file feature set, and the weighted summation refers to multiplying each feature dependency weight in the feature dependency weight set by the corresponding local security score in the local security score set, and summing up the multiplication results to obtain the global security score.
[0039] Specifically, performing configuration security analysis on the file configuration to obtain a configuration security score refers to dividing the file configuration vector into file configuration features, and using the file configuration features and a model such as Transformer to calculate a configuration security score corresponding to the file configuration feature.
[0040] Specifically, the security threshold is a preset threshold for determining whether the file to be uploaded has any abnormal situation, and the security threshold check refers to 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.
[0041] In detail, the file test results include test pass and test fail, and extracting the file size, file type and upload scenario data from the file configuration according to the file test results means that when the file test result is test pass, the file size, file type and upload scenario data are extracted, and when the file test result is test fail, the file upload is ended.
[0042] Specifically, by performing upload security detection, efficient file security detection of uploaded files can be achieved, security risks on the server side can be reduced, and data security can be guaranteed.
[0043] In detail, applying for an upload domain name refers to sending the file size and the file type to the server, and the server allocates an upload domain name based on 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.
[0044] Specifically, the upload scene application refers to sending the upload scene data to the server, and the server allocates an upload scene value for the upload scene data. For example, when the upload scene data is user avatar data, the corresponding upload scene value is profile image.
[0045] In an embodiment of the present invention, by applying for an upload format for the file to be uploaded according to the file configuration, an upload domain name and an upload scenario value are obtained, so that file uploads with file types and file size restrictions in specific scenarios can be supported, thereby improving the flexibility of file upload.
[0046] S2. Generate an upload request according to the upload domain name and the upload scenario value.
[0047] Specifically, the upload request refers to a request for data upload sent by the IOS end to the server end where the data needs to be uploaded.
[0048] In detail, generating an upload request according to the upload domain name and the upload scenario value includes: Obtain a dynamic timestamp, and generate an upload address according to the dynamic timestamp, the upload domain name, and the upload scenario value; A request initialization operation is performed according to the upload address to obtain an upload request.
[0049] In detail, the dynamic timestamp refers to the timestamp of the current time when the iOS terminal initiates the upload request, which is usually presented in the form of a Unix timestamp, that is, the number of seconds or milliseconds from January 1, 1970 00:00:00 UTC to the current time.
[0050] Specifically, the upload address can be generated according to the dynamic timestamp, the upload domain name and the upload scene value using a string concatenation method. For example, when the upload domain name is https: / / example.com / upload, the upload scene value is profile image, and the dynamic timestamp is time, these values can be concatenated to generate a complete upload address, which is https: / / example.com / upload?scene=profile image&time=timestamp.
[0051] In detail, the application program interface of AFNetworking may be used to perform a request initialization operation according to the upload address, that is, the request is initialized using AFHTTPSessionManager of AFNetworking, and the address of the request is designated as the upload address to obtain an upload request.
[0052] 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 files with file types and file size restrictions in specific scenarios, thereby improving the flexibility of file upload.
[0053] S3. Perform upload content configuration on the upload request according to the file to be uploaded and the file configuration to obtain a configuration upload request.
[0054] In detail, the configuration upload request refers to request data sent to the server for file upload communication. In order to enable the server to understand the file content of the file to be uploaded, the configuration upload request includes data such as request content and upload address.
[0055] 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 the configured upload request includes: Performing binary conversion on the file to be uploaded to obtain file data; Initialize the download time, extract the file name and file type from the file configuration respectively; The upload request is content configured according to the file data, the download time limit, the file name, and the file type to obtain a configured upload request.
[0056] In detail, the binary conversion refers to converting the file character type of the file to be uploaded into a binary format, and the binary conversion can be performed using the bin function or the bytearray function. The download time limit refers to the time period during which the server can save and support downloading after uploading the file to be uploaded to the server.
[0057] Specifically, the content may be configured according to the file data using fileData, the content may be configured according to the file name using fileName, and the content may be configured according to the file type using mimeType.
[0058] In detail, 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, indicating the actual content of the file, fileData can be any type of data, such as pictures, 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, which is used for server-side storage or display, mimeType is the MIME type of the file, indicating the content type of the file, common MIME types include image or jpeg for picture types, application or pdf for PDF document types, and video or mp4 for video types.
[0059] In the 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, the request body data can be configured for the request to be uploaded, thereby improving the integrity of the file when uploading.
[0060] S4. Perform salt signature on the configuration upload request to obtain a signed upload request.
[0061] In detail, the configuration upload request lacks verification content and may have security vulnerabilities, making the uploaded file vulnerable to attacks. Therefore, the configuration upload request needs to be salted and signed, wherein the signed upload request includes data such as the request header, request content, and upload address.
[0062] In the embodiment of the present invention, the step of performing a salted signature on the configuration upload request to obtain a signed upload request includes: Extract file data, download time, file name and file type from the configuration upload request; Performing data padding on the file data to obtain padding file data; Splitting the fill-in file data into data blocks to obtain a file data block set; Performing nonlinear operation, iterative obfuscation operation and character concatenation operation on each file data block in the file data block set to obtain a file signature; Extracting a dynamic timestamp from the upload request, and generating a dynamic salt string according to the dynamic timestamp; Performing 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; The configuration upload request is data signed according to the concatenated salt string to obtain a signed upload request.
[0063] Specifically, the data padding refers to filling the bit length of the file data to a multiple of 512, and the data padding can be performed by padding zeros at the end of the file data. The data block splitting refers to dividing the padded file data into 512-bit file data blocks, each of the file data blocks contains 16 32-bit words, and the generating of the dynamic salt string according to the dynamic timestamp refers to generating a dynamic salt value by character splicing according to the dynamic timestamp and the unique identifier of the upload server.
[0064] In detail, the four-round nonlinear function of the MD5 cache can be used to perform nonlinear operations, and the circular left shift and addition operations can be used to perform iterative obfuscation, the file signature.
[0065] In detail, the data signing of the configuration upload request according to the spliced salt string to obtain the signed upload request includes: Performing secondary data padding on the spliced salted string to obtain a padding salted string; Splitting the padded salt string into secondary data blocks to obtain a salt string data block set; Performing Boolean operations, rotation iterations, and character concatenation operations on each of the salted string data blocks to obtain a salted signature string; The configuration upload request is signed and concatenated according to the salted signature string to obtain a signed upload request.
[0066] Specifically, the secondary data padding refers to filling the bit length of the spliced salt string to a multiple of 32, and the secondary data padding can be performed by padding with zeros at the end. The secondary data block splitting refers to splitting the padding salt string into multiple 32-bit salted data blocks.
[0067] In detail, the eight 32-bit constant registers of SM3 can be used for Boolean operations. The round-robin iteration refers to the iterative obfuscation operation of each salted string data block after the Boolean operation using data shifting and XOR methods. The signature splicing refers to splicing the salted signature string as the signature of the configuration upload request in the request body.
[0068] In the embodiment of the present invention, by performing salted signature on the configuration upload request to obtain a signed upload request, the server can conveniently implement signature verification of file data and request parameters, thereby effectively blocking external brute force attacks.
[0069] S5. Upload and verify the file to be uploaded according to the signature upload request to obtain an upload result.
[0070] In detail, the upload result includes upload failure and upload success.
[0071] Specifically, upload verification means that after uploading the file to be uploaded to the server according to the signed upload request, the signed upload request is verified on the server side. After the verification on the server side is passed, it is determined whether the file download link corresponding to the signed upload request can be obtained; if so, the upload success is taken as the upload result, and the file download link corresponding to the signed upload request is generated; if not, the upload failure is taken as the upload result.
[0072] In the embodiment of the present invention, by performing upload verification, it is possible to determine whether the signature upload is successful based on whether an upload result is generated, thereby improving the flexibility of file upload.
[0073] The embodiment of the present invention can support the uploading of files with file types and file size restrictions in specific scenarios by applying for the upload format of 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, thereby improving the flexibility of file uploading. By configuring the upload content of the upload request according to the file to be uploaded and the file configuration, the request body data can be configured for the request to be uploaded, thereby improving the integrity of the file when uploading.
[0074] By performing salted signature on the configuration upload request to obtain a signature upload request, the server can conveniently 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 signature upload is successful based on whether an upload result is generated, thereby improving the flexibility of file upload. Therefore, the file upload method based on the IOS end proposed by the present invention can solve the problem of low flexibility when uploading files.
[0075] like Figure 4 , which is a device architecture diagram of an IOS-based file upload device provided by an embodiment of the present invention.
[0076] The IOS-based file upload device 100 of the present invention can be installed in an electronic device. According to the functions implemented, the IOS-based file upload device 100 can include a format application module 101, a request generation module 102, a content configuration module 103, a salt signature module 104 and an upload verification module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0077] In this embodiment, the functions of each module / unit are as follows: The format application module 101 is used to extract the file configuration from the file to be uploaded, and apply the upload format to the file to be uploaded according to the file configuration to obtain the upload domain name and the upload scenario value; The request generating module 102 is used to generate an upload request according to the upload domain name and the upload scenario value; 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 to obtain a configuration upload request; The salted signature module 104 is used to perform a salted signature on the configuration upload request to obtain a signed upload request; The upload verification module 105 is used to upload and verify the file to be uploaded according to the signature upload request to obtain an upload result.
[0078] In detail, each module described in the IOS-based file upload device 100 in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The same technical means as the file upload method based on the IOS side described in , and can produce the same technical effects, will not be repeated here.
[0079] like Figure 5 , is a schematic diagram of the structure of an electronic device for implementing an IOS-based file uploading method provided by an embodiment of the present invention.
[0080] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an IOS-based file upload program.
[0081] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a file upload program based on the IOS terminal, etc.), and calling data stored in the memory 11.
[0082] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC for short), a secure digital (SecureDigital, SD for short) card, a flash card (Flash Card for short), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the file upload program based on the IOS end, but also can be used to temporarily store data that has been output or is to be output.
[0083] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0084] 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 the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (Organic Light-Emitting Diode, referred to as 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 information processed in the electronic device and to display a visual user interface.
[0085] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0086] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0087] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0088] The text analysis program based on length optimization stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve: Extracting file configuration from the file to be uploaded, and applying an upload format to the file to be uploaded according to the file configuration, to obtain an upload domain name and an upload scenario value; Generate 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 configuration upload request; Performing a salted signature on the configuration upload request to obtain a signed upload request; The file to be uploaded is uploaded and verified according to the signature upload request to obtain an upload result.
[0089] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0090] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it 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, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0091] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement: Extracting file configuration from the file to be uploaded, and applying an upload format to the file to be uploaded according to the file configuration, to obtain an upload domain name and an upload scenario value; Generate 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 configuration upload request; Performing a salted signature on the configuration upload request to obtain a signed upload request; The file to be uploaded is uploaded and verified according to the signature upload request to obtain an upload result.
[0092] In the 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 schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0093] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0095] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0096] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0097] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application device that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0098] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the device embodiment can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A file uploading method based on an IOS terminal, characterized in that: The method comprises: Extracting file configuration from the file to be uploaded, and applying an upload format to the file to be uploaded according to the file configuration, to obtain an upload domain name and an upload scenario value; Generate 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 configuration upload request; Performing a salted signature on the configuration upload request to obtain a signed upload request; The file to be uploaded is uploaded and verified according to the signature upload request to obtain an upload result.
2. The file uploading method based on the IOS terminal as claimed in claim 1, characterized in that: The step of extracting the file configuration from the file to be uploaded includes: Performing format identification 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; Performing file dependency analysis on the file to be uploaded to obtain a file dependency path; Performing upload target analysis on the file to be uploaded to obtain the file upload target; According to the file dependency path and the file upload target, the scene source of the file to be uploaded is traced to obtain the upload scene data; Generate a file configuration according to the file type, the file size, the file name and the uploaded scene data.
3. The file uploading method based on the IOS terminal as claimed in claim 1, characterized in that: The step of applying 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 check on the file to be uploaded according to the file configuration to obtain a file check result; Extracting the file size, file type and upload scenario data from the file configuration according to the file test results; 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; An upload scene application is performed on the file to be uploaded according to the upload scene data to obtain an upload scene value.
4. The file uploading method based on the IOS terminal as claimed in claim 3, characterized in that: The step of performing upload security detection on the file to be uploaded according to the file configuration to obtain a file detection result includes: Extracting a file type from the file configuration, and performing file structure splitting on the file to be uploaded according to the file type to obtain a partial file set; Extracting file features from the local file set according to the file type to obtain a local file feature set; Performing local security analysis on the local file feature set to obtain a local security score set; Performing global dependency analysis on the local file feature set using a global attention mechanism to obtain a feature dependency weight set; Performing weighted summation on the local security score set according to the feature dependency weight set to obtain a global security score; Performing a configuration security analysis on the file configuration to obtain a configuration security score; Calculate a file security score based on the configuration security score and the global security score; The file security score is verified using a preset security threshold to obtain a file detection result.
5. The file uploading method based on the IOS terminal as claimed in claim 1, characterized in that: 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: Performing binary conversion on the file to be uploaded to obtain file data; Initialize the download time, extract the file name and file type from the file configuration respectively; The upload request is content configured according to the file data, the download time limit, the file name, and the file type to obtain a configured upload request.
6. The file uploading method based on the IOS terminal as claimed in claim 1, characterized in that: The step of performing salted signing on the configuration upload request to obtain a signed upload request includes: Extract file data, download time, file name and file type from the configuration upload request; Performing data padding on the file data to obtain padding file data; Splitting the fill-in file data into data blocks to obtain a file data block set; Performing nonlinear operation, iterative obfuscation operation and character concatenation operation on each file data block in the file data block set to obtain a file signature; Extracting a dynamic timestamp from the upload request, and generating a dynamic salt string according to the dynamic timestamp; Performing 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; The configuration upload request is data signed according to the concatenated salt string to obtain a signed upload request.
7. The file uploading method based on the IOS terminal as claimed in claim 6, characterized in that: The step of performing a data signature on the configuration upload request according to the spliced salt string to obtain a signed upload request includes: Performing secondary data padding on the spliced salted string to obtain a padding salted string; Splitting the padded salt string into secondary data blocks to obtain a salt string data block set; Performing Boolean operations, rotation iterations, and character concatenation operations on each of the salted string data blocks to obtain a salted signature string; The configuration upload request is signed and concatenated according to the salted signature string to obtain a signed upload request.
8. A file uploading device based on an IOS terminal, characterized in that: The device comprises: The format application module is used to extract the file configuration from the file to be uploaded, and apply the upload format to the file to be uploaded according to the file configuration to obtain the upload domain name and the upload scenario value; A request generation module, used to generate an upload request according to the upload domain name and the upload scenario value; A content configuration module, used to perform upload content configuration on the upload request according to the file to be uploaded and the file configuration, to obtain a configuration upload request; A salted signature module, used to perform a salted signature on the configuration upload request to obtain a signed upload request; The upload verification module is used to upload and verify the file to be uploaded according to the signature upload request to obtain an upload result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the IOS-based file upload method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the IOS-based file uploading method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Automatic test system
CN104601403A
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
Unstructured data sensitivity inference for file movement tracking in a network
US20200159947A1