Data transmission method and device

By constructing a network topology between mobile storage devices and selecting intermediate devices for data relay, the problem of data sharing and interaction between mobile storage devices in the absence of computer and network infrastructure is solved, enabling flexible and real-time data transmission.

CN121585986APending Publication Date: 2026-02-27HUAKE LINGYU (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511426690.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In existing technologies, mobile storage devices cannot directly share and interact with data in scenarios lacking computer and network infrastructure, which limits the flexibility and real-time nature of data sharing.

Method used

By constructing a network topology between mobile storage devices, determining data transmission links, and directly transmitting data, the system utilizes a preset device discovery mechanism and network topology construction algorithm to select intermediate mobile storage devices for data relay, thereby achieving self-organizing network transmission of data.

Benefits of technology

It improves the flexibility and real-time performance of data sharing between mobile storage devices, enabling direct data transmission even in the absence of computers and network infrastructure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121585986A_ABST
    Figure CN121585986A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, and belongs to the technical field of computers. The method comprises the steps that data information corresponding to data to be transmitted is obtained, N mobile storage devices to be networked are determined according to the data information, N is a positive integer, a network topology structure is constructed based on the N mobile storage devices to be networked, a data transmission link is determined through the network topology structure and the data information, and the data to be networked are transmitted according to the data transmission link. And transmitting the to-be-transmitted data. According to the data information corresponding to the to-be-transmitted data, the mobile storage device to be networked is determined, so that a network topology structure is constructed, the data information is combined, the data transmission link is determined, the to-be-transmitted data is transmitted, and the flexibility and the real-time performance of data sharing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a data transmission method and device. BACKGROUND

[0002] With the development of information technology, mobile storage devices provide great convenience for offline storage and physical transfer of data due to their portability and large storage characteristics. In practical applications, the demand for data transmission between mobile storage devices is increasingly prominent.

[0003] In related technologies, the existing data transmission method mainly introduces a computer as an intermediary. When two or more mobile storage devices need to transmit data, the data needs to be first imported from the source mobile storage device to the same or multiple computers, and then indirectly transmitted through a network (such as a local area network or the Internet). Although this method can achieve data transmission to a certain extent, since the data must be transmitted through a computer and a network, in the face of scenarios lacking computer and network infrastructure, users cannot directly share and interact data between mobile storage devices, which greatly limits the flexibility and real-time performance of data sharing. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a data transmission method and device to improve the flexibility and real-time performance of data sharing. The specific technical solutions are as follows: In a first aspect of the embodiments of the present application, a data transmission method is first provided, applied to a source mobile storage device, and the method comprises: obtaining data information corresponding to to-be-transmitted data; determining N mobile storage devices to be networked according to the data information, wherein N is a positive integer; constructing a network topology structure based on the N mobile storage devices to be networked; determining a data transmission link through the network topology structure and the data information; transmitting the to-be-transmitted data according to the data transmission link.

[0005] In an optional implementation, the determining N mobile storage devices to be networked according to the data information comprises: determining a target mobile storage device according to the data information; determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device based on a preset device discovery mechanism; determining the source mobile storage device, the target mobile storage device, and the at least one intermediate mobile storage device as the N mobile storage devices to be networked.

[0006] In an optional implementation, the determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device based on the preset device discovery mechanism comprises: initiating a networking request signal through the preset device discovery mechanism; determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device according to the networking request signal.

[0007] In an optional implementation, the determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device according to the networking request signal comprises: sending the networking request signal to each candidate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device, so that each candidate mobile storage device returns a response signal according to the networking request signal; receiving the response signal returned by each candidate mobile storage device, and screening each candidate mobile storage device according to a preset networking decision rule and the response signal corresponding to each candidate mobile storage device, to obtain the at least one intermediate mobile storage device.

[0008] In an optional implementation, the constructing a network topology structure based on the N mobile storage devices to be networked comprises: determining a logical connection relationship between each mobile storage device to be networked according to link state information of the N mobile storage devices to be networked; constructing the network topology structure according to the logical connection relationship.

[0009] In an optional implementation, the determining a data transmission link through the network topology structure and the data information comprises: obtaining data attributes from the data information; determining at least one candidate link satisfying the data attributes from the network topology structure; determining the data transmission link from the at least one candidate link.

[0010] In an optional implementation, the transmitting the data to be transmitted according to the data transmission link comprises: segmenting the data to be transmitted according to a preset segmentation rule to obtain M data packets, where M is a positive integer; transmitting the M data packets to a target mobile storage device in sequence according to the data transmission link.

[0011] In an optional embodiment, the target mobile storage device performs the following steps: receiving the M data packets; checking the data packets according to the header information contained in the data packets; if the data packets fail to pass the check, sending a retransmission request for the data packets to the source mobile storage device; receiving the data packets retransmitted by the source mobile storage device and rechecking until the M data packets all pass the check; recombining the M data packets to obtain the data to be transmitted.

[0012] In an optional embodiment, after the step of transmitting the data to be transmitted according to the data transmission link, the method further comprises: monitoring the link state information between the mobile storage devices to be networked in the network topology; updating the network topology when a change in the link state information is monitored.

[0013] In a second aspect of the embodiments of the present application, a data transmission device is further provided, which is applied to a source mobile storage device and comprises: a data acquisition module, configured to acquire data information corresponding to data to be transmitted; a device determination module, configured to determine N mobile storage devices to be networked according to the data information, wherein N is a positive integer; a network topology construction module, configured to construct a network topology based on the N mobile storage devices to be networked; a link determination module, configured to determine a data transmission link through the network topology and the data information; a data transmission module, configured to transmit the data to be transmitted according to the data transmission link.

[0014] In a third aspect of the embodiments of the present application, an electronic device is further provided, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus; the memory, configured to store a computer program; the processor, configured to execute the program stored on the memory, and realize the data transmission method in any one of the first aspect.

[0015] In a fourth aspect, the embodiments of the present application further provide a storage medium, wherein the storage medium stores instructions, and the instructions, when executed on a computer, cause the computer to perform the data transmission method according to any one of the first aspect.

[0016] In a fifth aspect, the embodiments of the present application further provide a computer program product comprising instructions, and the instructions, when executed on a computer, cause the computer to perform the data transmission method according to any one of the first aspect.

[0017] According to the above technical solution provided by the embodiments of the present application, the data information corresponding to the to-be-transmitted data is acquired, the N mobile storage devices to be networked are determined according to the data information, N is a positive integer, the network topology structure is constructed based on the N mobile storage devices to be networked, the data transmission link is determined through the network topology structure and the data information, and the to-be-transmitted data is transmitted according to the data transmission link. In this way, the mobile storage devices to be networked are determined according to the data information corresponding to the to-be-transmitted data, the network topology structure is constructed, and the data transmission link is determined in combination with the data information, so as to transmit the to-be-transmitted data, which can improve the flexibility and real-time performance of data sharing. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0020] One or more embodiments are illustrated by way of example in the drawings that are for illustrative purposes only, and these illustrative descriptions should not be construed as limiting the embodiments. Elements in the drawings that have the same reference numerals have the same functions unless otherwise explicitly stated. The drawings in the accompanying drawings do not constitute a proportional limitation.

[0021] Figure 1 An implementation flowchart of a data transmission method provided by the embodiments of the present application is shown in the figure. Figure 2 An implementation flowchart of another data transmission method provided by the embodiments of the present application is shown in the figure. Figure 3 An implementation flowchart of a determination method of an intermediate mobile storage device provided by the embodiments of the present application is shown in the figure. Figure 4 An implementation flowchart of another determination method of an intermediate mobile storage device provided by the embodiments of the present application is shown in the figure. Figure 5 An implementation flowchart of a data transmission link determination method provided by an embodiment of the present application is shown in the figure; Figure 6 A structure diagram of a network topology provided by an embodiment of the present application is shown in the figure; Figure 7 A structure diagram of a data transmission device provided by an embodiment of the present application is shown in the figure; Figure 8 A structure diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0023] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, reference numerals and / or letters can be repeated in different examples in the present application. Such repetition is for the purpose of simplification and clarity, and does not in itself indicate a relationship between the various embodiments and / or settings discussed.

[0024] In order to solve the technical problem that data must be transmitted through a computer and a network in the prior art, in the face of a scenario lacking computer and network infrastructure, users cannot directly share and interact data between mobile storage devices, greatly limiting the flexibility and real-time performance of data sharing, the present application provides a data transmission method and device to improve the flexibility and real-time performance of data sharing.

[0025] As Figure 1 An implementation flowchart of a data transmission method provided by an embodiment of the present application is shown in the figure, which is applied to a source mobile storage device, and can specifically include the following steps: S101, obtaining data information corresponding to the data to be transmitted.

[0026] The source mobile storage device refers to a mobile storage device initiating a data transmission request in an ad hoc network. The source mobile storage device integrates a low-power wireless module (such as a wireless network) and a master chip, and can perform networking, data management and transmission functions, including but not limited to a mobile phone, a computer, a U disk, a mobile hard disk, and the like, and embodiments of the present application do not limit the same. For example, in a task of transmitting data from a computer 1 to a computer 2, the computer 1 is the source mobile storage device, and the computer 2 is the target mobile storage device.

[0027] The data to be transmitted refers to a specific data content entity that needs to be sent by the source mobile storage device to other mobile storage devices through the network. The data to be transmitted can be a file (such as a document, a picture, a video), a folder, or a stream of data, and embodiments of the present application do not limit the same.

[0028] The data information is metadata used to describe the characteristics of the data to be transmitted, so as to guide the key parameters of subsequent networking and transmission decisions. The data information includes but is not limited to data size, target mobile storage device identifier, data type, priority, and the like, and embodiments of the present application do not limit the same. For example, when the data to be transmitted is a video, the data information can include video frame size, video format, and the like.

[0029] In embodiments of the present application, the data information corresponding to the data to be transmitted is obtained by the source mobile storage device. For example, when the data to be transmitted is a video, the source mobile storage device can obtain the file size, video format, video frame size, and the like of the video as data information.

[0030] S102, determining N mobile storage devices to be networked according to the data information, N being a positive integer.

[0031] In embodiments of the present application, N mobile storage devices to be networked are determined according to the data information, N being a positive integer (such as N being 1, 2, 3, and the like). Among them, the mobile storage devices to be networked refer to all mobile storage devices that need to be included in the current communication network in order to complete the data transmission task, including the final target mobile storage device and other mobile storage devices that may exist for relay forwarding.

[0032] For example, three mobile storage devices to be networked (a target mobile storage device, a mobile storage device 1 for relay forwarding, and a mobile storage device 2 for relay forwarding) are determined according to the data information.

[0033] S103, constructing a network topology based on the N mobile storage devices to be networked.

[0034] In the embodiment of the present application, the network topology structure is constructed based on the N mobile storage devices to be networked. The network topology structure is used to describe the logical structure of the connection relationship and communication cost between the N mobile storage devices to be networked, and generally exists in the form of a graph, which is used to represent the physical or logical connection mode between the mobile storage devices. The embodiment of the present application does not limit this.

[0035] Optionally, the source mobile storage device broadcasts a network request signal, and other mobile storage devices to be networked reply responses after receiving the signal. The source mobile storage device constructs an initial network topology structure according to the response information, and updates the network topology structure in real time through a heartbeat monitoring mechanism.

[0036] S104, determining a data transmission link through the network topology structure and the data information.

[0037] In the embodiment of the present application, the data transmission link is determined through the network topology structure and the data information. The data transmission link refers to a specific and ordered device forwarding sequence between the source mobile storage device and the target mobile storage device for transmitting the data to be transmitted.

[0038] Optionally, the shortest path algorithm (such as Dijkstra algorithm) or other routing algorithm can be used to determine the optimal data transmission link between the source mobile storage device and the target mobile storage device. For example, in a network topology structure with five nodes, the shortest path from the source mobile storage device to the target mobile storage device is calculated as A->C->E->D, and this path is taken as the data transmission link.

[0039] S105, transmitting the data to be transmitted according to the data transmission link.

[0040] In the embodiment of the present application, the data to be transmitted is transmitted according to the data transmission link. The data to be transmitted is transmitted from the source mobile storage device to the target mobile storage device through the data transmission link, which can improve the transmission efficiency.

[0041] Through the above description of the technical solutions provided by the embodiments of the present application, the data information corresponding to the data to be transmitted is obtained, the N mobile storage devices to be networked are determined according to the data information, N is a positive integer, the network topology structure is constructed based on the N mobile storage devices to be networked, the data transmission link is determined through the network topology structure and the data information, and the data to be transmitted is transmitted according to the data transmission link. In this way, the mobile storage devices to be networked are determined according to the data information corresponding to the data to be transmitted, so as to construct the network topology structure, and the data transmission link is determined in combination with the data information, so as to transmit the data to be transmitted. This can improve the flexibility and real-time performance of data sharing.

[0042] For example, Figure 2As shown, an embodiment of another data transmission method provided by the present application is shown in the flowchart, which can include the following contents: S201, obtaining data information corresponding to the data to be transmitted.

[0043] In the embodiments of the present application, this step is similar to the above-mentioned step S101, and the embodiments of the present application will not be repeated here.

[0044] S202, determining a target mobile storage device according to the data information.

[0045] In the embodiments of the present application, the target mobile storage device is determined according to the data information, wherein the target mobile storage device is the final receiver of the data to be transmitted specified by the user, and is the end point of the data transmission task. Specifically, the target storage device identifier can be obtained from the data information, and the target mobile storage device is determined according to the target storage device identifier.

[0046] For example, there are three mobile storage devices (mobile storage device 1, mobile storage device 2, and mobile storage device 3), and the target storage device identifier obtained from the data information is "mobile storage device 1", then the mobile storage device 1 is taken as the target mobile storage device.

[0047] S203, determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device based on a preset device discovery mechanism.

[0048] The above-mentioned preset device discovery mechanism is a standardized protocol and algorithm for discovering available mobile storage devices around the source mobile storage device, which is not limited in the embodiments of the present application.

[0049] The above-mentioned communication range refers to the effective distance range within which the source mobile storage device and the target mobile storage device can communicate wirelessly. The range is affected by many factors such as transmission characteristics of wireless communication technology (such as wireless network WiFi, Bluetooth, etc.), environmental interference factors (such as obstacles, electromagnetic interference, etc.), and device transmission power and receiving sensitivity, etc. In actual application, the specific communication range needs to be determined through field test or simulation analysis to ensure the accuracy and reliability of the device discovery mechanism.

[0050] The above-mentioned intermediate mobile storage device refers to a mobile storage device located between the source mobile storage device and the target mobile storage device, which is neither the initiator nor the final receiver of the data, but is willing and able to forward data for both. It plays the role of "relay station" or "router" to help data cross the distance or obstacles that cannot be directly communicated.

[0051] In the embodiment of the present application, based on the preset device discovery mechanism, at least one intermediate mobile storage device is determined within the communication range of the source mobile storage device and the target mobile storage device. The preset device discovery mechanism can be a broadcast-response mechanism and a heartbeat monitoring mechanism, which are used to search and identify other available mobile storage devices within the communication range of the source mobile storage device and the target mobile storage device, and the embodiment of the present application does not limit this.

[0052] Specifically, the broadcast-response mechanism is that the source mobile storage device broadcasts a networking request signal to its communication range through the wireless communication module, and the signal contains the identification, data transmission requirements and other key information of the source mobile storage device. After the surrounding available mobile storage devices receive the broadcast signal, they decide whether to respond according to their own capabilities and states, and send a response signal containing device identification, available resources and other information to the source mobile storage device.

[0053] The heartbeat monitoring mechanism is that the source mobile storage device periodically sends a heartbeat probe packet to the devices within its communication range to monitor the online state and availability of these devices. The receiving devices confirm their state by replying to the heartbeat response packet, and the source mobile storage device updates the device list and state information according to the received response packet.

[0054] How to determine at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device based on the preset device discovery mechanism can refer to the method shown in Figure 3 The embodiment of the present application provides an implementation flow diagram of a determination method of an intermediate mobile storage device, as shown in Figure 3 The embodiment of the present application provides an implementation flow diagram of a determination method of an intermediate mobile storage device, as shown in S301, initiating a networking request signal through a preset device discovery mechanism.

[0055] In the embodiment of the present application, the networking request signal is initiated through the preset device discovery mechanism. Specifically, the source mobile storage device can use the preset device discovery mechanism (such as the broadcast-response mechanism) to broadcast a networking request signal to the communication range through its wireless communication module. The networking request signal contains the identification, data transmission requirements (such as data volume, transmission rate requirements, etc.) and expected intermediate mobile storage device characteristics (such as storage capacity, processing capacity, etc.) and other key information of the source mobile storage device. The embodiment of the present application does not limit this.

[0056] S302, determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device according to the networking request signal.

[0057] In the embodiment of the present application, at least one intermediate mobile storage device is determined within the communication range of the source mobile storage device and the target mobile storage device according to the networking request signal.

[0058] And how to determine at least one intermediate mobile storage device from the source mobile storage device and the target mobile storage device in the communication range, can refer to the method as shown in Figure 4 The embodiment of the present application provides another method for determining an intermediate mobile storage device, and the implementation flowchart is shown in Figure 4 The embodiment of the present application provides another method for determining an intermediate mobile storage device, and the implementation flowchart is shown in S401, send a networking request signal to each candidate mobile storage device in the communication range of the source mobile storage device and the target mobile storage device, so that each candidate mobile storage device returns a response signal according to the networking request signal.

[0059] In the embodiment of the present application, the networking request signal is sent to each candidate mobile storage device in the communication range of the source mobile storage device and the target mobile storage device, so that each candidate mobile storage device returns a response signal according to the networking request signal. Wherein, after receiving the networking request signal, the candidate mobile storage device decides whether to participate in data transmission and returns a response signal according to its own ability and state (such as storage capacity, processing capacity, current load, etc.) and the key information in the networking request signal. The response signal contains the identification of the candidate mobile storage device, the available resource information (such as the remaining storage space, the processing capacity index, etc.) and the willingness to participate in data transmission.

[0060] S402, receive the response signal returned by each candidate mobile storage device, and screen each candidate mobile storage device according to the preset networking decision rule and the corresponding response signal of each candidate mobile storage device, to obtain at least one intermediate mobile storage device.

[0061] In the embodiment of the present application, the source mobile storage device receives the response signal returned by each candidate mobile storage device, and screens each candidate mobile storage device according to the preset networking decision rule and the corresponding response signal of each candidate mobile storage device, to obtain at least one intermediate mobile storage device. Wherein, the preset networking decision rule is a set of algorithms and strategies for quantitatively evaluating candidate devices and selecting the best, which is used to screen the intermediate mobile storage device suitable for undertaking the intermediate forwarding task from all the responding candidate mobile storage devices.

[0062] Specifically, the source mobile storage device receives all the response signals returned by the candidate mobile storage devices within a preset time window (such as 3 seconds), and parses the device identification, the remaining storage capacity, the CPU load rate, the battery capacity, the signal strength (RSSI) and other information in each response signal. Then, combined with the preset networking decision rule, each candidate mobile storage device is screened to obtain at least one intermediate mobile storage device.

[0063] Specifically, the implementation of the networking decision rule includes the following evaluation dimensions and screening processes: Resource matching degree evaluation, which is used to quantify the degree of fit between the resources of the candidate mobile storage device and the transmission requirements of the data to be transmitted. Specifically, the source mobile storage device parses the available resource information (such as remaining storage space, processing capability index, current load rate) in the response signal, and matches and calculates with the data transmission requirements (such as data size, real-time requirement) in the networking request signal. For example, calculate the storage matching degree score=(remaining storage space / data size) x weight 1, and the processing matching degree score=(processing capability index / processing requirement) x weight 2. The weights 1 and 2 are dynamically adjusted according to the data priority (such as higher priority data is given higher weight). Preferentially select the candidate mobile storage device with high resource matching degree. The weight 1 can be set to 0.4, and the weight 2 can be set to 0.3.

[0064] Device compatibility and link quality score: (1) Device compatibility, which is used to reflect the ability of devices to work together. Specifically, the compatibility of the type (such as device model, brand, supported protocol) of the candidate mobile storage device with the source mobile storage device, the target mobile storage device or other network devices is calculated. For example, a compatibility score table is predefined: the same type of mobile storage device scores 1, different types but supports the same protocol (such as both support Wi-Fi Direct) scores 0.8, and completely incompatible scores 0. The score is determined based on actual test or protocol standard. (2) Link quality evaluation, which is used to reflect the reliability and efficiency of the wireless communication link. Specifically, the link stability is evaluated based on the received signal strength (RSSI) or signal-to-noise ratio (SNR) in the response signal. Link quality score=(RSSI / maximum RSSI) x weight 3, where the maximum RSSI is determined by environmental testing. Preferentially select the candidate mobile storage device with high link quality and stable signal.

[0065] The resource matching degree evaluation and / or device compatibility and link quality score are weighted and summed, and finally the total score of each candidate mobile storage device is obtained. The candidate mobile storage device with a total score greater than a preset score threshold (such as 0.8, 0.9, etc.) is selected as the intermediate mobile storage device.

[0066] For example, assuming that the data to be transmitted is 30MB, and the source mobile storage device receives responses from three candidate mobile storage devices (D1, D2, D3). Through evaluation, D1: storage matching degree (0.9), processing matching degree (0.8), compatibility (1.0), link quality (0.7), total score = 0.9*0.4+0.8*0.3+1.0*0.2+0.7*0.3=1.01. D2: storage matching degree (0.6), processing matching degree (0.9), compatibility (0.8), link quality (0.9), total score = 0.6*0.4+0.9*0.3+0.8*0.2+0.9*0.3=0.94. D3: storage matching degree (0.8), processing matching degree (0.7), compatibility (0.9), link quality (0.6), total score = 0.8*0.4+0.7*0.3+0.9*0.2+0.6*0.3=0.89. If the preset score threshold is 0.90, then D1 (1.01) and D2 (0.94) are the intermediate mobile storage devices screened out.

[0067] S204, the source mobile storage device, the target mobile storage device and the at least one intermediate mobile storage device are determined as N mobile storage devices to be networked, N being a positive integer.

[0068] In the embodiments of the present application, the source mobile storage device, the target mobile storage device and the at least one intermediate mobile storage device are determined as N mobile storage devices to be networked, N being a positive integer.

[0069] For example, there are three intermediate mobile storage devices (intermediate mobile storage device 1, intermediate mobile storage device 2, intermediate mobile storage device 3), and the mobile storage devices to be networked are the source mobile storage device, the target mobile storage device, the intermediate mobile storage device 1, the intermediate mobile storage device 2 and the intermediate mobile storage device 3, i.e., 5 mobile storage devices to be networked are determined.

