CN109873831A - A kind of method and system of data transmission - Google Patents

A kind of method and system of data transmission Download PDF

Info

Publication number
CN109873831A
CN109873831A CN201910194292.XA CN201910194292A CN109873831A CN 109873831 A CN109873831 A CN 109873831A CN 201910194292 A CN201910194292 A CN 201910194292A CN 109873831 A CN109873831 A CN 109873831A
Authority
CN
China
Prior art keywords
data
order body
transmitting terminal
receiving end
data volume
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910194292.XA
Other languages
Chinese (zh)
Other versions
CN109873831B (en
Inventor
朱辉
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Apas Technology Co ltd
Original Assignee
Zhuhai Tianyan Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Tianyan Technology Co Ltd filed Critical Zhuhai Tianyan Technology Co Ltd
Priority to CN201910194292.XA priority Critical patent/CN109873831B/en
Publication of CN109873831A publication Critical patent/CN109873831A/en
Application granted granted Critical
Publication of CN109873831B publication Critical patent/CN109873831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application provides a kind of method and system of data transmission, this method comprises: the data transfer request that transmitting terminal issues receiving end receives;The transmitting terminal transmits request based on the data and generates data connection object, and the data connection object includes order body and data volume;The transmitting terminal transmits the order body by reflection mechanism, and by spreading the defeated transmission data volume;Receiving end parses the order body, the data volume is written according to parsing result, by spreading the defeated transmission data volume, a kind of method and system of data transmission provided by the embodiments of the present application can be in conjunction with the advantage based on order and the data transmission architecture based on data, target data is transmitted to receiving end by unified bandwidth, reduce the delay of data caused by time sharing transmissions, influence bandwidth etc., improve the efficiency of data transmission.

Description

A kind of method and system of data transmission
Technical field
This application involves the method and systems that technical field of data processing more particularly to a kind of data are transmitted.
Background technique
Middle backstage middleware is carried out telecommunication using two different data or command architecture.Wherein, based on order Communication: common framework technology includes dubbo, spring cloud, thrift, ICE etc.;Based on data communication: common Framework technology includes datax, hadoop pipe line etc..
Based on this, it was found by the inventors of the present invention that based on the communication construction of order to the performance of large-scale data transmission too Low, too poor to command interaction ease for use based on the communication construction of data, two kinds of communication constructions are respectively lacking.
The information disclosed in the background technology section is intended only to increase the understanding to general background of the invention, without answering When being considered as recognizing or imply that the information constitutes the prior art already known to those of ordinary skill in the art in any form.
Summary of the invention
The purpose of the embodiment of the present application is to provide a kind of method and system of data transmission, can be in conjunction with based on order and base In the advantage of the data transmission architecture of data.
In order to solve the above technical problems, the embodiment of the present application is realized by following aspects.
In a first aspect, the embodiment of the present application provides a kind of method of data transmission, comprising: transmitting terminal issues receiving end Data transfer request received;The transmitting terminal transmits request based on the data and generates data connection object, the number It include order body and data volume according to connection object;The transmitting terminal transmits the order body by reflection mechanism, defeated by spreading Transmit the data volume;Receiving end parses the order body, and the data volume is written according to parsing result.
In one possible implementation, the transmitting terminal transmits request based on the data and generates data connection object When, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
In one possible implementation, the method also includes the transmitting terminal carries out sequence to the order body Change processing, specifically: the writeable writable in Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java The serializing of the order body is realized with readable readable interface, is transmitted convenient for data.
In one possible implementation, the reception data transfer request includes: the transmitting terminal using socket Socket communication mode receives the data transfer request.
In one possible implementation, the reception data transfer request includes: that the transmitting terminal passes through thread pool It is concurrent to carry out thread, receives the data transfer request.
In one possible implementation, the receiving end parses the order body, will according to parsing result It includes: that the receiving end carries out unserializing to the order body that the data volume, which carries out write-in, to data volume execution pair The write operation answered.
Second aspect, the embodiment of the present application provides a kind of system of data transmission, including transmitting terminal and receiving end, described Transmitting terminal includes: receiving module, for receiving to the data transfer request that receiving end issues;Generation module, for being based on The data transfer request generates data connection object, and the data connection object includes order body and data volume;Transmission module, For transmitting the order body by reflection mechanism, and by spreading the defeated transmission data volume;The receiving end includes: parsing The data volume is written according to parsing result for parsing to the order body for module.
The generation module by be transmitted for described connecing when transmission request generates data connection object based on the data The data volume of receiving end and the order body of established form are packaged.
In one possible implementation, the transmitting terminal further includes serialization module, for the order body into Row serializing processing, specifically: it is writeable in the Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java Writable and readable readable interface realize the serializing of the order body, transmit convenient for data.
In one possible implementation, the receiving module is used to receive institute using socket Socket communication mode State data transfer request.
In one possible implementation, the receiving module is used for concurrent by thread pool progress thread, receives institute State data transfer request.
In one possible implementation, the parsing module is used to carry out unserializing to the order body, to institute It states data volume and executes corresponding write operation.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising: memory, processor and are stored in institute The computer executable instructions that can be run on memory and on the processor are stated, the computer executable instructions are described The step of method as described in above-mentioned first aspect is realized when processor executes.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage Medium realizes such as above-mentioned first for storing computer executable instructions when the computer executable instructions are executed by processor The step of method described in aspect.
In the embodiment of the present application, it is received by the data transfer request that transmitting terminal issues receiving end;The hair Sending end transmits request based on the data and generates data connection object, and the data connection object includes order body and data volume; The transmitting terminal transmits the order body by reflection mechanism, and by spreading the defeated transmission data volume;Receiving end is to described Order body is parsed, and the data volume is written according to parsing result, can by spreading the defeated transmission data volume In conjunction with the advantage based on order and the data transmission architecture based on data, target data is transmitted to receiving end by unified bandwidth, Reduce the delay of data caused by time sharing transmissions, influence bandwidth etc., improve the efficiency of data transmission.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The some embodiments recorded in application, for those of ordinary skill in the art, in the premise of not making the creative labor property Under, it is also possible to obtain other drawings based on these drawings.
Fig. 1 shows a kind of a kind of flow diagram of the method for data transmission provided by the embodiments of the present application;
Fig. 2 shows a kind of another flow diagrams of the method for data transmission provided by the embodiments of the present application;
Fig. 3 shows a kind of another flow diagram of the method for data transmission provided by the embodiments of the present application;
Fig. 4 shows a kind of structural schematic diagram of the system of data transmission provided by the embodiments of the present application;
Fig. 5 shows a kind of structural schematic diagram of the system of data transmission provided by the embodiments of the present application;
Fig. 6, which is shown, to be executed the hardware configuration of the electronic equipment of method of data transmission provided by the embodiments of the present application a kind of and shows It is intended to.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common The application protection all should belong in technical staff's every other embodiment obtained without creative efforts Range.
Fig. 1 shows a kind of a kind of flow diagram of the method for data transmission provided by the embodiments of the present application, and this method can To be executed by electronic equipment, such as terminal device or server device.In other words, the method can be by being mounted on terminal device Or the software or hardware of server device execute.The server-side includes but is not limited to: single server, server cluster, Cloud server or cloud server cluster etc..As shown, this method may comprise steps of.
S10: data transfer request is received.
The data transfer request that transmitting terminal issues receiving end receives.Terminal can be used as transmitting terminal, and server can Using as receiving end.
Realize the telecommunication between server and terminal, the data transmission for enabling the server to receive terminal transmission is asked It asks, which sent based on command communication.
S20: based on the data transmission request generate data connection object, the data connection object include order body and Data volume.
Transmitting terminal transmits request based on the data and generates data connection object, and the data connection object includes order body And data volume
It simultaneously include order body and data volume in a data connection object.The order body includes: interface name, method Name, parameter.
S30: transmitting terminal transmits the order body by reflection mechanism, and by spreading the defeated transmission data volume.
S40: receiving end parses the order body, and the data volume is written according to parsing result.
The method of a kind of data transmission provided by the embodiments of the present application as a result, the number that receiving end is issued by transmitting terminal It is received according to transmission request;The transmitting terminal transmits request based on the data and generates data connection object, and the data pass Defeated object includes order body and data volume;The transmitting terminal transmits the order body by reflection mechanism, and by spreading defeated biography The defeated data volume;Receiving end parses the order body, and the data volume is written according to parsing result, can In conjunction with the advantage based on order and the data transmission architecture based on data, target data is transmitted to receiving end by unified bandwidth, Reduce the delay of data caused by time sharing transmissions, influence bandwidth etc., improve the efficiency of data transmission.In a data transmission pair Order body and data volume are obtained simultaneously in the transmission of elephant, is ordered respectively in two times without being based respectively on two kinds of transmission mechanisms Body and data volume, the efficiency of improve data transfer.
Fig. 2 shows a kind of another flow diagram of the method for data transmission provided by the embodiments of the present application, this method It can be executed by electronic equipment, such as terminal device or server device.In other words, the method can be set by being mounted on terminal Standby or server device software or hardware execute.The server-side includes but is not limited to: single server, server set Group, cloud server or cloud server cluster etc..As shown, this method may comprise steps of.
S10: data transfer request is received.
The data transfer request that transmitting terminal issues receiving end receives.Terminal can be used as transmitting terminal, and server can Using as receiving end.
Realize the telecommunication between server and terminal, the data transmission for enabling the server to receive terminal transmission is asked It asks, which sent based on command communication.
S20: based on the data transmission request generate data connection object, the data connection object include order body and Data volume.
Transmitting terminal transmits request based on the data and generates data connection object, and the data connection object includes order body And data volume
It simultaneously include order body and data volume in a data connection object.The order body includes: interface name, method Name, parameter.
In one possible implementation, the transmitting terminal transmits request based on the data and generates data connection object When, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
It simultaneously include order body and data volume in a data connection object.
S31: transmitting terminal carries out serializing processing to the order body.
Common serializing technology has following several:
1, Java native sequence method passes through the primary stream of Java (between InputStream and OutputStream Conversion) mode converted.JavaBean entity class realizes Serializable interface.
2, Json serializing generally will use jackson packet, and some operations are carried out by ObjectMapper class, such as It converts objects into byte array or converts object for json string.The data lattice that usually json is returned as server end Formula.For example a server interface is called, does is common request xxx.json? the form of a=xxx&b=xxx.
3, Json resolver and generator that the Java language of fastjson better performances is realized, speed is fast, and function is strong, complete It is complete to support java bean, set, Map, date, Enum, it supports pattern and examines oneself.
4, ProtoBuff serializes object and can largely compress it, and can greatly reduce data transfer size, Improve system performance.For the caching of mass data, data storage capacity in caching can also be improved.
In one possible implementation, this step may include: by rewriteeing Object-Oriented Programming Language Java Writeable writable and readable readable interface in Software Development Kit jdk realize the serializing of the order body, just It is transmitted in data.Support common numerical value, character string, byte type etc..
Interface code is with reference to as follows:
S30: transmitting terminal transmits the order body by reflection mechanism, and by spreading the defeated transmission data volume.
S40: receiving end parses the order body, and the data volume is written according to parsing result.
Stream transmission property is judged whether there is, differentiation is defeated if there is spreading, then need not be serialized, directly stream docking ?.
The method of a kind of data transmission provided by the embodiments of the present application as a result, the number that receiving end is issued by transmitting terminal It is received according to transmission request;The transmitting terminal transmits request based on the data and generates data connection object, and the data pass Defeated object includes order body and data volume;The transmitting terminal transmits the order body by reflection mechanism, and by spreading defeated biography The defeated data volume;Receiving end parses the order body, and the data volume is written according to parsing result, can In conjunction with the advantage based on order and the data transmission architecture based on data, target data is transmitted to receiving end by unified bandwidth, Reduce the delay of data caused by time sharing transmissions, influence bandwidth etc., improve the efficiency of data transmission.In a data transmission pair Order body and data volume are obtained simultaneously in the transmission of elephant, is ordered respectively in two times without being based respectively on two kinds of transmission mechanisms Body and data volume, the efficiency of improve data transfer.
Fig. 3 shows a kind of another flow diagram of the method for data transmission provided by the embodiments of the present application, this method It can be executed by electronic equipment, such as terminal device or server device.In other words, the method can be set by being mounted on terminal Standby or server device software or hardware execute.The server-side includes but is not limited to: single server, server set Group, cloud server or cloud server cluster etc..As shown, this method may comprise steps of.
S10: data transfer request is received.
The data transfer request that transmitting terminal issues receiving end receives.Terminal can be used as transmitting terminal, and server can Using as receiving end.
Realize the telecommunication between server and terminal, the data transmission for enabling the server to receive terminal transmission is asked It asks, which sent based on command communication.
In one possible implementation, transmitting terminal can receive the data using socket Socket communication mode Transmission request.
In one possible implementation, the data transfer request can be received by thread pool.
BIO (English: blocking input and output), i.e. obstruction IO (English: input and output), During the message communicating based on Socket, Socket service end is to external offer service, and Socket client can be built The connection at Socket service end is stood, and then sends request data, then waits the processing of Socket service end, and returns to processing knot Fruit (response).Communication based on BIO, Socket service end can be blocked, i.e., accept to one each in snoop procedure The Socket connection of client is it is necessary to handle this request, and the client that other connections come at this time can only block waiting.It can See, the processing capacity at Socket service end is very limited under this mode, and client can only also wait until server-side sky The processing that idle makes requests.So in order to solve this problem, server-side can use the processing mode of thread pool.Thread pool is Task is added to queue in treatment process, then starts these automatically after creating thread by a kind of multiple threads form Business.Thread pool threads are all background threads.Per thread all using the storehouse size of default, is run with the priority of default, and In multiple thread units.If some thread is idle in Managed Code (as waited some event), then thread pool will Another worker thread is inserted into make all processors keep busy.If all thread pool threads all remain busy, but Comprising the work hung up in queue, then thread pool is eternal by the number for creating another worker thread but thread over time Maximum value is not exceeded.Thread more than maximum value can be lined up, but will be until just starting after the completion of other threads.As a result, into The efficiency of one step improve data transfer.
S20: based on the data transmission request generate data connection object, the data connection object include order body and Data volume.
Transmitting terminal transmits request based on the data and generates data connection object, and the data connection object includes order body And data volume
It simultaneously include order body and data volume in a data connection object.The order body includes: interface name, method Name, parameter.
In one possible implementation, the transmitting terminal transmits request based on the data and generates data connection object When, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
It simultaneously include order body and data volume in a data connection object.
S31: transmitting terminal carries out serializing processing to the order body.
Common serializing technology has following several:
1, Java native sequence method passes through the primary stream of Java (between InputStream and OutputStream Conversion) mode converted.JavaBean entity class realizes Serializable interface.
2, Json serializing generally will use jackson packet, and some operations are carried out by ObjectMapper class, such as It converts objects into byte array or converts object for json string.The data lattice that usually json is returned as server end Formula.For example a server interface is called, does is common request xxx.json? the form of a=xxx&b=xxx.
3, Json resolver and generator that the Java language of fastjson better performances is realized, speed is fast, and function is strong, complete It is complete to support java bean, set, Map, date, Enum, it supports pattern and examines oneself.
4, ProtoBuff serializes object and can largely compress it, and can greatly reduce data transfer size, Improve system performance.For the caching of mass data, data storage capacity in caching can also be improved.
In one possible implementation, this step may include: by rewriteeing Object-Oriented Programming Language Java Writeable writable and readable readable interface in Software Development Kit jdk realize that the serializing of the order body passes It is defeated.Support common numerical value, character string, byte type etc..
Interface code is with reference to as follows:
S30: transmitting terminal transmits the order body by reflection mechanism, and by spreading the defeated transmission data volume.
S40: receiving end parses the order body, and the data volume is written according to parsing result.
This step may comprise steps of.
S41: receiving end carries out unserializing to the order body.
The receiving end needs to carry out unserializing processing to the order body, is saved according in the byte stream of serializing Obj State and description information, connection object is rebuild by unserializing.
S42: corresponding write operation is executed to the data volume.
The method of a kind of data transmission provided by the embodiments of the present application as a result, the number that receiving end is issued by transmitting terminal It is received according to transmission request;The transmitting terminal transmits request based on the data and generates data connection object, and the data pass Defeated object includes order body and data volume;The transmitting terminal transmits the order body by reflection mechanism, and by spreading defeated biography The defeated data volume;Receiving end parses the order body, and the data volume is written according to parsing result, can In conjunction with the advantage based on order and the data transmission architecture based on data, target data is transmitted to receiving end by unified bandwidth, Reduce the delay of data caused by time sharing transmissions, influence bandwidth etc., improve the efficiency of data transmission.In a data transmission pair Order body and data volume are obtained simultaneously in the transmission of elephant, is ordered respectively in two times without being based respectively on two kinds of transmission mechanisms Body and data volume, the efficiency of improve data transfer.
Fig. 4 shows a kind of structural schematic diagram of the system of data transmission provided by the embodiments of the present application, which includes hair Sending end 10 and receiving end 20, transmitting terminal 10 include: receiving module 110, generation module 120 and transmission module 130.
The data transfer request that receiving module 110 is used to issue receiving end receives.Generation module 120 is for being based on The data transfer request generates data connection object, and the data connection object includes order body and data volume.Transmission module 130 for transmitting the order body by reflection mechanism, and by spreading the defeated transmission data volume.
Receiving end 20 includes: parsing module 210 for parsing to the order body, according to parsing result by the number It is written according to body.
In one possible implementation, generation module 120 generates data for transmission request based on the data and passes When defeated object, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
The system of a kind of data transmission provided by the embodiments of the present application as a result, the number that receiving end is issued by transmitting terminal It is received according to transmission request;The transmitting terminal transmits request based on the data and generates data connection object, and the data pass Defeated object includes order body and data volume;The transmitting terminal transmits the order body by reflection mechanism, and by spreading defeated biography The defeated data volume;Receiving end parses the order body, and the data volume is written according to parsing result, can In conjunction with the advantage based on order and the data transmission architecture based on data, target data is transmitted to receiving end by unified bandwidth, Reduce the delay of data caused by time sharing transmissions, influence bandwidth etc., improve the efficiency of data transmission.In a data transmission pair Order body and data volume are obtained simultaneously in the transmission of elephant, is ordered respectively in two times without being based respectively on two kinds of transmission mechanisms Body and data volume, the efficiency of improve data transfer.
Fig. 5 shows a kind of structural schematic diagram of the system of data transmission provided by the embodiments of the present application, which includes hair Sending end 10 and receiving end 20, transmitting terminal 10 include: receiving module 110, generation module 120, transmission module 130 and serialization module 140。
The data transfer request that receiving module 110 is used to issue receiving end receives.Generation module 120 is for being based on The data transfer request generates data connection object, and the data connection object includes order body and data volume.Transmission module 130, for transmitting the order body by reflection mechanism, and by spreading the defeated transmission data volume.
Receiving end 20 includes: parsing module 210, will be described according to parsing result for parsing to the order body Data volume is written.
In one possible implementation, generation module 120 generates data for transmission request based on the data and passes When defeated object, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
In one possible implementation, transmitting terminal 10 further includes serialization module 140, for the order body into Row serializing processing, specifically: it is writeable in the Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java Writable and readable readable interface realize the serializing of the order body, transmit convenient for data.
In one possible implementation, the receiving module 110 is used to connect using socket Socket communication mode Receive the data transfer request.
In one possible implementation, the receiving module 110 is used for concurrent by thread pool progress thread, is received The data transfer request.
In one possible implementation, the parsing module 210 is used to carry out unserializing to the order body, right The data volume executes corresponding write operation.
Each method described in embodiment of the method above can be performed in the system provided by the embodiments of the present application, and before realization The function and beneficial effect of each method described in literary embodiment of the method, details are not described herein.
Fig. 6, which is shown, to be executed the hardware configuration of the electronic equipment of method of data transmission provided by the embodiments of the present application a kind of and shows It is intended to, transmitting terminal described in the embodiment of the present application and receiving end can be executed by the electronic equipment with same or similar structure, As shown, the electronic equipment can generate bigger difference because configuration or performance are different, may include one or one with On processor 701 and memory 702, can store one or more storage application programs or number in memory 702 According to.Wherein, memory 702 can be of short duration storage or persistent storage.The application program for being stored in memory 702 may include one A or more than one module (diagram is not shown), each module may include that can hold to the series of computation machine in the electronic equipment Row instruction.Further, processor 701 can be set to communicate with memory 702, execute memory on the electronic equipment Series of computation machine executable instruction in 702.The electronic equipment can also include one or more power supplys 703, one Or more than one wired or wireless network interface 704, one or more input/output interfaces 705, one or more Keyboard 706 etc..
In a specific embodiment, which includes memory, processor and is stored on the memory And the computer executable instructions that can be run on the processor, the computer executable instructions are executed by the processor Shi Shixian following below scheme: the data transfer request that transmitting terminal issues receiving end receives;The transmitting terminal is based on the number It requests to generate data connection object according to transmission, the data connection object includes order body and data volume;The transmitting terminal passes through Reflection mechanism transmits the order body, by spreading the defeated transmission data volume;Receiving end parses the order body, root The data volume is written according to parsing result.
In one possible implementation, the transmitting terminal transmits request based on the data and generates data connection object When, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
In one possible implementation, the method also includes the transmitting terminal carries out sequence to the order body Change processing, specifically: the writeable writable in Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java The serializing of the order body is realized with readable readable interface, is transmitted convenient for data.
In one possible implementation, the reception data transfer request includes: the transmitting terminal using socket Socket communication mode receives the data transfer request.
In one possible implementation, the reception data transfer request includes: that the transmitting terminal passes through thread pool It is concurrent to carry out thread, receives the data transfer request.
In one possible implementation, the receiving end parses the order body, will according to parsing result It includes: that the receiving end carries out unserializing to the order body that the data volume, which carries out write-in, to data volume execution pair The write operation answered.
A kind of executable method above of electronic equipment of the method for data transmission provided by the embodiments of the present application is executed as a result, Each method as described in the examples, and realize the function and beneficial effect of each method described in embodiment of the method above, herein It repeats no more.
The electronic equipment of the embodiment of the present application exists in a variety of forms, including but not limited to following equipment.
Server: the equipment of the service of calculating is provided, the composition of server includes processor, hard disk, memory, system bus Deng, server is similar with general computer architecture, but due to needing to provide highly reliable service, processing capacity, Stability, reliability, safety, scalability, manageability etc. are more demanding.Other electricity with data interaction function Sub-device.
Further, described computer-readable to deposit the embodiment of the present application also provides a kind of computer readable storage medium Storage media is realized for storing computer executable instructions, when the computer executable instructions are executed by processor to flow down Journey: the data transfer request that transmitting terminal issues receiving end receives;The transmitting terminal transmits please seek survival based on the data At data connection object, the data connection object includes order body and data volume;The transmitting terminal is transmitted by reflection mechanism The order body, by spreading the defeated transmission data volume;Receiving end parses the order body, will according to parsing result The data volume is written.
In one possible implementation, the transmitting terminal transmits request based on the data and generates data connection object When, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
In one possible implementation, the method also includes the transmitting terminal carries out sequence to the order body Change processing, specifically: the writeable writable in Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java The serializing of the order body is realized with readable readable interface, is transmitted convenient for data.
In one possible implementation, the reception data transfer request includes: the transmitting terminal using socket Socket communication mode receives the data transfer request.
In one possible implementation, the reception data transfer request includes: that the transmitting terminal passes through thread pool It is concurrent to carry out thread, receives the data transfer request.
In one possible implementation, the receiving end parses the order body, will according to parsing result It includes: that the receiving end carries out unserializing to the order body that the data volume, which carries out write-in, to data volume execution pair The write operation answered.
It is able to carry out when the computer executable instructions are executed by processor as a result, above described in embodiment of the method Each method, and realize the function and beneficial effect of each method described in embodiment of the method above, details are not described herein.
Wherein, the computer readable storage medium includes read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
Further, the embodiment of the present application also provides a kind of computer program product, the computer program product packets The computer program being stored in non-transient computer readable storage medium is included, the computer program includes program instruction, when When described program instruction is computer-executed, realize following below scheme: transmitting terminal carries out the data transfer request that receiving end issues It receives;The transmitting terminal transmits request based on the data and generates data connection object, and the data connection object includes order Body and data volume;The transmitting terminal transmits the order body by reflection mechanism, by spreading the defeated transmission data volume;It receives End parses the order body, and the data volume is written according to parsing result.
In one possible implementation, the transmitting terminal transmits request based on the data and generates data connection object When, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
In one possible implementation, the method also includes the transmitting terminal carries out sequence to the order body Change processing, specifically: the writeable writable in Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java The serializing of the order body is realized with readable readable interface, is transmitted convenient for data.
In one possible implementation, the reception data transfer request includes: the transmitting terminal using socket Socket communication mode receives the data transfer request.
In one possible implementation, the reception data transfer request includes: that the transmitting terminal passes through thread pool It is concurrent to carry out thread, receives the data transfer request.
In one possible implementation, the receiving end parses the order body, will according to parsing result It includes: that the receiving end carries out unserializing to the order body that the data volume, which carries out write-in, to data volume execution pair The write operation answered.
Computer program product provided by the embodiments of the present application is executed as a result, to be able to carry out above described in embodiment of the method Each method, and realize the function and beneficial effect of each method described in embodiment of the method above, details are not described herein.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (12)

1. a kind of method of data transmission characterized by comprising
The data transfer request that transmitting terminal issues receiving end receives;
The transmitting terminal transmits request based on the data and generates data connection object, and the data connection object includes order body And data volume;
The transmitting terminal transmits the order body by reflection mechanism, and by spreading the defeated transmission data volume;
Receiving end parses the order body, and the data volume is written according to parsing result.
2. the method according to claim 1, wherein the transmitting terminal transmits request based on the data generates number When according to connection object, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
3. the method according to claim 1, wherein the method also includes the transmitting terminal is to the order Body carries out serializing processing, specifically:
The writeable writable and readable in Software Development Kit jdk by rewriteeing Object-Oriented Programming Language Java Readable interface realizes the serializing of the order body, transmits convenient for data.
4. the method according to claim 1, wherein the reception data transfer request includes:
The transmitting terminal receives the data transfer request using socket Socket communication mode.
5. the method according to claim 1, wherein the reception data transfer request includes:
The transmitting terminal is concurrent by thread pool progress thread, receives the data transfer request.
6. the method according to claim 1, wherein the receiving end parses the order body, according to The data volume is carried out write-in by parsing result
The receiving end carries out unserializing to the order body, executes corresponding write operation to the data volume.
7. a kind of system of data transmission, which is characterized in that including transmitting terminal and receiving end, the transmitting terminal includes:
Receiving module, for being received to the data transfer request that receiving end issues;
Generation module generates data connection object for transmission request based on the data, and the data connection object includes life Enable body and data volume;
Transmission module, for transmitting the order body by reflection mechanism, and by spreading the defeated transmission data volume;
The receiving end includes:
The data volume is written according to parsing result for parsing to the order body for parsing module.
8. system according to claim 7, which is characterized in that the generation module is for transmission request based on the data When generating data connection object, the order body of the data volume of the receiving end to be transmitted and established form is packaged.
9. system according to claim 7, which is characterized in that the transmitting terminal further includes serialization module, for institute It states order body and carries out serializing processing, specifically: by the Software Development Kit jdk for rewriteeing Object-Oriented Programming Language Java In writeable writable and readable readable interface realize the serializing of the order body, transmitted convenient for data.
10. system according to claim 7, which is characterized in that the receiving module is used for logical using socket Socket Letter mode receives the data transfer request.
11. system according to claim 7, which is characterized in that the receiving module is used to carry out thread by thread pool Concurrently, the data transfer request is received.
12. system according to claim 7, which is characterized in that the parsing module is used to carry out the order body anti- Serializing executes corresponding write operation to the data volume.
CN201910194292.XA 2019-03-14 2019-03-14 Data transmission method and system Active CN109873831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910194292.XA CN109873831B (en) 2019-03-14 2019-03-14 Data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910194292.XA CN109873831B (en) 2019-03-14 2019-03-14 Data transmission method and system

Publications (2)

Publication Number Publication Date
CN109873831A true CN109873831A (en) 2019-06-11
CN109873831B CN109873831B (en) 2021-07-23

Family

ID=66920523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910194292.XA Active CN109873831B (en) 2019-03-14 2019-03-14 Data transmission method and system

Country Status (1)

Country Link
CN (1) CN109873831B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004252708A (en) * 2003-02-20 2004-09-09 Hitachi Software Eng Co Ltd Object value setting method and program
US20050071342A1 (en) * 2003-09-25 2005-03-31 International Business Machines Corporation Data processing for objects with unknown data structures
CN103763357A (en) * 2014-01-08 2014-04-30 兴天通讯技术(天津)有限公司 Terminal, server and remote calling method based on TLV
CN105391804A (en) * 2015-12-16 2016-03-09 炫彩互动网络科技有限公司 Remote invocation method capable of reducing transmission flow
CN105843600A (en) * 2016-02-29 2016-08-10 乐视体育文化产业发展(北京)有限公司 Data editing method, apparatus and system
CN108009011A (en) * 2017-12-04 2018-05-08 科大国创软件股份有限公司 A kind of workflow platform multiplex roles affairs chain processing method based on java principles of reflection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004252708A (en) * 2003-02-20 2004-09-09 Hitachi Software Eng Co Ltd Object value setting method and program
US20050071342A1 (en) * 2003-09-25 2005-03-31 International Business Machines Corporation Data processing for objects with unknown data structures
CN103763357A (en) * 2014-01-08 2014-04-30 兴天通讯技术(天津)有限公司 Terminal, server and remote calling method based on TLV
CN105391804A (en) * 2015-12-16 2016-03-09 炫彩互动网络科技有限公司 Remote invocation method capable of reducing transmission flow
CN105843600A (en) * 2016-02-29 2016-08-10 乐视体育文化产业发展(北京)有限公司 Data editing method, apparatus and system
CN108009011A (en) * 2017-12-04 2018-05-08 科大国创软件股份有限公司 A kind of workflow platform multiplex roles affairs chain processing method based on java principles of reflection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIE LIU: "Reflection Analysis for Java: Uncovering More Reflective Targets Precisely", 《2017 IEEE 28TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE)》 *
孙立荣: "面向接口元数据信息获取的CORBA反射机制的研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Also Published As

Publication number Publication date
CN109873831B (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN111277616B (en) RDMA-based data transmission method and distributed shared memory system
CN104731569B (en) A kind of data processing method and relevant device
WO2021042840A1 (en) Data processing method and apparatus, server, and computer-readable storage medium
CN103116520B (en) Method based on the remote procedure call of TCP/ UDP
CN107370796B (en) Intelligent learning system based on Hyper TF
US20150067695A1 (en) Information processing system and graph processing method
CN103645994A (en) Data processing method and device
US10609125B2 (en) Method and system for transmitting communication data
WO2022032984A1 (en) Mqtt protocol simulation method and simulation device
CN103414579A (en) Cross-platform monitoring system applicable to cloud computing and monitoring method thereof
CN102810069A (en) JAVA object requesting and responding methods, devices and systems and terminal
US11474853B2 (en) Storage device operation method and physical server
CN109547162B (en) Data communication method based on two sets of one-way boundaries
CN111404931B (en) Remote data transmission method based on persistent memory
JP6498844B2 (en) Computer device and method for reading / writing data by computer device
WO2023046141A1 (en) Acceleration framework and acceleration method for database network load performance, and device
CN110308986A (en) The method of distributed training data communication on container cloud based on Optimized Operation
CN110177146A (en) A kind of non-obstruction Restful communication means, device and equipment based on asynchronous event driven
CN106131162B (en) A method of network service agent is realized based on IOCP mechanism
CN114371935A (en) Gateway processing method, gateway, device and medium
CN109951532B (en) DPDK-based automatic flow model conversion device
CN109873831A (en) A kind of method and system of data transmission
CN116932147A (en) Streaming job processing method and device, electronic equipment and medium
CN109218371B (en) Method and equipment for calling data
CN111984679B (en) Access method, device, host, system and medium of hardware acceleration database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220803

Address after: No.16 and 17, unit 1, North District, Kailin center, No.51 Jinshui East Road, Zhengzhou area (Zhengdong), Henan pilot Free Trade Zone, Zhengzhou City, Henan Province, 450000

Patentee after: Zhengzhou Apas Technology Co.,Ltd.

Address before: E301-27, building 1, No.1, hagongda Road, Tangjiawan Town, Zhuhai City, Guangdong Province

Patentee before: ZHUHAI TIANYAN TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right