File uploading method and file downloading method for satellite and ground core network

By dividing files into data blocks and verifying them in file transfer between satellite and ground core network, the problem of unreliable file transfer and bandwidth waste caused by unstable satellite links is solved, and reliable and efficient files are achieved and efficiently utilized.

CN119996400APending Publication Date: 2025-05-13GENEW TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411972649.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art cannot guarantee reliable and efficient transmission of files when the satellite link is unstable, and cannot fully utilize the satellite bandwidth, resulting in wasting satellite bandwidth.

Method used

By generating file upload requests and download requests, obtaining file data and dividing them into data blocks, transmitting using data block upload commands and receiving commands, and verifying during the transmission process to ensure the integrity and correctness of the data blocks.

Benefits of technology

In the case of unstable satellite links, ensure reliable and efficient transmission of files, and make full use of satellite bandwidth to reduce bandwidth waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996400A_ABST
    Figure CN119996400A_ABST
Patent Text Reader

Abstract

The invention discloses a file uploading method and a file downloading method for a satellite and a ground core network, and the file uploading method for the satellite and the ground core network comprises the steps: generating a file uploading request when it is detected that a file needs to be uploaded, and obtaining first file data according to the file uploading request, sending the file uploading request and file information of the first file data to a server, and receiving a first request response result sent by the server; performing data block quantity calculation on the first file data to obtain a first calculation result, and generating a corresponding data block uploading command according to the first calculation result; and uploading the first data file to the server according to the data block uploading command, and receiving a file uploading result sent by the server. According to the invention, the file can be reliably and efficiently transmitted under the condition that the satellite link is unstable, the satellite bandwidth can be fully utilized, and the waste of the satellite bandwidth is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of satellite mobile communication technology, and in particular to a file uploading method between a satellite and a ground core network, a file downloading method between a satellite and a ground core network, a client, and a computer-readable storage medium. Background Art

[0002] The VDES system (VHF Data Exchange System, a very high frequency data exchange system, is an enhanced and upgraded version of the ship automatic identification system in the field of water mobile services) is mainly composed of ship-borne VDES platforms, satellite base stations, VDES core networks, application centers, support systems, and ground-based VDES fusion systems. It mainly realizes the file data transmission function between ships and ground stations, and ships and other ships. The terminal's signaling or data messages are forwarded to the ground gateway station through satellite relays and stored in the ground core network system in the form of files. Satellites orbit the earth, and the communication time window for a satellite to communicate with the gateway station is within 20 minutes; if the window period has passed, the gateway station needs to wait for about 1 hour to communicate with the satellite.

[0003] At present, in order to ensure reliable and accurate file transmission between satellite and ground core network systems, the existing technology has proposed two solutions, such as Figure 1 As shown in the figure, one is TFTP (Trivial File Transfer Protocol) based on UDP protocol, and the other is FTP (File Transfer Protocol) based on TCP protocol, but both have obvious defects; for TFTP application, 1. Unreliable transmission based on UDP protocol makes it impossible to guarantee the reliability of each message interaction; 2. After the file is transferred, it is impossible to check whether the entire file is incorrect; 3. The transmission method adopted by TFTP to transfer files is interactive response, and each file transferred is only 512 bytes, while the entire transmission bandwidth is more than 10 MB per second, resulting in a waste of satellite bandwidth. For FTP application, 1. The wireless link between the satellite and the gateway station will become unreliable due to various natural factors such as weather; 2. During the file transfer process, if the satellite currently communicating with the gateway station leaves, it will have to wait for the next window to continue communication, causing the current file to fail, resulting in the need to retransmit the entire file.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The main purpose of the present invention is to provide a file uploading method and a file downloading method between a satellite and a ground core network, aiming to solve the problem in the prior art that when the satellite link is unstable, the file cannot be transmitted reliably and efficiently, and the satellite bandwidth cannot be fully utilized, resulting in a waste of satellite bandwidth.

[0006] To achieve the above object, the present invention provides a method for uploading files between a satellite and a terrestrial core network, the method comprising:

[0007] When it is detected that a file needs to be uploaded, a file upload request is generated, first file data is obtained according to the file upload request, the file upload request and file information of the first file data are sent to the server, and a first request response result sent by the server is received;

[0008] Calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result;

[0009] The first data file is uploaded to the server according to the data block upload command, and a file upload result sent by the server is received.

[0010] Optionally, the file upload method between the satellite and the ground core network, wherein the step of calculating the number of data blocks of the file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result, specifically includes:

[0011] If the time of receiving the first request response result does not exceed the preset time, calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result;

[0012] If the first calculation result is that there are multiple first data blocks, then name each of the first data blocks according to numerical sequence to obtain a first naming result;

[0013] The first data block of the first naming result is obtained, and a corresponding data block upload command is generated according to the first data block.

[0014] Optionally, the file upload method between the satellite and the ground core network, wherein uploading the first data file to the server according to the data block upload command and receiving the file upload result sent by the server, specifically includes:

[0015] Uploading the first message data of the first data block to the server according to the data block upload command, receiving a first verification result from the server, wherein the first verification result is obtained by the server performing a verification code calculation on the first message data to obtain a first verification code, and comparing the first verification code with the attached verification code of the first message data;

[0016] If the verification result is that the verification code is consistent, it is determined that the first message data is uploaded successfully, the upload status of the first data block is updated, and the second message data of the second data block of the first naming result is uploaded to the server, until all the first data blocks of the first naming result are uploaded successfully;

[0017] Receive the file upload result sent by the server, the file upload result is that the server assembles the data corresponding to all the first data blocks to obtain a first data file, verifies the first data file to obtain a file verification result, and obtains it based on the file verification result.

[0018] Optionally, the file upload method between the satellite and the ground core network, wherein the first data file is uploaded to the server according to the data block upload command, and a file upload result sent by the server is received, and then the method further includes:

[0019] If the file upload result is that the file upload fails, the upload status of all the first data blocks is reset, and all the first data blocks are re-uploaded to the server.

[0020] Optionally, the present invention provides a file downloading method between a satellite and a terrestrial core network, wherein the file downloading method between a satellite and a terrestrial core network comprises:

[0021] When it is detected that a file needs to be downloaded, a file download request is generated, the file download request is sent to the server, and a second request response result sent by the server is received;

[0022] Calculating the number of data blocks of the second file data of the second request response result to obtain a second calculation result, and generating a corresponding data block receiving command according to the second calculation result;

[0023] Sending the data block receiving command to the server, receiving the second file data sent by the server, and performing verification processing on the second file data to obtain a target verification result;

[0024] Generate a file download result according to the target verification result, and send the file download result to the server.

[0025] Optionally, the file downloading method between the satellite and the ground core network, wherein the step of calculating the number of data blocks for the file size of the second request response result to obtain a second calculation result, and generating a corresponding data block receiving command according to the second calculation result, specifically includes:

[0026] If the receiving time of the second request response result does not exceed the preset time, obtaining the file size information of the second data file in the second request response result, and calculating the number of data blocks of the second data file according to the file size information to obtain a second calculation result;

[0027] If the second calculation result is that there are multiple second data blocks, then name each of the second data blocks according to numerical sequence to obtain a second naming result;

[0028] The first target data block of the second naming result is obtained, and a corresponding data block receiving command is generated according to the first target data block.

[0029] Optionally, the file downloading method between the satellite and the ground core network, wherein the sending of the data block receiving command to the server, receiving the second file data sent by the server, and performing verification processing on the second file data to obtain a target verification result, specifically includes:

[0030] Sending the data block receiving command to the server, and receiving the first buffer data corresponding to the first target data block sent by the server;

[0031] Calculating a check code for the data in the first buffer to obtain a second check code, and comparing the second check code with the check code attached to the data in the first buffer to obtain a target check result;

[0032] If the target verification result is that the verification code is consistent, it is determined that the data in the first buffer is received successfully, the upload status of the first target data block is updated, and the server is requested to download the second target data block of the second naming result, until all the second data blocks of the second naming result are received successfully;

[0033] The data corresponding to all the second data blocks are assembled to obtain a second data file, and the second data file is verified to obtain a target verification result.

[0034] Optionally, the file download method between the satellite and the ground core network, wherein the file download result is generated according to the target verification result, and the file download result is sent to the server, and then further includes:

[0035] If the file download result is a file download failure, the download status of all the second data blocks is reset, and the file download request is re-initiated to the server.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides a client, wherein the client includes: a memory, a processor, and a file program for the satellite and ground core network and a file download program for the satellite and ground core network stored in the memory and runnable on the processor, wherein the file upload program for the satellite and ground core network implements the steps of the file upload method for the satellite and ground core network as described above when the file upload program for the satellite and ground core network is executed by the processor, and the file download program for the satellite and ground core network implements the steps of the file download method for the satellite and ground core network as described above when the file download program for the satellite and ground core network is executed by the processor.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a file upload program between the satellite and the ground core network and a file download program between the satellite and the ground core network. When the file upload program between the satellite and the ground core network is executed by the processor, the file upload method between the satellite and the ground core network as described above is implemented. When the file download program between the satellite and the ground core network is executed by the processor, the steps of the file download method between the satellite and the ground core network as described above are implemented.

[0038] In the present invention, the file upload method between the satellite and the ground core network includes: when it is detected that a file needs to be uploaded, a file upload request is generated, first file data is obtained according to the file upload request, the file upload request and the file information of the first file data are sent to the server, and the first request response result sent by the server is received; the number of data blocks of the first file data is calculated according to the first request response result to obtain a first calculation result, and a corresponding data block upload command is generated according to the first calculation result; the first data file is uploaded to the server according to the data block upload command, and the file upload result sent by the server is received. The present invention can ensure reliable and efficient transmission of files when the satellite link is unstable, and can make full use of the satellite bandwidth, reducing the waste of satellite bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the existing file transmission scheme between satellite and ground core network;

[0040] Figure 2 It is a flow chart of a preferred embodiment of the file uploading method between a satellite and a ground core network of the present invention;

[0041] Figure 3 It is a schematic diagram of file transmission between multiple satellites and a server in a preferred embodiment of the present invention;

[0042] Figure 4 This is a schematic diagram of client multi-threaded file transmission in a preferred embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram of a client thread requesting to upload a file in a preferred embodiment of the present invention;

[0044] Figure 6 This is a schematic diagram of a request to re-upload a file to a server in a preferred embodiment of the present invention;

[0045] Figure 7 It is a flow chart of a preferred embodiment of the file downloading method between a satellite and a ground core network of the present invention;

[0046] Figure 8 It is a schematic diagram of a client thread requesting to download a file in a preferred embodiment of the present invention;

[0047] Fig. 9 It is a schematic diagram of the operating environment of a preferred embodiment of the client of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. 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.

[0049] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0050] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0051] The file uploading method between the satellite and the ground core network described in the preferred embodiment of the present invention is as follows: Figure 2 As shown, the file uploading method between the satellite and the ground core network includes the following steps:

[0052] Step S100: when it is detected that a file needs to be uploaded, a file upload request is generated, first file data is obtained according to the file upload request, the file upload request and file information of the first file data are sent to the server, and a first request response result sent by the server is received.

[0053] Specifically, in the embodiment of the present invention, the client corresponds to a satellite, the server corresponds to a terrestrial core network, and, as Figure 3 As shown, a server can transfer files with multiple satellites; and before the client and the server transfer files, the client and the server need to be initialized. The specific initialization process is that the server creates a UDP socket and binds port 9900 to detect the file transfer request of the client, such as file upload request, file download request, etc.; and the client creates a UDP socket only when there is a file transfer request, and sends the other end IP as the server IP and port number 9900; and the client supports multi-threaded file transfer, such as Figure 4 As shown, the client creates 4 threads, for example, thread 1, thread 2, thread 3 and thread 4, each of which communicates with the server, and the startup of the corresponding thread is determined according to the file size. For example, if the size of the current file exceeds 1024KB, 4 threads are started, otherwise 1 thread is started. This is because when the size of the file is small, more threads may not necessarily improve the transmission efficiency, and it will also waste satellite bandwidth. In multi-threaded transmission, the method of determining the file part transmitted by each thread is to divide the file size of the current file by 4, and each thread transmits a part of it respectively. For example, if the file size of the current file is 1024KB, thread 1 is responsible for transmitting the data block of 0-256KB of the file, and thread 2 is responsible for transmitting the data block of 256-512KB of the file, and so on.

[0054] When the client detects that a file needs to be uploaded, in order to facilitate the description of the present solution, an example of a client thread requesting to upload a file is used in the present embodiment of the present invention. Figure 5 As shown, when the client detects that a file needs to be uploaded, it generates a file upload request FILE_SEND and creates a UDP socket handle; then, the first file data is obtained according to the file upload request FILE_SEND, and the file upload request and the file information of the first file data are sent to the server according to the UDP socket handle; then, when the server receives the file upload request and the file information of the first file data, it generates a corresponding first request response result according to the file upload request and the file information of the first file data, and sends the first request response result to the client.

[0055] Step S200: Calculate the number of data blocks of the first file data according to the first request response result to obtain a first calculation result, and generate a corresponding data block upload command according to the first calculation result.

[0056] Specifically, if the client receives the first request response result within a specified time (for example, 10 seconds), the number of data blocks of the first file data is calculated according to the first request response result to obtain a first calculation result, wherein the corresponding calculation formula is blocknum=filesize÷4KB+1, blocknum is the number of data blocks, and filesize is the file size; if the first calculation result is that there are multiple first data blocks, each of the first data blocks is named according to the numerical sequence to obtain a first naming result, for example, data block 1, data block 2, ..., data block n; the status of all the first data blocks is also preset, that is, m_block ckstatus[blocknum-1], wherein m_blockstatus[blocknum-1] is 0, indicating that the transmission is not completed, and m_blockstatus[blocknum-1] is 1, indicating that the transmission is completed; thereafter, obtaining the first data block of the first naming result, for example, data block 1, and generating a corresponding data block upload command according to the first data block, wherein the data block upload command includes a data block length, a data block position, a check value and a block number, for example, a data block upload command for data block 1, data block length 1 (2 bytes) | file data block data1 (1-4k bytes) | check value CRC1 | block number 1.

[0057] Step S300: Upload the first data file to the server according to the data block upload command, and receive the file upload result sent by the server.

[0058] Specifically, after receiving the data block upload command, the first message data of the first data block is uploaded to the server according to the data block upload command; wherein, the length of the first message data uploaded is set to 4KB, and the purpose of setting it to 4KB is that the data part in each message data is the effective load, but the message header and protocol part are also required, which are auxiliary loads; if the message data is too short, the effective data transmission rate is very low, and if the message data is too long, when an erroneous transmission occurs, the overhead of retransmission is also large, and 4KB is the most effective transmission length. Before the server receives the first message data, the server applies for a memory block of filesize size for temporarily storing the received data block. When the server receives the first message data, the server caches the first message data to the memory block, and calculates the check code for the data content and data length of the first message data according to the CRC algorithm to obtain a first check code, and compares the first check code with the attached check code of the first message data to obtain a first check result; if the first check result is that the check codes are consistent, it is determined that the first message data is uploaded successfully, and the upload status of the first data block is updated, for example, m_blockstatus[blocknum-1]=1; if the first check result is that the check codes are inconsistent, it is determined that the upload of the first message data has failed, and the first message data is uploaded again.

[0059] After the first message data is successfully uploaded, the client requests the next data block to be uploaded to the server, that is, the second message data of the second data block of the first naming result is uploaded to the server. The corresponding upload process is consistent with the first data block and will not be repeated here until all the first data blocks of the first naming result are successfully uploaded. After receiving all the first data blocks, the server needs to verify the entire file again to ensure that each data segment is correct after assembly. Specifically, the data corresponding to all the first data blocks are assembled to obtain the first data file, and the first data file is verified to obtain the file verification result; then, the file upload result is generated according to the file verification result, and the file upload result is sent to the client.

[0060] Furthermore, if the file verification result is that the first data file verification passes, the generated file upload result is FILE_OK; if the file verification result is that the first data file verification fails, the generated file upload result is FILE_ERROR; when the client receives FILE_ERROR, the retransmission task is started, and the upload status of all the first data blocks is reset according to the retransmission task, for example, m_blockstatus[0-filesize / 4KB-1] is set to 0, and all the first data blocks are re-uploaded to the server.

[0061] Furthermore, if the number of response timeouts of the client is greater than a preset number (e.g., 5 times) during the file upload process, it is determined that the link between the client and the server is disconnected, and the client scans from the starting block state. If the current block state m_blockstatus[n]=1 is an unfinished state, Figure 6 As shown, continue to request the server to upload the data block until the upload status of all data blocks is completed.

[0062] The file downloading method between the satellite and the ground core network described in the preferred embodiment of the present invention is as follows: Figure 7 As shown, the file downloading method between the satellite and the ground core network includes the following steps:

[0063] Step S101: when it is detected that a file needs to be downloaded, a file download request is generated, the file download request is sent to a server, and a second request response result sent by the server is received.

[0064] Specifically, in an embodiment of the present invention, before the client and the server perform file transfer, the client and the server need to be initialized. The specific initialization process is that the server creates a UDP socket and binds port 9900 to detect the client's file transfer request, such as a file upload request, a file download request, etc.; the client creates a UDP socket only when there is a file transfer request, and sends the other end IP as the server's IP and port number 9900; and the client supports multi-threaded file transfer, and the startup of the corresponding thread is determined according to the file size.

[0065] When the client detects that a file needs to be downloaded, in order to facilitate the description of the present solution, an example is given in the embodiment of the present invention in which a client thread requests a server file. Figure 8As shown, when the client detects that a file needs to be downloaded, the client applies for a memory block of size filesize for temporarily storing the received data block, and then generates a file download request FILE_REQUEST and creates a UDP socket handle; then, the first file data is obtained according to the file upload request FILE_SEND, and the file download request and the file information of the second file data are sent to the server according to the UDP socket handle; then, when the server receives the file download request and the file information of the second file data, it generates a corresponding second request response result according to the file download request and the file information of the second file data, and sends the second request response result to the client.

[0066] Step S201: Calculate the number of data blocks of the second file data of the second request response result to obtain a second calculation result, and generate a corresponding data block receiving command according to the second calculation result.

[0067] Specifically, if the client receives the second request response result within the specified time (for example, 10 seconds), the number of data blocks of the second file data is calculated according to the second request response result to obtain a second calculation result, wherein the corresponding calculation formula is blocknum=filesize÷4KB+1, blocknum is the number of data blocks, and filesize is the file size; if the second calculation result is that there are multiple second data blocks, each second data block is named according to the numerical order to obtain a second naming result; the status of all second data blocks is also preset, that is, m_blockstatus[blocknum-1], wherein m_blockstatus[blocknum-1] is 0, indicating that the transmission is not completed, and m_blockstatus[blocknum-1] is 1, indicating that the transmission is completed; thereafter, the first target data block of the second naming result is obtained, and a corresponding data block receiving command is generated according to the first target data block.

[0068] Step S301: Send the data block receiving command to the server, receive the second file data sent by the server, perform verification processing on the second file data, and obtain a target verification result.

[0069] Specifically, after obtaining a data block receiving command, the data block receiving command is sent to the server, and the server reads the first buffer data of the corresponding first data block according to the receiving command, and sends the first buffer data to the client; the client calculates a check code for the data content and data length of the first buffer data according to the CRC algorithm to obtain a second check code, and compares the second check code with the attached check code of the first buffer data to obtain a second check result; if the second check result is that the check codes are consistent, it is determined that the first message data is uploaded successfully, and the upload status of the first target data block is updated; if the second check result is that the check codes are inconsistent, it is determined that the upload of the first buffer data has failed, and the first buffer data is uploaded again.

[0070] After the first buffer data is successfully uploaded, the client requests the server to download the next data block, that is, sends the second buffer data download request of the second target data block of the second naming result to the server. The corresponding download process is consistent with the first target data block, and will not be repeated here until all the second data blocks of the second naming result are successfully downloaded. After receiving all the second data blocks, the server needs to verify the entire file again to ensure that each data segment is correct after assembly. Specifically, the data corresponding to all the second data blocks are assembled to obtain the second data file, and the second data file is verified to obtain the target verification result.

[0071] Step S401: Generate a file download result according to the target verification result, and send the file download result to the server.

[0072] Specifically, if the target verification result is that the second data file verification passes, the generated file download result is FILE_OK, and FILE_OK is sent to the server; if the target verification result is that the second data file verification fails, the generated file upload result is FILE_ERROR, and FILE_ERROR is sent to the server; when the client receives FILE_ERROR, the target retransmission task is started, and the download status of all the second data blocks is reset according to the target retransmission task, for example, m_blockstatus[0-filesize / 4KB-1] is set to 0, and all the second data blocks are re-downloaded from the server.

[0073] Furthermore, if during the file download process, the number of response timeouts of the client is greater than a preset number (for example, 5 times), it is determined that the link between the client and the server is disconnected, and the client scans from the starting block status. If the current block status m_blockstatus[n]=1 is an incomplete state, the client continues to request the server to download the data block until the download status of all data blocks is completed.

[0074] Furthermore, if Fig. 9 As shown, based on the above-mentioned file upload method between the satellite and the ground core network or the above-mentioned file download method between the satellite and the ground core network, the present invention also provides a client accordingly, and the client includes a processor 10, a memory 20 and a display 30. Fig. 9 Only some of the components of the client are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0075] In some embodiments, the memory 20 may be an internal storage unit of the client, such as a hard disk or memory of the client. In other embodiments, the memory 20 may also be an external storage device of the client, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the client. Further, the memory 20 may also include both an internal storage unit of the client and an external storage device. The memory 20 is used to store application software and various types of data installed on the client, such as the program code of the installed client. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a file upload program 40 for a satellite and a ground core network and a file download program 50 for a satellite and a ground core network, and the file upload program 40 for a satellite and a ground core network and the file download program 50 for a ground core network can both be executed by the processor 10, thereby realizing the file upload method for a satellite and a ground core network and the file download method for a ground core network in the present application.

[0076] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing a file upload method between the satellite and the ground core network or a file download method between the satellite and the ground core network.

[0077] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the client and to display a visual client interface. The components of the client communicate with each other via a system bus.

[0078] In one embodiment, when the processor 10 executes the satellite and terrestrial core network file upload program 40 in the memory 20, the steps of the satellite and terrestrial core network file upload method are implemented:

[0079] When it is detected that a file needs to be uploaded, a file upload request is generated, first file data is obtained according to the file upload request, the file upload request and file information of the first file data are sent to the server, and a first request response result sent by the server is received;

[0080] Calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result;

[0081] The first data file is uploaded to the server according to the data block upload command, and a file upload result sent by the server is received.

[0082] The step of calculating the number of data blocks of the file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result specifically includes:

[0083] If the time of receiving the first request response result does not exceed the preset time, calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result;

[0084] If the first calculation result is that there are multiple first data blocks, then name each of the first data blocks according to numerical sequence to obtain a first naming result;

[0085] The first data block of the first naming result is obtained, and a corresponding data block upload command is generated according to the first data block.

[0086] The uploading of the first data file to the server according to the data block upload command and receiving the file upload result sent by the server specifically includes:

[0087] Uploading the first message data of the first data block to the server according to the data block upload command, receiving a first verification result from the server, wherein the first verification result is obtained by the server performing a verification code calculation on the first message data to obtain a first verification code, and comparing the first verification code with the attached verification code of the first message data;

[0088] If the verification result is that the verification code is consistent, it is determined that the first message data is uploaded successfully, the upload status of the first data block is updated, and the second message data of the second data block of the first naming result is uploaded to the server, until all the first data blocks of the first naming result are uploaded successfully;

[0089] Receive the file upload result sent by the server, the file upload result is that the server assembles the data corresponding to all the first data blocks to obtain a first data file, verifies the first data file to obtain a file verification result, and obtains it based on the file verification result.

[0090] Wherein, uploading the first data file to the server according to the data block upload command, receiving the file upload result sent by the server, and then further comprising:

[0091] If the file upload result is that the file upload fails, the upload status of all the first data blocks is reset, and all the first data blocks are re-uploaded to the server.

[0092] In one embodiment, when the processor 10 executes the satellite and terrestrial core network file downloading program 50 in the memory 20, the steps of the satellite and terrestrial core network file downloading method are implemented:

[0093] When it is detected that a file needs to be downloaded, a file download request is generated, the file download request is sent to the server, and a second request response result sent by the server is received;

[0094] Calculating the number of data blocks of the second file data of the second request response result to obtain a second calculation result, and generating a corresponding data block receiving command according to the second calculation result;

[0095] Sending the data block receiving command to the server, receiving the second file data sent by the server, and performing verification processing on the second file data to obtain a target verification result;

[0096] Generate a file download result according to the target verification result, and send the file download result to the server.

[0097] The step of calculating the number of data blocks for the file size of the second request response result to obtain a second calculation result, and generating a corresponding data block receiving command according to the second calculation result specifically includes:

[0098] If the receiving time of the second request response result does not exceed the preset time, obtaining the file size information of the second data file in the second request response result, and calculating the number of data blocks of the second data file according to the file size information to obtain a second calculation result;

[0099] If the second calculation result is that there are multiple second data blocks, then name each of the second data blocks according to numerical sequence to obtain a second naming result;

[0100] The first target data block of the second naming result is obtained, and a corresponding data block receiving command is generated according to the first target data block.

[0101] The sending of the data block receiving command to the server, receiving the second file data sent by the server, and performing verification processing on the second file data to obtain a target verification result specifically includes:

[0102] Sending the data block receiving command to the server, and receiving the first buffer data corresponding to the first target data block sent by the server;

[0103] Calculating a check code for the data in the first buffer to obtain a second check code, and comparing the second check code with the check code attached to the data in the first buffer to obtain a target check result;

[0104] If the target verification result is that the verification code is consistent, it is determined that the data in the first buffer is received successfully, the upload status of the first target data block is updated, and the server is requested to download the second target data block of the second naming result, until all the second data blocks of the second naming result are received successfully;

[0105] The data corresponding to all the second data blocks are assembled to obtain a second data file, and the second data file is verified to obtain a target verification result.

[0106] The step of generating a file download result according to the target verification result and sending the file download result to the server further includes:

[0107] If the file download result is a file download failure, the download status of all the second data blocks is reset, and the file download request is re-initiated to the server.

[0108] In summary, the present invention provides a file upload method between a satellite and a ground core network and a file download method between a satellite and a ground core network, wherein the file upload method between a satellite and a ground core network comprises: when a file needs to be uploaded, generating a file upload request, obtaining first file data according to the file upload request, sending the file upload request and the file information of the first file data to a server, and receiving a first request response result sent by the server; calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result; uploading the first data file to the server according to the data block upload command, and receiving the file upload result sent by the server. The present invention can ensure reliable and efficient transmission of files when the satellite link is unstable, and can make full use of the satellite bandwidth, thereby reducing the waste of satellite bandwidth.

[0109] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or client including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or client. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or client including the element.

[0110] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.

[0111] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for uploading files between a satellite and a ground core network, characterized in that: The file uploading method between the satellite and the ground core network includes: When it is detected that a file needs to be uploaded, a file upload request is generated, first file data is obtained according to the file upload request, the file upload request and file information of the first file data are sent to the server, and a first request response result sent by the server is received; Calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result; The first data file is uploaded to the server according to the data block upload command, and a file upload result sent by the server is received.

2. The file uploading method between a satellite and a terrestrial core network according to claim 1, characterized in that: The step of calculating the number of data blocks of the file data according to the first request response result to obtain a first calculation result, and generating a corresponding data block upload command according to the first calculation result specifically includes: If the time of receiving the first request response result does not exceed the preset time, calculating the number of data blocks of the first file data according to the first request response result to obtain a first calculation result; If the first calculation result is that there are multiple first data blocks, then name each of the first data blocks according to numerical sequence to obtain a first naming result; The first data block of the first naming result is obtained, and a corresponding data block upload command is generated according to the first data block.