[0070] S205, according to the link state information of the N mobile storage devices to be networked, a logical connection relationship between each of the mobile storage devices to be networked is determined.

[0071] In the embodiments of the present application, according to the link state information of the N mobile storage devices to be networked, a logical connection relationship between each of the mobile storage devices to be networked is determined. Wherein, the link state information indicates whether any two of the N mobile storage devices to be networked can be connected, if yes, the logical connection relationship between the corresponding two mobile storage devices to be networked is "connectable", otherwise, it is "non-connectable", which is not limited in the embodiments of the present application.

[0072] S206, a network topology is constructed according to the logical connection relationship.

[0073] In the embodiment of the present application, the network topology is constructed according to the logical connection relationship. Specifically, the network topology is constructed according to the logical connection relationship between any two of the N mobile storage devices to be networked being "connectable" or "non-connectable".

[0074] S207, determining the data transmission link through the network topology and the data information.

[0075] In the embodiment of the present application, this step is similar to the above-mentioned step S104, and the embodiment of the present application will not be described one by one here.

[0076] And how to determine the data transmission link through the network topology and the data information can refer to the method as shown in Figure 5 As shown in Figure 5 The embodiment of the present application provides an implementation flow diagram of a data transmission link determination method, which can specifically include the following steps: S501, obtaining data attributes from the data information.

[0077] In the embodiment of the present application, the data attributes are obtained from the data information. The data attribute information includes but is not limited to data size, data type, data priority, source mobile storage device identifier, target mobile storage device identifier, etc.

[0078] S502, determining at least one candidate link meeting the data attributes from the network topology.

[0079] In the embodiment of the present application, at least one candidate link meeting the data attributes is determined from the network topology. It can also be understood as selecting a link with the source mobile storage device as the starting point and the target mobile storage device as the end point.

[0080] S503, determining the data transmission link from the at least one candidate link.

[0081] In the embodiment of the present application, the data transmission link is determined from the at least one candidate link, wherein the candidate link with the shortest path can be selected as the data transmission link.

[0082] Specifically, as shown in Figure 6As shown, a structure diagram of a network topology structure provided by an embodiment of the present application is shown, there are five mobile storage devices (A, B, C, D, E) to be networked, the corresponding weights, the node set of the determined shortest path is {A}, the node set of the undetermined shortest path is {B, C, D, E}, the current shortest distance of each node to the node A of the source mobile storage device is: A is 0, B is infinity, C is infinity, D is infinity, E is infinity, the predecessor node of each node (for example, the shortest path of A to E is A-->C-->E; then the predecessor node of C is A) is all null. The determination process of the candidate link: the first round: starting from node A, its neighbor nodes are B and C. The distance of B to A is updated to 20, and the distance of C to A is updated to 15. At this time, the node closest to A in the undetermined set is C (the distance is 15), C is added to the determined set, that is, the determined set becomes {A, C}, and the undetermined set becomes {B, D, E}. The second round: starting from node C (based on the result calculated in the first round, the initial value is 15), its neighbor nodes are B, D, and E. The distance of C to B is 15+10=25, while the current distance of B to A is 20, so the distance of B is not changed; the distance of C to D is 15+30=45; the distance of C to E is 15+8=23. At this time, the node closest to A in the undetermined set is B (the distance is 20), B is added to the determined set, the determined set becomes {A, C, B}, and the undetermined set becomes {D, E}. The third round: starting from node B (the result of the second round, the initial value of B is 20), its neighbor node is D. The distance of B to D is 20+25=45 (the value of B+D), while the current distance of D to A (calculated from C) is not changed. At this time, the node closest to A in the undetermined set is E (the distance is 23), E is added to the determined set, the determined set becomes {A, C, B, E}, and the undetermined set becomes {D}. The fourth round: starting from node E, its neighbor node is D. The distance of E to D is 23+12=35, which is shorter than the previous distance of D to A (45), so the distance of D to A is updated to 35 (adopting the principle of shortest path first), and the predecessor node of D is changed to E. At this time, D is added to the determined set, all nodes are in the determined set, and the algorithm ends. The shortest path and distance of node A to each node is finally obtained: the shortest distance to B is 20, and the path is A->B; the shortest distance to C is 15, and the path is A->C; the shortest distance to D is 35, and the path is A->C->E->D; the shortest distance to E is 23, and the path is A->C->E. According to the source mobile storage device identifier in the data attribute, it is determined that node A corresponds to the source mobile storage device, and according to the target mobile storage device identifier in the data attribute, it is determined that node E corresponds to the target mobile storage device, so the data transmission link is A->C->E.

[0083] S208, transmitting the to-be-transmitted data according to the data transmission link.

[0084] In the embodiment of the present application, this step is similar to the above-mentioned step S105, and the embodiment of the present application will not be described one by one here.

[0085] How to transmit the data to be transmitted according to the data transmission link can be specifically that the data to be transmitted is segmented according to a preset segmentation rule to obtain M data packets, M being a positive integer. The M data packets are sequentially transmitted to the target mobile storage device according to the data transmission link.

[0086] The corresponding target mobile storage device receives the M data packets, and for any data packet, the data packet is checked according to the header information contained in the data packet. If the data packet fails the check, a retransmission request for the data packet is sent to the source mobile storage device, the data packet retransmitted by the source mobile storage device is received, and the check is re-performed until the M data packets are all successfully checked. The M data packets are recombined to obtain the data to be transmitted. During the data transmission process, the network traffic and the link state can be monitored in real time by the data transmission module. When congestion occurs, a flow control algorithm (such as a sliding window mechanism) is used to adjust the data sending rate to avoid network congestion from getting worse. The flow control is used to avoid the sending rate of the sender (the source mobile storage device) being too fast and the receiving rate of the receiver (the target mobile storage device) being too low, so that the receiver loses data due to insufficient cache. The flow control is realized by the sliding window mechanism, that is, the sending capacity of the sender is dynamically adjusted by the “window size”, and at the same time, “pipeline transmission” (continuous sending without waiting for the confirmation of the previous frame) is supported, which can greatly improve the transmission efficiency.

[0087] For example, if the receiver cache size is limited, the initial sending rate is informed to the sender “receive window size = 4” (indicating that a maximum of 4 bytes of data can be received at the same time), and the sending window of the sender is initialized to [1-4]. The sender continuously sends data within the “sending window” range without waiting for the confirmation of the previous data (pipeline feature).

[0088] In addition, after the step of transmitting the data to be transmitted according to the data transmission link, it further includes monitoring the link state information between each mobile storage device to be networked in the network topology structure; and when it is monitored that the link state information changes, updating the network topology structure.

[0089] To ensure the security of self-organizing networks using mobile storage media, features such as device authentication, data encryption, and access control can be included. Encryption algorithms (such as RSA) are used to encrypt data before transmission, preventing data leakage. An authentication mechanism ensures that only authorized mobile storage devices can join the network and access data. Access permissions are set to restrict the operational rights of different users or mobile storage devices, improving network and data security. Simultaneously, data management on mobile storage devices can be implemented, including functions such as data storage, retrieval, deletion, and sharing permission settings. Data indexes and directory structures are established to facilitate quick data retrieval and access for users. Management and operation of different data types (such as files, folders, and databases) are supported, enabling categorized data storage and efficient utilization.

[0090] Corresponding to the above method embodiments, this application also provides a data transmission apparatus applied to a source mobile storage device, such as... Figure 7 As shown, the device may include a data acquisition module 701, a device determination module 702, a network topology construction module 703, a link determination module 704, and a data transmission module 705.

[0091] Data acquisition module 701 is used to acquire data information corresponding to the data to be transmitted; The device determination module 702 is used to determine N mobile storage devices to be networked based on the data information, where N is a positive integer; The network topology construction module 703 is used to construct a network topology based on the N mobile storage devices to be networked. The link determination module 704 is used to determine the data transmission link based on the network topology and the data information; The data transmission module 705 is used to transmit the data to be transmitted according to the data transmission link.

[0092] This application also provides an electronic device, such as... Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, communication interface 802, and memory 803 communicate with each other via the communication bus 804. Memory 803 is used to store computer programs; In one embodiment of this application, when the processor 801 executes a program stored in the memory 803, it performs the following steps: Data information corresponding to the to-be-transmitted data is acquired, N mobile storage devices to be networked are determined according to the data information, N is a positive integer, a network topology structure is constructed based on the N mobile storage devices to be networked, a data transmission link is determined through the network topology structure and the data information, and the to-be-transmitted data is transmitted according to the data transmission link.

[0093] The communication bus mentioned in the electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0094] The communication interface is used for communication between the electronic device and other devices.

[0095] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0096] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0097] In another embodiment provided in the present application, a storage medium is also provided, and the storage medium stores instructions, and when the instructions run on a computer, the computer executes the data transmission method in any of the above embodiments.

[0098] In another embodiment provided in the present application, a computer program product containing instructions is also provided, and when the instructions run on a computer, the computer executes the data transmission method in any of the above embodiments.

[0099] In the embodiments described above, all or some of the steps can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs or program elements. The computer programs reside (at least temporarily) in a memory of a computer during execution. The memory can be a RAM memory, a flash memory, a ROM memory, an EPROM memory, or any other suitable device. The memory can exist within a computer, in which the computer programs execute, or external to the computer, in which case data is probably exchanged between the computer and the memory over a suitable computer-readable medium such as a logical or physical connection, optical fiber cable, conventional telephone line, cellular telephone line, wireless electromagnetic connection, or the like. The one or more computer programs can be written in any suitable programming language, including one or more of C, C++, C#, Java, Visual Basic, or the like.

[0100] It should be noted that, in the present document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. In other words, any of the steps of a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0101] Each of the embodiments in the present specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the description of the method embodiments.

[0102] The foregoing detailed description of the application has been presented for purposes of illustration and description. Various modifications and changes can be made to these embodiments without departing from the spirit and scope of the application. It is intended that the scope of the application should not be limited by the particular representative embodiments described above. Any and all modifications, equivalents, or alternatives falling within the spirit and scope of the application as described and defined by the following claims are included.

Claims

1. A data transmission method, characterized in that, Applied to a source mobile storage device, the method includes: Obtain the data information corresponding to the data to be transmitted; Based on the data information, N mobile storage devices to be networked are determined, where N is a positive integer; Based on the N mobile storage devices to be networked, construct a network topology; The data transmission link is determined based on the network topology and the data information. The data to be transmitted is transmitted according to the data transmission link.

2. The method according to claim 1, characterized in that, The step of determining N mobile storage devices to be networked based on the data information includes: The target mobile storage device is determined based on the data information; Based on a preset device discovery mechanism, at least one intermediate mobile storage device is determined within the communication range of the source mobile storage device and the target mobile storage device. The source mobile storage device, the target mobile storage device, and the at least one intermediate mobile storage device are identified as the N mobile storage devices to be networked.

3. The method according to claim 2, characterized in that, The method of determining at least one intermediate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device based on a preset device discovery mechanism includes: A network formation request signal is initiated through the preset device discovery mechanism; Based on the network request signal, at least one intermediate mobile storage device is determined from the communication range of the source mobile storage device and the target mobile storage device.

4. The method according to claim 3, characterized in that, The step of determining at least one intermediate mobile storage device from within the communication range of the source mobile storage device and the target mobile storage device based on the network request signal includes: The network request signal is sent to each candidate mobile storage device within the communication range of the source mobile storage device and the target mobile storage device, so that each candidate mobile storage device returns a response signal according to the network request signal; The system receives response signals from each of the candidate mobile storage devices and filters each candidate mobile storage device according to preset networking decision rules and the response signals corresponding to each candidate mobile storage device to obtain at least one intermediate mobile storage device.

5. The method according to claim 1, characterized in that, The construction of the network topology based on the N mobile storage devices to be networked includes: Based on the link status information of the N mobile storage devices to be networked, determine the logical connection relationship between each of the mobile storage devices to be networked. The network topology is constructed based on the logical connection relationships.

6. The method according to claim 1, characterized in that, Determining the data transmission link using the network topology and the data information includes: Obtain data attributes from the data information; From the network topology, determine at least one candidate link that satisfies the data attributes; The data transmission link is determined from the at least one candidate link.

7. The method according to claim 1, characterized in that, The transmission of the data to be transmitted according to the data transmission link includes: The data to be transmitted is divided into M data packets according to a preset segmentation rule, where M is a positive integer; Based on the data transmission link, the M data packets are sequentially transmitted to the target mobile storage device.

8. The method according to claim 7, characterized in that, The target mobile storage device performs the following steps: Receive the M data packets; For any of the data packets, the data packet is verified based on the header information contained in the data packet; If the data packet verification fails, a retransmission request for the data packet is sent to the source mobile storage device; Receive the data packets retransmitted from the source mobile storage device and re-verify them until all M data packets are successfully verified. The M data packets are reassembled to obtain the data to be transmitted.

9. The method according to claim 1, characterized in that, After the step of transmitting the data to be transmitted according to the data transmission link, the method further includes: Monitor the link status information between each of the mobile storage devices to be networked in the network topology; When a change in link status information is detected, the network topology is updated.

10. A data transmission device, characterized in that, Applied to a source mobile storage device, the apparatus includes: The data acquisition module is used to acquire the data information corresponding to the data to be transmitted; The device determination module is used to determine N mobile storage devices to be networked based on the data information, where N is a positive integer; A network topology construction module is used to construct a network topology based on the N mobile storage devices to be networked. The link determination module is used to determine the data transmission link based on the network topology and the data information. The data transmission module is used to transmit the data to be transmitted according to the data transmission link.