CN107622127A - A kind of data processing method and its terminal device - Google Patents
A kind of data processing method and its terminal device Download PDFInfo
- Publication number
- CN107622127A CN107622127A CN201710905139.4A CN201710905139A CN107622127A CN 107622127 A CN107622127 A CN 107622127A CN 201710905139 A CN201710905139 A CN 201710905139A CN 107622127 A CN107622127 A CN 107622127A
- Authority
- CN
- China
- Prior art keywords
- target
- browser
- data
- local client
- cross
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 72
- 238000012545 processing Methods 0.000 claims abstract description 48
- 230000002452 interceptive effect Effects 0.000 claims description 69
- 230000005540 biological transmission Effects 0.000 claims description 18
- 238000005516 engineering process Methods 0.000 claims description 18
- 238000002360 preparation method Methods 0.000 claims description 2
- 230000000977 initiatory effect Effects 0.000 claims 1
- 230000003993 interaction Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 21
- 238000003860 storage Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 8
- 238000013515 script Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000004927 fusion Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the present application discloses a kind of data processing method and its terminal device, initiates cross-domain request to local client by the Ajax cross-domain modes of JSONP for browser and handles the goal task beyond browser disposal ability by local client.The embodiment of the present application method includes:The local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP, and the cross-domain request is initiated when preparing processing goal task by the browser, and the goal task is the task beyond the browser disposal ability;The local client obtains target data according to the cross-domain request, and the target data is the data beyond the browser disposal ability, and the target data is corresponding with the goal task;The local client determines target instruction target word according to the target data;The local client generates the first data according to the target instruction target word;The local client sends first data to target device.
Description
Technical field
The application is related to the communications field, more particularly to a kind of data processing method and its terminal device.
Background technology
Known software system architecture client/server (C/S, client/server) structure, by task
Client ends and Server ends are reasonably allocated to realize, either Client ends or Server ends be all in specific applications
Specific software support is also needed to, the software of C/S structures is needed for the soft of different operating system system development different editions
Part, cause updating maintenance complicated.
It is completely logical in browser and server (B/S, browser/server) structure, user interface relative to C/S frameworks
WWW browser realization is crossed, in the system based on B/S framework, in order to meet user's request diversity, it is often necessary at browser
The not treatable task of reason, as shown in figure 1, for example start client application in a browser, at present typically by ActiveX,
Browser auxiliary object (browser helper object, BHO), custom browser agreement or Microsoft's ClickOnce frameworks
Interacted etc. to realize with client application.
When browser is by calling different components to handle can not completing for task, because different browsers are for fortune
The setting of row environment, configuration of component etc. are all different, cause poor compatibility between different browsers.
The content of the invention
The embodiment of the present application discloses a kind of data processing method and its terminal device, passes through Ajax's for browser
The cross-domain modes of JSONP are initiated cross-domain request to local client and handled by local client beyond browser disposal ability
Goal task.
The embodiment of the present application first aspect provides a kind of data processing method, and this method is applied to be based on browser kimonos
The local client being engaged under device framework, the service that the local client provides are based on http protocol, it is characterised in that this method bag
Include:
The local client receives the cross-domain request initiated by the Ajax cross-domain modes of JSONP of browser, this it is cross-domain please
Ask and initiated when preparing processing goal task by the browser, the goal task is the task beyond the browser disposal ability;
The local client obtains target data according to the cross-domain request, and the target data is to handle energy beyond the browser
The data of power, the target data are corresponding with the goal task;
The local client determines target instruction target word according to the target data;
The local client generates the first data according to the target instruction target word;
The local client sends first data to target device.
Based in a first aspect, in the first embodiment of the embodiment of the present application first aspect, the local client root
Obtaining target data according to the cross-domain request includes:
The local client calls the target data of browser transmission according to the cross-domain request by Ajax technologies;
Or,
The local client browser called by WEB service method of calling according to the cross-domain request corresponding to server
The target data sent.
The first embodiment based on first aspect, in second of embodiment of the embodiment of the present application first aspect
In, the local client browser called by WEB service method of calling according to the cross-domain request corresponding to server send
The target data include:
Local client numbering according to corresponding to the target data that the cross-domain request receives browser transmission;
The local client browser called by WEB service method of calling according to the numbering corresponding to server send
The target data.
The first embodiment based on first aspect, first aspect, appointing in second of embodiment of first aspect
A kind of embodiment, in the third embodiment of the embodiment of the present application first aspect, the local client is according to the target
Data determine that target instruction target word includes:
The local client identifies the target data;
The local client determines the target instruction target word according to recognition result.
The first embodiment based on first aspect, first aspect, appointing in second of embodiment of first aspect
A kind of embodiment, in the 4th kind of embodiment of the embodiment of the present application first aspect, the target instruction target word includes:
Interactive command and/or non interactive instruction.
The 4th kind of embodiment based on first aspect, in the 5th kind of embodiment of the embodiment of the present application first aspect
In, the local client generates the first data according to the target instruction target word to be included:
The local client sends the interactive command to target process, to cause the target process performs the interactivity to refer to
Make and determine the return value of the interactive command;
The local client obtains the return value;
The local client determines that the return value is first data;
And/or
The local client performs non interactive instruction;
The local client determines the return value of non interactive instruction;
The local client determines that the return value is first data.
The first embodiment based on first aspect, first aspect, appointing in second of embodiment of first aspect
A kind of embodiment, in the 6th kind of embodiment of the embodiment of the present application first aspect, the target device includes:
Server corresponding to the browser and/or the browser.
The embodiment of the present application second aspect provides a kind of data processing method, and this method is applied to be based on browser kimonos
The local client being engaged under device framework, the service that the local client provides are based on http protocol, it is characterised in that this method bag
Include:
When browser prepares processing goal task, the browser is by Ajax cross-domain modes of JSONP to native client
The cross-domain request initiated is held, to allow the local client to obtain target data, the native client according to the cross-domain request
End determines target instruction target word according to the target data, and the local client generates the first data according to the target instruction target word, the local visitor
Family end sends first data to target device, and the goal task is beyond the task of the browser disposal ability, the number of targets
According to be corresponding with the goal task beyond the data of the browser disposal ability, the target data.
The application third aspect provides a kind of terminal device, and the terminal device includes local client, the native client
End is applied to browser and server framework, and the service that the local client provides is based on http protocol, it is characterised in that the end
End equipment includes:
Receiving unit, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP, this it is cross-domain please
Ask and initiated when preparing processing goal task by the browser, the goal task is the task beyond the browser disposal ability;
Acquiring unit, for obtaining target data according to the cross-domain request, the target data is beyond browser processing
The data of ability, the target data are corresponding with the goal task;
Determining unit, for determining target instruction target word according to the target data;
Generation unit, for generating the first data according to the target instruction target word;
Transmitting element, for sending first data to target device.
Based on the third aspect, in the first embodiment of the embodiment of the present application third aspect, the acquiring unit includes:
First calling module, for calling the number of targets of browser transmission by Ajax technologies according to the cross-domain request
According to;
Or,
Second calling module, corresponding to calling the browser by WEB service method of calling according to the cross-domain request
The target data that server is sent.
The first embodiment based on the third aspect, in second of embodiment of the embodiment of the present application third aspect
In, second calling module includes:
Receiving submodule, for according to the cross-domain request receive the browser transmission the target data corresponding to numbering;
Submodule is called, for server corresponding to calling the browser by WEB service method of calling according to the numbering
The target data sent.
The first embodiment based on the third aspect, the third aspect, appointing in second of embodiment of the third aspect
A kind of embodiment, in the third embodiment of the embodiment of the present application third aspect, the determining unit includes:
Identification module, for identifying the target data;
First determining module, for determining the target instruction target word according to recognition result.
The first embodiment based on the third aspect, the third aspect, appointing in second of embodiment of the third aspect
A kind of embodiment, in the 4th kind of embodiment of the embodiment of the present application third aspect, the generation unit includes:
Sending module, for sending interactive command to target process, to cause the target process performs the interactivity to refer to
Make and determine the return value of the interactive command;
Acquisition module, for obtaining the return value;
Second determining module, for determining that the return value is first data;
And/or
Execution module, for performing non interactive instruction;
3rd determining module, for determining the return value of non interactive instruction;
4th determining module, for determining that the return value is first data.
The application fourth aspect provides a kind of terminal device, and the terminal device includes browser, local client application
In browser and server framework, the service that local client provides is based on http protocol, it is characterised in that the terminal device bag
Include:
Cross-domain unit, when handling goal task for preparation, sent out by the cross-domain modes of Ajax JSONP to local client
The cross-domain request risen, to allow the local client to obtain target data, the local client root according to the cross-domain request
Target instruction target word is determined according to the target data, the local client generates the first data, the local client according to the target instruction target word
It is the task beyond the browser disposal ability to send first data to target device, goal task, and the target data is
It is corresponding with the goal task beyond the data of the browser disposal ability, the target data.
The aspect of the application the 5th provides a kind of terminal device, including:Memory, transceiver, processor and total linear system
System;
Wherein, the memory is used for storage program and instruction;
The transceiver is used to receive or send information under the control of reason device in this place;
The processor is used to perform the program in the memory;
The bus system is used to connect the memory, the transceiver and the processor, so that the memory, the transceiver
And the processor is communicated;
Wherein, the processor is used to call the programmed instruction in the memory, performs such as first aspect and its first aspect
The first method being somebody's turn to do to any one of the 6th kind of implementation implementation.
The aspect of the application the 6th provides a kind of terminal device, including:Memory, transceiver, processor and bus system;
Wherein, the memory is used for storage program and instruction;
The transceiver is used to receive or send information under the control of reason device in this place;
The processor is used to perform the program in the memory;
The bus system is used to connect the memory, the transceiver and the processor, so that the memory, the transceiver
And the processor is communicated;
Wherein, the processor is used to call the programmed instruction in the memory, performs the method being somebody's turn to do such as second aspect.
The aspect of the embodiment of the present application seven provides a kind of computer-readable recording medium, including instruction, when instruction is calculating
When being run on machine so that computer is performed such as the first of first aspect and first aspect to the 6th kind of implementation, the secondth
Any in the first of aspect, the third aspect and the third aspect to the 4th kind of implementation, the implementation of fourth aspect
The method of kind implementation.
The aspect of the embodiment of the present application eight provides a kind of computer program product for including instruction, when it is transported on computers
During row so that computer is performed if the first of first aspect and first aspect are to the 6th kind of implementation, second aspect, the
The first of three aspects and the third aspect are to any of the 4th kind of implementation, the implementation of fourth aspect realization side
The method of formula.
As can be seen from the above technical solutions, the embodiment of the present application has advantages below:Browsed when browser processing exceeds
During the goal task of device disposal ability, by establishing local client under browser and server framework, the native client
The service of the offer at end is based on http protocol, and directly target data can be called, and subsequent browser is cross-domain by JSONP
Mode carries out the transmission of target data with the local client, and the target data is data corresponding to goal task, so that this
Ground client obtains and processing target data, to complete the not treatable task of browser.In the present embodiment, using calling mesh
The mode of data is marked, in local client processing target data, rather than is handled on browser, each type avoided browses
The problem of device is incompatible.
Brief description of the drawings
Fig. 1 is one embodiment schematic diagram that browser handles not treatable task by invocation component;
Fig. 2 is one embodiment schematic diagram of the application data processing method;
Fig. 3 is another embodiment schematic diagram of the application data processing method;
Fig. 4 is another embodiment schematic diagram of the application data processing method;
Fig. 5 is another embodiment schematic diagram of the application data processing method;
Fig. 6 is another embodiment schematic diagram of the application data processing method;
Fig. 7 is another embodiment schematic diagram of the application data processing method;
Fig. 8 is another embodiment schematic diagram of the application data processing method;
Fig. 9 is another embodiment schematic diagram of the application data processing method;
Figure 10 is one embodiment schematic diagram of the application terminal device;
Figure 11 is another embodiment schematic diagram of the application terminal device;
Figure 12 is another embodiment schematic diagram of the application terminal device;
Figure 13 is another embodiment schematic diagram of the application terminal device;
Figure 14 is another embodiment schematic diagram of the application terminal device;
Figure 15 is another embodiment schematic diagram of the application terminal device;
Figure 16 is another embodiment schematic diagram of the application terminal device;
Figure 17 is another embodiment schematic diagram of the application terminal device.
Embodiment
In the present embodiment, cross-domain request will be initiated when browser processing is beyond the task of browser disposal ability,
For example, working as user needs to start some application program on a web browser, some document or form or access browser are opened
During resource in addition, prior art realizes these work by calling different components, but because different browsers is to group
The requirement of part is different, causes different browsers to see that compatibility is very poor, secondly when all browser is that host runs to component, also can
Cause browser execution slow, easily run quickly and burst, browser access is also limited by the setting of client's running environment, and user needs to set
Higher browser authority.For the application by the way of local client is established, browser initiates cross-domain ask by JSONP modes
Ask, the not treatable data of browser are handled by local client calling, and return value is sent into browser after the completion of processing, clear
Device can of looking at performs subsequent step.
The embodiment of the present application discloses a kind of data processing method and its terminal device, passes through Ajax's for browser
The cross-domain modes of JSONP are initiated cross-domain request to local client and handled by local client beyond browser disposal ability
Goal task.
JSONP is that a kind of utilize creates in the page<script>The method of node submits the side of HTTP request to not same area
Method, and the src attributes of script labels are no cross-domain limitations, this technology can solve cross-domain submission Ajax requests
Problem.
It should be noted that JS one kind literal translation formula scripts, are a kind of regime type, weak type, the language based on prototype
Speech, built-in support type.Its interpreter is referred to as JavaScript engine, is a part for browser, is widely used in client
The script at end, it is to be used on HTML (application under standard generalized markup language) webpage earliest, for HTML
Webpage increases dynamic function.
JSONP (JSON with Padding) is JSON one kind " use pattern ", available for solution major browsers
The problem of cross-domain data accesses.
The caused cross-domain access request to B websites is submitted to A when user accesses A websites in the cross-domain access of AJAX
The specified page of website.
In the embodiment of the present application, local client can be an application program positioned at computer local disk, also
It can be set for the virtual machine that local computer blurs to obtain by virtual technology, or the hardware being connected with local computer
Standby, this is not limited here.
In the present embodiment, the local client is applied to browser and server framework, what the local client provided
Service is based on http protocol, as shown in Fig. 2 one embodiment of data processing method includes in the embodiment of the present application:
201st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
In the present embodiment, during browser processing task, the target run into beyond browser disposal ability is appointed
During business, browser will receive a cross-domain instruction, and subsequent browser initiates cross-domain request according to the instruction to local client,
Cross-domain mode uses the cross-domain modes of JSONP of Ajax technologies.
In the present embodiment, the cross-domain request can be a GET request.
In the present embodiment, initiate cross-domain request mode can use front end JS codes to local client initiate across
Domain request, other modes can also be used, this is not limited here.
In the present embodiment, after browser sends cross-domain request to local client, local client identifies the request, returns
One section of JS code is returned, the code can perform automatically, for calling the not treatable target data of browser.
In the present embodiment, before browser sends cross-domain request to local client, first have to note in local client
Callback name, is then transmitted to server by one callback of volume.After server obtains callback numerical value, general
The json contents to be exported are included in callback numerical value, in order to which the json data of server generation can be by native client
End is properly received.
202nd, local client obtains target data according to cross-domain request;
After local client receives cross-domain request, it can also pass through other by Ajax technology invocation target data
Technology invocation target data, this is not limited here.
The target data is the data beyond browser disposal ability, and the target data is corresponding with goal task.
In the present embodiment, target data can be one section of document using js grammers.
In the present embodiment, the goal task of target data expression browser processing corresponding with goal task is:It is clear
The target data of device of looking at processing beyond its disposal ability.
203rd, local client determines target instruction target word according to target data;
Local client, parse script labels, and performance objective data.
In the present embodiment, after local client obtains target data, target data can be first identified, is tied further according to identification
Fruit determines target instruction target word, and local client determines that the mode of target instruction target word can also be other modes according to target data, specifically
It is not construed as limiting herein.
In the present embodiment, local client identifies that the mode of target data can be, due to being set in local client
There are the program code of target instruction target word, local client to run the target data after obtaining target data, obtain implementing result,
Local client determines the type of target instruction target word according to the implementing result, in the present embodiment, local client identification number of targets
According to mode can also be other modes, this is not limited here.
In the present embodiment, target instruction target word is if interactive command, such as opens a document in a browser, local visitor
Family end can send instructions to browser, and browser ejects an opening document window, after user confirms, browser according to the instruction
Send and confirm instruction to local client, subsequent this interactive command of local client execution opening document.
In the present embodiment, target instruction target word can be interactive command, or non interactive instructs, or is existing
Interactive command has the mixed instruction that non interactive instructs again, and this is not limited here.
In the present embodiment, interactive command can also be to open a certain application program in a browser, or adjust
With a certain function outside browser resource, this is not limited here.
204th, local client generates the first data according to target instruction target word;
Local client can produce a return value instructed after having performed target instruction target word, and local client determines the return
It is worth for the first data.
205th, local client sends the first data to target device.
In the present embodiment, target device can be browser, or server corresponding to browser, specifically herein
It is not construed as limiting.
In the present embodiment, target device is if browser, after browser obtains first data, according to first data
The data in the document opened in follow-up business, such as parsing browser are performed, now browser is needed first data
Corresponding server is sent to, server identifies first data and performs the follow-up task, and follow-up task can also be
Other tasks, this is not limited here.
In the present embodiment, target device can also be server corresponding to browser, if the first data are sent to clear
Look at server corresponding to device, then can complete the business function of a completion.
In the present embodiment, when browser processing is beyond the goal task of browser disposal ability, by browser
Local client is established with server architecture, the service of the offer of the local client is based on http protocol, can be direct
Target data is called, subsequent browser carries out the transmission of target data by the cross-domain modes of JSONP and local client,
The target data is data corresponding to goal task, so that local client obtains and processing target data, to complete to browse
The not treatable task of device.The present embodiment does not influence on browser, is called based on simple Ajax, compatible all kinds of browsers,
Browser can be realized.Client, the fusion of server three's business.Because Client Agent program is the clothes of http agreements
Business, it is possible to directly accessed by JS scripts, conveniently control or write the business procedure of mixing.
In the present embodiment, obtaining the mode of target data has a variety of, can be obtained from browser, can also be from browsing
Obtain in server corresponding to device, can be sent to browser after generating the first data, can also be sent to corresponding to browser
Server is to complete a complete business function.
Illustrate separately below.
First, target data is obtained from browser, the first data of generation are sent to browser
Fig. 3 is refer to, is described below.
It should be noted that in the present embodiment, target device is browser.
301st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
302nd, local client root states the target data that cross-domain request calls browser to send by Ajax technologies;
303rd, local client determines target instruction target word according to target data;
304th, local client generates the first data according to target instruction target word;
305th, local client sends the first data to browser.
In the present embodiment, step 301,302,303,304,305 respectively with the step 201 in embodiment illustrated in fig. 2,
202nd, 203,204,205 is similar, and specific here is omitted.
It should be noted that because the JS codes in A websites WEB page in browser can not access the resource of B websites,
So carry out cross-domain rear, it is necessary to the JS codes be called from browser using Ajax technologies, so as to be realized in local client
Access the purpose of B site resources.
In the present embodiment, the source of hard objectives data is browser, local by Ajax technology invocation target data
The first data generated after the complete target data of client process are sent to browser, so that browser performs follow-up step, this
Embodiment does not influence on browser, is called based on simple Ajax, compatible all kinds of browsers, it is possible to achieve browser.Client
End, the fusion of server three's business.
2nd, target data is obtained from server, the first data of generation are sent to server
Fig. 4 is refer to, is described below.
401st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
In the present embodiment, step 401 is similar with the step 201 in embodiment illustrated in fig. 2, and specific here is omitted.
402nd, local client numbering according to corresponding to the target data that cross-domain request receives browser transmission;
In the present embodiment, the operation performed after local client reception cross-domain request is similar with embodiment step 202, needs
It is noted that when the packet of the target data of transmission is bigger, inconvenience directly obtains from browser, now browser
Simply send corresponding to a target data and number to local client, so as to server corresponding to local client from browser
Obtain target data.
403rd, local client server according to corresponding to numbering by WEB service method of calling calling browser is sent
Target data;
404th, local client determines target instruction target word according to target data;
405th, local client generates the first data according to target instruction target word;
406th, local client sends the first data to server.
In the present embodiment, step 403,404,405,406 respectively with the step 202 in embodiment illustrated in fig. 2,203,
204th, 205 is similar, and specific here is omitted.
It should be noted that because the JS codes in A websites WEB page in browser can not access the resource of B websites, institute
To carry out cross-domain rear, it is necessary to obtain target data from server corresponding to browser using web services method of calling, so that
The purpose for accessing B site resources is realized in local client.
In the present embodiment, the source of hard objectives data is server corresponding to browser, passes through web services called side
Formula invocation target data, local client has handled the first data generated after target data and sent to server, so as to complete
One complete business function, add the exploitativeness of scheme.
3rd, target data is obtained from browser, the first data of generation are sent to server
Fig. 5 is refer to, is described below.
501st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
502nd, local client root states the target data that cross-domain request calls browser to send by Ajax technologies;
503rd, local client determines target instruction target word according to target data;
504th, local client generates the first data according to target instruction target word;
505th, local client sends the first data to server.
In the present embodiment, step 501,502,503,504,505 respectively with the step 201 in embodiment illustrated in fig. 2,
202nd, 203,204,205 is similar, and specific here is omitted.
It should be noted that because the JS codes in A websites WEB page in browser can not access the resource of B websites, institute
To carry out cross-domain rear, it is necessary to call the JS codes from browser using Ajax technologies, visited so as to be realized in local client
Ask the purpose of B site resources.
In the present embodiment, the source of hard objectives data is browser, local by Ajax technology invocation target data
The first data generated after the complete target data of client process are sent to server, so as to complete a complete business function,
Add the exploitativeness of scheme.
4th, target data is obtained from server, the first data of generation are sent to browser
Fig. 6 is refer to, is described below.
601st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
602nd, local client numbering according to corresponding to the target data that cross-domain request receives browser transmission;
603rd, local client server according to corresponding to numbering by WEB service method of calling calling browser is sent
Target data;
604th, local client determines target instruction target word according to target data;
605th, local client generates the first data according to target instruction target word;
606th, local client sends the first data to server.
In the present embodiment, step 601,602,603,604,605 respectively with the step 401 in embodiment illustrated in fig. 4,
402nd, 403,404,405 is similar, and specific here is omitted.
In the present embodiment, step 606 is similar with the step 205 in embodiment illustrated in fig. 2, and specific here is omitted.
It should be noted that because the JS codes in A websites WEB page in browser can not access the resource of B websites,
So carry out cross-domain rear, it is necessary to obtain target data from server corresponding to browser using web services method of calling, so as to
The purpose for accessing B site resources is realized in local client.
In the present embodiment, the source of hard objectives data is server, passes through web services method of calling invocation target number
According to local client has handled the first data generated after target data and sent to browser, so that browser performs follow-up
Step, add the exploitativeness of scheme.
In the embodiment of the present application, target instruction target word can be interactive command, or non interactive instructs, can be with
For the mixed instruction of interactive command and non interactive instruction composition.
(1) target instruction target word includes interactive command
Fig. 7 is refer to, is described below.
701st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
702nd, local client obtains target data according to cross-domain request;
In the present embodiment, in the present embodiment, step 701,702 respectively with the step 201 in embodiment illustrated in fig. 2,
202 is similar, and specific here is omitted.
703rd, local client determines interactive command according to target data;
In the present embodiment, interactive command can be to open document in a browser, or beat in a browser
Open the application program of certain chat software, or other interactive commands, this is not limited here.
In the present embodiment, local client determines that the mode of interactive command is similar with step 203 according to target data,
This is not limited here.
704th, local client sends interactive command to target process, to cause target process to perform interactive command simultaneously
Determine the return value of interactive command;
In the present embodiment, target process can wait upon the process of clothes for active user.
705th, local client obtains return value;
In the present embodiment, after target process has performed interactive command, a return value can be produced, local client with
There is communication connection in target process, local client can obtain the return value.
706th, local client determines that return value is the first data;
707th, local client sends the first data to server.
In the present embodiment, in the present embodiment, step 706,707 respectively with the step 204 in embodiment illustrated in fig. 2,
205 is similar, and specific here is omitted.
In the present embodiment, by the way that target instruction target word is defined as interactive command, local client needs the instruction to send out
Target process execution is given, adds the flexibility of scheme.Acting on behalf of the target process performed can be with custom security strategy, flexibly
Property it is high.
(2) target instruction target word instructs for non interactive
Fig. 8 is refer to, is described below.
801st, local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP;
802nd, local client obtains target data according to cross-domain request;
In the present embodiment, in the present embodiment, step 801,802 respectively with the step 201 in embodiment illustrated in fig. 2,
202 is similar, and specific here is omitted.
803rd, local client determines that non interactive instructs according to target data;
It should be noted that in the present embodiment, when browser performs non interactive instruction, if necessary to access browser
Resource in addition, can also there is the problem of browser compatibility difference.
In the present embodiment, local client determines the mode and step 203 class of non interactive instruction according to target data
Seemingly, this is not limited here.
804th, local client performs non interactive instruction;
In the present embodiment, when being non-interactive command during target instruction target word, directly performed by local client.
805th, local client really states the return value of non interactive instruction;
In the present embodiment, after local client has performed non interactive instruction, the return value performed is determined.
806th, local client determines that return value is the first data;
807th, local client sends the first data to target device.
In the present embodiment, in the present embodiment, the step 204 in step 806,807 and embodiment illustrated in fig. 2,205 classes
It is seemingly, specific that here is omitted.
In the present embodiment, instructed by the way that target instruction target word is defined as non interactive, local client directly performs this and referred to
Order, adds the flexibility of scheme.
It should be noted that in above-mentioned Fig. 2 to Fig. 8 embodiment, target instruction target word can have interactive command again
Have non interactive instruct mixed instruction, when for such case when, not only need perform interactive command and need execution nonreciprocal
Property instruction, specific executive mode corresponds to shown in step as described above, after being finished, is uniformly processed by local client.
The embodiment of the present application is described to Fig. 8 from the angle of local client for above figure 2, refer to Fig. 9, below
The embodiment of the present application will be described from the angle of browser.
It should be noted that local client in the present embodiment is applied to browser and server framework, the local
The service that client provides is based on http protocol, and one embodiment of data processing method includes in the embodiment of the present application:
901st, when browser prepares processing goal task, browser is by Ajax cross-domain modes of JSONP to local visitor
The cross-domain request that family end is initiated, to allow local client to obtain target data, local client root according to cross-domain request
Target instruction target word is determined according to target data, local client generates the first data according to target instruction target word, and local client sends first
For data to target device, goal task is the task beyond browser disposal ability, and target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task.
In the present embodiment, the mode and form that cross-domain request is initiated are similar with embodiment 201, specifically no longer superfluous herein
State.
In the present embodiment, after browser sends cross-domain request to local client, local client identifies the request, returns
One section of JS code is returned, the code can perform automatically, for calling the not treatable target data of browser.
In the present embodiment, before browser sends cross-domain request to local client, first have to note in local client
Callback name, is then transmitted to server by one callback of volume.After server obtains callback numerical value, general
The json contents to be exported are included in callback numerical value, in order to which the json data of server generation can be by native client
End is properly received.
In the present embodiment, local client obtains target data according to cross-domain request, and local client is according to number of targets
According to target instruction target word is determined, local client generates the first data according to target instruction target word, and local client sends the first data to mesh
The mode of marking device is similar with embodiment illustrated in fig. 2, and specific here is omitted.
In the present embodiment, when browser processing beyond browser disposal ability goal task when, by browser/
Local client is established under server architecture, the service of the offer of the local client is based on http protocol, can be directly right
Target data is called, and subsequent browser carries out the transmission of target data by the cross-domain modes of JSONP and local client, should
Target data is data corresponding to goal task, so that local client obtains and processing target data, to complete browser
Not treatable task.The present embodiment does not influence on browser, is called based on simple Ajax, compatible all kinds of browsers, can
To realize browser.Client, the fusion of server three's business.Because Client Agent program is the service of http agreements,
So directly can be accessed by JS scripts, the business procedure of mixing is conveniently controlled or write.
A kind of data processing method of the embodiment of the present application is described to Fig. 9 for above figure 2, refer to Figure 10, under
The local client of the embodiment of the present application will be described for face.
A kind of terminal device, the terminal device include local client, and local client is applied to browser and server
Framework, the service that local client provides are based on http protocol, it is characterised in that terminal device includes:
Receiving unit 1001, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1002, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1003, for determining target instruction target word according to target data;
Generation unit 1004, for generating the first data according to target instruction target word;
Transmitting element 1005, for sending the first data to target device.
In the present embodiment, the cross-domain request when browser prepares processing beyond the goal task of its disposal ability, is received
After unit 1001 receives cross-domain request, acquiring unit 1002 obtains target data, it is later determined that unit 1003 is according to target data
Target instruction target word is determined, generation unit 1004 generates the first data according to target instruction target word, and transmitting element 1005 sends the first data extremely
Target device, target device carry out follow-up step according to the first data.Appoint so as to reach processing beyond browser disposal ability
The purpose of business, and the first data are generated so that browser carries out subsequent operation.
In the present embodiment, obtaining the mode of target data has a variety of, can be obtained from browser, can also be from browsing
Obtain in server corresponding to device, can be sent to browser after generating the first data, can also be sent to corresponding to browser
Server considers one and shares four kinds of situations, be described below to complete a complete business function.
Figure 11 is refer to, is described below.
First, target data is obtained from browser, the first data of generation are sent to browser
It should be noted that the target device in transmitting element 1105 is browser.
Receiving unit 1101, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1102, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1103, for determining target instruction target word according to target data;
Generation unit 1104, for generating the first data according to target instruction target word;
Transmitting element 1105, for sending the first data to target device.
Wherein, acquiring unit includes:
First calling module 11021, for calling the number of targets of browser transmission by Ajax technologies according to cross-domain request
According to;
2nd, target data is obtained from browser, the first data of generation are sent to server
It should be noted that the target device in transmitting element 1105 is server.
Receiving unit 1101, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1102, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1103, for determining target instruction target word according to target data;
Generation unit 1104, for generating the first data according to target instruction target word;
Transmitting element 1105, for sending the first data to target device.
Wherein, acquiring unit includes:
First calling module 11021, for calling the number of targets of browser transmission by Ajax technologies according to cross-domain request
According to.
3rd, target data is obtained from server, the first data of generation are sent to browser
It should be noted that the target device in transmitting element 1105 is browser.
Receiving unit 1101, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1102, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1103, for determining target instruction target word according to target data;
Generation unit 1104, for generating the first data according to target instruction target word;
Transmitting element 1105, for sending the first data to target device.
Wherein, acquiring unit includes:
Second calling module 11022, corresponding to calling browser by WEB service method of calling according to cross-domain request
The target data that server is sent.
4th, target data is obtained from server, the first data of generation are sent to server
It should be noted that the target device in transmitting element 1105 is browser.
Receiving unit 1101, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1102, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1103, for determining target instruction target word according to target data;
Generation unit 1104, for generating the first data according to target instruction target word;
Transmitting element 1105, for sending the first data to target device.
Wherein, acquiring unit includes:
Second calling module 11022, corresponding to calling browser by WEB service method of calling according to cross-domain request
The target data that server is sent.
In the present embodiment, target data can utilize Ajax technologies from browser by the first calling module 11021
Obtain, can also be obtained by the second calling module 11022 using WEB service method of calling from server corresponding to browser,
First data of generation can be sent to browser, can also be sent to server corresponding to browser, be added embodiment.
In the present embodiment, when server corresponding to target data from browser obtains, it is necessary to first be obtained from browser
The numbering of target data, refer to Figure 11, be illustrated below.
Receiving unit 1101, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1102, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1103, for determining target instruction target word according to target data;
Generation unit 1104, for generating the first data according to target instruction target word;
Transmitting element 1105, for sending the first data to target device.
Wherein, acquiring unit includes:
Second calling module 11022, corresponding to calling browser by WEB service method of calling according to cross-domain request
The target data that server is sent.
Wherein, the second calling module includes:
Receiving submodule 110221, for numbering corresponding to the target data according to cross-domain request reception browser transmission;
Submodule 110222 is called, for the service according to corresponding to numbering and call browser by WEB service method of calling
The target data that device is sent.
In the present embodiment, can be by receiving submodule 110221 first from clear when the packet of target data is excessive
Look in device and obtain the numbering of target data, further according to the numbering by calling submodule 110222 from server corresponding to browser
Invocation target data, add diversity and the flexibility of scheme.
In the present embodiment, to determine that the mode of target instruction target word has according to target data values a variety of, refer to Figure 12, below will
One of which is described.
Receiving unit 1201, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1202, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1203, for determining target instruction target word according to target data;
Generation unit 1204, for generating the first data according to target instruction target word;
Transmitting element 1205, for sending the first data to target device.
Wherein it is determined that unit includes:
Identification module 12031, for identifying target data;
First determining module 12032, for determining target instruction target word according to recognition result.
In the present embodiment, after obtaining target data, first pass through identification module 12031 and identify target data, then pass through the
One determining module 12032 determines target instruction target word, adds the exploitativeness of scheme.
In the present embodiment, target instruction target word can be interactive command, or non interactive instructs, and can also be two
The mixed instruction of person, the form of target instruction target word is different, and the method for processing is also different, refer to Figure 13, below will be to target instruction target word
Illustrated for interactive command.
Receiving unit 1301, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP are cross-domain
Request is initiated when preparing processing goal task by browser, and goal task is the task beyond browser disposal ability;
Acquiring unit 1302, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1303, for determining target instruction target word according to target data;
Generation unit 1304, for generating the first data according to target instruction target word;
Transmitting element 1305, for sending the first data to target device.
Wherein, generation unit includes:
Sending module 13041, for sending interactive command to target process, to cause target process performs interactivity to refer to
Make and determine the return value of interactive command;
Acquisition module 13042, for obtaining return value;
Second determining module 13043, for determining that return value is the first data;
In the present embodiment, target instruction target word is embodied as interactive command, when for interactive command when, sending module
13041 are first sent to target process the instruction carries out processing determination return value, and acquisition module 13042 obtains the return value, the
Two determining modules 13043 determine that the return value is the first data, add the practicality of scheme.
Figure 14 is refer to, will be that non interactive instruction illustrates to target instruction target word below.
Acquiring unit 1402, for obtaining target data according to cross-domain request, target data is to handle energy beyond browser
The data of power, target data are corresponding with goal task;
Determining unit 1403, for determining target instruction target word according to target data;
Generation unit 1404, for generating the first data according to target instruction target word;
Transmitting element 1405, for sending the first data to target device.
Wherein, generation unit includes:
Execution module 14041, for performing non interactive instruction;
3rd determining module 14042, for determining the return value of non interactive instruction;
4th determining module 14043, for determining that return value is the first data.
In the present embodiment, target instruction target word is embodied as non interactive instruction, when being instructed for non interactive, performs mould
Block 14041 directly performs the non interactive and instructed, the 3rd determining module 14042 determination return value, and the 4th determining module 14043 is true
The fixed return value is the first data, adds the practicality of scheme.
It should be noted that in above-mentioned Figure 10 to Figure 14 embodiment, target instruction target word can have interactive command
Have the mixed instruction that non interactive instructs again, when for such case when, not only needing to perform interactive command but also needs to perform non-friendship
Mutual property instruction, specific executive mode is as shown in above-mentioned respective modules, after being finished, is uniformly processed by local client.
The embodiment of the present application is described to Figure 14 from the angle of local client for above figure 10, refer to Figure 15,
Below by from the angle of browser, the embodiment of the present application is described.
A kind of terminal device, the terminal device include browser, and local client is applied to browser and server framework,
The service that local client provides is based on http protocol, it is characterised in that terminal device includes:
Cross-domain unit 1501, during for preparing to handle goal task, by the cross-domain modes of Ajax JSONP to native client
Hold initiate cross-domain request, with allow local client according to cross-domain request obtain target data, local client according to
Target data determines target instruction target word, and local client generates the first data according to target instruction target word, and local client sends the first number
According to target device, goal task is the task beyond browser disposal ability, and target data is beyond browser disposal ability
Data, target data is corresponding with goal task.
In the present embodiment, when the cross-domain processing of unit 1501 is beyond the goal task of browser disposal ability, by clear
Look under device and server architecture and establish local client, the service of the offer of the local client is based on http protocol, can be with
Directly target data is called, subsequent browser carries out target data by the cross-domain modes of JSONP and local client
Transmission, the target data is data corresponding to goal task, so that local client obtains and processing target data, to complete
The not treatable task of browser.In the present embodiment, by establishing the local client based on http protocol, calling mesh is used
The mode of data is marked, in local client processing target data, rather than is handled on browser, each type avoided browses
The problem of device is incompatible.
Figure 16 is a kind of terminal device schematic diagram that the embodiment of the present application provides, and the terminal device 1600 includes native client
End, the terminal device 1600 can produce bigger difference because configuration or performance are different, can include one or more
Central processing unit (central processing units, CPU) 1622 (for example, one or more processors) and storage
The storage medium 1630 (such as one or one of device 1632, one or more storage application programs 1642 or data 1644
Above mass memory unit).Wherein, memory 1632 and storage medium 1630 can be of short duration storage or persistently storage.Storage
One or more modules (diagram does not mark) can be included in the program of storage medium 1630, each module can include pair
Series of instructions operation in terminal device.Further, central processing unit 1622 could be arranged to and storage medium 1630
Communication, the series of instructions operation in storage medium 1630 is performed on terminal device 1600.
The central processing unit 1622 can perform following steps according to command operating:
The cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP is received, cross-domain request is prepared by browser
Initiated when handling goal task, goal task is the task beyond browser disposal ability;
Target data is obtained according to cross-domain request, target data is beyond the data of browser disposal ability, target data
It is corresponding with goal task;
Target instruction target word is determined according to target data;
First data are generated according to target instruction target word;
The first data are sent to target device.
After the central processing unit 1622 can receive cross-domain request in the present embodiment, the not treatable mesh of browser is handled
Mark data and return to the first data so that browser continues subsequent step.
Terminal device 1600 can also include one or more power supplys 1626, and one or more are wired or wireless
Network interface 1650, one or more input/output interfaces 1658, and/or, one or more operating systems 1641,
Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Can be based on the terminal device structure shown in the Figure 16 as the step performed by terminal device in above-described embodiment.
Figure 17 is a kind of terminal device schematic diagram that the embodiment of the present application provides, and the terminal device 1700 includes browser,
The terminal device 1700 can produce bigger difference because configuration or performance are different, can include one or more centers
Processor (central processing units, CPU) 1722 (for example, one or more processors) and memory
1732, one or more storage application programs 1742 or data 1744 storage medium 1730 (such as one or one with
Upper mass memory unit).Wherein, memory 1732 and storage medium 1730 can be of short duration storage or persistently storage.It is stored in
The program of storage medium 1730 can include one or more modules (diagram does not mark), and each module can include to end
Series of instructions operation in end equipment.Further, central processing unit 1722 could be arranged to logical with storage medium 1730
Letter, the series of instructions operation in storage medium 1730 is performed on terminal device 1700.
The central processing unit 1722 can perform following steps according to command operating:
When prepare handle goal task when, by the cross-domain modes of Ajax JSONP to local client initiates it is cross-domain ask
Ask, to allow local client to obtain target data according to cross-domain request, local client determines mesh according to target data
Mark instruction, local client generate the first data according to target instruction target word, and local client sends the first data to target device, mesh
Mark task is the task beyond browser disposal ability, and target data is beyond the data of browser disposal ability, target data
It is corresponding with goal task.
In the present embodiment, can be goal task pair when central processing unit 1722 runs into not treatable goal task
The target data answered is sent to local client processing.
Terminal device 1700 can also include one or more power supplys 1726, and one or more are wired or wireless
Network interface 1750, one or more input/output interfaces 1758, and/or, one or more operating systems 1741,
Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Can be based on the terminal device structure shown in the Figure 17 as the step performed by terminal device in above-described embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the division of unit,
Only a kind of division of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can be with
With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed
Mutual coupling or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or
Communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, be shown as unit
Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can
To be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the application substantially or
Saying all or part of the part to be contributed to prior art or the technical scheme can be embodied in the form of software product
Out, the computer software product is stored in a storage medium, including some instructions are causing a computer equipment
(can be personal computer, local client, or network equipment etc.) performs each embodiment methods of the application Fig. 2 to Fig. 9
All or part of step.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (read-only
Memory, ROM), random access memory (random access memory, RAM), magnetic disc or CD etc. are various to deposit
Store up the medium of program code.
More than, above example is only to illustrate the technical scheme of the application, rather than its limitations;Although with reference to foregoing reality
Example is applied the application is described in detail, it will be understood by those within the art that:It still can be to foregoing each
Technical scheme described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed
Or replace, the essence of appropriate technical solution is departed from the spirit and scope of each embodiment technical scheme of the application.
Claims (16)
1. a kind of data processing method, methods described is applied to based on the local client under browser and server framework, institute
The service for stating local client offer is based on http protocol, it is characterised in that methods described includes:
The local client receives the cross-domain request that browser is initiated by the Ajax cross-domain modes of JSONP, it is described it is cross-domain please
Ask and initiated when preparing processing goal task by the browser, the goal task is appointing beyond the browser disposal ability
Business;
The local client obtains target data according to the cross-domain request, and the target data is at the browser
The data of reason ability, the target data are corresponding with the goal task;
The local client determines target instruction target word according to the target data;
The local client generates the first data according to the target instruction target word;
The local client sends first data to target device.
2. according to the method for claim 1, it is characterised in that the local client obtains mesh according to the cross-domain request
Mark data include:
The local client calls the number of targets of the browser transmission according to the cross-domain request by Ajax technologies
According to;
Or,
Local client service according to corresponding to the cross-domain request by the WEB service method of calling calling browser
The target data that device is sent.
3. according to the method for claim 2, it is characterised in that the local client passes through according to the cross-domain request
The target data that WEB service method of calling calls server corresponding to the browser to send includes:
Local client numbering according to corresponding to the target data that the cross-domain request receives the browser transmission;
Local client server according to corresponding to the numbering by the WEB service method of calling calling browser is sent out
The target data sent.
4. according to the method in any one of claims 1 to 3, it is characterised in that the local client is according to the mesh
Mark data determine that target instruction target word includes:
The local client identifies the target data;
The local client determines the target instruction target word according to recognition result.
5. according to the method in any one of claims 1 to 3, it is characterised in that the target instruction target word includes:
Interactive command and/or non interactive instruction.
6. according to the method for claim 5, it is characterised in that the local client is according to target instruction target word generation the
One data include:
The local client sends the interactive command to target process, to cause the target process to perform the interaction
Property instructs and determines the return value of the interactive command;
The local client obtains the return value;
The local client determines that the return value is first data;
And/or
The local client performs the non interactive instruction;
The local client determines the return value of the non interactive instruction;
The local client determines that the return value is first data.
7. according to the method in any one of claims 1 to 3, it is characterised in that the target device includes:
Server corresponding to the browser and/or the browser.
8. a kind of data processing method, methods described is applied to based on the local client under browser and server framework, institute
The service for stating local client offer is based on http protocol, it is characterised in that methods described includes:
When browser prepares processing goal task, the browser is by Ajax cross-domain modes of JSONP to local client
The cross-domain request of initiation, to allow the local client to obtain target data, the local according to the cross-domain request
Client determines target instruction target word according to the target data, and the local client is according to the number of target instruction target word generation first
According to the local client sends first data to target device, and the goal task is beyond browser processing
The task of ability, the target data are the data beyond the browser disposal ability, the target data and the target
Task is corresponding.
9. a kind of terminal device, the terminal device includes local client, and the local client is applied to browser kimonos
Business device framework, the service that the local client provides are based on http protocol, it is characterised in that the terminal device includes:
Receiving unit, the cross-domain request initiated for receiving browser by the Ajax cross-domain modes of JSONP, the cross-domain request
Initiated when preparing processing goal task by the browser, the goal task is appointing beyond the browser disposal ability
Business;
Acquiring unit, for obtaining target data according to the cross-domain request, the target data is at the browser
The data of reason ability, the target data are corresponding with the goal task;
Determining unit, for determining target instruction target word according to the target data;
Generation unit, for generating the first data according to the target instruction target word;
Transmitting element, for sending first data to target device.
10. terminal device according to claim 9, it is characterised in that the acquiring unit includes:
First calling module, for calling the target of the browser transmission by Ajax technologies according to the cross-domain request
Data;
Or,
Second calling module, corresponding to calling the browser by WEB service method of calling according to the cross-domain request
The target data that server is sent.
11. terminal device according to claim 10, it is characterised in that second calling module includes:
Receiving submodule, for volume corresponding to the target data according to the cross-domain request reception browser transmission
Number;
Submodule is called, for server corresponding to calling the browser by WEB service method of calling according to the numbering
The target data sent.
12. the terminal device according to any one of claim 9 to 11, it is characterised in that the determining unit includes:
Identification module, for identifying the target data;
First determining module, for determining the target instruction target word according to recognition result.
13. the terminal device according to any one of claim 9 to 11, it is characterised in that the generation unit includes:
Sending module, for sending interactive command to target process, to cause the target process performs the interactivity to refer to
Make and determine the return value of the interactive command;
Acquisition module, for obtaining the return value;
Second determining module, for determining that the return value is first data;
And/or
Execution module, for performing non interactive instruction;
3rd determining module, for determining the return value of the non interactive instruction;
4th determining module, for determining that the return value is first data.
14. a kind of terminal device, the terminal device includes browser, and local client is applied to browser and server frame
Structure, the service that local client provides are based on http protocol, it is characterised in that the terminal device includes:
Cross-domain unit, when handling goal task for preparation, initiated by the cross-domain modes of Ajax JSONP to local client
Cross-domain request, to allow the local client to obtain target data, the local client according to the cross-domain request
Target instruction target word is determined according to the target data, the local client generates the first data according to the target instruction target word, described
Local client sends first data to target device, and the goal task is appointing beyond the browser disposal ability
Business, the target data are the data beyond the browser disposal ability, and the target data is relative with the goal task
Should.
A kind of 15. terminal device, it is characterised in that including:Memory, transceiver, processor and bus system;
Wherein, the memory is used for storage program and instruction;
The transceiver is used to information is received or sent under the control of the processor;
The processor is used to perform the program in the memory;
The bus system is used to connect the memory, the transceiver and the processor, so that the memory, institute
State transceiver and the processor is communicated;
Wherein, the processor is used to call the programmed instruction in the memory, performs such as any one of claim 1 to 8
Described method.
16. a kind of computer-readable recording medium, including instruction, when the instruction is run on computers so that computer
Perform the method as any one of claim 1 to 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710905139.4A CN107622127A (en) | 2017-09-28 | 2017-09-28 | A kind of data processing method and its terminal device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710905139.4A CN107622127A (en) | 2017-09-28 | 2017-09-28 | A kind of data processing method and its terminal device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107622127A true CN107622127A (en) | 2018-01-23 |
Family
ID=61090052
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710905139.4A Pending CN107622127A (en) | 2017-09-28 | 2017-09-28 | A kind of data processing method and its terminal device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107622127A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109118822A (en) * | 2018-09-28 | 2019-01-01 | 华润置地控股有限公司 | A kind of wisdom parking management method and platform |
| CN109358915A (en) * | 2018-10-17 | 2019-02-19 | 北京点聚信息技术有限公司 | Local resource call method based on JavaScript script |
| CN110166502A (en) * | 2018-02-11 | 2019-08-23 | 中国移动通信有限公司研究院 | Data capture method, service providing end, service use end and network functional entity |
| CN110730208A (en) * | 2019-09-16 | 2020-01-24 | 深圳市国信合成科技有限公司 | Local device calling method and device, storage medium and device |
| CN111953662A (en) * | 2020-07-24 | 2020-11-17 | 南京南瑞继保电气有限公司 | Data processing method, device and system and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6710786B1 (en) * | 1997-02-03 | 2004-03-23 | Oracle International Corporation | Method and apparatus for incorporating state information into a URL |
| CN103475749A (en) * | 2013-09-11 | 2013-12-25 | 北京思特奇信息技术股份有限公司 | Cross-domain communication method and device |
| CN105471824A (en) * | 2014-09-03 | 2016-04-06 | 阿里巴巴集团控股有限公司 | Method, device and system for invoking local service assembly by means of browser |
| CN106027619A (en) * | 2016-05-11 | 2016-10-12 | 上海佳依佳信息科技有限公司 | Method and equipment for processing JSONP (JSON with Padding)-based request |
-
2017
- 2017-09-28 CN CN201710905139.4A patent/CN107622127A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6710786B1 (en) * | 1997-02-03 | 2004-03-23 | Oracle International Corporation | Method and apparatus for incorporating state information into a URL |
| CN103475749A (en) * | 2013-09-11 | 2013-12-25 | 北京思特奇信息技术股份有限公司 | Cross-domain communication method and device |
| CN105471824A (en) * | 2014-09-03 | 2016-04-06 | 阿里巴巴集团控股有限公司 | Method, device and system for invoking local service assembly by means of browser |
| CN106027619A (en) * | 2016-05-11 | 2016-10-12 | 上海佳依佳信息科技有限公司 | Method and equipment for processing JSONP (JSON with Padding)-based request |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110166502A (en) * | 2018-02-11 | 2019-08-23 | 中国移动通信有限公司研究院 | Data capture method, service providing end, service use end and network functional entity |
| US11758017B2 (en) | 2018-02-11 | 2023-09-12 | China Mobile Communication Co., Ltd Research Institute | Data acquisition method, service provider, service consumer and network functional entity |
| CN109118822A (en) * | 2018-09-28 | 2019-01-01 | 华润置地控股有限公司 | A kind of wisdom parking management method and platform |
| CN109358915A (en) * | 2018-10-17 | 2019-02-19 | 北京点聚信息技术有限公司 | Local resource call method based on JavaScript script |
| CN110730208A (en) * | 2019-09-16 | 2020-01-24 | 深圳市国信合成科技有限公司 | Local device calling method and device, storage medium and device |
| CN111953662A (en) * | 2020-07-24 | 2020-11-17 | 南京南瑞继保电气有限公司 | Data processing method, device and system and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107622127A (en) | A kind of data processing method and its terminal device | |
| CA2915619C (en) | Method and apparatus for customized software development kit (sdk) generation | |
| CA2915620C (en) | Method and apparatus for code virtualization and remote process call generation | |
| CN102346770B (en) | WebKit browser webpage content loading method and device | |
| CN109684590A (en) | A kind of browsing device net page data sharing method and device | |
| CN104038535A (en) | Method for improving user experience in virtual application environment and virtual application system | |
| US9602329B1 (en) | Dynamic remote procedure call | |
| US10810024B2 (en) | Redirection method and apparatus, and system | |
| CN103873491B (en) | VPN safety browser system and setting method | |
| US9971636B2 (en) | Methods for implementing web services and devices thereof | |
| WO2022052563A1 (en) | Service construction method, related device and computer readable storage medium | |
| CN109299331B (en) | Method and device for displaying hypertext markup language HTML5 page by Air | |
| CN106790276A (en) | A kind of browser-cross data interactive method and device based on browser protocol | |
| EP3528116A1 (en) | Operating method for storage device, and physical server | |
| US20150244704A1 (en) | Techniques to authenticate user requests involving multiple applications | |
| CN106973380A (en) | A kind of switching APN method and device | |
| US20170149934A1 (en) | Method, device and system for data cross-domain request | |
| CN110430084A (en) | Node state monitoring method and device | |
| CN110992131A (en) | Form processing method and device and storage medium | |
| US20030018698A1 (en) | Apparatus and method for workflow | |
| CN113055348A (en) | Cross-platform data request method and device and electronic equipment | |
| CN117149248A (en) | Micro front-end construction method, device, equipment and storage medium | |
| CN113886796B (en) | K8S-based service deployment method and device, electronic equipment and storage medium | |
| CN112416321B (en) | Application generation method, device, storage medium and electronic device | |
| WO2014161338A1 (en) | Method, apparatus, and system for webgame interaction |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180123 |
|
| RJ01 | Rejection of invention patent application after publication |