CN109600403A - A kind of method and device sending information - Google Patents

A kind of method and device sending information Download PDF

Info

Publication number
CN109600403A
CN109600403A CN201710923265.2A CN201710923265A CN109600403A CN 109600403 A CN109600403 A CN 109600403A CN 201710923265 A CN201710923265 A CN 201710923265A CN 109600403 A CN109600403 A CN 109600403A
Authority
CN
China
Prior art keywords
upload
document
server
response message
browser
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
CN201710923265.2A
Other languages
Chinese (zh)
Other versions
CN109600403B (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710923265.2A priority Critical patent/CN109600403B/en
Publication of CN109600403A publication Critical patent/CN109600403A/en
Application granted granted Critical
Publication of CN109600403B publication Critical patent/CN109600403B/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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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]

Landscapes

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

Abstract

The invention discloses a kind of method and apparatus for sending information, specifically: browser sends upload request message to not homologous server by angular-upload plug-in unit, and the document for needing to upload is carried in upload request message;Server receives upload request message, and it includes response message in the head response of the upload response message that corresponding generate, which uploads response message,;Server continues through angular-upload plug-in unit and returns to the upload response message for carrying response message in head response to browser.Therefore, when the embodiment of the present invention carries out message upload using angular-upload plug-in unit, response message is carried in the head response for uploading response message, when overcoming using the progress message upload of angular-upload plug-in unit, the problem of message except head is shielded, and effective information cannot be normally read.

Description

A kind of method and device sending information
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of method and device for sending information.
Background technique
Browser is utilized to upload document to server in order to realize, technical staff is using Angular JS frame to browser It is developed, adds the angular-upload plug-in unit in Angular JS frame, the angular-upload on a web browser Plug-in unit can be compatible with the browser (such as IE8 etc.) of lowest version, and document is uploaded to clothes using the angular-upload plug-in unit Business device.
When browser uploads document to server using angular-upload plug-in unit, pass through angular-upload plug-in unit Document upload request message is sent to server, after server is successfully received the document of upload, browser is by being somebody's turn to do Angular-upload plug-in unit receives the upload response message of server return.
Since the browser of lowest version limits cross-domain access, the document that browser is sent by angular-upload plug-in unit Upload request message is not normal network request message, and browser is caused to pass through the received upload of angular-upload plug-in unit In response message, the response message of web response body Web can not normally be read.
Summary of the invention
Present invention solves the technical problem that be to provide a kind of method for sending information, so as to realize from browser to The document of different source servers uploads.
For this purpose, the technical solution that the present invention solves technical problem is:
A method of information is sent, server is not homologous with browser, this method comprises:
Server receives the upload request message that browser is sent by angular-upload plug-in unit;
Server is generated according to the upload request message uploads response message, the head response packet for uploading response message Include response message;
Server returns to the upload response message to the browser by the angular-upload plug-in unit.
Optionally, server includes: according to upload request message generation upload response message
The response message is added to the access control expose headers word of the head response by server Duan Zhong.
Optionally, in upload request message and the upload response message, the value of content type field is text/ html。
Optionally, response message is document id, this method further include:
Server obtains the document in the upload request message, parses to the document, obtains document information;
Server generates the document id, stores the corresponding relationship of the document id Yu the document information.
Optionally, this method further include:
Server receives the document request message that the browser is sent, and the document request message includes the document ID;
Server searches the corresponding document information of the document id;
The document information is back to the browser by server.
In addition, server is not homologous with browser, the device packet the present invention also provides a kind of device for sending information It includes:
First receiving module, the upload request message sent for receiving browser by angular-upload plug-in unit;
Generation module uploads response message for generating according to the upload request message, the upload response message Head response includes response message;
First respond module is rung for returning to the upload to the browser by the angular-upload plug-in unit Answer message.
Optionally, generation module includes:
Adding unit, for the response message to be added to the access control expose of the head response In headers field.
Optionally, the upload response of the upload request message of the first receiving module and first respond module In message, the value of content type field is text/html.
Optionally, the response message in generation module is document id, described device further include:
Parsing module parses the document, obtains document for obtaining the document in the upload request message Information;
Memory module stores the corresponding relationship of the document id Yu the document information for generating the document id.
Device further include:
Second receiving module, the document request message sent for receiving the browser, the document request message packet Include the document id;
Searching module, for searching the corresponding document information of the document id;
Second respond module, for the document information to be back to the browser.
In addition, it is stored thereon with program the present invention also provides a kind of storage medium, when which is executed by processor, Realize the method for sending information.
In addition, the processor is held for running program when described program is run the present invention also provides a kind of processor The row method for sending information.
According to the above-mentioned technical solution, the method have the advantages that:
The method provided in an embodiment of the present invention for sending information, browser are sent by angular-upload plug-in unit and are uploaded Request message gives not homologous server, carries the document for needing to upload in upload request message;Server receives upload and asks Message is sought, it includes response message in the head response of the upload response message that corresponding generate, which uploads response message,;Server continues to lead to It crosses angular-upload plug-in unit and returns to the upload response message to browser.Therefore the embodiment of the present invention utilizes angular- When upload plug-in unit carries out message upload, response message is carried in the head response for uploading response message, utilization is overcome When angular-upload plug-in unit carries out message upload, the message except head is shielded, and cannot normally read effective information Problem.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram of the application scenarios of the embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for sending information provided in an embodiment of the present invention;
Fig. 3 is the signaling diagram of actual scene embodiment provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of device for sending information provided in an embodiment of the present invention.
Specific embodiment
With the rapid development of paperless office, the working and learning of government, enterprise and individual are increasingly dependent on electronics Document.For a part of document (the court's trial data of such as law court), due to the specific properties of its own, need server end into Row storage.Specifically, the document stored will be needed to be uploaded to server end by browser end, server end is to the document received It is parsed, the data and unique identification after obtaining document parsing, and the data that parsing is obtained are stored in database, by document Unique identification returns to browser end.
Browser will pass through under such exploitation environment usually using the exploitation that Angular JS frame carries out front end Browser uploads document to server, needs to realize using angular expansion plugin;In order to preferably reach lowest version browser Compatible effect is general to select angular-upload plug-in unit.
Using angular-upload plug-in unit, after uploading document to server from browser, text that server will receive Shelves are parsed, the data and unique identification after obtaining the document parsing;When user wants to read the document from server, It needs browser to send upload request message to server, angular-upload plug-in unit is passed through to browser from server later Document information after transmitting the parsing.
Under normal circumstances, the message transmitted between browser and server includes four parts: request row < request- Line>, request header<headers>, null<blank-line>and request data<request-body>, the text that is transmitted Shelves information is generally carried on request data<request-body>.
When uploading document without using angular-upload plug-in unit, that is, browser directly carries out message biography with server It is defeated, belong to normal upload mode, the message of transmission is carried in the part request data<request-body>, can directly read and Downloading;And browser carries out message transmissions by angular-upload plug-in unit and server, the upload sent to the server Request message is not normal network request message, at this time browser can only read the request header of the message information of response < Headers>, it for other three parts contents in the message information, is directly shielded, that is, is carried in request data<request- Body > part message information (document information) is shielded.
It, cannot in order to solve browser after uploading document to server by angular-upload plug-in unit from browser The problem of normal document information obtained in server returned packet, the embodiment of the invention provides a kind of methods for sending information And device, below in conjunction with Figure of description, preferred embodiment of the present invention will be described, it should be understood that described herein excellent Select embodiment only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.And it is in the absence of conflict, of the invention In embodiment and embodiment in feature can be combined with each other.
To solve the above-mentioned problems, the embodiment of the invention provides a kind of method for sending information, this method specifically: right In the case that server and browser be not homologous, browser sends to upload and ask by angular-upload plug-in unit to server Seek message;Server generates according to the upload request message received and uploads response message, the head response of the upload response message Including response message;And the upload response message is returned to browser by angular-upload plug-in unit.By this hair The response message of upload is carried in the head response for uploading response message by the scheme of bright embodiment, can be normal by browser It gets.
First practical application scene of the invention is introduced below.
Fig. 1 is the Sample Scenario figure of the present invention in practical applications, as shown in Figure 1, technical solution provided by the invention is answered In browser 101, server 102;Wherein, browser 101 is used to send various requests to server 102, and receives clothes The hypertext information and various multi-medium datas that business device 102 is sent, are parsed, shown and are played, specifically had: IE, Google, fire Fox, etc.;Server 102 refers to management resource and provides the computer software of service for user, but operating file, database and answers Server is also referred to as with the computer of the softwares such as program or computer system.
In practical applications, when some document needs to store, user needs uploading to by browser 101 by document When server 102, server 102 is parsed and is stored to the document received;And the response message that success or not will be uploaded Return to browser 101.When user needs to browse the document in browser 101, need to send a request to server 102, so Server 102 returns to the data to browser through 101 of this corresponding document according to the request received afterwards, and browser 101 is shown The document information received.
Particularly, in order to guarantee the information security of user, prevent the website of malice from stealing data behavior, in browser kimonos Homologous policy is introduced on business device.Specifically, between two browsers, between two servers or server and browsing utensil Have identical agreement, identical domain name and identical port, it is as homologous, as long as above-mentioned three have one it is identical, as not It is homologous.Between two not homologous browsers, between two servers or server and browser cannot open mutually or Access.Browser 101 and server 102 in embodiments of the present invention is not homologous.
It is right with reference to the accompanying drawing the embodiment of the invention provides a kind of method for sending information based on use above scene This is described in detail.
Fig. 2 is a kind of flow chart of method for sending information provided in an embodiment of the present invention, for not homologous server And browser, as shown in Fig. 2, this method comprises:
Step 201, server receives the upload request message that browser is sent by angular-upload plug-in unit;
Server and browser of the invention be not homologous, and the front end exploitation that browser uses is Angular JS frame Frame.
User it is in need by browser by document upload onto the server on store when, the document is carried on upload In request message, server is sent to by angular-upload plug-in unit by browser.It should be noted that only passing through Angular-upload plug-in unit could upload the upload message request for carrying document to server from browser, realize on document It passes.
Step 202, server generates according to above-mentioned upload request message and uploads response message, the sound of the upload response message Answering head includes response message;
Upload request message includes the document for needing to upload, and can also include the operation of upload request in specific implementation Type, the content of response message for requiring return etc..
Server parses the document wherein carried, obtains parsing document information according to the upload request message received, It include: Document Title, document format type, document content and other relevant keyword messages etc., and according to the text parsed Shelves information generate a corresponding response message, the response message must include document upload status information, if upload at Function, then the response message includes " success (success) " information;If uploading failure, which includes " failure (failure) " information.Certainly, which also may include an identification information, which can be with unique identification solution Document information after analysis, such as document id.
In specific implementation, server needs to generate a upload response message according to upload request message, which rings Message is answered to carry above-mentioned response message, browser is according to response message in upload response message it is found that its document to be uploaded is It is no to upload successfully.
In such a way that the progress file upload of angular-upload plug-in unit belongs to improper upload, browser is received upper Response message is passed, can only normally read its head (heater) information, rest part is shielded, cannot be read.Therefore, it responds Information include in the head response in the upload response message, with guarantee upload response message can in a browser by user just Often read.
Optionally, server includes: according to above-mentioned upload request message generation upload response message
Response message is added in the access control expose headers field of head response by server.
Specifically, upload response message include four parts: responsive trip<request-line>, head response<headers>, Null<blank-line>and web response body Web<request-body>, and head response<headers>in again have many fields, wherein Including access control expose headers field, response message is added to access control expose In headers field, that is, response message has been added in head response<headers>.It further relates to, by aforementioned four part The upload response message of composition can guarantee that the response message can normally be read by user in a browser.
Step 203, server returns to the upload response message to browser by angular-upload plug-in unit.
Server is sent to browser by angular-upload plug-in unit and uploads response message, the upload response message Response message is carried in head response, user is according in the reading to head response in the upload response message, it is known that above transmitting file is The no information such as successfully.
Execution through the above steps takes response message when carrying out message upload using angular-upload plug-in unit Band in upload response message head response in, overcome using angular-upload plug-in unit carry out message upload when, head it The problem of outer message is shielded, and effective information cannot be normally read.
In specific implementation, the response message that carries in response message is uploaded, it, can be with other than uploading status information It is other information for identifying this upload operation and uploading document.
Optionally, if response message is document id, the method for the transmission information further include:
S1, server obtain the document in upload request message, parse to document, obtain document information;
S2, server generates document id, and stores the corresponding relationship of document id and document information.
In specific implementation, server obtains this upload document when receiving upload request message accordingly; The upload document is the file destination that user wants to be stored.Firstly, server parses the document according to step S1, It obtains parsing document information, comprising: Document Title, document format type, document content and other relevant keyword messages Deng.Then, server is that the document received distributes document id according to step S2, and the document is believed after specifically may is that parsing Address information, the random number segment information generated for the document information etc. in server are ceased, after the document id of generation and parsing There are one-to-one mapping relations for document information.Finally, server stores the document information after above-mentioned parsing and document id Corresponding relationship, so as to subsequent user want the document information is read by browser when, according to document id and storage Corresponding relationship, search corresponding document information.
It is that the side of information is sent in actual operation from the operation that browser uploads document to server to document above Method further includes being read out by browser to the document uploaded onto the server, specific implementation is explained later.
In addition, the message that server sends and receivees is the data of json type.The Doctype of the json is Application/json is the relative complex data type of format, and browser is unable to this kind of data type of automatic identification, can handle The data of return are directly downloaded on desktop.It is caused inconvenience to the user in order to avoid message is directly downloaded on desktop, is promoted and used Family experience.
Optionally, in upload request message and upload response message, the value of content type field is text/html.
For upload request message and response message is uploaded, user needs directly to see on browser page that document uploads The information such as success or not are not intended to such message and are directly downloaded, cause the problems such as missing reception.
In specific implementation, the value of the Doctype content type field of json can be revised as text/html Format carries out directly displaying upload request report on the page of browser so that browser can identify the format of Doctype Text and upload response message content.
Optionally, the method provided in an embodiment of the present invention for sending information, further includes:
Step 204, server receives the document request message that browser is sent, and document request message includes document id;
In specific implementation, browser sends document request message to server, does not need to pass through angular- again Document request message directly can be sent to server by upload plug-in unit.The document solicited message includes in response message Document id.
Step 205, server searches the corresponding document information of the document ID;
In specific implementation, server can be in itself document information of storage and the corresponding relationship of document id, according to connecing The document id received searches the corresponding document information of the document ID.Lookup mode can be control one by one and search, and be also possible to close The search of key word is searched, and is not construed as limiting herein.
Step 206, the document information is back to the browser by server.
In specific implementation, server sends the document for carrying document information in response to the document request message of browser Request response message to server, document request response message also includes four parts that message should include, due to not utilizing Angular-upload plug-in unit transmitting message, so the position of document information addition is asked main body<request-body>for it, it is clear Device of looking at can normally read document and request document information in corresponding message.Also, server returns to document information to browser When, the value of content type field is text/html format, and the document information will not be downloaded on desktop, can be browsed Device is directly read, and is shown on the browser.
Obviously, the method provided in an embodiment of the present invention for sending information, browser are sent out by angular-upload plug-in unit It serves and passes request message to not homologous server, the document for needing to upload is carried in upload request message;Server receives Upload request message, corresponding generate upload response message, include response message in the head response of the upload response message;Server It continues through angular-upload plug-in unit and returns to the upload response message for carrying response message in head response to browser. Therefore the embodiment of the present invention using angular-upload plug-in unit carry out message upload when, by response message be carried on upload response In the head response of message, when overcoming using the progress message upload of angular-upload plug-in unit, the message except head is shielded The problem of covering, cannot normally reading effective information.
It is the introduction carried out to embodiment of the method for the invention above, in order to keep technical solution of the present invention more clear and complete It is whole, embodiment of the method provided by the invention for sending information in practical application scene is given below, referring specifically to Fig. 3.
In a concrete application scene of the embodiment of the present invention, as shown in figure 3, Fig. 3 is scene embodiment of the invention Signaling diagram, specifically include:
The document of server to be uploaded to is generated the upload request message comprising the document by S301, browser;
Above-mentioned upload request message is sent to server by angular-upload plug-in unit by S302, browser;
S303, server parse the document in the upload request message received, obtain document information;And to be somebody's turn to do Document information generates unique corresponding document id, and then stores the corresponding relationship of the document ID and document information;
S304, server, which generates, uploads response message, and the content of above-mentioned document id information in response is added to upload In the head response of response message, specifically in the access control expose headers field of head response;
S305, server send above-mentioned upload response message to browser by angular-upload plug-in unit;
S306, Doctype (the content type for uploading the json type in response message that browser will receive Field) value be converted to text/html format, the response message is directly viewable on browser page for user;
S307, browser generate the document request message comprising document id;
Above-mentioned document request message is sent to server by S308, browser;
S309, the server document id in document request message based on the received, in the document information and text of itself storage In the corresponding relationship of shelves ID, the corresponding document information of the document ID is searched;
The document information found is returned to browser by S310, server.
Concrete implementation mode in above-mentioned steps, the introduction in embodiment of the method shown in Figure 2 are no longer superfluous here It states.
Pass through the description of above-mentioned scene embodiment, it can be seen that the method provided by the invention for sending information utilizes Message transmissions between angular-upload plug-in unit not homologous server and browser;And document is uploaded to and is obtained text Shelves are divided into two independent processes.When carrying out document upload, response message is carried in the head response for uploading response message, gram When having taken using the progress message upload of angular-upload plug-in unit, the message except head is shielded, and cannot normally have been read The problem of imitating information;When browser obtains document information, browser and server directly carries out network communication, passes through document id Corresponding document information is obtained, Internet resources pressure is alleviated.
The above is the introduction to embodiment of the method for the invention, and describes the corresponding application scenarios of this method embodiment Embodiment, in addition to this, the present invention also provides a kind of devices for sending information, and the device is introduced below.
Referring to fig. 4, Fig. 4 is a kind of structural schematic diagram of device for sending information provided in an embodiment of the present invention, such as Fig. 4 institute Show, which includes:
First receiving module 401, the upload request report sent for receiving browser by angular-upload plug-in unit Text;
Generation module 402 uploads response message for generating according to upload request message, wherein upload response message Head response includes response message;
First respond module 403 uploads response message for returning by angular-upload plug-in unit to browser.
Optionally, above-mentioned generation module 402 includes:
Adding unit, for response message to be added to the access control expose headers word of head response Duan Zhong.
Optionally, the upload of the upload request message of above-mentioned first receiving module 401 and the first respond module 403 responds report The value of Wen Zhong, content type field is text/html.
Optionally, the response message in above-mentioned generation module 402 is document id, the device further include:
Parsing module parses document, obtains document information for obtaining the document in upload request message;
Memory module stores the corresponding relationship of document id and document information for generating document id.
Optionally, the device further include:
Second receiving module 404, for receiving the document request message of browser transmission, wherein document request message packet Include document id;
Searching module 405, for searching the corresponding document information of above-mentioned document id;
Second respond module 406, for document information to be back to browser.
It is shown in Fig. 4 send massaging device it is specific with it is shown in Fig. 2 it is a kind of transmission information embodiment of the method in retouch It states and corresponds to unanimously, which is not described herein again.
The device provided in an embodiment of the present invention for sending information carries out message upload using angular-upload plug-in unit When, response message is carried in the head response for uploading response message, overcomes and is reported using angular-upload plug-in unit When text uploads, the problem of message except head is shielded, cannot normally read effective information.
In addition, the present invention also provides it is a kind of send information device, it is described send information device include processor and Memory, above-mentioned first receiving module, generation module etc. are stored in memory as program module, are deposited by processor execution Above procedure module in memory is stored up to realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program module by kernel.Kernel can be set one Or more, when carrying out message upload using angular-upload plug-in unit to overcome by adjusting kernel parameter, except head The problem of message is shielded, and effective information cannot be normally read.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited Store up chip.
The embodiment of the invention provides a kind of storage medium, the storage medium includes the program of storage, wherein described The equipment that described program is called in control when program is run executes the method for sending information.Equipment herein can be service Device, PC, PAD, mobile phone etc..
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation When perform the following operations:
Receive the upload request message that browser is sent by angular-upload plug-in unit;
It is generated according to the upload request message and uploads response message, the head response for uploading response message includes response Information;
The upload response message is returned to the browser by the angular-upload plug-in unit.
Optionally, generating upload response message according to the upload request message includes:
The response message is added in the access control expose headers field of the head response.
Optionally, in upload request message and the upload response message, the value of content type field is text/ html。
Optionally, response message is document id, this method further include:
The document in the upload request message is obtained, the document is parsed, obtains document information;
The document id is generated, the corresponding relationship of the document id Yu the document information is stored.
Optionally, this method further include:
The document request message that the browser is sent is received, the document request message includes the document id;
Search the corresponding document information of the document id;
The document information is back to the browser.
The present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just The program code of beginningization there are as below methods step:
Receive the upload request message that browser is sent by angular-upload plug-in unit;
It is generated according to the upload request message and uploads response message, the head response for uploading response message includes response Information;
The upload response message is returned to the browser by the angular-upload plug-in unit.
Optionally, generating upload response message according to the upload request message includes:
The response message is added in the access control expose headers field of the head response.
Optionally, in upload request message and the upload response message, the value of content type field is text/ html。
Optionally, response message is document id, this method further include:
The document in the upload request message is obtained, the document is parsed, obtains document information;
The document id is generated, the corresponding relationship of the document id Yu the document information is stored.
Optionally, this method further include:
The document request message that the browser is sent is received, the document request message includes the document id;
Search the corresponding document information of the document id;
The document information is back to the browser.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that the embodiment of the present invention can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the present invention Form.It is deposited moreover, the present invention can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only the embodiment of the present invention, are not intended to restrict the invention.To those skilled in the art, The invention may be variously modified and varied.It is all within the spirit and principles of the present invention made by any modification, equivalent replacement, Improve etc., it should be included within scope of the presently claimed invention.

Claims (10)

1. a kind of method for sending information, which is characterized in that server is not homologous with browser, which comprises
The server receives the upload request message that browser is sent by angular-upload plug-in unit;
The server is generated according to the upload request message uploads response message, the head response packet for uploading response message Include response message;
The server returns to the upload response message to the browser by the angular-upload plug-in unit.
2. the method according to claim 1, wherein the server is generated according to the upload request message Passing response message includes:
The response message is added to the access control expose headers word of the head response by the server Duan Zhong.
3. method described in -2 any one according to claim 1, which is characterized in that
In the upload request message and the upload response message, the value of content type field is text/html.
4. according to the method described in claim 3, it is characterized in that, the response message is document id, the method also includes:
The server obtains the document in the upload request message, parses to the document, obtains document information;
The server generates the document id, stores the corresponding relationship of the document id Yu the document information.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
The server receives the document request message that the browser is sent, and the document request message includes the document ID;
The server searches the corresponding document information of the document id;
The document information is back to the browser by the server.
6. a kind of device for sending information, which is characterized in that server is not homologous with browser, and described device includes:
First receiving module, the upload request message sent for receiving browser by angular-upload plug-in unit;
Generation module uploads response message for generating according to the upload request message, the response for uploading response message Head includes response message;
First respond module, for returning to the upload response report to the browser by the angular-upload plug-in unit Text.
7. device according to claim 6, which is characterized in that the generation module includes:
Adding unit, for the response message to be added to the access control expose of the head response In headers field.
8. according to device described in claim 6-7, which is characterized in that the upload request message of first receiving module In the upload response message of first respond module, the value of content type field is text/html.
9. a kind of storage medium, which is characterized in that be stored thereon with program, when described program is executed by processor, realize as weighed Benefit requires any one of 1 to 5 method for sending information.
10. a kind of processor, which is characterized in that the processor is for running program, when described program is run, executes such as right It is required that any one of 1 to 5 method for sending information.
CN201710923265.2A 2017-09-30 2017-09-30 Method and device for sending information Active CN109600403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710923265.2A CN109600403B (en) 2017-09-30 2017-09-30 Method and device for sending information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710923265.2A CN109600403B (en) 2017-09-30 2017-09-30 Method and device for sending information

Publications (2)

Publication Number Publication Date
CN109600403A true CN109600403A (en) 2019-04-09
CN109600403B CN109600403B (en) 2021-11-02

Family

ID=65956886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710923265.2A Active CN109600403B (en) 2017-09-30 2017-09-30 Method and device for sending information

Country Status (1)

Country Link
CN (1) CN109600403B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364858A (en) * 2021-06-03 2021-09-07 中国工商银行股份有限公司 File uploading method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638454A (en) * 2012-03-14 2012-08-15 武汉理工大学 Plug-in type SSO (single signon) integration method oriented to HTTP (hypertext transfer protocol) identity authentication protocol
CN102902934A (en) * 2011-09-27 2013-01-30 微软公司 Integration and interactive operation system for unknowable host
CN103023790A (en) * 2012-12-31 2013-04-03 北京京东世纪贸易有限公司 Method and system used for realizing cross-domain interactive access
CN103229486A (en) * 2012-12-03 2013-07-31 华为技术有限公司 Batch file transmission method and device
US20140307734A1 (en) * 2013-04-12 2014-10-16 Qualcomm Incorporated Methods for Delivery of Flows of Objects over Broadcast/Multicast Enabled Networks
CN106534243A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Caching, requesting and responding method based on HTTP protocol and corresponding device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902934A (en) * 2011-09-27 2013-01-30 微软公司 Integration and interactive operation system for unknowable host
CN102638454A (en) * 2012-03-14 2012-08-15 武汉理工大学 Plug-in type SSO (single signon) integration method oriented to HTTP (hypertext transfer protocol) identity authentication protocol
CN103229486A (en) * 2012-12-03 2013-07-31 华为技术有限公司 Batch file transmission method and device
CN103023790A (en) * 2012-12-31 2013-04-03 北京京东世纪贸易有限公司 Method and system used for realizing cross-domain interactive access
US20140307734A1 (en) * 2013-04-12 2014-10-16 Qualcomm Incorporated Methods for Delivery of Flows of Objects over Broadcast/Multicast Enabled Networks
CN106534243A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Caching, requesting and responding method based on HTTP protocol and corresponding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364858A (en) * 2021-06-03 2021-09-07 中国工商银行股份有限公司 File uploading method and device

Also Published As

Publication number Publication date
CN109600403B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
US8332520B2 (en) Web server for managing session and method thereof
US20150012653A1 (en) Adaptive Packaging of Network Resources
CN103944944B (en) Method, electronic equipment and the system of sharing web page link
US11170157B2 (en) Systems and methods for co-browsing
CN106656920B (en) Processing method, device, storage medium and the processor of HTTP service
CN110119294A (en) The generation method of menu page, apparatus and system
CN107291759B (en) Method and device for processing browser page resources
EP2962216A1 (en) Sharing application states
CN105022832B (en) Method, mobile terminal and the download server that APP application securities are downloaded
US20120331038A1 (en) Systems and methods for processing web service piped network requests
CN108932238A (en) A kind of cross-domain communication method and device
CN103207877B (en) Coding/decoding method and device
CA2846581A1 (en) Data infrastructure for providing interconnectivity between platforms, devices and operating systems
CN108549586B (en) Information processing method and device
CN105095220B (en) A kind of browser implementation method, terminal and virtualization agent device
CN105556918B (en) A kind of resource downloading method and electronic equipment
CN109918146A (en) Page generation method and device
CN108021564A (en) A kind of method and apparatus of page reorientation
US20140074814A1 (en) Method and apparatus for switching search engine to repeat search
CN112954717B (en) Household appliance network distribution method and device based on H5 page
US11394807B2 (en) Critical path estimation for accelerated and optimal loading of web pages
CN110119483A (en) Display methods, device, terminal device and the storage medium of multimedia file
CN109600403A (en) A kind of method and device sending information
JP2020004380A (en) Wearable device, information processing method, device and system
CN108228145A (en) Data processing method, system and the mobile equipment of mixed type application program

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
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant