CN102710528A - Terminal and method for adjusting sockets in terminal - Google Patents

Terminal and method for adjusting sockets in terminal Download PDF

Info

Publication number
CN102710528A
CN102710528A CN2012102118403A CN201210211840A CN102710528A CN 102710528 A CN102710528 A CN 102710528A CN 2012102118403 A CN2012102118403 A CN 2012102118403A CN 201210211840 A CN201210211840 A CN 201210211840A CN 102710528 A CN102710528 A CN 102710528A
Authority
CN
China
Prior art keywords
socket
terminal
sockets
new
created
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
CN2012102118403A
Other languages
Chinese (zh)
Other versions
CN102710528B (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201210211840.3A priority Critical patent/CN102710528B/en
Publication of CN102710528A publication Critical patent/CN102710528A/en
Application granted granted Critical
Publication of CN102710528B publication Critical patent/CN102710528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a terminal, which comprises a communication modem for transmitting data to the outer part of the terminal by using established sockets in the terminal, a transmission rate detection module for detecting the actual transmission rate of the communication modem and a socket amount adjustment module for adjusting the maximum socket amount supported by the terminal according to the actual transmission rate of the communication modem. Correspondingly, the invention also provides a method for adjusting the sockets in the terminal. Due to the technical scheme, the maximum socket amount supported by a system can be dynamically adjusted according to key network environment factors, such as a signal-to-noise ratio, which influence data communication, so that under the condition of bad network environment, the socket amount for transmitting data in parallel at an appointed moment is limited; and therefore, the transmission efficiency of the single socket is guaranteed, the data performance is improved, and the user experience is enhanced.

Description

Terminal and terminal socket method of adjustment
Technical field
The present invention relates to the network data communication technical field, in particular to a kind of terminal and a kind of terminal socket method of adjustment.
Background technology
In existing correlation technique; On the existing terminal for the establishment of socket (Socket); All be that fixing maximum number sockets (SocketMax) is set, when surpassing the number sockets of terminal system establishment, with the establishment and the attended operation that allow this time to socket; When the number sockets of safeguarding when terminal system reached current maximum number sockets, new socket was created, connection request will be placed in the waiting list, if there is socket to be destroyed, then begins establishment, connection request in the response queue in this case.In such technical scheme; Do not consider the influence of network environment, fix, under network efficiency height, the extraordinary situation of network speed as if the socket of creating to efficiency of transmission; Can support considerable socket parallel transmission simultaneously; If but this moment is too small for being provided with of maximum number sockets, then the operation requests of a lot of sockets will be placed in the formation, can't utilize current bandwidth fully; Low at network efficiency, under the situation of the non-constant of network speed, if the socket of creating is too much; Then the efficiency of transmission of each socket will be very low; Cause too much overtime re-transmission, cause experience problems such as webpage can't be opened, failure is sent in multimedia message, Online Video can't be play, have a strong impact on efficiency of transmission.
Therefore; Need a kind of new terminal socket adjustment technology; Can influence the key network environmental factor of data communication according to signal to noise ratio etc., the maximum number sockets that dynamic debugging system is supported, thus specifying the socket number of parallel transmission data constantly in the situation limit of network environment difference; Guarantee the efficiency of transmission of single socket, promote data performance and user experience.
Summary of the invention
Technical problem to be solved by this invention is; A kind of new terminal socket adjustment technology; Can influence the key network environmental factor of data communication according to signal to noise ratio etc., the maximum number sockets that dynamic debugging system is supported, thus specifying the socket number of parallel transmission data constantly in the situation limit of network environment difference; Guarantee the efficiency of transmission of single socket, promote data performance and user experience.
In view of this, the invention provides a kind of terminal, comprising: communication modem, use the socket of establishment in the said terminal, with the external transmission data at said terminal; The transmission rate detection module detects the actual transfer rate of said communication modem; The number sockets adjusting module according to the speed of the actual transfer rate of said communication modem, is adjusted the maximum number sockets that said terminal is supported.In this technical scheme; Through of the supervision of said transmission rate detection module for the actual transfer rate of said communication modem; The maximum quantity of the socket that the number sockets adjusting module can be realized allow creating for the terminal is in view of the above dynamically adjusted, and then reduces even avoid the transmission rate of single socket to receive change of network environment and the negative effect that brings.
In technique scheme, preferably, said transmission rate detection module obtains the signal to noise ratio and/or the error rate in the said communication modem, and confirms the actual transfer rate of said communication modem according to said signal to noise ratio and/or the said error rate.Particularly, said rate detection module detects said communication modem actual transfer rate, can realize through obtaining signal to noise ratio and/or the error rate of this communication modem in transmission course.When higher relatively the and/or error rate is relatively low when said signal to noise ratio; The network environment that be described this moment is better relatively; The actual transfer rate testing result of said communication modem will be higher relatively this moment, explain that the data transmission capabilities of this communication modem this moment is stronger; On the contrary; When relatively low the and/or error rate is higher relatively when said signal to noise ratio; The network environment that be described this moment is relatively poor relatively, this moment said communication modem the actual transfer rate testing result with relatively low, the data transmission capabilities that this communication modem at this moment be described a little less than.
In technique scheme; Preferably; The demand transmission rate of single socket in the preset said terminal of said number sockets adjusting module; And, adjust said maximum number sockets according to the actual transfer rate of said communication modem and the demand transmission rate of said single socket.Particularly; At first preestablish the demand transmission rate of single socket for this terminal according to factors such as job requirements in the reality and said terminal transmission performances; Afterwards; The actual transfer rate of the said communication modem that records according to said transmission rate module; Compare according to certain rule and said preset single socket demand transmission rate,, and then obtain the maximum number sockets that the current time terminal can be supported such as the ratio that can obtain the former with the latter.
In technique scheme, preferably, also comprise: the priority management module, according to the professional significance level of transmission data, for different sockets are provided with priority; The socket administration module; When the establishment number sockets in said terminal surpasses said maximum number sockets; That destroys said terminal creates the minimum one or more sockets of socket medium priority, so that the said number sockets of having created is less than or equals said maximum number sockets; And/or when in said terminal, exist creating the request of new socket; If the said number sockets of having created reaches said maximum number sockets; Then more said new socket and the said priority height of having created socket; If the said priority of the having created socket all priority than said new socket is high, then do not create said new socket, if the priority of the said new socket of priority ratio of said one or more sockets of having created socket is low; Create said new socket, and destroy the said minimum socket of socket medium priority of having created.In real work; Be not that all data transmission services all should solve according to the time sequencing that request occurs successively; The data transmission service request that produces in the back may be more important than some data transmission service requests that formerly produce for the execution of terminal current business or terminal use, hopes that this preferentially is processed in the data service request that the back produces.Given this; In said terminal, can add said priority management module divides according to its significance level for issuable all data transmission services in this terminal in advance; And be that its corresponding socket distributes priority according to this; And add said socket administration module; To guarantee surpassing said maximum number sockets, perhaps created and when having reached in all sockets of said socket maximum quantity at least one the higher pairing data transmission service of socket of priority and creating socket, destroyed the minimum socket of part (one or more) priority for the priority ratio that produces in the back in the said number sockets of having created; Thereby make the current maximum number sockets that can support in said terminal remain unchanged, and then guarantee the efficiency of transmission of single socket.
In technique scheme, preferably, said socket administration module is after confirming not create said new socket; Wait for to said when having created number sockets and being lower than said maximum number sockets; Respond described request again and create said new socket, after creating said new socket, generate the request of new establishment socket according to the socket of having destroyed; Wait for to said and when having created number sockets and being lower than said maximum number sockets, respond said new request again.Particularly; In the terminal; For creating the socket request, can handle with the mode that forms request queue, that is to say; When said socket administration module is confirmed be the new socket of the new request establishment of current appearance; Said new request will be put into by the terminal all formed formations of request of not creating corresponding socket and waited for according to certain rule (as according to the professional significance level of this request institute corresponding data),, just according to the current queue ordinal response and ask to create new socket accordingly when having created number sockets and being lower than said maximum number sockets up to said.In like manner; For the request that generates new establishment socket according to the socket of having destroyed; Also will be put into the described request formation according to above-mentioned rule waits for; Until said when having created number sockets and being lower than said maximum number sockets, again according to the corresponding request of current said queue sequence response.
The present invention also provides a kind of terminal socket method of adjustment, comprising: step 202, the actual transfer rate of communication modem in the sense terminals; Step 204 according to the speed of the actual transfer rate of said communication modem, is adjusted the maximum number sockets that said terminal is supported.In this technical scheme; The actual transfer rate that the variation of network environment sees through said communication modem obtains embodying; In view of the above; The maximum quantity of the socket that this scheme has realized allow creating for the terminal is dynamically adjusted, and then reduces even avoid the transmission rate of single socket to receive change of network environment and the negative effect that brings.
In technique scheme, preferably, said step 202 comprises: obtain the signal to noise ratio and/or the error rate in the said communication modem, and confirm the actual transfer rate of said communication modem according to said signal to noise ratio and/or the said error rate.Particularly, detect said communication modem actual transfer rate, can realize through obtaining the signal to noise ratio and/or the error rate of this communication modem in transmission course.When higher relatively the and/or error rate is relatively low when said signal to noise ratio; The network environment that be described this moment is better relatively; The actual transfer rate testing result of said communication modem will be higher relatively this moment, explain that the data transmission capabilities of this communication modem this moment is stronger; On the contrary; When relatively low the and/or error rate is higher relatively when said signal to noise ratio; The network environment that be described this moment is relatively poor relatively, this moment said communication modem the actual transfer rate testing result with relatively low, the data transmission capabilities that this communication modem at this moment be described a little less than.
In technique scheme, preferably, said step 204 comprises: the demand transmission rate of single socket in the preset said terminal; According to the actual transfer rate of said communication modem and the demand transmission rate of said single socket, adjust said maximum number sockets.Particularly; At first preestablish the demand transmission rate of single socket for this terminal according to factors such as job requirements in the reality and said terminal transmission performances; Afterwards, according to the actual transfer rate of the said communication modem that records, compare according to certain rule and said preset single socket demand transmission rate; Such as the ratio that can obtain the former with the latter, and then obtain the maximum number sockets that the current time terminal can be supported.
In technique scheme, preferably, also comprise: according to the professional significance level of transmission data, for different sockets are provided with priority; When the establishment number sockets in said terminal surpasses said maximum number sockets; That destroys said terminal creates the minimum one or more sockets of socket medium priority, so that the said number sockets of having created is less than or equals said maximum number sockets; And/or when in said terminal, exist creating the request of new socket; If the said number sockets of having created reaches said maximum number sockets; Then more said new socket and the said priority height of having created socket; If the said priority of the having created socket all priority than said new socket is high, then do not create said new socket, if the priority of the said new socket of priority ratio of said one or more sockets of having created socket is low; Create said new socket, and destroy the said minimum socket of socket medium priority of having created.In real work; Be not that all data transmission services all should solve according to the time sequencing that request occurs successively; The data transmission service request that produces in the back may be more important than some data transmission service requests that formerly produce for the execution of terminal current business or terminal use, hopes that this preferentially is processed in the data service request that the back produces.Given this; In said terminal, divide according to its significance level for issuable all data transmission services in this terminal in advance; And be that its corresponding socket distributes priority according to this; And in view of the above all sockets in this terminal are managed; To guarantee surpassing said maximum number sockets, perhaps created and when having reached in all sockets of said socket maximum quantity at least one the higher pairing data transmission service of socket of priority and creating socket, destroyed the minimum socket of part (one or more) priority for the priority ratio that produces in the back in the said number sockets of having created; Thereby make the current maximum number sockets that can support in said terminal remain unchanged, and then guarantee the efficiency of transmission of single socket.
In technique scheme, preferably, also comprise: after confirming not create said new socket, wait for to said when having created number sockets and being lower than said maximum number sockets, responding described request again and creating said new socket; After creating said new socket, generate the request of new establishment socket according to the socket of having destroyed, wait for to said when having created number sockets and being lower than said maximum number sockets, responding said new request again.Particularly; In the terminal; For creating the socket request, can handle with the mode that forms request queue, that is to say; When confirming be the new socket of the new request establishment of current appearance; Said new request will be put into by the terminal all formed formations of request of not creating corresponding socket and waited for according to certain rule (as according to the professional significance level of this request institute corresponding data),, just according to the current queue ordinal response and ask to create new socket accordingly when having created number sockets and being lower than said maximum number sockets up to said.In like manner; For the request that generates new establishment socket according to the socket of having destroyed; Also will be put into the described request formation according to above-mentioned rule waits for; Until said when having created number sockets and being lower than said maximum number sockets, again according to the corresponding request of current said queue sequence response.
Through above technical scheme; Can influence the key network environmental factor of data communication according to signal to noise ratio etc.; The maximum number sockets that dynamic debugging system is supported; Thereby the situation limit in the network environment difference is being specified the socket number of parallel transmission data constantly, guarantees the efficiency of transmission of single socket, promotes data performance and user experience.
Description of drawings
Fig. 1 shows the block diagram at terminal according to an embodiment of the invention;
Fig. 2 shows the flow chart of terminal socket method of adjustment according to an embodiment of the invention;
Fig. 3 shows the operation logic figure of the socket maximum quantity setting at terminal according to an embodiment of the invention;
Fig. 4 shows the socket visioning procedure figure at terminal according to an embodiment of the invention;
Fig. 5 shows the socket Shredding Process figure at terminal according to an embodiment of the invention.
Embodiment
In order more to be expressly understood above-mentioned purpose of the present invention, feature and advantage, the present invention is further described in detail below in conjunction with accompanying drawing and embodiment.Need to prove that under the situation of not conflicting, the application's embodiment and the characteristic among the embodiment can make up each other.
A lot of details have been set forth in the following description so that make much of the present invention; But; The present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention does not receive the restriction of following disclosed specific embodiment.
Fig. 1 shows the block diagram at terminal according to an embodiment of the invention.
As shown in Figure 1, the terminal 100 according to an embodiment of the invention, comprising: communication modem 102, use the socket of establishment in the said terminal 100, with the external transmission data at said terminal 100; Transmission rate detection module 104 detects the actual transfer rate of said communication modem; Number sockets adjusting module 106 according to the speed of the actual transfer rate of said communication modem, is adjusted the maximum number sockets that said terminal 100 is supported.In this technical scheme; Through of the supervision of said transmission rate detection module 104 for the actual transfer rate of said communication modem; The maximum quantity of the socket that number sockets adjusting module 106 can be realized allowing to create for terminal 100 is in view of the above dynamically adjusted, and then reduces even avoid the transmission rate of single socket to receive change of network environment and the negative effect that brings.
In technique scheme; Preferably; Said transmission rate detection module 104 obtains the signal to noise ratio and/or the error rate in the said communication modem, and confirms the actual transfer rate of said communication modem 102 according to said signal to noise ratio and/or the said error rate.Particularly, said rate detection module 104 detects said communication modem actual transfer rate, can realize through obtaining signal to noise ratio and/or the error rate of this communication modem 102 in transmission course.When higher relatively the and/or error rate is relatively low when said signal to noise ratio; The network environment that be described this moment is better relatively; The actual transfer rate testing result of said communication modem 102 will be higher relatively this moment, explain that the data transmission capabilities of this communication modem 102 this moment is stronger; On the contrary; When relatively low the and/or error rate is higher relatively when said signal to noise ratio; The network environment that be described this moment is relatively poor relatively, this moment said communication modem 102 the actual transfer rate testing result with relatively low, the data transmission capabilities that this communication modem 102 at this moment be described a little less than.
In technique scheme; Preferably; The demand transmission rate of single socket in the said number sockets adjusting module 106 preset said terminals 100; And, adjust said maximum number sockets according to the actual transfer rate of said communication modem 102 and the demand transmission rate of said single socket.Particularly; At first preestablish the demand transmission rate of single socket for this terminal 100 according to factors such as job requirements in the reality and said terminal 100 transmission performances; Afterwards; The actual transfer rate of the said communication modem 102 that records according to said transmission rate module 104; Compare according to certain rule and said preset single socket demand transmission rate,, and then obtain the maximum number sockets that current time terminal 100 can be supported such as the ratio that can obtain the former with the latter.
In technique scheme, preferably, also comprise: priority management module 108, according to the professional significance level of transmission data, for different sockets are provided with priority; Socket administration module 110; When the establishment number sockets in said terminal 100 surpasses said maximum number sockets; That destroys said terminal 100 creates the minimum one or more sockets of socket medium priority, so that the said number sockets of having created is less than or equals said maximum number sockets; And/or when in said terminal 100, exist creating the request of new socket; If the said number sockets of having created reaches said maximum number sockets; Then more said new socket and the said priority height of having created socket; If the said priority of the having created socket all priority than said new socket is high, then do not create said new socket, if the priority of the said new socket of priority ratio of said one or more sockets of having created socket is low; Create said new socket, and destroy the said minimum socket of socket medium priority of having created.In real work; Be not that all data transmission services all should solve according to the time sequencing that request occurs successively; The data transmission service request that produces in the back may be more important than some data transmission service requests that formerly produce for the user at the execution of terminal 100 current business or terminal 100, hopes that this preferentially is processed in the data service request that the back produces.Given this; In said terminal 100, can add said priority management module 108 divides according to its significance level for issuable all data transmission services in this terminal 100 in advance; And be that its corresponding socket distributes priority according to this; And add said socket administration module 110; To guarantee surpassing said maximum number sockets, perhaps created and when having reached in all sockets of said socket maximum quantity at least one the higher pairing data transmission service of socket of priority and creating socket, destroyed the minimum socket of part (one or more) priority for the priority ratio that produces in the back in the said number sockets of having created; Thereby make the said terminal 100 current maximum number sockets that can support remain unchanged, and then guarantee the efficiency of transmission of single socket.
In technique scheme, preferably, said socket administration module 108 is after confirming not create said new socket; Wait for to said when having created number sockets and being lower than said maximum number sockets; Respond described request again and create said new socket, after creating said new socket, generate the request of new establishment socket according to the socket of having destroyed; Wait for to said and when having created number sockets and being lower than said maximum number sockets, respond said new request again.Particularly; In terminal 100; For creating the socket request, can handle with the mode that forms request queue, that is to say; When said socket administration module 110 is confirmed be the new socket of the new request establishment of current appearance; Said new request will be put into by terminal 100 all formed formations of request of not creating corresponding socket and waited for according to certain rule (as according to the professional significance level of this request institute corresponding data),, just according to the current queue ordinal response and ask to create new socket accordingly when having created number sockets and being lower than said maximum number sockets up to said.In like manner; For the request that generates new establishment socket according to the socket of having destroyed; Also will be put into the described request formation according to above-mentioned rule waits for; Until said when having created number sockets and being lower than said maximum number sockets, again according to the corresponding request of current said queue sequence response.
Fig. 2 shows the flow chart of terminal socket method of adjustment according to an embodiment of the invention.
As shown in Figure 2, socket method of adjustment in terminal comprises: step 202, the actual transfer rate of communication modem in the sense terminals according to an embodiment of the invention; Step 204 according to the speed of the actual transfer rate of said communication modem, is adjusted the maximum number sockets that said terminal is supported.In this technical scheme; The actual transfer rate that the variation of network environment sees through said communication modem obtains embodying; In view of the above; The maximum quantity of the socket that this scheme has realized allow creating for the terminal is dynamically adjusted, and then reduces even avoid the transmission rate of single socket to receive change of network environment and the negative effect that brings.
In technique scheme, preferably, said step 202 comprises: obtain the signal to noise ratio and/or the error rate in the said communication modem, and confirm the actual transfer rate of said communication modem according to said signal to noise ratio and/or the said error rate.Particularly, detect said communication modem actual transfer rate, can realize through obtaining the signal to noise ratio and/or the error rate of this communication modem in transmission course.When higher relatively the and/or error rate is relatively low when said signal to noise ratio; The network environment that be described this moment is better relatively; The actual transfer rate testing result of said communication modem will be higher relatively this moment, explain that the data transmission capabilities of this communication modem this moment is stronger; On the contrary; When relatively low the and/or error rate is higher relatively when said signal to noise ratio; The network environment that be described this moment is relatively poor relatively, this moment said communication modem the actual transfer rate testing result with relatively low, the data transmission capabilities that this communication modem at this moment be described a little less than.
In technique scheme, preferably, said step 204 comprises: the demand transmission rate of single socket in the preset said terminal; According to the actual transfer rate of said communication modem and the demand transmission rate of said single socket, adjust said maximum number sockets.Particularly; At first preestablish the demand transmission rate of single socket for this terminal according to factors such as job requirements in the reality and said terminal transmission performances; Afterwards, according to the actual transfer rate of the said communication modem that records, compare according to certain rule and said preset single socket demand transmission rate; Such as the ratio that can obtain the former with the latter, and then obtain the maximum number sockets that the current time terminal can be supported.
In technique scheme, preferably, also comprise: according to the professional significance level of transmission data, for different sockets are provided with priority; When the establishment number sockets in said terminal surpasses said maximum number sockets; That destroys said terminal creates the minimum one or more sockets of socket medium priority, so that the said number sockets of having created is less than or equals said maximum number sockets; And/or when in said terminal, exist creating the request of new socket; If the said number sockets of having created reaches said maximum number sockets; Then more said new socket and the said priority height of having created socket; If the said priority of the having created socket all priority than said new socket is high, then do not create said new socket, if the priority of the said new socket of priority ratio of said one or more sockets of having created socket is low; Create said new socket, and destroy the said minimum socket of socket medium priority of having created.In real work; Be not that all data transmission services all should solve according to the time sequencing that request occurs successively; The data transmission service request that produces in the back may be more important than some data transmission service requests that formerly produce for the execution of terminal current business or terminal use, hopes that this preferentially is processed in the data service request that the back produces.Given this; In said terminal, divide according to its significance level for issuable all data transmission services in this terminal in advance; And be that its corresponding socket distributes priority according to this; And in view of the above all sockets in this terminal are managed; To guarantee surpassing said maximum number sockets, perhaps created and when having reached in all sockets of said socket maximum quantity at least one the higher pairing data transmission service of socket of priority and creating socket, destroyed the minimum socket of part (one or more) priority for the priority ratio that produces in the back in the said number sockets of having created; Thereby make the current maximum number sockets that can support in said terminal remain unchanged, and then guarantee the efficiency of transmission of single socket.
In technique scheme, preferably, also comprise: after confirming not create said new socket, wait for to said when having created number sockets and being lower than said maximum number sockets, responding described request again and creating said new socket; After creating said new socket, generate the request of new establishment socket according to the socket of having destroyed, wait for to said when having created number sockets and being lower than said maximum number sockets, responding said new request again.Particularly; In the terminal; For creating the socket request, can handle with the mode that forms request queue, that is to say; When confirming be the new socket of the new request establishment of current appearance; Said new request will be put into by the terminal all formed formations of request of not creating corresponding socket and waited for according to certain rule (as according to the professional significance level of this request institute corresponding data),, just according to the current queue ordinal response and ask to create new socket accordingly when having created number sockets and being lower than said maximum number sockets up to said.In like manner; For the request that generates new establishment socket according to the socket of having destroyed; Also will be put into the described request formation according to above-mentioned rule waits for; Until said when having created number sockets and being lower than said maximum number sockets, again according to the corresponding request of current said queue sequence response.
Fig. 3 shows the operation logic figure of the socket maximum quantity setting at terminal according to an embodiment of the invention.
As shown in Figure 3, the operation of the socket maximum quantity setting at terminal may further comprise the steps:
Step 302 calculates maximum socket according to the communication capacity of the communication modem at terminal and supports quantity;
Step 304, terminal are supported the numerical value that the maximum quantity of socket is set to obtain in the step 302;
Step 306, whether the recoverable amount of judging current terminal socket is greater than the maximum quantity that is provided with in the step 304: if then get into step 308; If not, end then is set;
Step 308 stops the data transmit-receive of the low socket of priority, and request queue is put in the request of the socket that the establishment that the pairing data transmission service of out-of-work socket is formed is new, and gets into step 306 once more.
Fig. 4 shows the socket visioning procedure figure at terminal according to an embodiment of the invention.
As shown in Figure 4, the flow process of the socket at terminal establishment may further comprise the steps according to an embodiment of the invention:
Step 402, new socket is created in request;
Step 404 judges whether the number sockets of current terminal establishment reaches the maximum number sockets of setting: if then get into step 412; If not, then get into step 406;
Step 406, the new socket of the establishment that foundation step 402 is asked;
Step 408, the current socket in terminal is possessed quantity and is added 1;
Step 410, the transmission data;
Step 412 judges that the priority of the pairing socket of data transmission service of current request is whether high than the socket priority of working: if then get into step 414; If not, then get into step 418;
Step 414, the data transmit-receive of the socket that the priority that stops to work is minimum, and get into step 416;
Step 416 is put into socket establishment request queue with the new socket establishment request that the pairing data transmission service of out-of-work socket generates, and is got into step 406;
Step 418., the request of the socket that the establishment of step 402 is new are put into socket and are created request queue, and get into step 404.
Fig. 5 shows the socket Shredding Process figure at terminal according to an embodiment of the invention.
As shown in Figure 5, the socket Shredding Process at terminal may further comprise the steps according to an embodiment of the invention:
Step 502, certain socket is destroyed in request;
Step 504 stops to ask in the step 502 transfer of data of the socket destroyed;
Step 506 is destroyed the socket of asking destruction in the step 502;
Step 508, the current socket in terminal are possessed number and are subtracted 1.
More than be described with reference to the accompanying drawings technical scheme of the present invention.Application through the present technique scheme; Can influence the key network environmental factor of data communication according to signal to noise ratio etc.; The maximum number sockets that dynamic debugging system is supported; Thereby the situation limit in the network environment difference is being specified the socket number of parallel transmission data constantly, guarantees the efficiency of transmission of single socket, promotes data performance and user experience.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a terminal is characterized in that, comprising:
Communication modem uses the socket of establishment in the said terminal, with the external transmission data at said terminal;
The transmission rate detection module detects the actual transfer rate of said communication modem;
The number sockets adjusting module according to the speed of the actual transfer rate of said communication modem, is adjusted the maximum number sockets that said terminal is supported.
2. terminal according to claim 1; It is characterized in that; Said transmission rate detection module obtains the signal to noise ratio and/or the error rate in the said communication modem, and confirms the actual transfer rate of said communication modem according to said signal to noise ratio and/or the said error rate.
3. terminal according to claim 1; It is characterized in that; The demand transmission rate of single socket in the preset said terminal of said number sockets adjusting module; And, adjust said maximum number sockets according to the actual transfer rate of said communication modem and the demand transmission rate of said single socket.
4. according to each described terminal in the claim 1 to 3, it is characterized in that, also comprise:
The priority management module is according to the professional significance level of transmission data, for different sockets are provided with priority;
The socket administration module; When the establishment number sockets in said terminal surpasses said maximum number sockets; That destroys said terminal creates the minimum one or more sockets of socket medium priority, so that the said number sockets of having created is less than or equals said maximum number sockets; And/or when in said terminal, exist creating the request of new socket; If the said number sockets of having created reaches said maximum number sockets; Then more said new socket and the said priority height of having created socket; If the said priority of the having created socket all priority than said new socket is high, then do not create said new socket, if the priority of the said new socket of priority ratio of said one or more sockets of having created socket is low; Create said new socket, and destroy the said minimum socket of socket medium priority of having created.
5. terminal according to claim 4 is characterized in that, said socket administration module is after confirming not create said new socket; Wait for to said when having created number sockets and being lower than said maximum number sockets; Respond described request again and create said new socket, after creating said new socket, generate the request of new establishment socket according to the socket of having destroyed; Wait for to said and when having created number sockets and being lower than said maximum number sockets, respond said new request again.
6. a terminal socket method of adjustment is characterized in that, comprising:
Step 202, the actual transfer rate of communication modem in the sense terminals;
Step 204 according to the speed of the actual transfer rate of said communication modem, is adjusted the maximum number sockets that said terminal is supported.
7. terminal according to claim 6 socket method of adjustment is characterized in that said step 202 comprises:
Obtain the signal to noise ratio and/or the error rate in the said communication modem, and confirm the actual transfer rate of said communication modem according to said signal to noise ratio and/or the said error rate.
8. terminal according to claim 6 socket method of adjustment is characterized in that said step 204 comprises:
The demand transmission rate of single socket in the preset said terminal;
According to the actual transfer rate of said communication modem and the demand transmission rate of said single socket, adjust said maximum number sockets.
9. terminal according to claim 6 socket method of adjustment is characterized in that, also comprises:
According to the professional significance level of transmission data, for different sockets are provided with priority;
When the establishment number sockets in said terminal surpasses said maximum number sockets; That destroys said terminal creates the minimum one or more sockets of socket medium priority, so that the said number sockets of having created is less than or equals said maximum number sockets; And/or
When in said terminal, having the request of creating new socket; If the said number sockets of having created reaches said maximum number sockets; Then more said new socket and the said priority height of having created socket; If the said priority of the having created socket all priority than said new socket is high, then do not create said new socket, if the priority of the said new socket of priority ratio of said one or more sockets of having created socket is low; Create said new socket, and destroy the said minimum socket of socket medium priority of having created.
10. terminal according to claim 9 socket method of adjustment is characterized in that, also comprises:
After confirming not create said new socket, wait for to said when having created number sockets and being lower than said maximum number sockets, responding described request again and creating said new socket;
After creating said new socket, generate the request of new establishment socket according to the socket of having destroyed, wait for to said when having created number sockets and being lower than said maximum number sockets, responding said new request again.
CN201210211840.3A 2012-06-25 2012-06-25 Terminal and method for adjusting sockets in terminal Active CN102710528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210211840.3A CN102710528B (en) 2012-06-25 2012-06-25 Terminal and method for adjusting sockets in terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210211840.3A CN102710528B (en) 2012-06-25 2012-06-25 Terminal and method for adjusting sockets in terminal

Publications (2)

Publication Number Publication Date
CN102710528A true CN102710528A (en) 2012-10-03
CN102710528B CN102710528B (en) 2015-06-24

Family

ID=46903097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210211840.3A Active CN102710528B (en) 2012-06-25 2012-06-25 Terminal and method for adjusting sockets in terminal

Country Status (1)

Country Link
CN (1) CN102710528B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631330A (en) * 2015-12-24 2016-06-01 上海市共进通信技术有限公司 Customized virtual machine method for limiting socket quantity of JAVA programs
CN107342951A (en) * 2017-06-21 2017-11-10 苏睿 Data transmission method and device
CN109076013A (en) * 2016-05-10 2018-12-21 华为技术有限公司 Packet switching service recognition methods and terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201887A (en) * 2010-03-23 2011-09-28 深圳市金蝶中间件有限公司 Method and device for controlling socket transmission rate

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201887A (en) * 2010-03-23 2011-09-28 深圳市金蝶中间件有限公司 Method and device for controlling socket transmission rate

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DIRTYSEA: "Linux配置支持高并发TCP连接(socket最大连接数)及优化内核参数", 《HTTP://WWW.DIRTYSEA.COM/FORUM.PHP?MOD=VIEWTHREAD&TID=1293》 *
胡文奇等: "森林防火监控中心的软件设计", 《中国科技论文在线》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631330A (en) * 2015-12-24 2016-06-01 上海市共进通信技术有限公司 Customized virtual machine method for limiting socket quantity of JAVA programs
CN109076013A (en) * 2016-05-10 2018-12-21 华为技术有限公司 Packet switching service recognition methods and terminal
US10917255B2 (en) 2016-05-10 2021-02-09 Huawei Technologies Co., Ltd. Packet switched service identification method and terminal
CN107342951A (en) * 2017-06-21 2017-11-10 苏睿 Data transmission method and device

Also Published As

Publication number Publication date
CN102710528B (en) 2015-06-24

Similar Documents

Publication Publication Date Title
CN108616596B (en) Block chain self-adaptive consensus method based on dynamic authorization and network environment perception
JP7058654B2 (en) Resource sharing methods, equipment and systems
CN102710554B (en) The service state detection method of distributed information system and distributed information system
US20170118579A1 (en) Method and apparatus for m2m device subscription
CN106572087B (en) Voice outbound system
CN104144098A (en) Information pushing method and system and pushing server equipment
WO2010148914A1 (en) Method and apparatus for creating dial-up service
KR101686073B1 (en) Method, management server and computer-readable recording medium for allowing client terminal to be provided with services by converting network topology adaptively according to characteristics of the services
CN110912972A (en) Service processing method, system, electronic equipment and readable storage medium
CN113938516A (en) Method and system for synchronously realizing transaction processing of heterogeneous system
CN102710528A (en) Terminal and method for adjusting sockets in terminal
CN203135901U (en) Encryption equipment management device
CN114036236A (en) Multi-gateway cluster system
CN101888412B (en) Video push processing method and system serving live broadcast of mobile terminal
CN108259605B (en) Data calling system and method based on multiple data centers
CN109600278A (en) A kind of data communications method, device, equipment and medium
CN103068052A (en) Dynamic configuration method and system of resources and portal server
CN101621526B (en) iSCSI method and apparatus for preventing useless connection from occupying system resources
CN105429900A (en) Method, device and system for bandwidth speed acceleration
CN103002038B (en) The processing method of elastic load equilibrium and device
CN105025273A (en) Building visible intercom system connection method, password setting method and system
CN102316138A (en) Client end and load balance method
US9185226B2 (en) Voicemail server monitoring/reporting via aggregated data
CN101436953B (en) Management method and processing module for on-line announcement message of network appliance
CN104954158A (en) Connection management method and connection pool control equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant