A kind of method and system for receiving, sending information
Technical field
The invention belongs to network technique field more particularly to a kind of method and system for receiving, sending information.
Background technology
With the rapid development and popularization of person internet, internet by people is widely used, brought in every respect
Huge convenience is mutually exchanged by network, links up and like for more and more people, it has also become a kind of information interchange of prevalence
Mode, the propagation for making information is easily quick, improves live and work efficiency.
Now, Current Email sends mutually information on internet, and E-mail address does not allow user anonymity to send information,
There are many blogs on internet, they generally have second level domain network address, such as zhangsan.blog.com, communicate between them
And pass through E-mail address rather than obvious second level domain network address.It can not be mutual between present internet site user
It communicates, it is impossible to be communicated by network address.
The content of the invention
In view of this, the technical problem to be solved in the present invention is, provides a kind of method for receiving, sending information and is
System, make between website user can by network address to send mutually, receive information, make to be in communication with each other between website user,
Network convenient for users is sent, receive information.
The technical solution adopted by the present invention to solve the technical problems is:
A kind of method for receiving, sending information, including:
A, the log-on message of user setting is submitted to server, is saved into database by client, and returns to registering result
Information is to client;
B, client sends information to the user by network address to server;
C, the server receives described information, and information is saved into database;
D, after the user login services device, program searches the information for being sent to the user from database, returns and searches
As a result the user's client is arrived to show.
A kind of method for receiving, sending information, including:
A, the log-on message of user setting is submitted to server, is saved into database by client, and returns to registering result
Information is to client;
B, send the information that will send of information server to be stored into database and/or memory, and pass through network address to connecing
It receives information server and sends the information;
C, the receive information server receives described information, and then send verification information by network address believes to described send
Cease server;
D, after the transmission information server receives verification information, searched whether from the database and/or memory
There are the information record, and if so, returning to true, false is otherwise returned to;
E, the receive information server receives the verification information of feedback, if the verification information is true, connects
The transmission information is received, is stored into database, if feedback information is false, abandons the transmission information;
F, the user login services device, program search the information for being sent to the user from database, return and search knot
Fruit shows to the user's client.
The method further includes before step B:Client sends the message subject, interior that the user setting of information is sent
Appearance, the account of receive information user, the domain name of receive information user, the network address of receive information, the account, close for sending information user
Code, the domain name for sending information user, the network address for sending information, transmission information service is sent to by the information of setting by network address
Device after transmission information server receives information, is searched from customer data base, verifies transmission information user's account, and verification is led to
It crosses, performs step B, otherwise abandon execution and send the information, and return to error message.
It is described by network address to server send information network address be:Multistage domain address.
The network address for sending information to server by network address carries query string parameter, wherein including following one
Item is multinomial:
The message subject of transmission, content, the account of receive information user, the domain name of receive information user, receive information
Network address, the account for sending information user, send the network address of information, are unique identifier train value, close the domain name for sending information user
Code.
It is described that following one to multiple item is included to the information that server is sent by network address:
The message subject of transmission, content, the account of receive information user, the domain name of receive information user, receive information
Network address, the account for sending information user, send the network address of information, are unique identifier train value, close the domain name for sending information user
Code.
It is described by network address to server send information be to be realized by the get modes or post modes of http protocol.
A kind of system for receiving, sending information, including:
Registration module for the log-on message of user setting to be submitted to server, is saved into database, and returns to registration
Result information is to client;
Sending module sends information by network address for client to server;
Information for receiving the information of sending module transmission, is saved into database by receiving module;
Check module, after the user login services device, program searches the letter for being sent to the user from database
Breath returns to lookup result and is shown to the user's client;
Database, for storing the log-on message of user, the information that user sends, receives.
The system further comprises:
Registration module is used to the log-on message of user setting being submitted to server, be saved into second server database or
The 3rd server database of person, and registering result information is returned to client;
Client sending module sends information by network address for client to second server receiving module;
Second server receiving module is used to receive the information of client sending module transmission, and information is saved into the second clothes
It is engaged in device database and/or memory;
Second server sending module is used to the information that second server receiving module receives being sent to the by network address
Three server receiving modules;
3rd server receiving module is used to receive the information of second server sending module transmission;
Authentication module connects for the information of the 3rd server receiving module reception to be sent to second server by network address
It receives module to be verified, and obtains the verification result information of return, if the verification result returned is true, by the 3rd service
The information that device receiving module receives is saved into the 3rd server database, and returns to 1 or true to second server, if returned
Verification result for false, then abandon the information of the reception of receiving module 15, and 0 or false returned to second server;
Check module for after the user login services device, program to search the letter for being sent to the user from database
Breath returns to lookup result and is shown to the user's client;
Database be used to storing the log-on message of user, user transmission, receive information.
Implement the invention has the advantages that:The present invention provides a kind of method and system for receiving, sending information, makes
Between website user can by network address to send mutually, receive information, make to be in communication with each other between website user, facilitate
User is sent using network, receive information.
Description of the drawings
Fig. 1 is the realization flow chart that information approach is received, sent in the embodiment of the present invention one;
Fig. 2 is the realization flow chart that information approach is received, sent in the embodiment of the present invention two;
Fig. 3 is the realization flow chart that information approach is received, sent in the embodiment of the present invention three;
Fig. 4 is the realization flow chart that information approach is received, sent in the embodiment of the present invention four;
Fig. 5 is the structure diagram that the present invention received, sent information system;
Fig. 6 is another structure diagram for receiving, sending information system of the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 shows in the embodiment of the present invention one the realization flow for receiving, sending information approach, mainly realizes step
For:
Step S101, the user a log-on messages set are submitted to server, are saved into database by client, and are returned
Registering result information is to client.
For example, user a is registered on the www.abc.com of website, setting account is the information such as zhangsan, password, is confirmed
Afterwards, log-on message is submitted to server, is saved into database, returns to the information that succeeds in registration and gives user a.So web station system is account
The second level domain for number being user's distribution of zhangsan is zhangsan.abc.com.
Step S102, user b send information by network address to the Website server that user a is registered.
User b using client by url (network address), HTTP inquiry strings, http agreements get modes to user a
The Website server of registration is anonymous to send information.
For example, user b inputs network address http in browser address bar://zhangsan.abc.com/Title=
Hello&body=how are you, click go to button, and the server being directed toward to the network address sends solicited message, wherein
Zhangsan is the account that receive information user a is registered on the www.abc.com of website, and zhangsan.abc.com is user a
Second level domain, title be send information title, body be send information content, certainly can also include other content,
Therefore not to repeat here.The zhangsan that the server program (such as website homepage program) obtains in network address in second level domain (is used
Family account), message header is obtained using the c# programs Request.QueryString [" title "] in asp.net, is used
Request.QueryString [" body "] obtains the information content.Then judge whether account receives for the user of zhangsan
Anonymous information, if the configuration information of the storage of zhangsan in the database returns to transmission and lose not receive anonymous information
Lose information, otherwise obtained information be saved into database table, the information record include message header, the information content and
The fields such as receive information user account.
The network address that user b is inputted in browser address bar can also be http://www.abc.com/zhangsan/
Title=hello&body=how are you or http://www.abc.com/UserName=zhangsan&title
=hello&body=how are you etc..
In another example the following code in the html codes of webpage:
User b inputs the account zhangsan of receive information user a in UserName text boxes, in title text boxes
Middle input header hello, the input content how are you in body text boxes, click on Submit2 buttons, and program passes through
Url, HTTP inquiry string http://www.abc.com/Title=hello&body=how are you&UserName
=zhangsan submits information to server.Server program (such as website homepage program) uses the c# programs in asp.net
Request.QueryString [" UserName "] obtains the account zhangsan of receive information user, uses
Request.QueryString [" title "] obtains message header hello, uses Request.QueryString [" body "]
Obtain information content how are you.Then judge whether account receives anonymous information for the user of zhangsan, if
The configuration information of the storage of zhangsan in the database then returns to transmission failure information, otherwise will not receive anonymous information
Obtained information is saved into database table, and returns to transmission successful information, and the information record is including in message header, information
The fields such as the user account of appearance and receive information.
In another example the following code in the html codes of webpage:
User b inputs the second level domain zhangsan.abc.com of receive information user a in yuming text boxes,
Input header hello in title text boxes, the input content how are you in body text boxes click on Submit2 buttons,
Pass through url, HTTP inquiry string http://zhangsan.abc.com/Title=hello&body=how are you
Information is submitted to server.The zhangsan that server program (such as website homepage program) obtains in network address in second level domain (is used
Family account), message header is obtained using the c# programs Request.QueryString [" title "] in asp.net, is used
Request.QueryString [" body "] obtains the information content.Then judge whether account receives for the user of zhangsan
Anonymous information, if the configuration information of the storage of zhangsan in the database returns to transmission and lose not receive anonymous information
Information is lost, otherwise obtained information is saved into database table, and returns to transmission successful information, which includes information
The fields such as title, the information content and user account, user's domain name.
User b uses the website service that client is registered by the post modes of url (network address), http agreements to user a
Device is anonymous to send information.
For example, there is following code in the html codes of webpage:
User b inputs the network address www.abc.com of receive information website in yuming text boxes, in UserName texts
The account zhangsan, the input header hello in title text boxes, in body text boxes of receive information user a is inputted in frame
Middle input content how are you click on Submit2 buttons, pass through http://www.abc.com/Default.aspx is submitted
Information is to server.Server program uses the c# programs Request.Form [" UserName "] in asp.net to be received
The user account zhangsan of information obtains message header using Request.Form [" title "], uses Request.Form
[" body "] obtains the information content.Then judge whether account receives anonymous information for the user of zhangsan, if
The configuration information of the storage of zhangsan in the database then returns to transmission failure information, otherwise will not receive anonymous information
Obtained information is saved into database table, and returns to transmission successful information, and the information record is including in message header, information
The fields such as appearance and receive information user account.
In another example there is following code in the html codes of webpage:
User b inputs the account " zhangsan " of receive information user a in UserName text boxes, in title texts
Input header hello in frame, the input content how are you in body text boxes, click on Buttonl buttons, and program passes through
Network address http://www.abc.com/Default.aspx submits information, and server program uses asp.net to web server
In c# programs Request.Form [" UserName "] obtain the account zhangsan of receive information user, use
Request.Form [" title "] obtains message header, and the information content is obtained using Request.Form [" body "].Then sentence
Whether the user that disconnected account is zhangsan receives anonymous information, if the configuration information of the storage of zhangsan in the database
Not receive anonymous information, then transmission failure information is returned to, otherwise obtained information is saved into database table, and return to hair
Successful information is sent, which includes the fields such as the user account of message header, the information content and receive information.
In another example there is following code in the html codes of webpage:
User b inputs the network address www.abc.com of receive information in yuming text boxes, in UserName text boxes
Account zhangsan, the input header hello in title text boxes of receive information user a is inputted, it is defeated in body text boxes
Enter content how are you, click on Submit3 buttons, pass through network address http://www.abc.com/Service.asmx/
Send submits information, and server program uses the c# programs Request.Form in asp.net to Web services servers
[" UserName "] obtains the user account " zhangsan " of receive information, and letter is obtained using Request.Form [" title "]
Title " hello " is ceased, the information content " how are you " is obtained using Request.Form [" body "].Then account is judged
Whether anonymous information is received for the user of zhangsan, if the configuration information of the storage of zhangsan in the database is not connect
Anonymous information is received, then returns to transmission failure information, otherwise obtained information is saved into database table, and returns and sends successfully
Information, the information record include the fields such as message header, the information content and receive information user account.
Client application ajax technologies send information to server:
Such as user b inputs the second level domain zhangsan.abc.com of receive information user a in the page, inputs information
Title " hello ", the input information content " how are you ", the url that generation sends information after determining are http://
zhangsan.abc.com/Title=hello&body=how are you, and using ajax technologies by the url to clothes
Business device sends solicited message, and server program (such as website homepage program) obtains the receive information user in second level domain in network address
Account zhangsan, and message header is obtained using the c# programs Request.QueryString [" title "] in asp.net,
The information content is obtained using Request.QueryString [" body "].Then judge account for zhangsan user whether
Anonymous information is received, if the configuration information of the storage of zhangsan in the database returns to hair not receive anonymous information
Failure information is sent, otherwise obtained information is saved into database table, and returns to transmission successful information, which includes
The fields such as message header, the information content and user account, user's domain name.
Programming mode sends information to server, for example, being realized using the c# programs of asp.net, user b is defeated in the page
Enter the second level domain zhangsan.abc.com, message header hello, information content how are you of receive information user a,
New network address URL, Response.Redirect (" http is redirected to after determining://zhangsan.abc.com/Title=
Hello&body=how are you "), information is thus submitted to server.
Or information is sent to server using following this section of C# codes, according to the user b receive information user a's inputted
Second level domain zhangsan.abc.com, message header hello, information content how are you generation network address.
Or information is sent to server using following this section of C# codes,
Server program (such as website homepage program) obtains the zhangsan (user account) in second level domain in network address, makes
Message header is obtained with the c# programs Request.QueryString [" title "] in asp.net, is used
Request.QueryString [" body "] obtains the information content.Then judge whether account receives for the user of zhangsan
Anonymous information, if the configuration information of the storage of zhangsan in the database returns to transmission and lose not receive anonymous information
Information is lost, otherwise obtained information is saved into database table, and returns to transmission successful information, which includes information
The fields such as title, the information content and user account.
Or information is sent to server using following this section of C# codes,
Server program obtains the zhangsan (user account) in second level domain in network address, uses the c# in asp.net
Program Request.QueryString [" title "] obtains message header, uses Request.QueryString [" body "]
Obtain the information content.Then judge whether account receives anonymous information for the user of zhangsan, if the storage of zhangsan
Configuration information in the database then returns to transmission failure information, otherwise preserves obtained information not receive anonymous information
Enter in database table, and return to transmission successful information, which includes message header, the information content and receive information
The fields such as user account.
In embodiments of the present invention, the url (network address) includes HTTP handler network address and Web service (Web
Services) handler address, for example, HTTP handler Web site query character string is http://
zhangsan.abc.com/Title=hello&body=how are you or http://www.abc.com/
zhangsan/Title=hello&body=how are you or http://www.abc.com/UserName=
Zhangsan&title=hello&body=how are you etc., Web service (Web services) handler address are looked into
Inquiry character string is http://zhangsan.abc.com/Service.asmx/sendTitle=hello&body=how
Are you or http://www.abc.com/zhangsan/Service.asmx/sendTitle=hello&body=
How are you or http://www.abc.com/Service.asmx/sendUserName=zhangsan&title=
Hello&body=how are you etc..
In embodiments of the present invention, the server receive information:
When url (network address) is HTTP handler network address http://UserName.abc.com/Title=hello&
During body=how are you, Extensive domain name analysis * .abc.com are set, any subdomain is so added before domain name abc.com
Name, may have access to pointed WEB addresses.Set * .abc.com are all resolved to together under namely domain name abc.com
One IP address gets on.Server program (such as website homepage program) obtains the UserName (users in second level domain in network address
Account), such as the c# Code obtainings UserName for passing through following asp.net:
When client submits information using get modes, server uses the c# programs in asp.net
Request.QueryString [" title "] obtains message header, is obtained using Request.QueryString [" body "]
The information content;When client submits information using post modes, server uses the c# programs in asp.net
Request.Form [" title "] obtains message header, and the information content is obtained using Request.Form [" body "];For it
He is url (network address) http://www.abc.com/zhangsan/Title=hello&body=how are you or
http://www.abc.com/UserName=zhangsan&title=hello&body=how are you etc., service
Device program acquisition user account, title, content is similar or is the prior art, and details are not described herein.
When url (network address) is Web service (Web services) handler address, such as http://
zhangsan.abc.com/Service.asmx/sendTitle=hello&body=how are you, wherein title are
Message header, body are the information contents, and send is the function in Web services.Extensive domain name analysis * .abc.com are set, this
Sample adds any subdomain name before domain name abc.com, may have access to pointed WEB addresses.Namely domain name abc.com it
Lower set * .abc.com are all resolved to same IP address up.
Server program is by http://zhangsan.abc.com/Service.asmx/sendTitle=hello&
Body=how are you are rewritten as http://www.abc.com/Service.asmx/sendTitle=hello&body
=how are you&UserName=zhangsan are simultaneously gone to, and server program can use the c# programs in asp.net
Request.QueryString [" title "] obtains message header, is obtained using Request.QueryString [" body "]
The information content obtains the account of receive information user using Request.QueryString [" UserName "].Or server
Program obtains the user account zhangsan of receive information in second level domain by network address, and server process program can pass through
The information that parameter acquiring in url (network address) inquiry string is sent, for example, parameter of the server program by send functions
Title obtains message header, and the information content is obtained by the parameter body of send functions.Then obtained information is saved into number
According in the table of storehouse, which includes the fields such as message header, the information content and receive information user account.
For the url (network address) of other Web services (Web services), http://www.abc.com/zhangsan/
Service.asmx/sendTitle=hello&body=how are you or http://www.abc.com/
Service.asmx/sendUserName=zhangsan&title=hello&body=how are you etc..Server
Program obtains that the user account of receive information, title, content are similar or for the prior art, and details are not described herein.
Asp.net projects being enumerated herein, example being rewritten to url (network address), configuration rule is as follows in web.config:
<RewriterRule>
<LookFor>http://(\w+)\.abc\.com</LookFor>
<SendTo>/test.aspx</SendTo>
</RewriterRule>
(w+) is used for matching arbitrary string, wherein test.aspx at will write it is other can also because do not use at all
It.
Then so handled in program:
Step S103, the server reception are sent to the information of user a, information are saved into database.Success preserves
1 or true is returned after information, otherwise returns to 0 or false.
Step S104, user's a login service devices, program search the information of user a receptions from database, return and search knot
Fruit shows to user's a clients.
For example, account is zhangsan, second level domain is the user a of zhangsan.abc.com in website
It is logged on www.abc.com, checks the information that user a is received, user a clients send the reception for searching that account is zhangsan
The request of information after server receives request, searches from database to server, and returns to lookup result to user a visitors
Family end, client receives the lookup result, and is shown in the page.
What embodiment one was said is that anonymous form sends information to user, and embodiment two illustrates how non-anonymous form to user
Send information.If user setting is not receive the information of anonymous transmission, then send information user must account, password test
After card passes through, information could be sent, and the domain name of sender is shown at the user of receive information.
Fig. 2 shows in the embodiment of the present invention two the realization flow for receiving, sending information approach, mainly realizes step
For:
Step S201, the log-on message of user setting is submitted to server, is saved into database by client, and returns to note
Volume result information is to client.
For example, user a is registered on the www.abc.com of website, setting account is the information such as zhangsan, password, is confirmed
Afterwards, log-on message is submitted to server, is saved into database, returns to the information that succeeds in registration and gives user a.So web station system is account
The second level domain of number user for being zhangsan distribution is zhangsan.abc.com.User b is noted on the www.efg.com of website
Volume, setting account are the information such as liliu, password, and after confirmation, log-on message is submitted to server, are saved into database, return to note
Volume successful information gives user b.So web station system is that the second level domain for user's distribution that account is liliu is
liliu.efg.com。
Step S202, user b send information by network address to the Website server that user a is registered.
For example, on the www.efg.com of website, the user b that account liliu, second level domain are liliu.efg.com is stepped on
It after record, to send information on the www.abc.com of website, account zhangsan, second level domain are
The user a of zhangsan.abc.com, user b input the message header hello to be sent, content how are in the page
You, the second level domain zhangsan.abc.com of receive information user a.Confirm after sending, to second level domain
Server pointed by zhangsan.abc.com sends solicited message, for example is to send to ask by network address http inquiry strings
Seek information, then the network address of generation, inquiry string http://zhangsan.abc.com/Title=hello&body
=how are you&SendUser=liliu.efg.com, because the user b that account is liliu has logged on, account
Number, password have verified that by, thus can it is non-anonymous transmission information.After user's a servers receive information, server
Program (such as website homepage program) obtains the user a account zhangsan of the receive information in second level domain in network address, and uses
C# programs Request.QueryString [" title "] in asp.net obtains message header, uses
Request.QueryString [" body "] obtains the information content, is obtained using Request.QueryString [" SendUser "]
To the second level domain for sending information user b.Then information is saved into database table, the information record include message header,
Account, the domain name of the information content and receive information user a send the fields such as the domain name of information user b.
If the user b that account liliu, second level domain are liliu.efg.com is not logged on, to send information to
The user a that account is zhangsan, second level domain is zhangsan.abc.com, user b to be sent in window interface input
Message header hello, content how are you, the second level domain zhangsan.abc.com of receive information user a send letter
It ceases the second level domain liliu.efg.com of user b and sends the password of information user b, confirm, because user b is not stepped on
Record, so user b input accounts and password, it is desirable that the Website server registered to user b verifies that account by rear, could be sent
Information so server pointed by program to the second level domain liliu.efg.com of user b sends solicited message, for example is logical
It crosses network address http inquiry strings and submits request, then the network address of generation, inquiry string http://
liliu.efg.com/Title=hello&body=how are you&receive=zhangsan.abc.com&pwd=
123456, after server receives information, server program (such as website homepage program) obtains the hair in second level domain in network address
Deliver letters the user b account liliu of breath, and using the c# programs Request.QueryString [" title "] in asp.net
To message header, the information content is obtained using Request.QueryString [" body "], is used
Request.QueryString [" receive "] obtains the second level domain zhangsan.abc.com of receive information user a, makes
The password for being liliu with Request.QueryString [" pwd "] the user b accounts for obtaining sending information, then from database
It is middle to search, verify the user's account, password, if authentication failed, error message is returned, if be proved to be successful, server
Program can pass through network address http://zhangsan.abc.com/Title=hello&body=how are you&
SendUser=liliu.efg.com send information to server of the second level domain pointed by zhangsan.abc.com, clothes
After business device receives information, server program (such as website homepage program) obtains the use of the receive information in second level domain in network address
Family a account zhangsan, and obtain information mark using the c# programs Request.QueryString [" title "] in asp.net
Topic, obtains the information content using Request.QueryString [" body "], uses Request.QueryString ["
SendUser "] the domain name liliu.efg.com of transmission information user b is obtained, then information is saved into database table, it should
Information record includes message header, the account of the information content and receive information user, domain name, sends the domain name of information user
Etc. fields.
Step S203, the server receive the information that user b is sent to user a, information are saved into database, success
1 or true is returned after preserving information, otherwise returns to 0 or false.
Step S204, user's a login service devices, program search the information of user a receptions from database, return and search knot
Fruit shows to user's a clients.
Fig. 3 shows in the embodiment of the present invention three the realization flow for receiving, sending information approach, mainly realizes step
For:
Step S301, the log-on message of user setting is submitted to server, is saved into database by client, and returns to note
Volume result information is to client.
For example, user a is registered on the www.abc.com of website, setting account is the information such as zhangsan, password, is confirmed
Afterwards, log-on message is submitted to server, is saved into database, returns to the information that succeeds in registration and gives user a.So web station system is account
The second level domain of number user for being zhangsan distribution is zhangsan.abc.com.User b is noted on the www.efg.com of website
Volume, setting account are the information such as liliu, password, and after confirmation, log-on message is submitted to server, are saved into database, return to note
Volume successful information gives user b.So web station system is that the second level domain for user's distribution that account is liliu is
liliu.efg.com。
Step S302, user's b Website logins send information by network address to the Website server that user a is registered, and will
Described information is saved into database and/or memory.
For example, on the www.efg.com of website, the user b that account liliu, second level domain are liliu.efg.com is stepped on
It after record, to send information on the www.abc.com of website, account zhangsan, second level domain are
The user a of zhangsan.abc.com, user b input the message subject hello to be sent, content how are in the page
You, receive information user a domain name zhangsan.abc.com (or the account zhangsan of receive information user a and receive believe
The network address www.abc.com of breath).Confirm after sending, the information of transmission is saved into database and/or caching by server program
In, and create a unique identifier row or a globally unique identifier row (GUID row), information record word for information record
Section includes unique identifier, message header, the information content, sender's network address (such as www.efg.com), sender's account (such as
Liliu), sender's domain name (such as liliu.efg.com), recipient's network address (such as www.abc.com), recipient's account be (such as
Zhangsan), recipient's domain name (such as zhangsan.abc.eom), state field.For example it is by network address http inquiry words
Symbol string sends information to the server pointed by the domain name of user a, then the network address of generation, inquiry string http://
zhangsan.abc.com/Title=hello&body=how are you&SendUser=liliu.efg.com&id=
6, wherein, id is unique identifier row, and SendUser is sender's domain name.User b servers are sent to user a servers to be believed
Breath.
Step S303, the server receive the information that user b is sent to user a, then to the server for sending information
Send requests verification information.
After user's a servers receive information, server program (such as website homepage program) obtains two of user a in network address
The account zhangsan of grade domain name zhangsan.abc.com and user a, and use the c# programs in asp.net
Request.QueryString [" title "] obtains message header, is obtained using Request.QueryString [" body "]
The information content obtains sending the domain name of information user using Request.QueryString [" SendUser "]
Liliu.efg.com obtains the identifier train value 6 of the information record using Request.QueryString [" id "].Then lead to
Cross network address http://liliu.efg.com/Transmissions of the receive=zhangsan.abc.com&CheckID=6 to user b
The server of information sends requests verification information.
The transmission information server of step S304, the user b receive the verification information, perform verification, return to verification
As a result.
The server of user b receives the verification information, and server program (such as website homepage program) obtains to be used in network address
The second level domain liliu.efg.com of family b obtains receive information user using Request.QueryString [" receive "]
The domain name zhangsan.abc.com of a obtains the unique of requests verification using Request.QueryString [" CheckID "]
Then the value 6 of identifier column id searches unique identifier row id values as 6, transmission information user from the database or memory
Domain name be liliu.efg.com, the information record that the domain name of receive information user is zhangsan.abc.com, find
Afterwards, 1 or true is returned, is not found, returns to 0 or false.
The server of the transmission requests verification information of step S305, the user a receives the verification result information, according to
Verification result handles described information.
The server of the transmission requests verification information of the user a receives feedback information, if feedback information be 1 or
True then illustrates that sending information server has sent this information, then receives, preserves this information, and 1 or true of return,
After the transmission information server of user b receives return information, the state train value for updating the information record is 1, and expression has been sent
Success, other side have received.If feedback information is 0 or false, illustrate that sending information server does not send the information, in
The information is to give up, and returns to 0 or false.
Step S306, user's a Website logins, program search the information of user a receptions from database, return to lookup result
It is shown to user's a clients.
Fig. 4 shows in the embodiment of the present invention four the realization flow for receiving, sending information approach, mainly realizes step
For:
Step S401, the log-on message of user setting is submitted to server, is saved into database by client, and returns to note
Volume result information is to client.
For example, user a is registered on the www.abc.com of website, setting account is the information such as zhangsan, password, is confirmed
Afterwards, log-on message is submitted to server, is saved into database, returns to the information that succeeds in registration and gives user a.So web station system is account
The second level domain of number user for being zhangsan distribution is zhangsan.abc.com.User b is noted on the www.efg.com of website
Volume, setting account are the information such as liliu, password, and after confirmation, log-on message is submitted to server, are saved into database, return to note
Volume successful information gives user b.So web station system is that the second level domain for user's distribution that account is liliu is
liliu.efg.com。
Step S402, user b are inputted in the page sends information, the website service then registered by network address to user b
Device sends information.
The user b that account is liliu, second level domain is liliu.efg.com is not logged on website, to send information to account
Number it is zhangsan, the user a that second level domain is zhangsan.abc.com, user b input the letter to be sent in window interface
Title hello, content how are you, the second level domain zhangsan.abc.com of receive information user a are ceased, sends information
The second level domain liliu.efg.com of user b and the password for sending information user b, because user b is not logged on, with
Family b inputs account and password, is that requirement verifies that account by rear, could send information, institute to the Website server that user b is registered
After confirming submission, server pointed by program to the second level domain liliu.efg.com of user b sends solicited message, such as
It is that information is sent by network address http inquiry strings, then the network address of generation, inquiry string http://
liliu.efg.com/Title=hello&body=how are you&receive=zhangsan.abc.com&pwd=
123456, wherein, pwd is the password of sender's account, and receive is recipient's domain name.
Step S403, the user b servers receive described information, and then verification sends whether information user's account deposits
If it is present described information is saved into database and/or memory, breath of concurrently delivering letters.
After the server of user b receives information, server program (such as website homepage program) obtains second-level domain in network address
User b account liliu in name, letter is obtained using the c# programs Request.QueryString [" title "] in asp.net
Title is ceased, the information content is obtained using Request.QueryString [" body "], uses Request.QueryString ["
Receive "] the domain name zhangsan.abc.com of receive information user a is obtained, it uses Request.QueryString ["
Pwd "] obtain the password of transmission information user b.Then program searches account as liliu from customer data base, and password is
123456 account whether there is, if it does not exist, then returning to error message, otherwise send the information.Server program is incited somebody to action
To information be saved into database and/or caching, and create a unique identifier train value or an overall situation for information record
Unique identifier value (GUID).Information Record field includes identifier column, message header, the information content, sender's network address (such as
Www.efg.com), sender's account (such as liliu), sender's domain name (such as liliu.efg.com), recipient's network address be (such as
Www.abc.com), recipient's account (such as zhangsan), recipient's domain name (such as zhangsan.abc.eom), state word
Section.
The server of the transmission information of user b can pass through network address http://zhangsan.abc.com/Title=
Services of the hello&body=how are you&SendUser=liliu.efg.com&id=6 to the receive information of user a
Device sends information, wherein, id is unique identifier row, and SendUser represents the domain name of sender.
Step S404, the server receive the information that user b is sent to user a, then to the server for sending information
Send requests verification information.
After the server of user a receives user b transmission information, server program (such as website homepage program) obtains network address
User account zhangsan in middle second level domain uses the c# programs Request.QueryString [" in asp.net
Title "] message header is obtained, the information content is obtained using Request.QueryString [" body "], is used
Request.QueryString [" SendUser "] obtains sending the domain name liliu.efg.com of information user, uses
Request.QueryString [" id "] obtains the identifier train value 6 of this information record.Then network address http is passed through://
liliu.efg.com/Server from receive=zhangsan.abc.com&CheckID=6 to the transmission information of user b,
Send requests verification information.
The transmission information server of step S405, the user b receive the verification information, perform verification, return to verification
As a result.
After the transmission information server of the user b receives the verification information, server program (such as website homepage journey
Sequence) obtain network address in second level domain liliu.efg.com, connect using Request.QueryString [" receive "]
The domain name zhangsan.abc.com of information user is received, obtaining request using Request.QueryString [" CheckID "] tests
Then the value 6 of the unique identifier row id of card searches unique identifier row id values as 6, hair from the database or in memory
The information note that the domain name for sending information user is liliu.efg.com, the domain name of receive information user is zhangsan.abc.com
Record after finding, returns to 1 or true, otherwise returns to 0 or false,
The receive information server of step S406, the user a receives the verification result information, according to verification result,
Handle described information.
The server of the transmission requests verification of user a receives the verification result information of feedback, if feedback information be 1 or
True then illustrates that send information server has sent this information really, then preserves this information and enters database, and returns
After the transmission information server of 1 or true, user b receive return information, the state train value for updating the information record is 1, table
Show and sent success, other side has received.If feedback information is 0 or false, illustrate that sending information server does not have transmission should
Information in being to give up the information, and returns to 0 or false.
Step S407, user's a Website logins, program search the information for being sent to user a from database, return and search knot
Fruit shows to user's a clients.
For example, account is zhangsan, second level domain is the user a of zhangsan.abc.com in website
It is logged on www.abc.com, checks the information of reception, client sends the request for searching the receive information that account is zhangsan
It to server, after server receives request, is searched from database, and returns to lookup result to client, client receives
The lookup result, and shown in the page.
Fig. 5 shows present invention reception, the structure diagram for sending information system, which can be applied to electronic equipment,
Including computer, mobile electronic terminal, mobile phone etc..
Registration module 10 is used to the log-on message of user setting being submitted to first server 15, is saved into first server
Database 14, and registering result information is returned to client.
Sending module 11 sends information by network address for client to first server 15.
First server receiving module 12 is used to receive the information of the transmission of sending module 11, and information is saved into first service
Device database 14.
After checking that module 13 logs in first server 15 for the user, program is looked into from first server database 14
The information for being sent to the user is looked for, lookup result is returned and is shown to the user's client.
First server database 14, for storing the log-on message of user, the information that user sends, receives.
Fig. 6 shows another structure diagram for receiving, sending information system of the present invention, which can be applied to electronics and set
It is standby, including computer, mobile electronic terminal, mobile phone etc..
Registration module 10 is used to the log-on message of user setting being submitted to 19 and the 3rd server 20 of second server, protect
Second server database 22 or the 3rd server database 16 are stored in, and returns to registering result information to client.
Client sending module 11 sends information by network address for client to second server receiving module 23.
Second server receiving module 23 is used to receive the information of the transmission of sending module 11, and information is saved into second service
In device database 22 and/or memory.
Second server sending module 21 is used to send the information that second server receiving module 23 receives by network address
To the 3rd server receiving module 18.
3rd server receiving module 18 is used to receive the information of the transmission of second server sending module 21.
Authentication module 17 is used to the information that the 3rd server receiving module 18 receives being sent to second service by network address
Device receiving module 23 is verified, and obtains the verification result information of return, if the verification result returned for true, by the
The information that two server receiving modules 23 receive is saved into database, and returns to 1 or true to second server 19, if returned
Verification result for false, then abandon the information of the reception of second server receiving module 23, and 0 returned to second server 19
Or false.
Check module 13 for after the user login services device, program to search transmission from the 3rd server database 16
To the information of the user, return to lookup result and shown to the user's client.
Second server database 22, the 3rd server database 16 are used to store log-on message, the hair of user of user
It send, receive information.
In conclusion technical solution provided by the invention is convenient and easy, making can be by network address come mutually between website user
It mutually sends, receive information, makes to be in communication with each other between website user, network convenient for users is sent, receive information, is expanded
The propagation of the network information is opened up.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should all be included in the protection scope of the present invention.