CN109660573A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN109660573A
CN109660573A CN201710934953.9A CN201710934953A CN109660573A CN 109660573 A CN109660573 A CN 109660573A CN 201710934953 A CN201710934953 A CN 201710934953A CN 109660573 A CN109660573 A CN 109660573A
Authority
CN
China
Prior art keywords
client
required parameter
listening components
xenogenesis
address
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
CN201710934953.9A
Other languages
Chinese (zh)
Other versions
CN109660573B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710934953.9A priority Critical patent/CN109660573B/en
Publication of CN109660573A publication Critical patent/CN109660573A/en
Application granted granted Critical
Publication of CN109660573B publication Critical patent/CN109660573B/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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application discloses data transmission method and device.It includes the service invocation request of required parameter that one specific embodiment of this method, which includes: in response to detecting that xenogenesis language component is initiated, the required parameter is packaged, and the required parameter after encapsulation is sent to listening components, to obtain data indicated by the service invocation request from the destination server by the listening components;Data acquired in the listening components are transmitted to the xenogenesis language component.This embodiment improves the flexibilities of service call.

Description

Data transmission method and device
Technical field
This application involves field of computer technology, and in particular to Internet technical field more particularly to data transmission method And device.
Background technique
With the development of computer technology, each Internet company is usually used to can satisfy company's mainstream business development Development language (such as Java language) and RPC (Remote Procedure Call Protoco, remote procedure call protocol) frame Frame (such as the Dubbo of open source, enterprise voluntarily research and develop RPC frame etc.) is developed.However, increasing with type of business, Internet company would generally be gradually introduced more development languages (such as Lua language or Golang (The Go Programming Language, Go language) etc.), since used RPC frame does not support the calling of these development languages, these exploitations Language can not be called directly by service interface and be serviced.
Existing mode is usually to build HTTP (HyperText Transfer in RPC frame or individually in machine Protocol, hypertext transfer protocol) gateway, service call is carried out by the HTTP gateway.However, if the HTTP gateway deployment It there is a problem that the response time in the case where trans-regional computer room, transnational internet calling is too long in RPC frame;If should HTTP gateway is built in individual machine, and machine resources burden is not only increased, it is also necessary to which individual operation cost guarantees should Availability of the HTTP gateway in High traffic loads.Therefore, existing mode is asked there is the flexibility of service call is lower Topic.
Summary of the invention
The purpose of the embodiment of the present application is to propose a kind of improved data transmission method and device, to solve background above The technical issues of technology segment is mentioned.
In a first aspect, the embodiment of the present application provides a kind of data transmission method for the first client, the first client End operation has xenogenesis language component and listening components, and xenogenesis language component is used to not support by the service interface of destination server Xenogenesis language initiate service invocation request, listening components are for monitoring transmission control protocol TCP port;This method comprises: ringing It includes the service invocation request of required parameter that Ying Yu, which detects that xenogenesis language component is initiated, is packaged to required parameter, and will Required parameter after encapsulation is sent to listening components, signified to obtain service invocation request from destination server by listening components The data shown;Data acquired in listening components are transmitted to xenogenesis language component.
In some embodiments, it is asked in response to detecting that xenogenesis language component initiates the service call comprising required parameter Before asking, this method further include: successively start listening components and xenogenesis language component;Preset monitoring address list is solved Analysis determines that xenogenesis language component local TCP to be connected monitors address, monitors so that xenogenesis language component is established with local TCP The connection pool of address, wherein local TCP monitors internet protocol address and the listening components institute that address includes the first client The port numbers of the TCP port of monitoring.
In some embodiments, after successively starting listening components and xenogenesis language component, this method further include: to prison It listens address list to be parsed, determines that the TCP of xenogenesis language component the second client to be connected monitors address, so that xenogenesis language Say that component establishes the connection pool that address is monitored with the TCP of the second client, wherein the TCP of the second client monitors address and includes The port numbers for the TCP port that the IP address of second client and the listening components of the second client operation are monitored.
In some embodiments, it is asked in response to detecting that xenogenesis language component initiates the service call comprising required parameter After asking, this method further include: determine whether local TCP port is supported to connect, if so, determining xenogenesis language component and local TCP monitors the local connection pool that address is established and is able to use, and required parameter is transmitted to local connection pool, so that this Ground connection pool is packaged required parameter, and the required parameter after encapsulation is sent to listening components, to pass through listening components Data indicated by service invocation request are obtained from destination server.
In some embodiments, it is asked in response to detecting that xenogenesis language component initiates the service call comprising required parameter After asking, this method further include: in response to determining that local TCP port is not supported to connect, required parameter is transmitted to xenogenesis language The connection pool of component and the second client, after required parameter is packaged and will be encapsulated by the connection pool of the second client Required parameter be transmitted to the listening components of the second client operation, and the listening components run by the second client are from target Server obtains data indicated by service invocation request.
Second aspect, the embodiment of the present application provide a kind of data transmission device for the first client, the first client End operation has xenogenesis language component and listening components, and xenogenesis language component is used to not support by the service interface of destination server Xenogenesis language initiate service invocation request, for listening components for monitoring transmission control protocol TCP port, which includes: hair Unit is sent, is configured in response to detecting that xenogenesis language component is initiated include the service invocation request of required parameter, to request Parameter is packaged, and the required parameter after encapsulation is sent to listening components, to be obtained by listening components from destination server Take data indicated by service invocation request;First transmission unit is configured to for data acquired in listening components being transmitted to Xenogenesis language component.
In some embodiments, device further include: start unit is configured to successively start listening components and xenogenesis language Say component;First establishing unit is configured to parse preset monitoring address list, determines that xenogenesis language component waits connecting The local TCP connect monitors address, so that xenogenesis language component establishes the connection pool for monitoring address with local TCP, wherein local TCP monitors the port numbers that address includes the internet protocol address of the first client and TCP port that listening components are monitored.
In some embodiments, device further include: second establishes unit, is configured to solve monitoring address list Analysis determines that the TCP of xenogenesis language component the second client to be connected monitors address, so that xenogenesis language component is established and second The TCP of client monitors the connection pool of address, wherein the TCP of the second client is with monitoring the IP that address includes the second client The port numbers for the TCP port that the listening components of location and the operation of the second client are monitored.
In some embodiments, device further include: the second transmission unit is configured to whether determine local TCP port Support connection, if so, determine that xenogenesis language component is monitored the local connection pool that address is established with local TCP and is able to use, And required parameter is transmitted to local connection pool, so that locality connection pond is packaged required parameter, and will be after encapsulation Required parameter is sent to listening components, to obtain number indicated by service invocation request from destination server by listening components According to.
In some embodiments, device further include: third transmission unit is configured in response to determining the local end TCP Mouth is not supported to connect, and required parameter is transmitted to the connection pool of xenogenesis language component Yu the second client, to pass through the second client The connection pool at end is packaged required parameter and the required parameter after encapsulation is transmitted to the monitoring group of the second client operation Part, and data indicated by service invocation request are obtained from destination server by the listening components that the second client is run.
The third aspect, the embodiment of the present application provide a kind of client, comprising: one or more processors;It is run Xenogenesis language component, the clothes for the xenogenesis language call destination server that the service interface by destination server is not supported Business;The listening components run, for monitoring transmission control protocol TCP port;Storage device, for storing one or more journeys Sequence, when one or more programs are executed by one or more processors, so that one or more processors realize that data such as are transmitted The method of any embodiment in method.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the method such as any embodiment in data transmission method when the program is executed by processor.
Data transmission method and device provided by the embodiments of the present application, by detecting that xenogenesis language component is initiated comprising asking The service invocation request for seeking parameter, is packaged required parameter, and the required parameter after encapsulation is sent to listening components, with Data indicated by service invocation request are obtained from destination server by listening components, then by number acquired in listening components According to xenogenesis language component is transmitted to, so that client can access RPC frame by internal listening components, there is no across ground The problem of area's computer room, transnational internet, improve service call performance;In addition, by the listening components of multiplexing local disposition, section Additional machine resources have been saved, and have directly initiated the calling of service involved in RPC frame by listening components, flow is not present Convergence process improves the flexibility of service call.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the data transmission method of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the data transmission method of the application;
Fig. 4 is the flow chart according to another embodiment of the data transmission method of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the data transmission device of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the client of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the data transmission method of the application or the exemplary system architecture of data transmission device 100。
As shown in Figure 1, system architecture 100 may include client 101, network 102 and server 103.Network 102 to The medium of communication link is provided between client 101 and server 103.Network 102 may include various connection types, such as Wired, wireless communication link or fiber optic cables etc..
User can be used client 101 and be interacted by network 102 with server 103, to receive or send message etc..Visitor Various telecommunication customer end applications can be installed, such as web browser applications, class of doing shopping are applied, searching class is answered on family end 101 With, instant messaging tools, mailbox client, social platform software etc..
Client 101 can be the various electronic equipments with display screen and supported web page browsing, including but not limited to Smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 103 can be to provide the server of various services, and server 103 can be based on the issuing service of RPC frame Interface (such as publication order inquiries interface), client 101 can call corresponding service (such as to look by above-mentioned RPC frame Ask order).
It should be noted that data transmission method provided by the embodiment of the present application is generally executed by client 101, accordingly Ground, data transmission device are generally positioned in client 101.
It should be understood that the number of client, network and server in Fig. 1 is only schematical.According to realize needs, It can have any number of client, network and server.
With continued reference to Fig. 2, it illustrates a realities according to the data transmission method for the first client of the application Apply the process 200 of example.Above-mentioned first client operation has xenogenesis language component and listening components, the data transmission method, including Following steps:
It step 201, include the service invocation request of required parameter in response to detecting that xenogenesis language component is initiated, to request Parameter is packaged, and the required parameter after encapsulation is sent to listening components, to be obtained by listening components from destination server Take data indicated by service invocation request.
In the present embodiment, the electronic equipment (such as client 101 shown in FIG. 1) of information transferring method operation thereon Xenogenesis language component and listening components can have been run.Above-mentioned electronic equipment is in response to detecting that xenogenesis language component is initiated to include The clothes of required parameter (for example, may include the parameters such as order number, timestamp for calling the required parameter of order inquiries service) Business call request, can be packaged above-mentioned required parameter, and the required parameter after encapsulation is sent to above-mentioned listening components, To obtain data indicated by above-mentioned service invocation request from above-mentioned destination server by above-mentioned listening components.Wherein, above-mentioned Xenogenesis language component can be used for the service interface by above-mentioned destination server (such as server 103 shown in FIG. 1) The xenogenesis language (such as Lua language or Golang etc.) that (service interface) is not supported is initiated to above-mentioned destination service The service invocation request serviced provided by device.Herein, above-mentioned xenogenesis language component can be to realization service call function The encapsulation of method, and the service call function is write with xenogenesis language.Above-mentioned destination server can be based on RPC The server that frame (such as the Dubbo of open source, enterprise voluntarily research and develop RPC frame etc.) provides service (such as provides order and looks into Ask the server of service).In practice, RPC frame is the frame for realizing program code across machine, striding course service call. Business provider can be based on the issuing service of RPC frame, and business user can be called by RPC frame and be serviced.Due to RPC frame Frame usually only maintains a kind of development language (such as Java language) version, and issuing service or calling service are required to using above-mentioned The development language safeguarded carries out, and is not available the xenogenesis language progress different from above-mentioned safeguarded development language, therefore, above-mentioned The service interface of destination server is only supported and the consistent development language of language (such as Java language) used in RPC frame Service invocation request does not support the service invocation request of above-mentioned xenogenesis language.
It should be noted that above-mentioned listening components can be for monitoring transmission control protocol TCP (Transmission Control Protocol, transmission control protocol) port (for example, TCP:8899) component (such as TCPListener component). Above-mentioned listening components can support Transmission Control Protocol, which can keep long connection and reliable data transmission.Above-mentioned listening components can It is developed with using with the language of the same race (such as Java language) of above-mentioned RPC frame, and inside can be opened using existing Transmission Control Protocol Dynamic listening port.After above-mentioned listening components listen to required parameter, the remote service of RPC frame can be called, to realize from upper It states destination server and obtains data indicated by above-mentioned service invocation request.
Above-mentioned required parameter is packaged it should be pointed out that above-mentioned electronic equipment can use various modes.As Above-mentioned required parameter can be packaged into JSON (JavaScript Object Notation, JS object tag) format by example; Above-mentioned required parameter can also be packaged into plain text format;Above-mentioned required parameter can also be packaged into binary format etc..
Step 202, data acquired in listening components are transmitted to xenogenesis language component.
In the present embodiment, data acquired in above-mentioned listening components can be transmitted to xenogenesis language by above-mentioned electronic equipment Component.
With continued reference to the schematic diagram that Fig. 3, Fig. 3 are according to the application scenarios of the data transmission method of the present embodiment.? In the application scenarios of Fig. 3, the operation of the first client 301 has xenogenesis language component 302 and listening components 303.First client 301 Include the service invocation request of required parameter in response to detecting that xenogenesis language component 302 is initiated, required parameter be packaged, And the required parameter after encapsulation is sent to listening components 303, it is taken with being obtained by listening components 303 from destination server 304 Data indicated by business call request.Finally, data acquired in listening components 303 are transmitted to xenogenesis by the first client 301 Language component 302.
The method provided by the above embodiment of the application, by detecting that xenogenesis language component is initiated comprising required parameter Service invocation request is packaged required parameter, and the above-mentioned required parameter after encapsulation is sent to above-mentioned listening components, with Data indicated by above-mentioned service invocation request are obtained from above-mentioned destination server by above-mentioned listening components, then by above-mentioned prison Data acquired in component are listened to be transmitted to above-mentioned xenogenesis language component, so that client can be accessed by internal listening components The problem of RPC frame, there is no trans-regional computer rooms, transnational internet, improve service call performance;In addition, passing through multiplexing The listening components of local disposition save additional machine resources, and are directly initiated involved in RPC frame by listening components The calling of service is not present traffic aggregation process, improves the flexibility of service call.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of data transmission method.Above-mentioned first visitor The operation of family end has xenogenesis language component and listening components, the process 400 of the data transmission method, comprising the following steps:
Step 401, successively start listening components and xenogenesis language component.
In the present embodiment, the electronic equipment (such as client 101 shown in FIG. 1) of information transferring method operation thereon Xenogenesis language component and listening components can have been run.Above-mentioned electronic equipment can start above-mentioned listening components first, start Afterwards, above-mentioned listening components can monitor a specified TCP port (for example, TCP:8899).Then, above-mentioned electronic equipment can be with Start above-mentioned xenogenesis language component.
Step 402, preset monitoring address list is parsed, determines xenogenesis language component local TCP to be connected Address is monitored, so that xenogenesis language component establishes the connection pool for monitoring address with local TCP.
In the present embodiment, above-mentioned electronic equipment can parse preset monitoring address list, determine xenogenesis language Say that component local TCP to be connected monitors address (for example, " 127.0.0.1:8899 "), so that above-mentioned xenogenesis language component is established The connection pool of address is monitored with local TCP, wherein local TCP is with monitoring the Internet protocol IP that address includes the first client The port numbers (for example, 8899) for the TCP port that location (for example, 127.0.0.1) and listening components are monitored.It should be noted that Connection pool and the method for establishing connection pool are the well-known techniques studied and applied extensively at present, and details are not described herein.
In the present embodiment, above-mentioned monitoring address list may include that local TCP monitors address.Above-mentioned electronic equipment can be with Benefit in various manners parses above-mentioned monitoring address list.As an example, above-mentioned electronic equipment can use character string The designated symbols (such as comma, colon, fullstop etc.) that the mode matched is inquired in above-mentioned monitoring address list can be then based on The above-mentioned designated symbols identified the operation such as are separated, extract character string to the information in above-mentioned monitoring address list, in turn It obtains local TCP and monitors address.
Step 403, monitoring address list is parsed, determines xenogenesis language component the second client to be connected TCP monitors address, so that xenogenesis language component establishes the connection pool for monitoring address with the TCP of the second client.
In the present embodiment, in above-mentioned monitoring address list can also include the second client monitoring address (for example, " 127.0.0.1:8899, the first client: 8899, the second client: 8899 ").Wherein, above-mentioned second client can be fortune Going identical xenogenesis language component (copy of i.e. above-mentioned xenogenesis language component) and identical listening components, (i.e. above-mentioned monitoring is each The copy of component) client.Above-mentioned electronic equipment can use identical analytic method, carry out to above-mentioned monitoring address list Parsing determines that the TCP of xenogenesis language component the second client to be connected monitors address, so that xenogenesis language component is established and the The TCP of two clients monitors the connection pool of address, wherein the TCP of the second client monitors the IP that address includes the second client The TCP port monitored of listening components of address (such as 127.0.0.1) and the operation of the second client port numbers (for example, 8899)。
It should be noted that step 402 and step 403 may be performed simultaneously.
Step 404, include the service invocation request of required parameter in response to detecting that xenogenesis language component is initiated, determine this Whether ground TCP port, which is supported, connects.
In the present embodiment, above-mentioned electronic equipment includes the clothes of required parameter in response to detecting that xenogenesis language component is initiated Whether business call request, can determine whether above-mentioned local TCP port is supported to connect, i.e., can normally connect.In response to determination Whether local TCP port, which is supported, connects, and above-mentioned electronic equipment can execute step 405;In response to whether determining local TCP port It does not support to connect, above-mentioned electronic equipment can execute step 406.
Step 405, in response to determining that local TCP port supports connection, determine that xenogenesis language component and local TCP monitor ground The local connection pool that location is established is able to use, and required parameter is transmitted to local connection pool, so that locality connection pond Required parameter is packaged, and the required parameter after encapsulation is sent to listening components, to be taken by listening components from target Business device obtains data indicated by service invocation request.
In the present embodiment, in response to determining that local TCP port supports connection, above-mentioned electronic equipment can determine above-mentioned different The connection pool for the local that kind of language component and above-mentioned local TCP monitoring address are established is able to use, and by above-mentioned required parameter It is transmitted to local connection pool, so that locality connection pond is packaged required parameter, and the required parameter after encapsulation is sent To above-mentioned listening components, to obtain data indicated by service invocation request from destination server by above-mentioned listening components.
Step 406, in response to determining that local TCP port is not supported to connect, required parameter is transmitted to xenogenesis language component With the connection pool of the second client, to be packaged by the connection pool of the second client to required parameter and by asking after encapsulation Parameter is asked to be transmitted to the listening components of the second client operation, and the listening components run by the second client are from destination service Device obtains data indicated by service invocation request.
In the present embodiment, in response to determining that local TCP port is not supported to connect, above-mentioned electronic equipment can be asked above-mentioned Parameter is asked to be transmitted to the connection pool of xenogenesis language component Yu above-mentioned second client, to carry out by the connection pool to required parameter The listening components of the second client operation are encapsulated and are transmitted to the required parameter after encapsulation, and run by the second client Listening components obtain data indicated by service invocation request from destination server.
Step 407, data acquired in listening components are transmitted to xenogenesis language component.
In the present embodiment, the data acquired in listening components can be transmitted to xenogenesis group of languages by above-mentioned electronic equipment Part.Listening components herein are to get the listening components of data indicated by above-mentioned service invocation request.
Figure 4, it is seen that compared with the corresponding embodiment of Fig. 2, the process of the data transmission method in the present embodiment 400 highlight to the listening components progress service call in the case where local TCP port can not be connected through the second client The step of.The scheme of the present embodiment description can make xenogenesis group of languages in the case where local listening components break down as a result, Part completes the calling of PPC frame by the listening components on other machines, improves the availability of data transmission.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of transmission of data to fill The one embodiment set, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to respectively In kind electronic equipment, which can run xenogenesis language component and listening components, and above-mentioned xenogenesis language component is used for Service invocation request is initiated by the xenogenesis language that the service interface of destination server is not supported, above-mentioned listening components are for monitoring TCP port.
As shown in figure 5, the above-mentioned data transmission device 500 of the present embodiment includes: transmission unit 501, it is configured to respond Include the service invocation request of required parameter in detecting that above-mentioned xenogenesis language component is initiated, above-mentioned required parameter is sealed Dress, and the above-mentioned required parameter after encapsulation is sent to above-mentioned listening components, to be taken by above-mentioned listening components from above-mentioned target Business device obtains data indicated by above-mentioned service invocation request;First transmission unit 502 is configured to above-mentioned listening components institute The data of acquisition are transmitted to above-mentioned xenogenesis language component.
In the present embodiment, above-mentioned transmission unit 501 is in response to detecting that above-mentioned xenogenesis language component is initiated comprising request The service invocation request of parameter can be packaged above-mentioned required parameter, and the above-mentioned required parameter after encapsulation is sent to Above-mentioned listening components, to obtain number indicated by above-mentioned service invocation request from above-mentioned destination server by above-mentioned listening components According to.
In the present embodiment, data acquired in above-mentioned listening components can be transmitted to by above-mentioned first transmission unit 502 Above-mentioned xenogenesis language component.
In some optional implementations of the present embodiment, above-mentioned data transmission device 500 can also include that starting is single First (not shown).Wherein, above-mentioned start unit may be configured to successively start above-mentioned listening components and above-mentioned xenogenesis language Say component;First establishing unit is configured to parse preset monitoring address list, determines above-mentioned xenogenesis language component Local TCP to be connected monitors address, so that above-mentioned xenogenesis language component establishes the connection for monitoring address with above-mentioned local TCP Pond, wherein above-mentioned local TCP monitors the internet protocol address and above-mentioned listening components that address includes above-mentioned first client The port numbers for the TCP port monitored.
In some optional implementations of the present embodiment, above-mentioned data transmission device 500 can also be built including second Vertical unit (not shown).Wherein, it above-mentioned second establishes unit and may be configured to solve above-mentioned monitoring address list Analysis determines that the TCP of above-mentioned xenogenesis language component the second client to be connected monitors address, so that above-mentioned xenogenesis language component is built The vertical connection pool that address is monitored with the TCP of the second client, wherein it includes the second client that the TCP of the second client, which monitors address, The port numbers for the TCP port that the IP address at end and the above-mentioned listening components of the second client operation are monitored.
In some optional implementations of the present embodiment, above-mentioned data transmission device 500 can also include the second biography Defeated unit (not shown).Wherein, above-mentioned second transmission unit may be configured to determine whether above-mentioned local TCP port props up Connection is held, if so, the local connection pool for determining that above-mentioned xenogenesis language component and above-mentioned local TCP monitoring address are established can It uses, and above-mentioned required parameter is transmitted to above-mentioned local connection pool, so that above-mentioned locality connection pond is to above-mentioned required parameter Be packaged, and the above-mentioned required parameter after encapsulation be sent to above-mentioned listening components, with by above-mentioned listening components from above-mentioned Destination server obtains data indicated by above-mentioned service invocation request.
In some optional implementations of the present embodiment, above-mentioned data transmission device 500 can also include that third passes Defeated unit (not shown).Wherein, above-mentioned third transmission unit may be configured in response to the above-mentioned local TCP port of determination It does not support to connect, above-mentioned required parameter is transmitted to the connection pool of above-mentioned xenogenesis language component Yu above-mentioned second client, with logical The connection pool for crossing above-mentioned second client is packaged above-mentioned required parameter and is transmitted to the above-mentioned required parameter after encapsulation The listening components of above-mentioned second client operation, and by the listening components of above-mentioned second client operation from above-mentioned destination service Device obtains data indicated by above-mentioned service invocation request.
The device provided by the above embodiment of the application detects that xenogenesis language component initiates packet by transmission unit 501 Service invocation request containing required parameter, is packaged required parameter, and the above-mentioned required parameter after encapsulation is sent to Listening components are stated, to obtain number indicated by above-mentioned service invocation request from above-mentioned destination server by above-mentioned listening components According to then data acquired in above-mentioned listening components are transmitted to above-mentioned xenogenesis language component by the first transmission unit 502, thus objective The problem of family end can access RPC frame by internal listening components, and there is no trans-regional computer rooms, transnational internet, mentions High service call performance;In addition, saving additional machine resources, and pass through by the listening components of multiplexing local disposition Listening components directly initiate the calling serviced involved in RPC frame, and traffic aggregation process is not present, improves service call Flexibility.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the client for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Client shown in Fig. 6 is only an example, should not function and use scope band to the embodiment of the present application Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination. The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection, Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include transmission unit and the first transmission unit.Wherein, the title of these units is not constituted to the unit itself under certain conditions Restriction, for example, the first transmission unit is also described as " data acquired in listening components being transmitted to xenogenesis group of languages The unit of part ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: include the service invocation request of required parameter in response to detecting that xenogenesis language component is initiated, which is carried out Encapsulation, and the required parameter after encapsulation is sent to listening components, to be obtained by the listening components from the destination server Data indicated by the service invocation request;Data acquired in the listening components are transmitted to the xenogenesis language component.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of data transmission method for the first client, which is characterized in that the first client operation has xenogenesis language Say that component and listening components, the xenogenesis language component are used for the xenogenesis language that do not support by the service interface of destination server Service invocation request is initiated, the listening components are for monitoring transmission control protocol TCP port, which comprises
It include the service invocation request of required parameter in response to detecting that the xenogenesis language component is initiated, to the required parameter Be packaged, and the required parameter after encapsulation be sent to the listening components, with by the listening components from described Destination server obtains data indicated by the service invocation request;
Data acquired in the listening components are transmitted to the xenogenesis language component.
2. data transmission method according to claim 1, which is characterized in that described in response to detecting the xenogenesis language Before saying that component initiates the service invocation request comprising required parameter, the method also includes:
Successively start the listening components and the xenogenesis language component;
Preset monitoring address list is parsed, determines that the xenogenesis language component local TCP to be connected monitors address, So that the xenogenesis language component establishes the connection pool for monitoring address with the local TCP, wherein the local TCP monitors ground Location includes the port numbers of the internet protocol address of first client and TCP port that the listening components are monitored.
3. data transmission method according to claim 2, which is characterized in that it is described successively start the listening components and After the xenogenesis language component, the method also includes:
The monitoring address list is parsed, determines the TCP prison of the xenogenesis language component the second client to be connected Address is listened, so that the xenogenesis language component establishes the connection pool for monitoring address with the TCP of the second client, wherein the second visitor The TCP at family end monitors the IP address that address includes the second client and the listening components of the second client operation are monitored The port numbers of TCP port.
4. data transmission method according to claim 3, which is characterized in that described in response to detecting the xenogenesis language After saying that component initiates the service invocation request comprising required parameter, the method also includes:
Determine whether the local TCP port is supported to connect, if so, determining that the xenogenesis language component and the local TCP are supervised The local connection pool for listening address to be established is able to use, and the required parameter is transmitted to the local connection pool, with It is packaged the locality connection pond to the required parameter, and the required parameter after encapsulation is sent to the monitoring Component, to obtain data indicated by the service invocation request from the destination server by the listening components.
5. data transmission method according to claim 4, which is characterized in that described in response to detecting the xenogenesis language After saying that component initiates the service invocation request comprising required parameter, the method also includes:
It does not support to connect in response to the determination local TCP port, the required parameter is transmitted to the xenogenesis language component With the connection pool of second client, the required parameter is packaged simultaneously with the connection pool by second client The required parameter after encapsulation is transmitted to the listening components of the second client operation, and passes through second client The listening components of operation obtain data indicated by the service invocation request from the destination server.
6. a kind of data transmission device for the first client, which is characterized in that the first client operation has xenogenesis language Say that component and listening components, the xenogenesis language component are used for the xenogenesis language that do not support by the service interface of destination server Service invocation request is initiated, for monitoring transmission control protocol TCP port, described device includes: the listening components
Transmission unit is configured to ask in response to detecting that the xenogenesis language component initiates the service call comprising required parameter It asks, the required parameter is packaged, and the required parameter after encapsulation is sent to the listening components, to pass through It states listening components and obtains data indicated by the service invocation request from the destination server;
First transmission unit is configured to for data acquired in the listening components to be transmitted to the xenogenesis language component.
7. data transmission device according to claim 6, which is characterized in that described device further include:
Start unit is configured to successively start the listening components and the xenogenesis language component;
First establishing unit is configured to parse preset monitoring address list, determines that the xenogenesis language component waits for The local TCP of connection monitors address, so that the xenogenesis language component establishes the connection pool that address is monitored with the local TCP, Wherein, the local TCP monitors internet protocol address and the listening components institute that address includes first client The port numbers of the TCP port of monitoring.
8. data transmission device according to claim 7, which is characterized in that described device further include:
Second establishes unit, is configured to parse the monitoring address list, determines that the xenogenesis language component waits connecting The TCP of the second client connect monitors address, so that the xenogenesis language component, which is established, monitors address with the TCP of the second client Connection pool, wherein it includes that the IP address of the second client and the second client are run that the TCP of the second client, which monitors address, The port numbers for the TCP port that the listening components are monitored.
9. data transmission device according to claim 8, which is characterized in that described device further include:
Second transmission unit is configured to determine whether the local TCP port is supported to connect, if so, determining the xenogenesis language Speech component is monitored the local connection pool that address is established with the local TCP and is able to use, and the required parameter is transmitted To the local connection pool, so that the locality connection pond is packaged the required parameter, and will be described in after encapsulation Required parameter is sent to the listening components, to obtain the service call from the destination server by the listening components The indicated data of request.
10. data transmission device according to claim 9, which is characterized in that described device further include:
Third transmission unit is configured to not support to connect in response to the determination local TCP port, the required parameter is passed The connection pool of the xenogenesis language component Yu second client is transported to, with the connection pool by second client to institute The listening components that required parameter is packaged and the required parameter after encapsulation is transmitted to the second client operation are stated, And it is obtained indicated by the service invocation request by the listening components that second client is run from the destination server Data.
11. a kind of client, comprising:
One or more processors;
The xenogenesis language component run, described in the xenogenesis language call for not supported by the service interface of destination server The service of destination server;
The listening components run, for monitoring transmission control protocol TCP port;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as method as claimed in any one of claims 1 to 5 is realized when execution.
CN201710934953.9A 2017-10-10 2017-10-10 Data transmission method and device Active CN109660573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710934953.9A CN109660573B (en) 2017-10-10 2017-10-10 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710934953.9A CN109660573B (en) 2017-10-10 2017-10-10 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN109660573A true CN109660573A (en) 2019-04-19
CN109660573B CN109660573B (en) 2021-10-15

Family

ID=66108702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710934953.9A Active CN109660573B (en) 2017-10-10 2017-10-10 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN109660573B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158777A (en) * 2019-12-12 2020-05-15 中移(杭州)信息技术有限公司 Component calling method and device and computer readable storage medium
CN112818336A (en) * 2020-12-28 2021-05-18 深圳市金微蓝技术有限公司 Data access method, data access device and computer readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206648A (en) * 2006-12-20 2008-06-25 鸿富锦精密工业(深圳)有限公司 Network service generating system and method
CN102098296A (en) * 2010-12-29 2011-06-15 北京新媒传信科技有限公司 Method and system for realizing remote call
US20120065956A1 (en) * 2010-08-31 2012-03-15 The Regents Of The University Of California Digital processors
CN104951275A (en) * 2015-06-18 2015-09-30 湖北盛天网络技术股份有限公司 Computer instruction data processing method and system
CN105005608A (en) * 2015-07-07 2015-10-28 中国科学院遥感与数字地球研究所 OpenSearch based distributed cooperative service system for lightweight satellite data
CN106020963A (en) * 2016-06-07 2016-10-12 中国建设银行股份有限公司 Cross-system internal service calling method and device
CN106648940A (en) * 2017-03-13 2017-05-10 北京百悟科技有限公司 Remote procedure call method and device
CN106686021A (en) * 2015-11-05 2017-05-17 北京京东尚科信息技术有限公司 Service invoking method and gateway
CN107179951A (en) * 2016-03-09 2017-09-19 北京京东尚科信息技术有限公司 Remote procedure calling (PRC) method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206648A (en) * 2006-12-20 2008-06-25 鸿富锦精密工业(深圳)有限公司 Network service generating system and method
US20120065956A1 (en) * 2010-08-31 2012-03-15 The Regents Of The University Of California Digital processors
CN102098296A (en) * 2010-12-29 2011-06-15 北京新媒传信科技有限公司 Method and system for realizing remote call
CN104951275A (en) * 2015-06-18 2015-09-30 湖北盛天网络技术股份有限公司 Computer instruction data processing method and system
CN105005608A (en) * 2015-07-07 2015-10-28 中国科学院遥感与数字地球研究所 OpenSearch based distributed cooperative service system for lightweight satellite data
CN106686021A (en) * 2015-11-05 2017-05-17 北京京东尚科信息技术有限公司 Service invoking method and gateway
CN107179951A (en) * 2016-03-09 2017-09-19 北京京东尚科信息技术有限公司 Remote procedure calling (PRC) method and device
CN106020963A (en) * 2016-06-07 2016-10-12 中国建设银行股份有限公司 Cross-system internal service calling method and device
CN106648940A (en) * 2017-03-13 2017-05-10 北京百悟科技有限公司 Remote procedure call method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158777A (en) * 2019-12-12 2020-05-15 中移(杭州)信息技术有限公司 Component calling method and device and computer readable storage medium
CN111158777B (en) * 2019-12-12 2023-10-27 中移(杭州)信息技术有限公司 Component calling method, device and computer readable storage medium
CN112818336A (en) * 2020-12-28 2021-05-18 深圳市金微蓝技术有限公司 Data access method, data access device and computer readable storage medium

Also Published As

Publication number Publication date
CN109660573B (en) 2021-10-15

Similar Documents

Publication Publication Date Title
CN108614774A (en) Automated testing method and device
CN107357914B (en) Information processing method and device
CN108282529A (en) Publication and system, the method and apparatus for subscribing to data
CN109062563A (en) Method and apparatus for generating the page
CN107844324A (en) Customer terminal webpage redirects treating method and apparatus
CN109815105A (en) Applied program testing method and device based on Btrace
CN108897854A (en) A kind of monitoring method and device of overtime task
CN110069308A (en) The page starts method, apparatus, electronic equipment and storage medium
CN109359194A (en) Method and apparatus for predictive information classification
CN108829518A (en) Method and apparatus for pushed information
CN111881392A (en) Page display method and device
CN109582317A (en) Method and apparatus for debugging boarding application
CN108959087A (en) test method and device
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
CN109218041A (en) Request processing method and device for server system
CN109344330A (en) Information processing method and device
CN109408748A (en) Method and apparatus for handling information
CN110070394A (en) Data processing method, system, medium and calculating equipment
CN114500481A (en) Service request processing method, system and device
CN114513552B (en) Data processing method, device, equipment and storage medium
CN109818994A (en) Information processing method and device for agent side
CN109660573A (en) Data transmission method and device
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
CN109981546B (en) Method and device for acquiring remote call relation between application modules
CN110401731A (en) Method and apparatus for distributing content distribution nodes

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