3. The file uploading method between a satellite and a ground core network according to claim 2, characterized in that: The uploading of the first data file to the server according to the data block upload command and receiving the file upload result sent by the server specifically includes: Uploading the first message data of the first data block to the server according to the data block upload command, receiving a first verification result from the server, wherein the first verification result is obtained by the server performing a verification code calculation on the first message data to obtain a first verification code, and comparing the first verification code with the attached verification code of the first message data; If the verification result is that the verification code is consistent, it is determined that the first message data is uploaded successfully, the upload status of the first data block is updated, and the second message data of the second data block of the first naming result is uploaded to the server, until all the first data blocks of the first naming result are uploaded successfully; Receive the file upload result sent by the server, the file upload result is that the server assembles the data corresponding to all the first data blocks to obtain a first data file, verifies the first data file to obtain a file verification result, and obtains it based on the file verification result.

4. The method for uploading files between a satellite and a ground core network according to claim 2, characterized in that: The step of uploading the first data file to the server according to the data block upload command and receiving the file upload result sent by the server further comprises: If the file upload result is that the file upload fails, the upload status of all the first data blocks is reset, and all the first data blocks are re-uploaded to the server.

5. A file downloading method between a satellite and a ground core network, characterized in that: The file downloading method of the satellite and the ground core network includes: When it is detected that a file needs to be downloaded, a file download request is generated, the file download request is sent to the server, and a second request response result sent by the server is received; Calculating the number of data blocks of the second file data of the second request response result to obtain a second calculation result, and generating a corresponding data block receiving command according to the second calculation result; Sending the data block receiving command to the server, receiving the second file data sent by the server, and performing verification processing on the second file data to obtain a target verification result; Generate a file download result according to the target verification result, and send the file download result to the server.

6. The file downloading method between satellite and ground core network according to claim 5, characterized in that: The step of calculating the number of data blocks for the file size of the second request response result to obtain a second calculation result, and generating a corresponding data block receiving command according to the second calculation result, specifically includes: If the receiving time of the second request response result does not exceed the preset time, obtaining the file size information of the second data file in the second request response result, and calculating the number of data blocks of the second data file according to the file size information to obtain a second calculation result; If the second calculation result is that there are multiple second data blocks, then name each of the second data blocks according to numerical sequence to obtain a second naming result; The first target data block of the second naming result is obtained, and a corresponding data block receiving command is generated according to the first target data block.

7. The file downloading method between satellite and ground core network according to claim 6, characterized in that: The sending of the data block receiving command to the server, receiving the second file data sent by the server, and performing verification processing on the second file data to obtain a target verification result specifically includes: Sending the data block receiving command to the server, and receiving the first buffer data corresponding to the first target data block sent by the server; Calculating a check code for the data in the first buffer to obtain a second check code, and comparing the second check code with the check code attached to the data in the first buffer to obtain a target check result; If the target verification result is that the verification code is consistent, it is determined that the data in the first buffer is received successfully, the upload status of the first target data block is updated, and the server is requested to download the second target data block of the second naming result, until all the second data blocks of the second naming result are received successfully; The data corresponding to all the second data blocks are assembled to obtain a second data file, and the second data file is verified to obtain a target verification result.

8. The method for downloading files between a satellite and a terrestrial core network according to claim 6, characterized in that: The step of generating a file download result according to the target verification result and sending the file download result to the server further comprises: If the file download result is a file download failure, the download status of all the second data blocks is reset, and the file download request is re-initiated to the server.

9. A client, characterized in that: The client includes: a memory, a processor, and a file upload program for the satellite and ground core network and a file download program for the satellite and ground core network stored in the memory and runnable on the processor. When the file upload program for the satellite and ground core network is executed by the processor, the steps of the file upload method for the satellite and ground core network as described in any one of claims 1 to 4 are implemented. When the file download program for the satellite and ground core network is executed by the processor, the steps of the file download method for the satellite and ground core network as described in any one of claims 5 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a file upload program between the satellite and the ground core network and a file upload and download program between the satellite and the ground core network. When the file upload program between the satellite and the ground core network is executed by the processor, the file upload method between the satellite and the ground core network as described in any one of claims 1-4 is implemented. When the file download program between the satellite and the ground core network is executed by the processor, the steps of the file download method between the satellite and the ground core network as described in any one of claims 5-8 are implemented.

Citation Information

Cited By

  • Asynchronous file generation and downloading implementation method and system

    CN120935167A