Multi-terminal data transmission method and device, server and storage medium
By generating a transmission request containing the request delivery order and data processing template, it is passed to the target device in sequence and processed, the problems of confusing transmission order and complexity verification in distributed data processing are solved, and the accuracy and completeness of data during transmission are achieved.
Patent Information
- Application Number
- CN202510834487.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-08-22
AI Technical Summary
Distributed data processing lacks an effective sequential control mechanism during transmission, resulting in a disordered sequence of data reception. In the face of data with a wide range of sources, diverse formats and correlation, the integrity verification is complex and cannot guarantee the accuracy and completeness of the data during transmission.
Generate a transmission request containing the order of request delivery and the data processing template, determine the target device in the order of request delivery, and obtain the target data according to the data processing template for processing during each delivery process, generate processing results, and pass it to the next target device when the conditions are met until all devices are processed.
Through orderly data transmission and processing, the accuracy and completeness of data during the transmission process are ensured, and the problems of confusing transmission sequence and complex integrity verification are solved.
Smart Images

Figure CN120528979A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data transmission technology, and in particular to a multi-terminal data transmission method, device, server and storage medium. Background Art
[0002] With the continuous innovation of IoT technology and the ever-expanding application scenarios, IoT networking is playing a key role in smart transportation, smart healthcare, smart agriculture, and other fields. In these application scenarios, efficient analysis of data generated by multiple devices has become a key prerequisite for achieving intelligent and refined IoT management.
[0003] Traditional IoT network data processing often uses a single device as the core hub. This device collects data from other devices through network communications, pre-processes the data using its own computing power, and uploads it to the server. However, this approach has significant drawbacks: data processing efficiency is limited by the computing power of a single device, severely lagging behind when faced with massive amounts of data; data transmission requires frequent coordination between devices, making the process cumbersome and complex; resource utilization is extremely unbalanced, and core devices operate under long-term high loads, which can easily lead to performance bottlenecks and failures; and if the device is attacked, the entire data processing chain is at risk of being paralyzed, making security difficult to guarantee.
[0004] To overcome the drawbacks of single-device processing, distributed data processing methods leverage the collaborative work of multiple devices to share tasks, improving processing efficiency to a certain extent. However, in real-world IoT applications, data analysis often exhibits strong correlations, and many processing steps exhibit linear characteristics, which require a strict transmission order. Furthermore, some data analysis cannot proceed until all relevant data has been uploaded. However, distributed data processing lacks an effective sequence control mechanism during transmission, and the random nature of data uploaded by different devices can easily lead to out-of-order reception. Furthermore, integrity verification for data from a wide range of sources, in diverse formats, and with interdependencies requires comprehensive consideration of the logical relationships between the data, making the data verification process extremely complex. These issues make it difficult to guarantee the accuracy and integrity of data during transmission. Summary of the Invention
[0005] To address the lack of an effective sequence control mechanism during the transmission process of the above-mentioned distributed data processing, the randomness of data uploaded by different devices can easily lead to a disordered reception order; in the face of data from a wide range of sources, diverse formats, and correlations, integrity verification needs to comprehensively consider the logical relationships between data, making the data verification process extremely complex. These problems lead to the technical problem that it is impossible to guarantee the accuracy and integrity of data during transmission. This application provides a multi-terminal data transmission method, device, server, and storage medium. The specific technical solution is as follows:
[0006] In a first aspect, the present application provides a multi-terminal data transmission method, applied to a request initiating device, the method comprising:
[0007] generating a transmission request including a request transmission sequence and at least one data processing template, and determining a target device according to the request transmission sequence;
[0008] The transfer request is transmitted to the target device, so that the target device performs the following operations:
[0009] receiving the transmission request, and determining the data processing template in the transmission request that matches the target device;
[0010] Acquiring target data of the target device according to the data processing template, processing the target data, obtaining a processing result, and storing the processing result in the transmission request;
[0011] If it is determined according to the request transfer sequence that there is a next target device, the transmission request is transferred to the next target device for further processing.
[0012] In an optional embodiment, the data processing template includes target data requirement information, a data processing model, and a data anchor point, wherein the data anchor point is an association relationship between the data processing model and the target data;
[0013] The step of acquiring target data of the target device according to the data processing template and processing the target data to obtain a processing result includes:
[0014] acquiring target data of the target device according to the target data requirement information;
[0015] According to the data anchor point, the target data is filled into the corresponding data position in the data requirement set of the corresponding data processing model, and the data processing model is executed to obtain a processing result.
[0016] In an optional embodiment, executing the data processing model to obtain a processing result includes:
[0017] Determine whether the data requirement set of the data processing model is complete, and if the data requirement set is complete, execute the data processing model to obtain a processing result.
[0018] In an optional embodiment, after executing the data processing model and obtaining the processing result, the method further includes:
[0019] Determining whether the target data in the data requirement set filled into the data processing model is no longer used;
[0020] When the target data is no longer used, the target data is deleted from the data requirement set of the data processing model.
[0021] In an optional embodiment, determining whether the target data in the data requirement set filled into the data processing model is no longer used includes:
[0022] For any other data processing model, detecting whether the target data is used in the data requirement set of the other data processing model;
[0023] If the target data is not used in the data requirement sets of the remaining data processing models, determining that the target data is no longer used;
[0024] In a case where the target data is used in the data requirements of the remaining data processing models, determining that the target data is to be continued to be used;
[0025] The target data is filled into the corresponding data location in the data requirement set of the remaining data processing models.
[0026] In an optional embodiment, the number of the target device is at least one, and the number of the next target device is at least one;
[0027] The transmitting the transmission request to the target device comprises:
[0028] delivering the transmission request to at least one of the target devices;
[0029] The step of transferring the transmission request to the next target device for further processing when it is determined according to the request transfer order that the next target device exists comprises:
[0030] If it is determined according to the request transfer order that there is at least one next target device after the target device, the transmission request is transferred to the at least one next target device for further processing.
[0031] In an optional embodiment, the storing, after the transmission request, further includes:
[0032] Find the flag bit corresponding to the target device from the request transfer sequence, and set the flag bit to indicate that data collection is completed.
[0033] In an optional embodiment, the method further comprises:
[0034] receiving at least one of the transmission requests, and integrating the request delivery order in the at least one transmission request to obtain an integrated request delivery order;
[0035] Determining whether the flags of all target devices in the integration request transmission sequence are set to data collection completed;
[0036] When the flag bits of all target devices are set to indicate that data collection is completed, extracting a processing result from at least one of the transmission requests, and generating a final execution result based on the processing result;
[0037] Wherein, when it is determined according to the request transmission order that there is no next target device after the target device, the transmission request is returned to the request initiating device.
[0038] In a second aspect, the present application provides a multi-terminal data transmission apparatus, applied to a request initiating device, the apparatus comprising:
[0039] a request generation module, configured to generate a transmission request including a request transmission sequence and at least one data processing template, and determine a target device according to the request transmission sequence;
[0040] A request delivery module is used to deliver the transmission request to the target device so that the target device performs the following operations: receiving the transmission request and determining the data processing template in the transmission request that matches the target device; obtaining the target data of the target device based on the data processing template, and processing the target data to obtain the processing result, which is stored in the transmission request; and when it is determined that there is a next target device according to the request delivery order, delivering the transmission request to the next target device for further processing.
[0041] In a third aspect, a server is provided, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0042] Memory for storing computer programs;
[0043] The processor is configured to implement any of the multi-terminal data transmission methods described in the first aspect above when executing a program stored in the memory.
[0044] In a fourth aspect, a storage medium is also provided, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes any multi-terminal data transmission method described in the first aspect.
[0045] In a fifth aspect, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the multi-terminal data transmission methods described above.
[0046] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the multi-terminal data transmission method provided by the embodiment of the present application generates a transmission request including a request transmission order and at least one data processing template, and determines the target device according to the request transmission order, and transmits the transmission request to the target device, so that the target device performs the following operations: receives the transmission request, determines the data processing template that matches the target device in the transmission request, obtains the target data of the target device according to the data processing template, processes the target data, obtains the processing result, and stores it in the transmission request; when it is determined that there is a next target device according to the request transmission order, transmits the transmission request to the next target device for further processing.
[0047] By generating a transmission request including the request transmission order and the data processing template, the target device is determined and transmitted according to the request transmission order. In this way, the transmission request is transmitted between each target device. At the same time, during each transmission, the target data of the target device is obtained according to the data processing template, the target data is processed, the processing results are obtained, and stored in the transmission request. This solves the problems of disordered transmission order and complex integrity verification in distributed data processing, and ensures the accuracy and integrity of data during transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0051] Figure 1 A schematic diagram of an implementation flow of a multi-terminal data transmission method provided in an embodiment of the present application;
[0052] Figure 2 A schematic diagram of an implementation flow of another multi-terminal data transmission method provided in an embodiment of the present application;
[0053] Figure 3A schematic diagram of an implementation flow of another multi-terminal data transmission method provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of an implementation flow of another multi-terminal data transmission method provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of the structure of a transmission request provided in an embodiment of the present application;
[0056] Figure 6 A schematic diagram of the structure of a multi-terminal data transmission device provided in an embodiment of the present application;
[0057] Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0059] The disclosure below 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, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0060] like Figure 1 FIG. 1 is a flow chart illustrating an implementation of a multi-terminal data transmission method provided in an embodiment of the present application. The method is applied to a request initiating device (e.g., a server) and may specifically include the following steps:
[0061] S101, generating a transmission request including a request transmission sequence and at least one data processing template, and determining a target device according to the request transmission sequence.
[0062] In an embodiment of the present application, the transmission parameters are initialized, including at least one data processing template and a request transmission order (referring to the order in which requests are transmitted between devices). The data processing template includes the target data requirement information of the device, a data processing model for processing the target data (the data processing model is generally a model for pre-processing the target data), and a data anchor point. The data anchor point is the association relationship between the data processing model and the target data. According to the data anchor point, the target data can be transmitted to the data processing model associated with it.
[0063] Thus, transmission parameters are initialized to form a transmission request, i.e., a transmission request is generated, including a request delivery sequence and at least one data processing template. Generally, one request corresponds to one data processing template. For example, if a user's air conditioner and fan usage habits need to be analyzed, detailed data is not required; only the overlapping time when the user turns on the fan and air conditioner simultaneously can be analyzed. In this case, a transmission request can be established, involving two data processing templates: Data Processing Template 1, where the target data requirement information is fan startup data, a data processing model calculates the startup time interval based on the fan startup data, and the data anchor is the association between the fan startup data and the data processing model; and Data Processing Template 2, where the target data requirement information is air conditioner startup data, a data processing model calculates the air conditioner startup data and overlaps it with the fan startup data to obtain a union, and the data anchor is the association between the air conditioner startup data and the data processing model. Finally, the obtained union is returned to the request initiating device (e.g., a server), which analyzes the user's cooling usage habits based on this union.
[0064] It should be noted that the transmission parameters may also include verification parameters required by the device. For example, a token is distributed to each target device in the request transmission sequence, and the validity of the target data is verified by the token during the transmission of the transmission request between the target devices.
[0065] In addition, for the request transmission sequence, the target device can be determined according to the request transmission sequence, wherein the target device here is usually the first target device, that is, the first target device to which the transmission request specified in the request transmission sequence is to be transmitted.
[0066] S102, pass the transmission request to the target device so that the target device performs the following operations: receive the transmission request, determine the data processing template in the transmission request that matches the target device; obtain the target data of the target device based on the data processing template, process the target data, obtain the processing result, and store it in the transmission request; if it is determined that there is a next target device according to the request transmission order, pass the transmission request to the next target device for further processing.
[0067] In an embodiment of the present application, for a transmission request, the transmission request is delivered to a target device, where the target device is usually the first target device, that is, the first target device to which the transmission request is to be delivered as specified in the request delivery order.
[0068] The target device receives and executes a transfer request. Specifically, the target device receives the transfer request, identifies the data processing template that matches it, and then performs the following operations based on the data processing template: obtaining the target device's target data, processing the target data, and obtaining a processing result. The processing result obtained based on the data processing template can be stored in the transfer request, that is, temporarily stored in the transfer request. Temporarily storing in the transfer request means temporarily storing it in the transfer request by carrying or including it, meaning that the transfer request carries or includes the processing result.
[0069] It should be noted that for the target device, there is a device identification, and the data processing template that matches itself in the transmission request can be determined based on the device identification. This embodiment of the present application does not limit this.
[0070] In addition, for the target device, after temporarily storing the processing result in the transmission request, it can be determined whether there is a next target device based on the request transmission order. If it is determined that there is no next target device based on the request transmission order, the target device that is last in the transmission order returns the transmission request to the request initiating device (such as a server) through a request. The request initiating device (such as a server) parses the transmission request, obtains the processing result therein, and generates a final execution result. If it is determined that there is a next target device based on the request transmission order, the transmission request is passed to the next target device for continued processing, which means that the next target device is used as the target device and step S102 is repeated.
[0071] Through the above description of the technical solution provided in the embodiment of the present application, a transmission request is generated that includes a request delivery order and at least one data processing template, and according to the request delivery order, the target device is determined, and the transmission request is delivered to the target device so that the target device performs the following operations: receiving the transmission request, determining the data processing template that matches the target device in the transmission request, obtaining the target data of the target device based on the data processing template, processing the target data, obtaining the processing result, and storing it in the transmission request; when it is determined that there is a next target device according to the request delivery order, the transmission request is delivered to the next target device for further processing.
[0072] By generating a transmission request including the request transmission order and the data processing template, the target device is determined and transmitted according to the request transmission order. In this way, the transmission request is transmitted between each target device. At the same time, during each transmission, the target data of the target device is obtained according to the data processing template, the target data is processed, the processing results are obtained, and stored in the transmission request. This solves the problems of disordered transmission order and complex integrity verification in distributed data processing, and ensures the accuracy and integrity of data during transmission.
[0073] Furthermore, in this embodiment of the present application, each data processing template includes target data requirement information, a data processing model, and a data anchor. The data anchor represents the association between the data processing model and the target data. When a transmission request arrives at the target device, the target data can be retrieved based on the target data requirement information. Based on the data anchor, the target data is then populated into the associated data processing model, and the data processing model is executed to obtain the processing result. The transmission request is then temporarily stored.
[0074] Based on this, Figure 2 FIG. 1 is a flow chart illustrating another multi-terminal data transmission method according to an embodiment of the present application. The method is applied to a request initiating device (e.g., a server) and may include the following steps:
[0075] S201, generate a transmission request including a request delivery order and at least one data processing template, and determine the target device according to the request delivery order; the data processing template includes target data requirement information, a data processing model, and a data anchor point, and the data anchor point is the association relationship between the data processing model and the target data.
[0076] In an embodiment of the present application, transmission parameters are initialized, including at least one data processing template and a request transfer sequence (referring to the order in which requests are transferred between devices), thereby generating a transmission request including the request transfer sequence and at least one data processing template.
[0077] Among them, for each data processing template, it includes the target data requirement information of the device, the data processing model for processing the target data (the data processing model is generally a model for pre-processing the target data), and a data anchor point. The data anchor point is the association relationship between the data processing model and the target data. According to the data anchor point, the target data can be passed to the data processing model associated with it.
[0078] In addition, for the request transmission sequence, the target device can be determined according to the request transmission sequence, wherein the target device here is usually the first target device, that is, the first target device to which the transmission request specified in the request transmission sequence is to be transmitted.
[0079] S202, pass the transmission request to the target device so that the target device performs the following operations: receive the transmission request, determine the data processing template in the transmission request that matches the target device; obtain the target data of the target device according to the target data requirement information; fill the target data into the corresponding data position in the data requirement set of the corresponding data processing model according to the data anchor point, execute the data processing model, obtain the processing result, and store it in the transmission request; if it is determined that there is a next target device according to the request transmission order, pass the transmission request to the next target device for further processing.
[0080] In an embodiment of the present application, for a transmission request, the transmission request is delivered to a target device, where the target device is usually the first target device, that is, the first target device to which the transmission request is to be delivered as specified in the request delivery order.
[0081] The target device receives and executes the transfer request. Specifically, the target device receives the transfer request and identifies the data processing template that matches it. The data processing template includes target data requirement information, a data processing model, and a data anchor. The data anchor is the relationship between the data processing model and the target data.
[0082] The target device thus obtains the target data of the target device according to the target data requirement information, fills the target data into the corresponding data position in the data requirement set of the corresponding data processing model according to the data anchor point, and executes the data processing model to obtain the processing result.
[0083] Among them, for the data processing model, it may require more than one data. Therefore, before executing the data processing model, it is necessary to determine whether the data is complete, that is, after adding the target data provided by the target device this time, whether the conditions for executing the data processing model are met. If so, the data processing model is executed and the processing results are obtained, which are temporarily stored in the transmission request.
[0084] Based on this, after filling the target data into the corresponding data position in the data requirement set of the corresponding data processing model, it is determined whether the data requirement set of the data processing model is filled completely. If the data requirement set is filled completely, it means that the conditions for executing the data processing model are met. At this time, the data processing model is executed and the processing results are obtained, which are temporarily stored in the transmission request.
[0085] In addition, after obtaining the processing results and temporarily storing them in the transmission request, the target data can be deleted if no longer needed, thereby reducing data redundancy. To this end, it is determined whether the target data filled in the data requirement set of the data processing model is no longer used. If the target data is no longer used, the target data is deleted from the data requirement set of the data processing model. Otherwise, the target data is removed from the data requirement set of the data processing model and filled into the corresponding data position in the data requirement set of the remaining data processing models.
[0086] It should be noted that the timing for judging whether the target data filled in the data requirement set of the data processing model is no longer used may specifically be after executing the data processing model and obtaining the processing result. The so-called after executing the data processing model and obtaining the processing result means judging whether the target data filled in the data requirement set of the data processing model is no longer used at the next moment (or at the same time) after executing the data processing model and obtaining the processing result. Of course, it may also be to pass the transmission request to the next target device, and the next target device obtains the target data of the next target device according to the target data requirement information, and fills the target data into the corresponding data position in the data requirement set of the corresponding data processing model according to the data anchor point, before executing the data processing model and obtaining the processing result. The embodiment of the present application does not limit this.
[0087] Among them, judging whether the target data filled into the data requirement set of the data processing model is no longer used is specifically judging whether the target data is used by the remaining data processing models. To this end, for any remaining data processing model, it is detected whether the target data is used in the data requirement set of the remaining data processing model. If the target data is not used in the data requirement set of the remaining data processing model, it is determined that the target data is no longer used. If the target data is used in the data requirement set of the remaining data processing model, it is determined that the target data is still used. At this time, the target data can be filled into the corresponding data position in the data requirement set of the remaining data processing model.
[0088] In addition, for the target device, after temporarily storing the processing result in the transmission request, it can be determined whether there is a next target device based on the request delivery order. If it is determined that there is no next target device based on the request delivery order, the target device that is last in the delivery order returns the transmission request to the request initiating device (such as a server) through a request. The request initiating device (such as a server) parses the transmission request, obtains the processing result therein, and generates a final execution result. If it is determined that there is a next target device based on the request delivery order, the transmission request is passed to the next target device for continued processing, which means that the next target device is used as the target device and step S102 is repeated.
[0089] By generating a transmission request including the request transmission order and the data processing template, the target device is determined and transmitted according to the request transmission order. In this way, the transmission request is transmitted between each target device. At the same time, during each transmission, the target data of the target device is obtained according to the target data requirement information. According to the data anchor point, the target data is filled into the corresponding data position in the data requirement set of the corresponding data processing model, and the data processing model is executed to obtain the processing result, which is stored in the transmission request. In this way, the problems of disordered transmission order and complex integrity verification in distributed data processing are solved, and the accuracy and integrity of the data during the transmission process are guaranteed.
[0090] In the above embodiment, the request delivery order can be a linear order. For example, if there is a server, device A, and device B, then the request delivery order can be server → device A, device A → device B, so that the request delivery order is linear. In addition, the request delivery order can also be set based on the association between data processing models, so that the request delivery order is, for example, a tree-like order, and transmission requests can be delivered concurrently.
[0091] Based on this, Figure 3 FIG. 1 is a flow chart illustrating another multi-terminal data transmission method according to an embodiment of the present application. The method is applied to a request initiating device (e.g., a server) and may include the following steps:
[0092] S301, generate a transmission request including a request delivery order and at least one data processing template, and determine at least one target device based on the request delivery order; the data processing template includes target data requirement information, a data processing model, and a data anchor point, and the data anchor point is the association relationship between the data processing model and the target data.
[0093] In an embodiment of the present application, transmission parameters are initialized, including at least one data processing template and a request transfer sequence (referring to the order in which requests are transferred between devices), thereby generating a transmission request including the request transfer sequence and at least one data processing template.
[0094] Among them, for each data processing template, it includes the target data requirement information of the device, the data processing model for processing the target data (the data processing model is generally a model for pre-processing the target data), and a data anchor point. The data anchor point is the association relationship between the data processing model and the target data. According to the data anchor point, the target data can be passed to the data processing model associated with it.
[0095] In addition, for the request delivery order, at least one target device may be determined according to the request delivery order, wherein the at least one target device here is usually the first target device, that is, the at least one first target device to which the transmission request specified in the request delivery order is to be delivered.
[0096] S302, pass the transmission request to at least one target device, so that the at least one target device performs the following operations: receive the transmission request, determine the data processing template in the transmission request that matches the target device; obtain the target data of the target device according to the target data requirement information; fill the target data into the corresponding data position in the data requirement set of the corresponding data processing model according to the data anchor point, and execute the data processing model to obtain the processing result, which is stored in the transmission request; when it is determined that there is at least one next target device after the target device according to the request transmission order, pass the transmission request to at least one next target device for further processing.
[0097] In an embodiment of the present application, for a transmission request, the transmission request is concurrently transmitted to at least one target device, wherein the at least one target device here is usually the first target device, that is, the at least one first target device to which the transmission request is to be transmitted as specified in the request transmission order.
[0098] For each target device, a transfer request is received and executed. Specifically, each target device receives the transfer request and determines the data processing template that matches it. The data processing template includes target data requirement information, a data processing model, and a data anchor. The data anchor is the association between the data processing model and the target data.
[0099] Therefore, each target device obtains the target data of the target device itself according to the target data requirement information, fills the target data into the corresponding data position in the data requirement set of the corresponding data processing model according to the data anchor point, and executes the data processing model to obtain the processing result.
[0100] Among them, for the data processing model, it may require more than one data. Therefore, before executing the data processing model, it is necessary to determine whether the data is complete, that is, after adding the target data provided by the target device this time, whether the conditions for executing the data processing model are met. If so, the data processing model is executed and the processing results are obtained, which are temporarily stored in the transmission request.
[0101] Based on this, after filling the target data into the corresponding data position in the data requirement set of the corresponding data processing model, it is determined whether the data requirement set of the data processing model is filled completely. If the data requirement set is filled completely, it means that the conditions for executing the data processing model are met. At this time, the data processing model is executed and the processing results are obtained, which are temporarily stored in the transmission request.
[0102] In addition, after obtaining the processing results and temporarily storing them in the transmission request, the target data can be deleted if no longer needed, thereby reducing data redundancy. To this end, it is determined whether the target data filled into the data requirement set of the data processing model is no longer used. If the target data is no longer used, the target data is deleted from the data requirement set of the data processing model. Otherwise, the target data is removed from the data requirement set of the data processing model and filled into the data requirement sets of the remaining data processing models.
[0103] The process of determining whether the target data populated into the data requirement set of the data processing model is no longer in use specifically involves determining whether the target data is used by the remaining data processing models. To this end, for any of the remaining data processing models, it is detected whether the target data is used in the data requirement set of the remaining data processing model. If the target data is not used in the data requirement set of the remaining data processing model, it is determined that the target data is no longer in use. If the target data is used in the data requirement set of the remaining data processing model, it is determined that the target data is still in use. In this case, the target data can be populated into the corresponding data location in the data requirement set of the remaining data processing model.
[0104] In addition, for each target device, after temporarily storing the processing result in the transmission request, it can determine whether there is at least one next target device after itself according to the request transmission order. When it is determined that there is no next target device after itself according to the request transmission order, the target device that is last in the transmission order returns the transmission request to the request initiating device (such as a server) through a request. The request initiating device (such as a server) parses the transmission request, obtains the processing result therein, and generates a final execution result. When it is determined that there is at least one next target device after itself according to the request transmission order, the transmission request is concurrently passed to at least one next target device for continued processing, which means that at least one next target device is used as the target device and step S102 is repeated.
[0105] Since the transmission request may be transmitted concurrently between target devices, for each target device, after storing the processing result in the transmission request, the flag bit corresponding to the target device itself can be found from the request transmission order, and the flag bit can be set to data collection completion, which means that the target data of the target device has been collected and processed.
[0106] For the target device that is last in the transmission order, the transmission request is returned to the request initiating device (such as a server) in the form of a request, and the request initiating device (such as a server) can receive it. The transmission request may be transmitted concurrently between the target devices. Therefore, for the request initiating device (such as a server), at least one transmission request can be received. Accordingly, the request transmission order in the transmission request can be integrated to obtain an integrated request transmission order, and it is determined whether the flag bits of all target devices in the integrated request transmission order are set to data collection completion. When the flag bits of all target devices are set to data collection completion, the processing result in at least one transmission request is extracted, and the final execution result is generated according to the processing result.
[0107] For example, the request transmission order is server → device A, device A → device B, device A → device C. The transmission request is transmitted from the server to device A. Device A provides target data A, which is filled in the corresponding data position in the data requirement set of data processing model A. The data of data processing model A is judged to be complete. Data processing model A is executed to obtain processing result A, which is temporarily stored in the transmission request. The flag corresponding to device A in the request transmission order is set to data collection completion. The transmission request is concurrently transmitted from device A to device B and device C. Device B provides target data B, which is filled in the corresponding data position in the data requirement set of data processing model B. The data processing model B is judged to be complete. The data is complete, and the data processing model B is executed to obtain the processing result B, which is temporarily stored in the transmission request. The flag corresponding to device B in the request transmission sequence is set to data collection completion. There is no next target device after device B. Device B sends a transmission request to the server, and the same is true for device C. In this way, the server receives the transmission requests returned by devices B and C respectively, integrates the request transmission sequences in these two transmission requests, and obtains the integrated request transmission sequence. The flags of devices A, B, and C in the integrated request transmission sequence are all set to data collection completion, and then extracts the processing results in the two transmission requests, and generates the final execution result based on the processing results.
[0108] The following describes the multi-terminal data transmission method provided by the embodiment of the present application in conjunction with specific embodiments. Figure 4 As shown, the following steps are included:
[0109] S401: Initialize transmission parameters and form a transmission request.
[0110] Specifically, the initialization transmission parameters include a data processing template and data transfer information. The data processing template includes the device's target data requirements, the computational model for processing the target data (i.e., the aforementioned data processing model), and a data anchor. The data anchor is the relationship between the computational model and the target data, and the target data can be transferred to the associated computational model based on the data anchor. The data transfer information includes the order in which requests are transferred to the device and the verification parameters required by the device.
[0111] S402: Initiate a transmission request to the target device according to the data transfer information.
[0112] Specifically, according to the order in which the requests in the data transfer information are transferred between devices, the server initiates a transmission request to the first target device.
[0113] S403: The target device receives and executes the transmission request.
[0114] Specifically, the target device receives the transmission request, obtains the target data according to the target data requirement information, and fills the target data into the calculation model according to the data anchor point. As a preferred embodiment, the target device verifies the correctness of the request according to the verification parameters in the data transmission information.
[0115] S404, calculate the model settlement result and delete the corresponding target data.
[0116] Specifically, the execution model determines whether the data is complete, that is, whether the conditions for executing the calculation model are met after adding the target data provided by the target device this time. If so, the calculation model is executed and the calculation results are obtained, and temporarily stored in the transmission request. At the same time, it is determined whether the target data used by the calculation model is no longer used. If so, the corresponding target data is deleted.
[0117] S405: Determine whether the transmission sequence is complete based on the data transmission information.
[0118] Specifically, it is determined whether the transmission sequence is complete according to the data transmission information, and if so, step S406 is executed, otherwise, step S407 is executed.
[0119] S406: The target device returns the execution result to the server.
[0120] Specifically, the target device that is the last in the transmission order returns the transmission request to the server through a request. The server parses the transmission request, obtains the calculation result of the calculation model, and generates the final execution result.
[0121] S407: According to the data transfer information, the next device is selected as the target device and step S403 is executed.
[0122] Specifically, according to the data transfer information, the next device is taken as the target device and step S403 is repeated.
[0123] Through this approach, the server generates a transmission request based on user needs, including a set of target device requirements and a computational model. This request is then transferred between target devices, attempting to use the computational model to calculate intermediate results during each transfer. This reduces the instability of requests caused by large data volumes during the transmission process. During the transfer process, each target device focuses only on the data it needs and the computational model to which it is being transferred, reducing the risk of snooping on other devices' data and increasing data transmission security.
[0124] The present invention is described in detail below in conjunction with specific embodiments:
[0125] Reference Figure 5 , initialize parameters, form a transmission request, and the transmission request is transmitted through A->B;
[0126] The request arrives at device A from the server, and device A provides target data A, which is filled into the data location corresponding to the data requirement set of computing model A;
[0127] Determine that the data of calculation model A is complete, execute calculation model A, obtain calculation result A, and temporarily store it in the transmission request;
[0128] The request is passed from device A to device B. Device B provides target data B and fills it into the data location corresponding to the data requirement set of computing model B.
[0129] Determine that the data of calculation model B is complete, execute calculation model B, obtain calculation result B, and temporarily store it in the transmission request;
[0130] After determining that the device execution sequence is complete, device B sends a transfer request to the server;
[0131] The server generates the final result by calculating the result A and the result B.
[0132] Corresponding to the above method embodiment, the embodiment of the present application also provides a multi-terminal data transmission device, which is applied to a request initiating device, such as Figure 6 As shown, the device may include: a request generating module 610 and a request transmitting module 620.
[0133] The request generation module 610 is configured to generate a transmission request including a request transmission sequence and at least one data processing template, and determine a target device according to the request transmission sequence;
[0134] The request delivery module 620 is used to deliver the transmission request to the target device so that the target device performs the following operations: receiving the transmission request, determining the data processing template in the transmission request that matches the target device; obtaining the target data of the target device based on the data processing template, and processing the target data to obtain the processing result, which is stored in the transmission request; and when it is determined that there is a next target device according to the request delivery order, delivering the transmission request to the next target device for further processing.
[0135] The embodiment of the present application also provides a server, such as Figure 7 As shown, it includes a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74.
[0136] Memory 73, for storing computer programs;
[0137] The processor 71 is configured to execute the program stored in the memory 73 to implement the following steps:
[0138] Generate a transmission request including a request delivery order and at least one data processing template, and determine a target device according to the request delivery order; deliver the transmission request to the target device so that the target device performs the following operations: receive the transmission request, determine the data processing template in the transmission request that matches the target device; obtain target data of the target device based on the data processing template, process the target data, obtain a processing result, and store it in the transmission request; if it is determined that there is a next target device according to the request delivery order, deliver the transmission request to the next target device for further processing.
[0139] The communication bus mentioned in the server above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, the figure uses only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0140] The communication interface is used for communication between the above server and other devices.
[0141] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0142] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0143] In another embodiment provided by the present application, a storage medium is also provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes the multi-terminal data transmission method described in any of the above embodiments.
[0144] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the multi-terminal data transmission method described in any one of the above embodiments.
[0145] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0146] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0147] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0148] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.
Claims
1. A multi-terminal data transmission method, characterized in that: Applied to a request initiating device, the method includes: generating a transmission request including a request transmission sequence and at least one data processing template, and determining a target device according to the request transmission sequence; The transfer request is transmitted to the target device, so that the target device performs the following operations: receiving the transmission request, and determining the data processing template in the transmission request that matches the target device; Acquiring target data of the target device according to the data processing template, processing the target data, obtaining a processing result, and storing the processing result in the transmission request; If it is determined according to the request transfer sequence that there is a next target device, the transmission request is transferred to the next target device for further processing.
2. The method according to claim 1, characterized in that The data processing template includes target data requirement information, a data processing model, and a data anchor point, wherein the data anchor point is the association relationship between the data processing model and the target data; The step of acquiring target data of the target device according to the data processing template and processing the target data to obtain a processing result includes: acquiring target data of the target device according to the target data requirement information; According to the data anchor point, the target data is filled into the corresponding data position in the data requirement set of the corresponding data processing model, and the data processing model is executed to obtain a processing result.
3. The method according to claim 2, characterized in that The executing the data processing model to obtain a processing result includes: Determine whether the data requirement set of the data processing model is complete, and if the data requirement set is complete, execute the data processing model to obtain a processing result.
4. The method according to claim 2, characterized in that After executing the data processing model and obtaining the processing result, the method further includes: Determining whether the target data in the data requirement set filled into the data processing model is no longer used; When the target data is no longer used, the target data is deleted from the data requirement set of the data processing model.
5. The method according to claim 4, characterized in that The determining whether the target data in the data requirement set filled into the data processing model is no longer used includes: For any other data processing model, detecting whether the target data is used in the data requirement set of the other data processing model; If the target data is not used in the data requirement sets of the remaining data processing models, determining that the target data is no longer used; In a case where the target data is used in the data requirements of the remaining data processing models, determining that the target data is to be continued to be used; The target data is filled into the corresponding data location in the data requirement set of the remaining data processing models.
6. The method according to claim 1, characterized in that The number of the target device is at least one, and the number of the next target device is at least one; The transmitting the transmission request to the target device comprises: delivering the transmission request to at least one of the target devices; The step of transferring the transmission request to the next target device for further processing when it is determined according to the request transfer order that the next target device exists comprises: If it is determined according to the request transfer order that there is at least one next target device after the target device, the transmission request is transferred to the at least one next target device for further processing.
7. The method according to claim 6, characterized in that The storing, after the transmission request, further comprises: Find the flag bit corresponding to the target device from the request transfer sequence, and set the flag bit to indicate that data collection is completed.
8. The method according to claim 7, characterized in that The method further comprises: receiving at least one of the transmission requests, and integrating the request delivery order in the at least one transmission request to obtain an integrated request delivery order; Determining whether the flags of all target devices in the integration request transmission sequence are set to data collection completed; When the flag bits of all target devices are set to indicate that data collection is completed, extracting a processing result from at least one of the transmission requests, and generating a final execution result based on the processing result; Wherein, when it is determined according to the request transmission order that there is no next target device after the target device, the transmission request is returned to the request initiating device.
9. A multi-terminal data transmission device, characterized in that: Applied to a request initiating device, the apparatus includes: a request generation module, configured to generate a transmission request including a request transmission sequence and at least one data processing template, and determine a target device according to the request transmission sequence; A request delivery module is used to deliver the transmission request to the target device so that the target device performs the following operations: receiving the transmission request and determining the data processing template in the transmission request that matches the target device; obtaining the target data of the target device based on the data processing template, and processing the target data to obtain the processing result, which is stored in the transmission request; and when it is determined that there is a next target device according to the request delivery order, delivering the transmission request to the next target device for further processing.
10. A server, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 8 when executing a program stored in a memory.
11. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.