CN106254420B - A kind of cross-domain communication method and device - Google Patents

A kind of cross-domain communication method and device Download PDF

Info

Publication number
CN106254420B
CN106254420B CN201610566054.3A CN201610566054A CN106254420B CN 106254420 B CN106254420 B CN 106254420B CN 201610566054 A CN201610566054 A CN 201610566054A CN 106254420 B CN106254420 B CN 106254420B
Authority
CN
China
Prior art keywords
container
father
communication
instruction
sub
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.)
Active
Application number
CN201610566054.3A
Other languages
Chinese (zh)
Other versions
CN106254420A (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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN201610566054.3A priority Critical patent/CN106254420B/en
Publication of CN106254420A publication Critical patent/CN106254420A/en
Application granted granted Critical
Publication of CN106254420B publication Critical patent/CN106254420B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a kind of cross-domain communication method and device, the cross-domain communication method is applied to father's container and sub- container in not same area, father's container and the sub- container are respectively equipped with transmitters and receivers, which comprises the first communication instruction is sent in the receiver that father's container is equipped with by the transmitter that the sub- container is equipped with using itself;The receiver that father's container is equipped with receives and parses through first communication instruction, obtains server access request;Server access request is sent to background server by father's container, realizes cross-domain communication.The present invention can not only realize cross-domain communication, also be avoided that the waste of manpower, physical resource.

Description

A kind of cross-domain communication method and device
Technical field
The present invention relates to data processing fields, and in particular to a kind of cross-domain communication method and device.
Background technique
Different containers, it is different simply by the presence of agreement, domain name or port, then it is considered to be at the container of not same area, It can not directly be communicated between container in not same area.Even the container of set membership may also be in difference Domain, if fruit container wants access to the background server of father's container, first have to realize cross-domain communication function.
Currently, can be realized cross-domain communication by the way of background proxy, and still, on the basis of original system framework, Need to newly increase a background proxy server.Specifically, current estrade container wants the background service of cross-domain access father's container When device, access request is sent to background proxy server first, the access request is forwarded to father by background proxy server The background server of container, to realize cross-domain communication.
But this implementation not only needs to configure new background proxy server, but also also increases server pipe The administrative burden of reason personnel, this is undoubtedly the waste to various human and material resources resources.
Summary of the invention
The present invention provides a kind of cross-domain communication method and devices, can not only realize cross-domain communication, be also avoided that manpower, The waste of physical resource.
The present invention provides a kind of cross-domain communication method, the cross-domain communication method is applied to father's container in not same area With sub- container, father's container and the sub- container are respectively equipped with transmitters and receivers, which comprises
First communication instruction is sent to connecing for father's container outfit by the transmitter that the sub- container is equipped with using itself It receives in device;
The receiver that father's container is equipped with receives and parses through first communication instruction, obtains server access request;
Server access request is sent to background server by father's container, realizes cross-domain communication.
Preferably, the method also includes:
Father's container reception generates the second communication instruction after the response character string of the background server, described Response character string is requested to obtain by the background server according to the server access, and second communication instruction is for indicating First communication instruction is handled successfully;
Second communication instruction is sent to the sub- container and is equipped with by the transmitter that father's container is equipped with using itself Receiver in.
Preferably, when first communication instruction is reading instruction or inquiry instruction, the method also includes:
The receiver that the transmitter that the sub- container is equipped with using itself is equipped with to father's container sends third communication and refers to It enables, the third communication instruction is for requesting the response character string from the background server;
The response character string is sent to the receiver that the sub- container is equipped with by the transmitter that father's container is equipped with.
Preferably, data block identifier is carried in the third communication instruction;The transmitter that father's container is equipped with will be described Response character string is sent to the receiver that the sub- container is equipped with, comprising:
Father's container in advance with single maximum transmitted amount by the response character string cutting be several data blocks;
The transmitter that father's container is equipped with is according to the data block identifier carried in the third communication instruction, to the son The receiver that container is equipped with sends data block corresponding with the data block identifier in the response character string.
Preferably, when first communication instruction is write command, the method also includes:
Father's container generates the 4th communication instruction according to first communication instruction, and the 4th communication instruction carries number According to block identification, for requesting the character string of background server to be written;
4th communication instruction is sent to the receiver that the sub- container is equipped with by the transmitter that father's container is equipped with In;
The data block identifier that the transmitter that the sub- container is equipped with is carried according to the 4th communication instruction, Xiang Suoshu father hold The receiver that device is equipped with sends the corresponding data block of the data block identifier, and the data block is by the background server to be written Character string divide;
Correspondingly, server access request is sent to background server by father's container, cross-domain communication, packet are realized It includes:
When the receiver that father's container is equipped with receives do-nothing instruction, father's container will carry the data received The server access request of block is uploaded to background server, realizes cross-domain communication.
The present invention also provides a kind of cross-domain communication device, the cross-domain communication device includes that two transmitters and two connect Receive device, wherein a transmitter and a receiver are provided in sub- container, another transmitter and another receiver are equipped with In father's container, the sub- container and father's container are in not same area;
The transmitter that the sub- container is equipped with, for the first communication instruction to be sent to the receiver that father's container is equipped with In;
The receiver that father's container is equipped with obtains server access for receiving and parsing through first communication instruction Request realizes cross-domain communication so that server access request is sent to background server by father's container.
Preferably, the transmitter that father's container is equipped with, is also used to for the second communication instruction to be sent to the sub- container and match In standby receiver, second communication instruction is for indicating that first communication instruction is handled successfully;Second communication refers to What order was generated after the response character string of the background server by father's container reception, the response character string is by described Background server requests to obtain according to the server access.
Preferably, the transmitter that the sub- container is equipped with is also used in first communication instruction be reading instruction or inquiry When instruction, the receiver that Xiang Suoshu father's container is equipped with sends third communication instruction, and the third communication instruction comes from for requesting The response character string of the background server;
The transmitter that father's container is equipped with is also used to for the response character string being sent to connecing for the sub- container outfit Receive device.
Preferably, the transmitter that father's container is equipped with, specifically for according to the number carried in the third communication instruction According to block identification, the receiver being equipped with to the sub- container sends number corresponding with the data block identifier in the response character string According to block, the data block is in advance obtained the response character string cutting with single maximum transmitted amount by father's container.
Preferably, the transmitter that father's container is equipped with is also used to when first communication instruction is write command, by the Four communication instructions are sent in the receiver that the sub- container is equipped with, and the 4th communication instruction is as father's container according to First communication instruction generates, and the 4th communication instruction carries data block identifier, for requesting the word of background server to be written Symbol string;
The transmitter that the sub- container is equipped with, is also used to the data block identifier carried according to the 4th communication instruction, to The receiver that father's container is equipped with sends the corresponding data block of the data block identifier, the data block by it is described it is to be written after The character string of platform server divides;
Correspondingly, the receiver that father's container is equipped with, is also used to when receiving do-nothing instruction, so that father's container will The server access request for carrying the data block received is uploaded to background server, realizes cross-domain communication.
The present invention provides a kind of cross-domain communication methods, applied to father's container and sub- container in not same area, the father Container and the sub- container are respectively equipped with transmitters and receivers, specifically, the transmission that the sub- container utilizes itself to be equipped with First communication instruction is sent in the receiver that father's container is equipped with by device;The receiver that father's container is equipped with is received and is solved First communication instruction is analysed, server access request is obtained;After server access request is sent to by father's container Platform server realizes cross-domain communication.The present invention can solve the problems, such as cross-domain communication from foreground using transmitters and receivers, no To cause to bear from the background, the cross-domain communication of the background server of sub- container and father's container finally can be realized.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those of ordinary skill in the art, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of cross-domain communication method flow diagram provided in an embodiment of the present invention;
Fig. 2 is the execution interaction figure of reading instruction in a kind of cross-domain communication provided in an embodiment of the present invention;
Fig. 3 is the execution interaction figure of inquiry instruction in a kind of cross-domain communication provided in an embodiment of the present invention;
Fig. 4 is the execution interaction figure of write command in a kind of cross-domain communication provided in an embodiment of the present invention;
Fig. 5 is a kind of cross-domain communication apparatus structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
The introduction of embodiment particular content is carried out below.
The embodiment of the invention provides a kind of cross-domain communication method, with reference to Fig. 1, for it is provided in an embodiment of the present invention it is a kind of across Domain means of communication flow chart, the cross-domain communication method are applied to father's container and sub- container in not same area, father's container Transmitters and receivers are respectively equipped with the sub- container, the method specifically includes:
S101: the first communication instruction is sent to father's container and is equipped with by the transmitter that the sub- container is equipped with using itself Receiver in.
S102: the receiver that father's container is equipped with receives and parses through first communication instruction, obtains server access Request.
S103: server access request is sent to background server by father's container, realizes cross-domain communication.
Father's container and sub- container in the embodiment of the present invention are two containers of set membership, and sub- container is contained in father's appearance Device.But father's container is different with the agreement, domain name or port of sub- container, so, father's container and sub- container are different Domain.
There is the demand communicated with the background server of father's container in sub- container in the embodiment of the present invention, due to sub- container with Father's container is in different domains, so, it is desirable to it realizes the demand, first has to solve the problems, such as cross-domain.Benefit of the embodiment of the present invention It is realized and is in not between the father's container and sub- container of same area with the transmitters and receivers that respectively father's container and sub- container are equipped with Communication, to realize that the background server of sub- container and father's container communicates using father's container.
The first communication instruction in the embodiment of the present invention belongs to preset communication instruction between father's container and sub- container, such as For reading instruction, write command, inquiry instruction etc..After the first communication instruction is sent to the receiver of father's container, the father holds Device parses first communication instruction to form server access request, final to realize that son holds to communicate with background server The communication need of device and background server.
In practical application, in order to show whether running succeeded of first communication instruction, the embodiment of the present invention is also default Second communication instruction, for indicating that first communication instruction is handled successfully.Specifically, father's container reception takes to from backstage After device be engaged in for the response character string of server access request, the second communication instruction, and the transmitter being equipped with using itself are generated The receiver that sub- container is equipped with is sent it to, to inform that first communication instruction is handled successfully.
In a kind of specific embodiment, the first communication instruction is reading instruction or inquiry instruction, then holds for sub- container and father Communication instruction between device further includes third communication instruction, for requesting the response character string from background server.
Specifically, the response character string received is divided into several data in advance with single maximum transmitted amount by father's container Block.Data block identifier is carried in the third communication instruction that the transmitter that sub- container is equipped with is sent, the transmitter that father's container is equipped with will The corresponding data block of the data block identifier is sent to the receiver that sub- container is equipped with, until transmitter that father's container is equipped in the future It is transmitted from all response character strings of background server, then illustrates that reading instruction, inquiry instruction execute completion.
In another specific embodiment, the first communication instruction is write command, then between sub- container and father's container Communication instruction further includes the 4th communication instruction, for requesting the character string of background server to be written.
Specifically, sub- container be written into advance the character string of background server be divided into single maximum transmitted amount it is several Data block.Father's container generates the 4th communication instruction for carrying data block identifier after receiving write command, and is equipped with using itself Transmitter send it in the receiver that sub- container is equipped with.The transmitter that sub- container is equipped with is corresponding by the data block identifier Data block be sent to father's container outfit receiver in, until in the instruction that the receiver of father's container receives do not include it is to be written The character string of background server, then the character string to be written received is sent to background server by father's container, is completed son and is held Device is to the cross-domain write operation of the background server of father's container.
It is specifically to introduce the specific of cross-domain communication method provided in an embodiment of the present invention by taking a kind of implement scene as an example below Implementation, but the implement scene cannot function as to application limitation of the invention.
Under the implement scene, the sub- container in the embodiment of the present invention has for realizing the function of online business process designer Body, online business process designer is the online process design tool for being embedded in process design community, process design community collection At online business process designer.For realizing the function of the process design community, online business process designer sets father's container with process It counts community and is in not same area.Since online business process designer can generate process design document, picture etc., there are storage demand, institutes With online business process designer wants process design document, the picture generated using the background server storage of process design community Deng to produce the demand of the background server cross-domain communication of online business process designer and process design community.
In the embodiment of the present invention, online business process designer and process design community are respectively equipped with transmitters and receivers, The communication in the not online business process designer of same area and process design community is realized using the transmitters and receivers of outfit, most Realize online business process designer to the cross-domain communication of the background server of process design community eventually.
Introduce between online business process designer and process design community separately below communication use it is different types of logical News instruction, but following communication instruction type cannot function as to application limitation of the invention.
In a kind of embodiment, the first communication instruction is reading instruction, and the process for reading storage from background server is set Count document, picture etc..It is the execution interaction figure of reading instruction in a kind of cross-domain communication provided in an embodiment of the present invention with reference to Fig. 2.
S201: online business process designer generates reading instruction LoadJson: after, using transmitter by the reading instruction LoadJson: it is sent to the receiver of process design community.
S202: process design community generates server access request, and is sent to background server.
S203: background server returns to the JSON character string of serializing, and the JSON character string is online business process designer Want the process design document read, the data of picture.In order not to limit the data type transmitted in cross-domain communication, the present invention is real It applies regular meeting to serialize JSON character string, the specific main body for executing serializing can be background server, be also possible to Receive the process design community of JSON character string.Correspondingly, receiving the JSON character string of serializing in online business process designer Unserializing is carried out to it afterwards.
S204: process design community generates LoadJsonOK: instruction, for notifying online business process designer reading instruction to handle Success.
S205: online business process designer generates Loading:loadingJSON and (data block identifier: 0) instructs, and be sent to The receiver of process design community.
Since the data volume of online business process designer and the intercommunal communication transfer of process design is that have single maximum Limitation, so, JSON character string is divided into several data blocks in advance by the process design community in the embodiment of the present invention, each The size of data block is using single maximum as standard.(data block identifier: 0) instruction is used for the Loading:loadingJSON Requested data block is identified as 0 corresponding JSON character string.
S206: the transmitter of process design community returns to Loading:loadingJSON, JSON character string.
S207: online business process designer generates Loading:loadingJSON and (data block identifier: 1) instructs, and be sent to The receiver of process design community.
S208: the transmitter of process design community returns to Loading:loadingJSON, JSON character string.
The rest may be inferred, when in the instruction that the receiver of online business process designer receives not including JSON character string, Illustrate all JSON character string end of transmissions.
S218: the transmitter of process design community sends Loading:loadingJSON, null, end of transmission.
So far, the cross-domain acquisition process design of the background server for realizing online business process designer from process design community The function of document, picture etc..
In another embodiment, the first communication instruction is inquiry instruction, for the stream from background server inquiry storage Data information etc. in journey design documentation, picture.It is to be inquired in a kind of cross-domain communication provided in an embodiment of the present invention with reference to Fig. 3 The execution interaction figure of instruction.
S301: online business process designer generates inquiry instruction Pquery:(query argument) after, it will using transmitter Pquery:(query argument) instruct the receiver for being sent to process design community.
S302: process design community generates server access request, and is sent to background server.
S303: background server returns to the JSON character string of serializing, and the JSON character string is online business process designer It is desired to inquire obtained process design document, the data information in picture.
S304: process design community generates PqueryOK: instruction, for notifying online business process designer inquiry instruction to handle Success.
S305: online business process designer generates Pquerying:Pquery and (data block identifier: 0) instructs, and be sent to stream The receiver of journey design community.
S306: the transmitter of process design community returns to Pquerying:Pquery, JSON character string.
The rest may be inferred, when in the instruction that the receiver of online business process designer receives not including JSON character string, Illustrate all JSON character string end of transmissions inquired.
S318: the transmitter of process design community sends Pquerying:Pquery, null, end of transmission.
So far, the cross-domain Inquiry Process Design of the background server for realizing online business process designer from process design community The function of data information in document, picture.
In another embodiment, the first communication instruction is write command, for designing text to background server Stored Procedure Shelves, picture etc..It is the execution interaction figure of write command in a kind of cross-domain communication provided in an embodiment of the present invention with reference to Fig. 4.
S401: online business process designer generates write command Save: after, using transmitter by the write command Save: sending To the receiver of process design community.
S402: process design community generates Saving:JSON character string, and (data block identifier: 0) instructing, and is sent to online The receiver of business process designer.
S403: the transmitter of online business process designer returns to Saving:JSON character string.
S404: process design community generates Saving:JSON character string, and (data block identifier: 1) instructing, and is sent to online The receiver of business process designer.
S405: the transmitter of online business process designer returns to Saving:JSON character string.
The rest may be inferred, when not including JSON character string in the instruction that the receiver of online business process designer is sent, says Bright all JSON character string end of transmissions.
S408: the transmitter of online business process designer sends Saving:Save, null, end of transmission.
S410: process design community generates server access request, and sends server access request, and the server is visited It asks in request and carries all JSON character strings received, to be stored in background server.
S411: after background server stores successfully, storage success response is returned to process design community.
S412: process design community generates SaveOK: instruction, for notifying online business process designer write command to be processed into Function.
So far, the cross-domain Stored Procedure design of the background server for realizing online business process designer to process design community The function of document, picture etc..
In practical application, the other information system of similar process design community, if there is also directly embedding in this way Enter the demand of online business process designer, then also can use above-mentioned implementation provided in an embodiment of the present invention solve front and back across The problem of domain communicates.
The embodiment of the invention provides a kind of cross-domain communication method, applied to father's container and sub- container in not same area, Father's container and the sub- container are respectively equipped with transmitters and receivers, specifically, the sub- container is equipped with using itself Transmitter the first communication instruction is sent in the receiver that father's container is equipped with;The receiver that father's container is equipped with connects First communication instruction is received and parsed, server access request is obtained;The server access is requested to send out by father's container It send to background server, realizes cross-domain communication.The present invention can solve cross-domain communication from foreground using transmitters and receivers Problem finally can be realized the cross-domain communication of the background server of sub- container and father's container not to cause to bear from the background.
It is one kind provided in an embodiment of the present invention that the embodiment of the invention also provides a kind of cross-domain communication devices with reference to Fig. 5 Cross-domain communication apparatus structure schematic diagram.The cross-domain communication device 500 includes two transmitters and two receivers, wherein one A transmitter 510 and a receiver 520 are provided in sub- container, another transmitter 530 and another receiver 540 are equipped with In father's container, the sub- container and father's container are in not same area;
The transmitter 510 that the sub- container is equipped with, for the first communication instruction to be sent to connecing for father's container outfit It receives in device;
The receiver 540 that father's container is equipped with obtains server visit for receiving and parsing through first communication instruction It asks request, so that server access request is sent to background server by father's container, realizes cross-domain communication.
In practical application, the transmitter 530 that father's container is equipped with, for the second communication instruction to be sent to the sub- appearance In the receiver that device is equipped with, second communication instruction is for indicating that first communication instruction is handled successfully;Described second is logical News instruction is generated after the response character string of the background server by father's container reception, the response character string by The background server requests to obtain according to the server access.
In addition, the transmitter 510 that the sub- container is equipped with, is also used in first communication instruction be reading instruction or inquiry When instruction, the receiver that Xiang Suoshu father's container is equipped with sends third communication instruction, and the third communication instruction comes from for requesting The response character string of the background server;
The transmitter 530 that father's container is equipped with is also used to for the response character string being sent to the sub- container and is equipped with Receiver.
Specifically, the transmitter 530 that father's container is equipped with, specifically for according to being carried in the third communication instruction Data block identifier, the receiver being equipped with to the sub- container send corresponding with the data block identifier in the response character string Data block, the data block are in advance obtained the response character string cutting with single maximum transmitted amount by father's container.
The transmitter 530 that father's container is equipped with is also used to when first communication instruction is write command, by four-way News instruction is sent in the receiver that the sub- container is equipped with, and the 4th communication instruction is by father's container according to described first Communication instruction generates, and the 4th communication instruction carries data block identifier, for requesting the character string of background server to be written;
The transmitter 510 that the sub- container is equipped with, is also used to the data block identifier carried according to the 4th communication instruction, The receiver being equipped with to father's container sends the corresponding data block of the data block identifier, the data by it is described it is to be written after The character string of platform server divides;
Correspondingly, the receiver 540 that father's container is equipped with, is also used to when receiving do-nothing instruction, so that the father holds The server access for carrying the data block received request is uploaded to background server by device, realizes cross-domain communication.
Cross-domain communication device provided in an embodiment of the present invention includes two transmitters and two receivers, wherein a hair Device and a receiver is sent to be provided in sub- container, another transmitter and another receiver are provided in father's container, described Sub- container and father's container are in not same area;The transmitter that the sub- container is equipped with, for the first communication instruction to be sent to In the receiver that father's container is equipped with;The receiver that father's container is equipped with refers to for receiving and parsing through first communication It enables, obtains server access request, so that server access request is sent to background server by father's container, realize Cross-domain communication.The present invention from foreground can solve the problems, such as cross-domain communication using the cross-domain communication device, not to cause to bear from the background Load finally can be realized the cross-domain communication of the background server of sub- container and father's container.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not In the case where making the creative labor, it can understand and implement.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
It is provided for the embodiments of the invention a kind of cross-domain communication method and device above to be described in detail, herein Apply that a specific example illustrates the principle and implementation of the invention, the explanation of above example is only intended to help Understand method and its core concept of the invention;At the same time, for those skilled in the art, according to the thought of the present invention, There will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as to this The limitation of invention.

Claims (8)

1. a kind of cross-domain communication method, which is characterized in that the cross-domain communication method be applied in not father's container of same area and Sub- container, father's container and the sub- container are respectively equipped with transmitters and receivers, which comprises
First communication instruction is sent to the receiver that father's container is equipped with by the transmitter that the sub- container is equipped with using itself In;
The receiver that father's container is equipped with receives and parses through first communication instruction, obtains server access request;
Server access request is sent to background server by father's container, realizes cross-domain communication;
The method also includes:
Father's container reception generates the second communication instruction, the response after the response character string of the background server Character string is requested to obtain by the background server according to the server access, and second communication instruction is for indicating described First communication instruction is handled successfully;
Second communication instruction is sent to connecing for the sub- container outfit by the transmitter that father's container is equipped with using itself It receives in device.
2. cross-domain communication method according to claim 1, which is characterized in that when first communication instruction be reading instruction or When inquiry instruction, the method also includes:
The sub- container sends third communication instruction, institute using the receiver that the transmitter that itself is equipped with is equipped with to father's container Third communication instruction is stated for requesting the response character string from the background server;
The response character string is sent to the receiver that the sub- container is equipped with by the transmitter that father's container is equipped with.
3. cross-domain communication method according to claim 2, which is characterized in that carry data block in the third communication instruction Mark;The response character string is sent to the receiver that the sub- container is equipped with by the transmitter that father's container is equipped with, comprising:
Father's container in advance with single maximum transmitted amount by the response character string cutting be several data blocks;
The transmitter that father's container is equipped with is according to the data block identifier carried in the third communication instruction, to the sub- container The receiver of outfit sends data block corresponding with the data block identifier in the response character string.
4. cross-domain communication method according to claim 1, which is characterized in that when first communication instruction is write command, The method also includes:
Father's container generates the 4th communication instruction according to first communication instruction, and the 4th communication instruction carries data block Mark, for requesting the character string of background server to be written;
4th communication instruction is sent in the receiver that the sub- container is equipped with by the transmitter that father's container is equipped with;
The data block identifier that the transmitter that the sub- container is equipped with is carried according to the 4th communication instruction, Xiang Suoshu father's container are matched Standby receiver sends the corresponding data block of the data block identifier, the data block by the background server to be written word Symbol string divides;
Correspondingly, server access request is sent to background server by father's container, cross-domain communication is realized, comprising:
When the receiver that father's container is equipped with receives do-nothing instruction, father's container will carry the data block received Server access request is uploaded to background server, realizes cross-domain communication.
5. a kind of cross-domain communication device, which is characterized in that the cross-domain communication device includes two transmitters and two receivers, Wherein, a transmitter and a receiver are provided in sub- container, another transmitter and another receiver are provided to father In container, the sub- container and father's container are in not same area;
The transmitter that the sub- container is equipped with, for the first communication instruction to be sent in the receiver that father's container is equipped with;
The receiver that father's container is equipped with obtains server access request for receiving and parsing through first communication instruction, So that server access request is sent to background server by father's container, cross-domain communication is realized;
The transmitter that father's container is equipped with, for the second communication instruction to be sent in the receiver that the sub- container is equipped with, Second communication instruction is for indicating that first communication instruction is handled successfully;Second communication instruction is by father's container Generated after receiving the response character string from the background server, the response character string by the background server according to The server access requests to obtain.
6. cross-domain communication device according to claim 5, which is characterized in that
The transmitter that the sub- container is equipped with is also used to when first communication instruction is reading instruction or inquiry instruction, to institute The receiver for stating the outfit of father's container sends third communication instruction, and the third communication instruction comes from the background service for requesting The response character string of device;
The transmitter that father's container is equipped with is also used to for the response character string being sent to the reception that the sub- container is equipped with Device.
7. cross-domain communication device according to claim 6, which is characterized in that
The transmitter that father's container is equipped with, specifically for according to the data block identifier carried in the third communication instruction, to The receiver that the sub- container is equipped with sends data block corresponding with the data block identifier in the response character string, the number The response character string cutting is obtained with single maximum transmitted amount in advance by father's container according to block.
8. cross-domain communication device according to claim 5, which is characterized in that
The transmitter that father's container is equipped with is also used to when first communication instruction is write command, by the 4th communication instruction It is sent in the receiver that the sub- container is equipped with, the 4th communication instruction is referred to by father's container according to first communication It enables and generating, the 4th communication instruction carries data block identifier, for requesting the character string of background server to be written;
The transmitter that the sub- container is equipped with, is also used to the data block identifier carried according to the 4th communication instruction, Xiang Suoshu The receiver that father's container is equipped with sends the corresponding data block of the data block identifier, and the data block is taken by the backstage to be written The character string of business device divides;
Correspondingly, the receiver that father's container is equipped with, is also used to when receiving do-nothing instruction, so that father's container will carry There is the server access request of the data block received to be uploaded to background server, realizes cross-domain communication.
CN201610566054.3A 2016-07-18 2016-07-18 A kind of cross-domain communication method and device Active CN106254420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610566054.3A CN106254420B (en) 2016-07-18 2016-07-18 A kind of cross-domain communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610566054.3A CN106254420B (en) 2016-07-18 2016-07-18 A kind of cross-domain communication method and device

Publications (2)

Publication Number Publication Date
CN106254420A CN106254420A (en) 2016-12-21
CN106254420B true CN106254420B (en) 2019-10-22

Family

ID=57613307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610566054.3A Active CN106254420B (en) 2016-07-18 2016-07-18 A kind of cross-domain communication method and device

Country Status (1)

Country Link
CN (1) CN106254420B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107070870B (en) * 2017-01-09 2020-04-14 阿里巴巴集团控股有限公司 Data acquisition method and device
CN107508795B (en) * 2017-07-26 2020-03-13 中国联合网络通信集团有限公司 Cross-container cluster access processing device and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2378270B (en) * 2001-07-30 2005-04-20 Ibm Method and apparatus for data transfer across a network
CN105045887B (en) * 2015-07-24 2018-06-22 苏州工业园区迪锐信信息科技有限责任公司 The system and method for mixed mode cross-domain data interaction

Also Published As

Publication number Publication date
CN106254420A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN104937895B (en) The method and apparatus for controlling access in a wireless communication system
CN102291430B (en) Method for processing allocation information of Internet of things, Internet of things platform and system
EP3745675A1 (en) Service layer resource propagation across domains
CN103795768B (en) The method and apparatus of remote access
CN105763670B (en) A kind of method and device for container allocation IP address
CN104331035A (en) Mini-satellite test remote measurement and remote control monitoring system based on service-oriented architecture and method thereof
CN112637329B (en) Identification method, device, equipment and storage medium of multiple application programs
CN106713423A (en) Distributed data processing method and device for cloud access point controller
CN106713323A (en) Page content preview method, client, server and system
CN103067295A (en) Method and device and system for service transmission
CN106254420B (en) A kind of cross-domain communication method and device
CN104168165A (en) Access control method and device based on GPRS network and integrated identification network
CN106462539A (en) Mechanism for file transformation and sharing across devices using camera interface
CN105281941B (en) A kind of data transmission method, the first CSE, centre CSE and the 2nd CSE
CN110996372B (en) Message routing method, device and system and electronic equipment
CN109495461A (en) Data access request processing method, device and vehicle-mounted central control system
CN103491153A (en) Method, equipment and peer-to-peer network system for data sharing
JP2004213533A (en) Screen reception device, screen delivery device, screen information transmission/reception system, screen reception method, screen delivery method and program therefor
CN105656643A (en) Method and equipment for performing compatible management based on network configuration protocol
CN104284297B (en) A kind of method, apparatus of resource migration
CN112632124B (en) Multimedia information acquisition method, device, system, storage medium and electronic device
CN110398985A (en) A kind of distributed self-adaption Telemetry System of UAV and method
CN108989175A (en) A kind of communication means and device
CN106506239A (en) The method and system being authenticated in organization unit domain
CN106326296A (en) Data query method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant