CN1195242A - Method for computer network asynchronous communication - Google Patents

Method for computer network asynchronous communication Download PDF

Info

Publication number
CN1195242A
CN1195242A CN97108875A CN97108875A CN1195242A CN 1195242 A CN1195242 A CN 1195242A CN 97108875 A CN97108875 A CN 97108875A CN 97108875 A CN97108875 A CN 97108875A CN 1195242 A CN1195242 A CN 1195242A
Authority
CN
China
Prior art keywords
communication
network
module
computer network
program
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
CN97108875A
Other languages
Chinese (zh)
Other versions
CN1102313C (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN97108875A priority Critical patent/CN1102313C/en
Publication of CN1195242A publication Critical patent/CN1195242A/en
Application granted granted Critical
Publication of CN1102313C publication Critical patent/CN1102313C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

An asynchronous communication method for computer network features that in a network terminal there is a communication module for communicating with other network terminals, and said communication module is composed of at least one communication management module for setting up connection parameters, creating connection and writing communication application programs, and at least one communication linke control module for treating the events occur during network connection and automatic restoration when network failure occurs. By setting up a parameter IsServer, a communication module can be used as either client module or server one.

Description

A kind of method of computer network asynchronous communication
The present invention relates to computer realm, relate in particular to a kind of method of computer network asynchronous communication.
The alleged fault of the present invention is meant the improper situation in the computer network asynchronous communication, and as connection failure, communicating interrupt sends data failure, receives data failure etc.
In existing computer network communication, visible " PC WORLD " (PC WORLD) 1996 the 8th phases of magazine of comparatively general communication implementation method are entitled as the article of " the Winsock programming is preliminary ".In the method that article is introduced, connection of every establishment just need be write a cover communication program; Have nothing in common with each other as the communication program of server end and communication program as client; A network failure takes place in communication, then ejects a message box by a MessageBox function on user interface, to the user prompt fault message, for example " connection failure ", " sending failure " etc.Program itself is not done any processing for fault, and just ends program running, gives the user with signalling trouble, waits for that the user handles.The user rule of thumb revises mistake after receiving fault prompting, fix a breakdown, and connects again, network operations such as transmission, reception.
The said method simple possible, practical in simple network communication, but there is following defective: the network failure prompting that (1) is frequent, make the user often be bothered, can not concentrate in the middle of the exploitation of application program, be not very abundant user for experience, and frequent fault prompting makes it feel at a loss as to what to do, even experienced user also is difficult to deal with numerous network failures; (2) communication failure is all discerned by using the Communication Layer program, makes application program very complicated, and especially in multi computer communication, the complexity of network communication bottom has more increased the complexity of application layer; (3) this method is in order to realize that same computer not only can be as client computer but also can be as the function of server, must establishment two overlap different programs, one cover is client program, one cover is server program, this computer has the function of client computer during the operation client program, and this computer has the function of server during the runtime server program.Such procedure quantity is very big, and is particularly evident in multi computer communication.
Purpose of the present invention, provide a kind of like this computer network communication method, promptly realize the function of client-server with identical program, realize client functionality or server capability for communication module simple, consistent application programming interfaces are provided, make more simple possible of function that communication module realizes server or client computer.
Another object of the present invention is to recover automatically when network failure takes place, and application program need not to handle network failure, is not subjected to the influence of network failure, guarantees the end user when carrying out communication, can shield network failure and is not disturbed.
For this reason, the invention provides a kind of computer network asynchronous communication method, realize client functionality and server side functionality with same set of communication module in each network terminal, described communication module comprises at least one communication management module and at least one communication link control module; The communication management module settings connects parameter, creates a connection, and writes the application communication program; The communication link control module is carried out and being connected of other network terminal, data transmit-receive, and when network failure takes place, recover automatically.
The operation of described automatically restoring fault may further comprise the steps:
(I) judge connection status attribute IsServer;
(II) if it is server end that result (I) represents this communication module, then carry out (III), otherwise, carry out (V);
(III) judge whether to exist one and intercept process;
(IV) if judged result (III) is intercepted process for there is one in oneself, then directly return; Otherwise, if judged result for there not being any process of intercepting, then begin one and intercept process, return then;
(V) carry out network again and connect, return then.
Effect of the present invention is embodied in the following aspects:
(1) all network event all conductively-closed get up, the user can not bothered by omnifarious network event notice.When network failure occurring, Automatic Program is recovered to handle, need not user intervention.Therefore, concerning the end user and or the developer, simplified operation.
(2) communication management need not be considered the complexity of network communication bottom, has simplified program widely, and the overall code amount reduces significantly, reduces to tens of row by original thousands of row, has reduced developer's workload widely.
(3) at an identical cover computer program different parameters is set, promptly can realizes the function of client computer or server respectively, both easy operating had reduced procedure quantity again greatly.
(4) be connected in order to carry out communication, only need in the communication management module, to be provided with the related parameter that has of this connection, call identical communication link control module then and get final product, have very strong versatility with different network terminals.
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.
Fig. 1 is a hierarchy schematic diagram of realizing the bitcom of the inventive method;
Fig. 2 A is that the communication management module is used to be provided with the schematic diagram that the interactive mode that connects parameter is provided with frame in the one embodiment of the invention;
Fig. 2 B is that the communication management module is used to create the schematic diagram that each interactive mode of using communication program is provided with frame in the one embodiment of the invention;
Fig. 2 C is the program frame schematic diagram of a communication applications program of communication management module creation in the embodiment of the invention;
Fig. 3 is the process chart that network failure recovers incident automatically;
Fig. 4 is the process chart that sends data event;
Fig. 5 is the processing general flow chart that receives data event;
Fig. 6 is the process chart that step 511 receives the packet header incident among Fig. 5;
Fig. 7 is the process chart that step 512 is determined bag total length incident among Fig. 5;
Fig. 8 is the flow chart that step 521 receives data among Fig. 5;
As shown in Figure 1, in the network terminal, usually the computer program relevant with communication is divided into application layer S100 and Communication Layer S200.Application layer is some application programs, is used to handle concrete business, as the test in the telecommunication system, maintenance, charging etc.; Communication Layer is some communication program modules (calling " communication module " in the following text), be used to realize and other network terminal between connection, the transmitting-receiving of data etc.On specific implementation, Communication Layer S200 can be divided into not only communication management layer S210 and communication link layer (but also be called " bottom of communicating by letter ") S220.Communication management layer program S210 comprises at least one communication management module, for example, S211 shown in Figure 1A, S212, three communication management modules of S213, these communication management module controls communication link layer programs are carried out data transmit-receive, the data that the received communication link layer is sent, offer application program, and the message that will connect on/off offers application program.The communication link layer is made up of one or more communication link control module, S221 shown in Fig. 1, S222, S223, three communication link control modules, each communication link control module is by communication link L1, L2, L3, the data of handling in the connection send and the reception incident, and network failure state and automatic the recovery are set when network failure takes place.In the present invention, each communication link control module S221, S222, the program code of S223 is just the same, and the communication link control module is general, can duplicate fully in different connections.
In communication module, be provided with an IsServer attribute, when IsServer is a true time, show that this communication module is as the server end module in this connects; When IsServer is a fictitious time, show that this communication module is as client modules in this connects.
In communication module, also be provided with one and show that whether unimpeded network connect connection status attribute IsHot, when IsHot is a true time, the expression network connects unimpeded, otherwise when IsHot is a fictitious time, the expression network connects and interrupts.
In existing network communications technology, in order to create a new connection, all need write the one-stage communication hypervisor again, the connection parameter is set, handle network event.In the inventive method, adopted a kind of interactive mode that the method for frame is set,, network has been set connects parameters by being similar to the mode of the lattice of filling in a form; Will handle network event corresponding to each, only need to activate the inlet of this incident in the frame that is provided with, just produce a handling procedure framework, when needs were handled this incident, the step that only needs to fill in concrete processing in corresponding program frame got final product.Fig. 2 A, 2B are that utilization the inventive method realizes two schematic diagrames that frame is set in the example of communication management.In Fig. 2 A, select different parameter hurdles, in terms by terms insert suitable value, promptly finished the setting of connection parameter.Fig. 2 B is provided with the inlet of part button.onrelease, when need are handled wherein one or more incidents, activate this event column, just can eject a program frame shown in Fig. 2 C, remaining thing only needs to insert concrete contents processing in framework and gets final product.
It more than is an example realizing communication management of the present invention, those skilled in the art are not difficult to find out, utilize thought of the present invention and method, frame is set can adopts other form, be provided with that each parameter hurdle, event column can increase and decrease as required in the frame, order also can be replaced arbitrarily.
After setting up parameter by said method and writing the part handling procedure of finishing, promptly call a linker getready.If the communication link control module is as client modules, then begin to be connected with the bipartite network terminal; If the communication link control module is as the server end module, then begins one and intercept process.The connection and the program of intercepting are well known to those skilled in the art, and do not describe in detail at this.
After the network successful connection, promptly carry out data transmit-receive, state setting, fault recovery by the communication link control module.The communication link control module is carried out aforesaid operations, is presented as the processing to some network events.Below the embodiment of the invention is handled network connect operating procedure unimpeded, that network connects incidents such as interruption, data transmission, Data Receiving and be explained in detail.
Network connects unimpeded incident
When network connects when unimpeded, communication link control module notice application management program is put the IsHot attribute for true, and the communication management module can be handled this incident, also can not handle.No matter whether the communication management module deals with, the communication link control module is all returned.When the network connection kept unimpeded, the IsHot attribute remained " very ".
Network connects disconnected event
It is a kind of network abnormality that network connects disconnection, thereby is a kind of of the present invention's alleged " fault ".The present invention connects being treated to of disconnected event to network and carries out network failure and recover automatically, and the treatment step that network failure recovers incident automatically as shown in Figure 3.The IsHot attribute at first is set for false, notification application.Then, carry out automatically restoring fault and handle, promptly automatically call linker getready again, rebulid a connection.In step 303, judge that this communication module is server end or client, if judge it is client, then carry out 306, again carry out a client and connect,, then continue to judge whether the network terminal has existed one and intercepted if judge it is server end, as existing, then do not deal with, directly return; Otherwise, if there is no, then produce a process of intercepting, return then.
Send data event
It is as follows that the network terminal is handled the transmission operation that data event comprised: as Fig. 4, at first the notification communication administration module carries out internal state and handles, and the transmission data mode is set.In step 402, a packet header is set, outgoing data can be left in (under the situation of regular length) in the packet header, also can will represent the numerical value and the out of Memory of outgoing data total length to leave in the packet header, 403, packet header is sent to the bipartite network terminal together with data to be sent.In step 404, if receive the answer signal of " finishing receiving " that the bipartite network terminal is beamed back within the predetermined time, then be provided with and be sent completely sign, finish this transmission; Otherwise, if in official hour, do not receive the answer signal of " finishing receiving ", showing that then network may break down, execution in step 406 is carried out error handling processing, and processing method is for carrying out automatic recovery incident as shown in Figure 3.
Receive data event
The present invention is that receiving course is divided into three kinds of states to receiving the processing of data event: receive the packet header state, receive data mode and abandon data mode, three kinds of Status Flags correspondingly are set, initial condition is for receiving the packet header state.When receiving the incident generation of data for one, at first judge the residing state of communication link control module according to Status Flag, different states is carried out the operation of different step.
In the embodiment shown in fig. 5, if step 500 is judged as the packet header state that receives that is in, then execution in step 511 and 512 operation.At first be to receive header data in step 511.Fig. 6 is the specific implementation of step 511.Step 601 is for getting packet header length.In the process that aforementioned communication management module creation connects, pre-set packet header length, step 601 promptly is to read this packet header length.In step 602, apply for that a buffering area is with temporary transient storage header data.Receive header data at last, leave in the buffering area, turn back to the step 512 of main-process stream then, determine the bag total length.Flow process shown in Figure 7 is the specific implementation of step 512, and its treatment step is: notifying communication hypervisor at first.As previously mentioned, in the step 302 that sends data event, will wrap the total length value and deposit packet header in.And in the communication management module, may be provided with a bag total length computing module (with the situation of calling in the following text 1), (with the situation of calling in the following text 2) may be set yet, step 702 promptly is to judge whether the communication management module has been provided with bag total length computing module, if be provided with, then execution in step 704, handle by the communication management module, go out to wrap total length according to the data computation in the packet header, and in step 705, check its legitimacy, check that promptly the bag total length whether more than or equal to packet header length, returns the bag total length that is calculated at last; If be not provided with, the length of then giving tacit consent to packet header is the bag total length, returns.
After determining the bag total length, for situation 1, equal to wrap the reception buffering area of total length in length of step 513 application, success or not according to application, reception data mode mark is set respectively or abandons the data mode mark, the communication link control module enters and receives data mode or abandon data mode; For situation 2, need not application reception buffering area in addition, directly the packet header buffering area is got final product as receiving buffering area, to put then and receive the data mode mark, the communication link control module enters the reception data mode.
If step 500 is judged as the reception data mode, then carry out 521, enter the flow process that receives data.As shown in Figure 8, at first duplicate data in the packet header.Other data that to send then deposit the reception buffering area in.After all receiving, the notification communication administration module.An automatic release mark is arranged in the communication management module, the true and false of automatic release mark is set, when communication management is provided with, then is defaulted as automatically and is released to " very " according to whether being necessary the data that keep buffering area.In step 805, judge automatic release mark, whether discharge this reception buffering area according to its " very " or " vacation " decision.Be provided with at last and finish receiving sign, the notification communication hypervisor is returned the flow process of Fig. 5.522, put and receive the packet header status indication, prepare to receive data next time.
Abandon data mode if step 500 is judged as, then carry out 531, abandon data processing automatically.For guaranteeing the integrality of next bag data, this step circulates to the data that received and abandons, till having abandoned this bag data.Put the packet header state that receives then, prepare to receive next bag data.
The software module that the above application program module, communication module, communication management module, communication link control module all are made up of computer program, the operation of above-mentioned each step also all is that the mode by computer program realizes.

Claims (12)

1, a kind of method of computer network asynchronous communication, in a network terminal, comprise the communication module that is used for carrying out communication, it is characterized in that: at least one communication management module and at least one communication link control module are set in described communication module with other network terminal; Described communication management module is used to be provided with the connection parameter, creates to connect, and writes communication applications program etc.; Described communication link program module is used for handling network and connects the variety of event that takes place, and recovers automatically when network failure takes place.
2, the method for computer network asynchronous communication as claimed in claim 1, it is characterized in that: an expression network also is set in described communication module connects whether unimpeded connection status attribute IsHot, put connection status attribute IsHot when unimpeded for true when network connects, put connection status attribute IsHot when disconnecting for false when network connects.
3, the method for computer network asynchronous communication as claimed in claim 1, its feature also is: describedly be provided with that to connect parameter, create steps such as connecting, write the communication applications program be to finish with the mode that interactive mode is provided with frame.
4, the method for computer network asynchronous communication as claimed in claim 3, it is characterized in that when selecting a communication applications program entry, promptly produce one and the corresponding program frame of described communication applications program, only need in described program frame, to write respective phases of operation and can finish writing of described communication applications program.
5, computer network asynchronous communication method as claimed in claim 4, its feature also is: be provided with one and show that this program module is the type attribute IsServer of server end or client in described communication management module, corresponding to type attribute IsServer value is true or false, so that described communication management module is respectively as server end module or client modules and carry out function corresponding.
6, the method for computer network asynchronous communication as claimed in claim 1, its feature also is: the following at least network event of described communication link program module handles: network connects unimpeded incident, network connects disconnected event, send data event, receive data event, the automatic recovery incident when breaking down.
7, the method for computer network asynchronous communication as claimed in claim 6, it is characterized in that: described communication link control module is handled the step that described network connects unimpeded incident and comprised at least: IsHot is changed to " very " with the connection status attribute, and the notification communication administration module.
8, the method for computer network asynchronous communication as claimed in claim 6 is characterized in that: the step that described communication link control module is handled described network connection disconnected event comprises:
IsHot is changed to vacation with the connection status attribute
The notification communication application program
Automatically recover.
9, the method for computer network asynchronous communication as claimed in claim 6, its feature also is: the step that described communication link control module is handled described transmission data event comprises:
A packet header is set
Send packet header and outgoing data bag
Judge whether to receive answer signal at the appointed time,, then be provided with and be sent completely sign, return then if receive; If do not receive, then carry out automatically restoring fault.
10, the method for computer network asynchronous communication as claimed in claim 6, its feature also is: when handling described reception data event accepting state is divided into: receive the packet header state, receive data mode and abandon data mode.
11, the method for computer network asynchronous communication as claimed in claim 6 is characterized in that: the operation of the described reception data event of described communication link program module handles comprises:
1) judges described communication link program module accepting state of living in;
2) if 1) judged result receive the packet header state for being in, then carry out following steps:
Receive packet header
Determine the bag total length
Application bag buffering area
Put the reception data mode respectively or abandon data mode according to the application success or not;
3) if 1) judged result for being in the reception data mode, then receive data step, put then and receive the packet header status indication;
4) if 1) judged result abandon data mode for being in, then circulation abandons current data packet, and the packet header state that receives is set then.
12, as the method for claim 1 or 6 or 8 described computer network asynchronous communications, it is characterized in that: the operation that described network failure recovers automatically may further comprise the steps:
(I) judge connection status attribute IsServer
(II) if it is server end that result (I) represents this communication module, then carry out (III), otherwise, carry out (V)
(III) judge whether to exist one and intercept process
(IV) if the judged result of III for existing one to intercept process, then directly return; Otherwise, if judged result intercept process for there not being any one, then begin one and intercept process, return then
(V) carry out network again and connect, return then.
CN97108875A 1997-04-03 1997-04-03 Method for computer network asynchronous communication Expired - Fee Related CN1102313C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN97108875A CN1102313C (en) 1997-04-03 1997-04-03 Method for computer network asynchronous communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN97108875A CN1102313C (en) 1997-04-03 1997-04-03 Method for computer network asynchronous communication

Publications (2)

Publication Number Publication Date
CN1195242A true CN1195242A (en) 1998-10-07
CN1102313C CN1102313C (en) 2003-02-26

Family

ID=5170717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN97108875A Expired - Fee Related CN1102313C (en) 1997-04-03 1997-04-03 Method for computer network asynchronous communication

Country Status (1)

Country Link
CN (1) CN1102313C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100356332C (en) * 2002-12-27 2007-12-19 清华大学 Radiation image network cooperative check system and its realizing method
CN100356333C (en) * 2002-12-27 2007-12-19 清华大学 Application program cooperative work, dicision system and its realizing method based on network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100356332C (en) * 2002-12-27 2007-12-19 清华大学 Radiation image network cooperative check system and its realizing method
CN100356333C (en) * 2002-12-27 2007-12-19 清华大学 Application program cooperative work, dicision system and its realizing method based on network

Also Published As

Publication number Publication date
CN1102313C (en) 2003-02-26

Similar Documents

Publication Publication Date Title
US5883939A (en) Distributed architecture for an intelligent networking coprocessor
CA1326302C (en) Methods and apparatus for software retrofitting
US4628508A (en) Computer of processor control systems
US5606600A (en) Generalized statistics engine for telephone network employing a network information concentrator
CA2294654C (en) Fault-tolerant java virtual machine
US5910984A (en) Fault tolerant service-providing apparatus for use in a telecommunications network
EP0964563B1 (en) Redundant call processing
US20020085696A1 (en) Methods and apparatus for call service processing
US6504923B1 (en) Intelligent network with distributed service control function
CN1102313C (en) Method for computer network asynchronous communication
CN1110927C (en) Device and method for configurating and updating services in telecommunication network
Friedman et al. Using group communication technology to implement a reliable and scalable distributed in coprocessor
CN1610350A (en) Business transmitting method based on soft exchange network
CN101170717B (en) A method and system for realizing license mechanism of mobile switching center in the pool
US6370654B1 (en) Method and apparatus to extend the fault-tolerant abilities of a node into a network
CN1097906C (en) Method for dynamically exchange for busineses on intellectural network
CN107330064A (en) A kind of method and system that small documents are created based on CIFS agreements
US7177920B1 (en) Method for configuring an upgraded administrative module computer in an electronic switching system
US6459786B1 (en) Call and connection control
CN100344202C (en) Method and device for realizing service processing unit backup in intelligent network system
Frieder et al. Dynamic program modification in telecommunications systems
Byun et al. A pattern language for communication protocols
CN1426196A (en) Self circulation method for program control exchanger
CN101155043A (en) Method for implementing terminal service program by telnet login mode
CN115801680A (en) Abnormal message processing method, device, equipment, medium and product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Applicant after: Huawei Technologies Co., Ltd.

Applicant before: Huawei Technology Co., Ltd., Shenzhen City

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SHENZHEN HUAWEI TECHNOLOGY CO., LTD TO: HUAWEI TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
DD01 Delivery of document by public notice

Addressee: Huawei Technologies Co., Ltd.

Document name: Notification to Pay the Fees

DD01 Delivery of document by public notice

Addressee: Huawei Technologies Co., Ltd.

Document name: Notification of Termination of Patent Right

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20030226

Termination date: 20140403