CN108228338A - One kind regards networked resources management method and system - Google Patents

One kind regards networked resources management method and system Download PDF

Info

Publication number
CN108228338A
CN108228338A CN201611201043.1A CN201611201043A CN108228338A CN 108228338 A CN108228338 A CN 108228338A CN 201611201043 A CN201611201043 A CN 201611201043A CN 108228338 A CN108228338 A CN 108228338A
Authority
CN
China
Prior art keywords
thread
networked terminals
handle
regarding
communication handle
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
CN201611201043.1A
Other languages
Chinese (zh)
Other versions
CN108228338B (en
Inventor
解君
沈军
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Visionvera International Information Technology Co Ltd
Original Assignee
Beijing Visionvera International Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Visionvera International Information Technology Co Ltd filed Critical Beijing Visionvera International Information Technology Co Ltd
Priority to CN201611201043.1A priority Critical patent/CN108228338B/en
Publication of CN108228338A publication Critical patent/CN108228338A/en
Application granted granted Critical
Publication of CN108228338B publication Critical patent/CN108228338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to regarding networking technology field, networked resources management method and system are regarded more particularly to one kind, solves the problems, such as that the prior art is high to the performance requirement of server CPU and memory.The above method is applied to regard in networking, including:Communication handle queue and inactive queue of task are monitored depending on networked server;Above-mentioned communication handle is initialized by the above-mentioned MAC Address regarding networked server and the MAC Address regarding networked terminals;Above-mentioned inactive queue of task is used for caching the pending resource request regarding networked terminals;If listening to setting event, the idle thread enabled in thread pool is worker thread, to handle above-mentioned setting event;When being disconnected depending on networked terminals, recycling is above-mentioned to regard the corresponding communication handle of networked terminals.The embodiment of the present invention reduces establishment and destroying threads, establishment and the resource overhead of destruction communication handle, therefore reduces the performance requirement to CPU and memory, while ensure that the safety of connection.

Description

One kind regards networked resources management method and system
Technical field
The present invention relates to regarding networking technology field, networked resources management method and system are regarded more particularly to one kind.
Background technology
With the fast development of the network technology, enterprise is also higher and higher to the performance requirement of high-performance server, especially It in peak period, faces ten thousand grades of users and accesses simultaneously, it is more likely that the degraded performances such as cause congestion, packet loss, processing speed slow are asked Topic.The scheme of existing high-performance server is to be asked by way of multithreading multinuclear to cope with a large amount of user mostly;So And there is the problem of high to server hardware requirement, especially high to the performance requirement of server CPU and memory.
Invention content
In view of the problem of above-mentioned performance requirement to CPU and memory is high, it is proposed that the embodiment of the present invention is in order to provide one kind The one kind for overcoming the above problem or solving the above problems at least partly regards networked resources management method and system.
To solve the above-mentioned problems, the embodiment of the invention discloses one kind to regard networked resources management method, and the method should For regarding in networking, including:
Communication handle queue and inactive queue of task are monitored depending on networked server;The communication handle regards connection by described The MAC Address of network server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for caching pending The resource request regarding networked terminals;
If listening to setting event, the idle thread enabled in thread pool is worker thread, to handle the setting thing Part;
When being disconnected depending on networked terminals, recycling is described to regard the corresponding communication handle of networked terminals.
Preferably, if described listen to setting event, the idle thread enabled in thread pool is worker thread, to handle The step of setting event, includes:
If listening to the corresponding resource request regarding networked terminals by communication handle, a sky in thread pool is enabled Idle thread is worker thread, and the resource request for regarding networked terminals is received and parsed through by the communication handle;
The resource request regarding networked terminals and corresponding communication handle are encapsulated, it is medium to be put into inactive queue of task It is pending;
If listening in the inactive queue of task has task arrival, enabling in thread pool idle thread is Worker thread by the corresponding communication handle of the task, handles the corresponding resource request of the task.
Preferably, it is described when being disconnected depending on networked terminals, regarding the corresponding communication handle of networked terminals described in recycling Step includes:
If listening to the corresponding disconnection regarding networked terminals by communication handle to ask, a sky in thread pool is enabled Idle thread handles described disconnect for worker thread and asks;
If listening to the disconnection regarding networked terminals by the communication handle to confirm, the communication handle is recycled simultaneously It is placed in the communication handle queue.
Preferably, the method further includes:
If the connection request received depending on networked server regarding networked terminals, a free time in thread pool is enabled Thread is worker thread, to handle the connection request;
The connection request for regarding networked terminals is received and parsed through, networked terminals will be regarded described in the connection request MAC Address and regarding networked terminals number, is compared with the information depending on networked terminals described in storage, confirms and described regards networking eventually The connection permission at end;
A communication handle is obtained from regarding connected network communication handle queue, according to the MAC Address regarding networked server The communication handle is initialized with the MAC Address regarding networked terminals, and pass through the communication handle return to allow what is networked Response.
Preferably, the method further includes:
If there is no idle thread in the thread pool, wait for until there is free idle thread;Wherein, the worker thread exists Idle thread is recovered as after being finished.
On the other hand, networked resources are regarded the embodiment of the invention also discloses one kind and manages system, the system is applied to regard In networking, including:
Module is monitored, for monitoring communication handle queue and inactive queue of task;The communication handle is regarded by described The MAC Address of networked server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for caching waiting to locate The resource request regarding networked terminals of reason;
Event processing module is set, if for listening to setting event, it is work to enable the idle thread in thread pool Thread, to handle the setting event;
Communication handle recycling module, for when being disconnected depending on networked terminals, recycling to be described corresponding regarding networked terminals Communication handle.
Preferably, the setting event processing module includes:
Resource request parsing module, if for listening to the corresponding resource request regarding networked terminals by communication handle, It is worker thread then to enable an idle thread in thread pool, and receiving and parsing through described regard by the communication handle networks eventually The resource request at end;
Resource request cache module, for the resource request regarding networked terminals and corresponding communication handle to be encapsulated, It is medium pending to be put into inactive queue of task;
Resource request processing module if having task arrival for listening in the inactive queue of task, enables line An idle thread in Cheng Chi is worker thread, and by the corresponding communication handle of the task, it is corresponding to handle the task Resource request.
Preferably, the handle recycling module includes:
Request processing module is disconnected, if being asked for listening to the corresponding disconnection regarding networked terminals by communication handle, It then enables in thread pool idle thread and the disconnection request is handled for worker thread;
Handle resets module, if confirming for listening to the disconnection regarding networked terminals by the communication handle, The communication handle is recycled to be placed in the communication handle queue.
Preferably, the system also includes:
Connection request processing module, if for the connection request received depending on networked server regarding networked terminals, The idle thread enabled in thread pool is worker thread, to handle the connection request;
It connects permission and confirms module, it, please by the connection for receiving and parsing through the connection request for regarding networked terminals MAC Address regarding networked terminals of described in asking and regarding networked terminals number, with regarded described in storage the information of networked terminals into Row compares, and confirms the connection permission for regarding networked terminals;
Communication handle acquisition module, for obtaining a communication handle from regarding connected network communication handle queue, according to described The communication handle is initialized depending on the MAC Address of networked server and the MAC Address regarding networked terminals, and is passed through described logical Letter handle return allows the response to network.
Preferably, the system also includes:
Thread management module if for not having idle thread in the thread pool, is waited for until there is free idle thread;Its In, the worker thread is recovered as idle thread after being finished.
The embodiment of the present invention includes advantages below:
The embodiment of the present invention applies the characteristic regarding networking, by creating the communication sentence of thread pool and multiplexing based on MAC Address Handle reduces establishment and destroying threads, establishment and destroys the resource overhead of communication handle, therefore reduces to CPU and memory Performance requirement, while ensure that the safety of connection.
Description of the drawings
Fig. 1 is a kind of networking schematic diagram for regarding networking of the present invention;
Fig. 2 is a kind of hardware architecture diagram of node server of the present invention;
Fig. 3 is a kind of hardware architecture diagram of access switch of the present invention;
Fig. 4 is that a kind of Ethernet association of the present invention turns the hardware architecture diagram of gateway;
Fig. 5 a are the schematic diagrames of technical solution of the embodiment of the present invention;
Fig. 5 b are another schematic diagrames of technical solution of the embodiment of the present invention;
Fig. 6 is a kind of flow chart regarding networked resources management method that the embodiment of the present invention one provides;
Fig. 7 is another flow chart for regarding networked resources management method provided by Embodiment 2 of the present invention;
Fig. 8 is a kind of structure diagram regarding networked resources management system that the embodiment of the present invention three provides;
Fig. 9 is the structure diagram that the another kind that the embodiment of the present invention four provides regards networked resources management system.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, it is below in conjunction with the accompanying drawings and specific real Applying mode, the present invention is described in further detail.
It is the important milestone of network Development depending on networking, is a real-time network, can realize HD video real-time Transmission, Push numerous the Internet, applications to HD video, high definition is face-to-face.
It, can be such as high in a network platform by required service depending on networking using real-time high-definition video switching technology Clear video conference, Intellectualized monitoring analysis, emergency command, digital broadcast television, delay TV, the Web-based instruction, shows video monitoring Field live streaming, VOD program requests, TV Mail, individual character recording (PVR), Intranet (manage) channel, intelligent video Broadcast Control, information publication by oneself The services such as etc. tens of kinds videos, voice, picture, word, communication, data are all incorporated into a system platform, by TV or Computer realizes that high-definition quality video plays.
For those skilled in the art is made to more fully understand the embodiment of the present invention, below to being introduced depending on networking:
Depending on networking, applied portion of techniques is as described below:
Network technology (Network Technology)
Network technology innovation depending on networking improves traditional ethernet (Ethernet), potential huge on network to face Video flow.(Circuit is exchanged different from simple network packet packet switch (Packet Switching) or lattice network Switching), Streaming demands are met using Packet Switching depending on networking technology.Has grouping depending on networking technology Flexible, the simple and low price exchanged, is provided simultaneously with quality and the safety assurance of circuit switching, it is virtually electric to realize the whole network switch type Road and the seamless connection of data format.
Switching technology (Switching Technology)
Two advantages of asynchronous and packet switch of Ethernet are used depending on networking, eliminating Ethernet under the premise of full compatibility lacks It falls into, has the end-to-end seamless connection of the whole network, direct user terminal directly carries IP data packets.User data is in network-wide basis It is not required to any format conversion.It is the more advanced form of Ethernet depending on networking, is a real-time exchange platform, can realizes at present mutually The whole network large-scale high-definition realtime video transmission that networking can not be realized pushes numerous Internet video applications to high Qinghua, unitizes.
Server technology (Server Technology)
It is different from traditional server, its Streaming Media depending on the server technology in networking and unified video platform Transmission be built upon it is connection-oriented on the basis of, data-handling capacity is unrelated with flow, communication time, and single network layer is with regard to energy Enough include signaling and data transmission.For voice and video business, handled depending on networking and unified video platform Streaming Media Complexity many simpler than data processing, efficiency substantially increase hundred times or more than traditional server.
Reservoir technology (Storage Technology)
The ultrahigh speed reservoir technology of unified video platform in order to adapt to the media content of vast capacity and super-flow and State-of-the-art real time operating system is employed, the programme information in server instruction is mapped to specific hard drive space, media Content is no longer pass through server, and moment is directly delivered to user terminal, and user waits for typical time to be less than 0.2 second.It optimizes Sector distribution greatly reduces the mechanical movement of hard disc magnetic head tracking, and resource consumption only accounts for the 20% of ad eundem IP internets, but The concurrent flow more than 3 times of traditional disk array is generated, overall efficiency promotes 10 times or more.
Network security technology (Network Security Technology)
Structural design depending on networking by servicing independent licence system, equipment and the modes such as user data is completely isolated every time The network security problem of puzzlement internet has thoroughly been eradicated from structure, antivirus applet, fire wall has not been needed to generally, has prevented black Visitor and the attack of virus, provide structural carefree secure network to the user.
Service innovative technology (Service Innovation Technology)
Business and transmission are merged by unified video platform, whether single user, private user or a net The sum total of network is all only primary automatic connection.User terminal, set-top box or PC are attached directly to unified video platform, obtain rich The multimedia video service of rich colorful various forms.Unified video platform is traditional to substitute with table schema using " menu type " Complicated applications program, and can use considerably less code that complicated application can be realized, and realize the new business innovation of " endless ".
Networking depending on networking is as described below:
It is a kind of central controlled network structure depending on networking, which can be Tree Network, Star network, ring network etc. class Type, but centralized control node is needed to control whole network in network on this basis.
As shown in Figure 1, it is divided into access net and Metropolitan Area Network (MAN) two parts depending on networking.
The equipment of access mesh portions can be mainly divided into 3 classes:Node server, access switch, terminal is (including various machines Top box, encoding board, memory etc.).Node server is connected with access switch, and access switch can be with multiple terminal phases Even, and Ethernet can be connected.
Wherein, node server is the node that centralized control functions are played in access net, can control access switch and terminal. Node server can directly be connected with access switch, can also directly be connected with terminal.
Similar, the equipment of metropolitan area mesh portions can also be divided into 3 classes:Metropolitan area server, node switch, node serve Device.Metropolitan area server is connected with node switch, and node switch can be connected with multiple node servers.
Wherein, node server is the node server for accessing mesh portions, i.e. node server had both belonged to access wet end Point, and belong to metropolitan area mesh portions.
Metropolitan area server is the node that centralized control functions are played in Metropolitan Area Network (MAN), can control node switch and node serve Device.Metropolitan area server can be directly connected to node switch, can also be directly connected to node server.
It can be seen that be entirely a kind of central controlled network structure of layering depending on networking network, and node server and metropolitan area The network controlled under server can be the various structures such as tree-shaped, star-like, cyclic annular.
Visually claim, access mesh portions can form unified video platform (empty thiol point), and multiple unified videos are put down Platform can be formed regarding networking;Each unified video platform can be interconnected by metropolitan area and wide area depending on networking.
Classify depending on networked devices
1.1 embodiment of the present invention can be mainly divided into 3 classes depending on the equipment in networking:Server, interchanger is (including ether Net gateway), terminal (including various set-top boxes, encoding board, memory etc.).Depending on networking can be divided on the whole Metropolitan Area Network (MAN) (or National net, World Wide Web etc.) and access net.
The equipment of 1.2 wherein access mesh portions can be mainly divided into 3 classes:Node server, access switch is (including ether Net gateway), terminal (including various set-top boxes, encoding board, memory etc.).
The particular hardware structure of each access network equipment is:
Node server:
As shown in Fig. 2, mainly include Network Interface Module 201, switching engine module 202, CPU module 203, disk array Module 204;
Wherein, Network Interface Module 201, the Bao Jun that CPU module 203, disk array module 204 are come in enter switching engine Module 202;Switching engine module 202 to the packet come in look into the operation of address table 205, so as to obtain the navigation information of packet; And the packet is stored according to the navigation information of packet the queue of corresponding pack buffer 206;If the queue of pack buffer 206 approaches It is full, then it abandons;All pack buffer queues of 202 poll of switching engine mould, are forwarded if meeting the following conditions:1) port It is less than to send caching;2) the queue package counting facility is more than zero.Disk array module 204 mainly realizes the control to hard disk, including The operations such as initialization, read-write to hard disk;CPU module 203 is mainly responsible between access switch, terminal (not shown) Protocol processes, to address table 205 (including descending protocol packet address table, uplink protocol package address table, data packet addressed table) Configuration and, the configuration to disk array module 204.
Access switch:
As shown in figure 3, mainly include Network Interface Module (downstream network interface module 301, uplink network interface module 302), switching engine module 303 and CPU module 304;
Wherein, the packet (upstream data) that downstream network interface module 301 is come in is into packet detection module 305;Packet detection mould Whether mesh way address (DA), source address (SA), type of data packet and the packet length of the detection packet of block 305 meet the requirements, if met, Corresponding flow identifier (stream-id) is then distributed, and enters switching engine module 303, is otherwise abandoned;Uplink network interface mould The packet (downlink data) that block 302 is come in is into switching engine module 303;The data packet that CPU module 204 is come in enters switching engine Module 303;Switching engine module 303 to the packet come in look into the operation of address table 306, so as to obtain the navigation information of packet; It is gone if the packet into switching engine module 303 is downstream network interface toward uplink network interface, with reference to flow identifier (stream-id) packet is stored in the queue of corresponding pack buffer 307;If the queue of the pack buffer 307 is close full, It abandons;If the packet into switching engine module 303 is not that downstream network interface is gone toward uplink network interface, according to packet Navigation information is stored in the data packet queue of corresponding pack buffer 307;If the queue of the pack buffer 307 is close full, Then abandon.
All pack buffer queues of 303 poll of switching engine module, are divided to two kinds of situations in embodiments of the present invention:
It is gone if the queue is downstream network interface toward uplink network interface, meets the following conditions and be forwarded:1) It is less than that the port sends caching;2) the queue package counting facility is more than zero;3) token that rate control module generates is obtained;
It is gone if the queue is not downstream network interface toward uplink network interface, meets the following conditions and be forwarded: 1) it is less than to send caching for the port;2) the queue package counting facility is more than zero.
Rate control module 208 is configured by CPU module 204, to all downlink networks in programmable interval The pack buffer queue that interface is gone toward uplink network interface generates token, to control the code check of forwarded upstream.
CPU module 304 is mainly responsible for the protocol processes between node server, configuration to address table 306 and, Configuration to rate control module 308.
Ethernet association turns gateway
As shown in figure 4, mainly include Network Interface Module (downstream network interface module 401, uplink network interface module 402), switching engine module 403, CPU module 404, packet detection module 405, rate control module 408, address table 406, Bao Huan Storage 407 and physics add module 409, physics removing module 410.
Wherein, the data packet that downstream network interface module 401 is come in enters packet detection module 405;Packet detection module 405 is examined The Ethernet physics DA of measured data packet, Ethernet physics SA, Ethernet length or frame type, regarding networking mesh way address DA, whether meet the requirements depending on networking source address SA, depending on networking data Packet type and packet length, corresponding stream is distributed if meeting Identifier (stream-id);Then, physics DA, physics SA, length or frame are subtracted by physics removing module 410 Type (2byte), and enter corresponding order caching, otherwise abandon;
Downstream network interface module 401 detects the transmission caching of the port, if there is Bao Ze regarding with networking mesh according to packet Address D A knows the Ethernet physics DA of corresponding terminal, adds the Ethernet physics DA of terminal, Ethernet assists the object for turning gateway SA, Ethernet length or frame type are managed, and is sent.
The function that Ethernet association turns other modules in gateway is similar with access switch.
Terminal:
Mainly include Network Interface Module, Service Processing Module and CPU module;For example, set-top box mainly connects including network Mouth mold block, video/audio encoding and decoding engine modules, CPU module;Encoding board mainly includes Network Interface Module, video encoding engine Module, CPU module;Memory mainly includes Network Interface Module, CPU module and disk array module.
The equipment of 1.3 metropolitan area mesh portions can be mainly divided into 2 classes:Node server, node switch, metropolitan area server. Wherein, node switch mainly includes Network Interface Module, switching engine module and CPU module;Metropolitan area server mainly includes Network Interface Module, switching engine module and CPU module are formed.
2nd, regarding networking data package definition
2.1 access network data package definitions
The data packet for accessing net mainly includes following sections:Destination address (DA), source address (SA), reserve bytes, payload(PDU)、CRC。
As shown in the table, the data packet for accessing net mainly includes following sections:
DA SA Reserved Payload CRC
Wherein:
Destination address (DA) is made of 8 bytes (byte), and first character section represents type (such as the various associations of data packet Discuss packet, multicast packet, unicast packet etc.), be up to 256 kinds of possibility, the second byte to the 6th byte is metropolitan area net address, Seven, the 8th bytes are access net address;
Source address (SA) is also to be made of 8 bytes (byte), is defined identical with destination address (DA);
Reserve bytes are made of 2 bytes;
Payload parts have different length according to the type of different datagrams, if being if various protocol packages 64 bytes, if single group unicast packets words be 32+1024=1056 byte, be not restricted to certainly more than 2 kinds;
CRC is made of 4 bytes, and computational methods follow the Ethernet CRC algorithm of standard.
2.2 Metropolitan Area Network (MAN) packet definitions
The topology of Metropolitan Area Network (MAN) is pattern, may there is 2 kinds, connection even of more than two kinds, i.e. node switching between two equipment 2 kinds can be all can exceed that between machine and node server, node switch and node switch, node switch and node server Connection.But the metropolitan area net address of metropolitan area network equipment is unique, is closed to accurately describe the connection between metropolitan area network equipment System, introduces parameter in embodiments of the present invention:Label uniquely describes a metropolitan area network equipment.
(Multi-Protocol Label Switch, multiprotocol label are handed over by the definition of label and MPLS in this specification Change) label definition it is similar, it is assumed that between device A and equipment B there are two connect, then data packet slave device A to equipment B just There are 2 labels, data packet slave device B to device A also there are 2 labels.Label is divided into label, outgoing label, it is assumed that data packet enters The label (entering label) of device A is 0x0000, and the label (outgoing label) when this data packet leaves device A may reform into 0x0001.The networking flow of Metropolitan Area Network (MAN) is to enter network process under centralized Control, also means that address distribution, the label of Metropolitan Area Network (MAN) Distribution is all dominated by metropolitan area server, and node switch, node server are all passive execution, this point with The label distribution of MPLS is different, and the distribution of the label of MPLS is the result that interchanger, server are negotiated mutually.
As shown in the table, the data packet of Metropolitan Area Network (MAN) mainly includes following sections:
DA SA Reserved Label Payload CRC
That is destination address (DA), source address (SA), reserve bytes (Reserved), label, payload (PDU), CRC.Its In, the form of label, which can refer to, to be defined as below:Label is 32bit, wherein high 16bit retains, only with low 16bit, its position Put is between the reserve bytes and payload of data packet.
Based on the above-mentioned characteristic regarding networking, with reference to Fig. 5 a and Fig. 5 b, it is proposed that one of the core concepts of the embodiments of the present invention, The embodiment of the present invention is applied to regard networked server and multiple scenes regarding networked terminals, it then follows regarding the agreement of networking, by making With reusable communication handle (above-mentioned communication handle is based on the MAC Address regarding networked server and the MAC Address regarding networked terminals), Reduce the resource overhead that establishment is brought with destroying communication handle, and in the thread pool by being created in server initiation Thread monitor and safeguard the queue of reusable communication handle and inactive queue of task, equally reduce establishment and destroying threads The resource overhead brought;Further, with reference to shown in Fig. 5 b, during establishing and connecting, by the thread in thread pool to The networked terminals that regard of application connection distribute communication handle, and above-mentioned communication handle is recycled after disconnecting.
Embodiment one:
With reference to shown in Fig. 6, the embodiment of the present invention one provides one kind and regards networked resources management method, and the method is applied to Depending in networking, including step 601-603:
Step 601:Communication handle queue and inactive queue of task are monitored depending on networked server;The communication handle passes through The MAC Address regarding networked server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for delaying Deposit the pending resource request regarding networked terminals.
The main thread regarding networked server monitors communication handle queue and inactive queue of task;The communication handle It is initialized by the MAC Address regarding networked server and the MAC Address regarding networked terminals, the MAC Address, that is, hardware Location, this is because regarding networking characteristic determine because using interchanger depending on the connection in networking, and interchanger is operated in number more According to link layer, and it is connection safety using the advantages of MAC Address, invalid user stealing Internet resources can be prevented;It is described to wait to locate Reason task queue is used for caching the pending resource request regarding networked terminals, and the money of high concurrent in the short time can be effectively treated It asks in source.
During the initialization regarding networked server, need to create communication handle queue in case using, that is, Shen in advance Please memory source, the communication handle needs MAC Address by regarding networked server and regarding at the beginning of the MAC Address of networked terminals comes Beginningization.
During the initialization regarding networked server, it is also necessary to create thread pool by host process, can repair according to actual needs Change the quantity of created thread pool thread, and can determine the quantity of thread according to the core of CPU under normal circumstances, example If core cpu number is N, then for compute-intensive applications, number of threads can be N+1, for I/O intensive type application, thread Quantity can be 2N+1.Some relevant initialization operations are also done during thread pool is created, for example are treated described in establishment Task queue is handled, addition mutex (is equivalent to unlock with locking, for ensureing thread-safe, avoids two or more threads Will not be by concurrent invocation) or semaphore (it is similary to be used for ensureing thread-safe, it is used for when there is task arrival, main thread is used for calling out Worker thread in awake thread pool);Resource request can be placed in inactive queue of task thread pool during the work time, work as master Thread is listened in inactive queue of task and can just be handled when having task arrival, such as can wake up the sky in thread pool Idle thread carries out task processing.
Step 602:If listening to setting event, the idle thread enabled in thread pool is worker thread, to handle State setting event.
If the main thread depending on networked server listens to setting event, the idle line in the thread pool is waken up Journey, starts the idle thread as worker thread, and the setting event is handled by the worker thread.The setting event can be with Event including resource request further includes the event that task reaches in inactive queue of task, can also include other events.One As, after the worker thread is finished, being just recycled in thread pool becomes idle thread.The monitoring can pass through prison The communication handle in the communication handle queue is listened, to listen to resource request event or connection disconnected event, can also be led to It crosses and monitors the inactive queue of task to listen to corresponding semaphore, that is, listen to the arrival of task, i.e., can account at this time The task is handled with cpu resource.
For example, for the CPU of four cores, four threads can be run simultaneously, if listening to the resource regarding networked terminals A Request, then idle thread 1 is waken up as worker thread 1 in thread pool, for parsing and caching the resource request, i.e., will described in Resource request is encapsulated as task A with corresponding communication handle, and is positioned in the inactive queue of task, then the work Thread 1 is recovered as idle thread;And in 1 operational process of worker thread, appoint if listening in inactive queue of task It is engaged in the arrival of B, then idle thread 2 is waken up as worker thread 2 in thread pool, and the worker thread 2 handles the task B, obtains Corresponding resource request and communication handle are obtained, the resource request is handled, corresponding resource data can be found and passed through logical Believe that handle returns to the resource data, and is recovered as idle thread after the completion of performing;If listen to inactive queue of task The arrival of middle task A, then idle thread 3 is waken up as worker thread 3 in thread pool, to handle the task A;The thread 3 Can be the thread 2 or other threads being in idle condition;It is not intended to limit the line for parsing the resource request Journey, the thread of resource request corresponding with handling the task is same thread.
Step 603:When being disconnected depending on networked terminals, recycling is described to regard the corresponding communication handle of networked terminals.
When being disconnected depending on networked terminals, described regard regards the corresponding communication sentence of networked terminals described in networked server recycling Handle.Usually, the communication handle for regarding networked terminals can be monitored by the main thread regarding networked server, listened to Request is disconnected, described disconnect can be handled by the thread in thread pool and is asked, and recycle the communication handle.
The embodiment of the present invention includes advantages below:
The embodiment of the present invention applies the characteristic regarding networking, by creating the communication sentence of thread pool and multiplexing based on MAC Address Handle reduces establishment and destroying threads, establishment and destroys the resource overhead of communication handle, therefore reduces to CPU and memory Performance requirement, while ensure that the safety of connection.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of action group It closes, but those skilled in the art should know, the embodiment of the present invention is not limited by described sequence of movement, because according to According to the embodiment of the present invention, certain steps may be used other sequences or be carried out at the same time.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented Necessary to example.
Embodiment two:
With reference to shown in Fig. 7, the embodiment of the present invention two provides one kind and regards networked resources management method, and the method is applied to Depending in networking, including step 701-709:
Step 701:If the connection request received depending on networked server regarding networked terminals, enables in thread pool One idle thread is worker thread, to handle the connection request.
If the main thread depending on networked server receives the connection request regarding networked terminals, enable in thread pool One idle thread is worker thread, to handle the connection request;The connection request includes the MAC for regarding networked terminals Address and regarding networked terminals number, the MAC Address regarding networked terminals and described regards networked terminals number regarding networked terminals All it is unique, is corresponded with the networked terminals that regard, as the mark regarding networked terminals.
Step 702:The connection request for regarding networked terminals is received and parsed through, connection will be regarded described in the connection request The MAC Address of network termination and regarding networked terminals number, is compared with the information depending on networked terminals described in storage, described in confirmation Depending on the connection permission of networked terminals.
Worker thread in the thread pool depending on networked server receives and parses through the connection request for regarding networked terminals, Obtain it is described regarding the MAC Address of networked terminals and regarding networked terminals number in the connection request, and according to it is described regard networking The MAC Address of terminal searches the corresponding of storage and regards networked terminals number or regard networked terminals number searching pair according to described The MAC Address regarding networked terminals answered, finds the corresponding information regarding networked terminals of storage in a word, and is compared, If the MAC Address, the networked terminals number that regards are identical with the corresponding informance of storage, confirm described regarding networked terminals With connection permission, step 703 is performed;If the MAC Address, it is described have any difference depending on networked terminals number, confirm It is described not connect permission depending on networked terminals, then terminate.
Step 703:A communication handle is obtained from regarding connected network communication handle queue, according to described regarding networked server MAC Address and the MAC Address regarding networked terminals initialize the communication handle, and pass through the communication handle and return to permission The response of networking.
Worker thread in the thread pool depending on networked server obtains one from depending on connected network communication handle queue not to be had The communication handle being initialised, it is initial according to the MAC Address regarding networked server and the MAC Address regarding networked terminals Change the communication handle, it is certainly, described to be identified depending on networked terminals with connection permission;Then it is returned by the communication handle Return the response for allowing to network.
Step 704:Communication handle queue and inactive queue of task are monitored depending on networked server;The communication handle passes through The MAC Address regarding networked server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for delaying Deposit the pending resource request regarding networked terminals.
Step 705:If listening to the corresponding resource request regarding networked terminals by communication handle, enable in thread pool An idle thread for worker thread, the resource request for regarding networked terminals is received and parsed through by the communication handle.
If listening to the resource request regarding networked terminals corresponding to the communication handle by communication handle, line is enabled An idle thread in Cheng Chi is worker thread, and the resource for regarding networked terminals is received and parsed through by the communication handle Request.
Step 706:The resource request regarding networked terminals and corresponding communication handle are encapsulated, are put into waiting task Queue is medium pending.
The worker thread encapsulates the resource request regarding networked terminals and corresponding communication handle, is put into pending Task queue is medium pending, i.e., caches the resource request.Usually, it is in order to cope with the demand of high concurrent, task is temporary When to be cached to inactive queue of task medium pending.
Step 707:If listening in the inactive queue of task has task arrival, a sky in thread pool is enabled Idle thread is worker thread, by the corresponding communication handle of the task, handles the corresponding resource request of the task.
If the main thread depending on networked server, which is listened in the inactive queue of task, task arrival, enable An idle thread in thread pool is worker thread, by the corresponding communication handle of the task, handles the task and corresponds to Resource request, such as the corresponding data of the resource request can be extracted, and by the corresponding number of the resource request It is packaged and sends out according to according to the networked terminals number (address of the corresponding target terminal) that regards of the target terminal in the resource request It sees off;The corresponding data of the resource request can be extracted from the resource request, i.e., please from the resource The source terminal asked, can also be by described depending on being extracted in networked server or other forms;By institute after the completion of task Task is stated to delete from the inactive queue of task.
In this practical application, networking is regarded as the network with centralized control functions, including main control server and undernet Equipment, the undernet equipment include terminal, are depending on one of core idea of networking, by notifying to exchange by main control server Equipment is directed to when time downstream communications link of service is with table, and the table for being then based on the configuration carries out the transmission of data packet.
That is, include depending on the communication means in networking:
Main control server (described regarding networked server in such as embodiment of the present invention) configuration is when time downlink communication of service Link;
By the corresponding data packet of the resource request, target terminal is sent to according to the downstream communications link.
In embodiments of the present invention, configuration is worked as time downstream communications link of service and is included:Notice is led to when time downlink of service Believe that the switching equipment involved by link matches table;
Furthermore, include according to downstream communications link transmission:Inquiry table be configured, switching equipment is to being received Data packet is transmitted by corresponding port.
In the concrete realization, service includes unicast communication service and Multicast Communication Service.I.e. either cast communication is still Unicast communication, can use it is above-mentioned with table-realize the communication regarded in networking with the core idea of table.
As previously mentioned, including access mesh portions regarding networking net, in access is netted, which is node server, Undernet equipment includes access switch and terminal.
For the unicast communication service during access is netted, the main control server configuration is when time downlink communication chain of service The step of road, may comprise steps of:
Sub-step S11, for main control server according to the resource request, time downstream communications link information of service is worked as in acquisition, Downstream communications link information includes, and participates in the downstream communication ports information when time main control server of service and access switch;
Sub-step S12, downstream communication ports information of the main control server according to control server, data packet inside it The downlink port that setting is oriented to when time data packet of service in the table of location;And the downstream communication ports according to access switch are believed Breath, to corresponding access switch sending port configuration order;
Sub-step S13, access switch according in port configuration command data packet addressed table inside it, setting when time The downlink port that the data packet of service is oriented to.
For the Multicast Communication Service during access is netted, main control server obtains the downstream communications link letter when time service The step of breath, can include following sub-step:
Sub-step S21, main control server obtain the resource request of application Multicast Communication Service, and resource request includes service The access net address of type information, service content information and target terminal;Wherein, service content information includes service number;
Sub-step S22, main control server according to the service number in preset content-address mapping table, extraction source The access net address of terminal;
Sub-step S23, main control server obtains the corresponding multicast address of source terminal, and distributes to target terminal;And according to According to the access net address of service type information, source terminal and target terminal, obtain when the communication link information of time multicast services.
Step 708:If listening to the corresponding disconnection regarding networked terminals by communication handle to ask, enable in thread pool An idle thread handled for worker thread it is described disconnect request.
If the main thread depending on networked server listens to regarding for the corresponding communication handle by communication handle and networks The disconnection request of terminal then enables in thread pool idle thread and the disconnection request is handled for worker thread;Processing Described disconnect asks send ACK messages to the networked terminals that regard, and acknowledges receipt of disconnection request.
Step 709:If listening to the disconnection regarding networked terminals by the communication handle to confirm, recycle described logical Letter handle is placed in the communication handle queue.
Confirm if the worker thread listens to the disconnection regarding networked terminals by the communication handle, recycle institute Communication handle is stated to be placed in the communication handle queue.
Preferably, the method further includes:
Step 710:If there is no idle thread in the thread pool, wait for until there is free idle thread;Wherein, the work Make thread and idle thread is recovered as after being finished.
If the main thread depending on networked server listens to the setting event, and does not have idle line in thread pool Journey then needs to wait for, and worker thread is waited for be recovered as the generation of idle thread after operation.
The embodiment of the present invention includes advantages below:
The embodiment of the present invention applies the characteristic regarding networking, by creating the communication sentence of thread pool and multiplexing based on MAC Address Handle reduces establishment and destroying threads, establishment and destroys the resource overhead of communication handle, therefore reduces to CPU and memory Performance requirement, while ensure that the safety of connection;Permission is connected by confirmation, further ensures the safety of connection;It is logical It crosses and the limit of setting event and processing procedure is limited so that thread pool thread utilization is more efficient;Pass through thread pool thread The disconnection of connection and communication handle recycling are handled, improves the utilization ratio of thread pool thread.
Because in the preferred embodiment of the embodiment of the present invention, restriction is made to the thread management in thread pool, therefore improve The utilization ratio of thread pool thread.
It should be noted that the step 701-703 and step 704-707 does not have absolute context, but Relatively independent;Similarly, the step 704-707 and step 708-709 does not have absolute context, but opposite Independent;The step 705-706 is also relatively independent with the step 707.For embodiment of the method, in order to simply retouch It states, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the embodiment of the present invention is not It is limited by described sequence of movement, because of embodiment according to the present invention, other sequences or same may be used in certain steps Shi Jinhang.Secondly, those skilled in the art should also know, embodiment described in this description belongs to preferred embodiment, Necessary to the involved action not necessarily embodiment of the present invention.
Embodiment three:
With reference to shown in Fig. 8, the embodiment of the present invention three provides a kind of networked resources that regard and manages system, and the system is applied to Depending in networking, including:
Module 801 is monitored, for monitoring communication handle queue and inactive queue of task;The communication handle passes through described MAC Address depending on networked server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for caching treating The resource request regarding networked terminals of processing;
Event processing module 802 is set, if for listening to setting event, it is work to enable the idle thread in thread pool Make thread, to handle the setting event;
Communication handle recycling module 803, for when being disconnected depending on networked terminals, the recycling networked terminals that regard to correspond to Communication handle.
The embodiment of the present invention includes advantages below:
The embodiment of the present invention applies the characteristic regarding networking, by creating the communication sentence of thread pool and multiplexing based on MAC Address Handle reduces establishment and destroying threads, establishment and destroys the resource overhead of communication handle, therefore reduces to CPU and memory Performance requirement, while ensure that the safety of connection.
For device embodiment, since it is basicly similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
Example IV:
With reference to shown in Fig. 9, the embodiment of the present invention four provides a kind of networked resources that regard and manages system, and the system is applied to Depending in networking, including:
Module 801 is monitored, for monitoring communication handle queue and inactive queue of task;The communication handle passes through described MAC Address depending on networked server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for caching treating The resource request regarding networked terminals of processing;
Resource request parsing module 80201, if for listening to the corresponding resource regarding networked terminals by communication handle Request, then it is worker thread to enable an idle thread in thread pool, and described regard is received and parsed through by the communication handle The resource request of networked terminals;
Resource request cache module 80202, for by the resource request regarding networked terminals and corresponding communication handle Encapsulation, it is medium pending to be put into inactive queue of task;
Resource request processing module 80203 if having task arrival for listening in the inactive queue of task, opens It is worker thread with an idle thread in thread pool, by the corresponding communication handle of the task, handles the task pair The resource request answered;
Request processing module 80301 is disconnected, if for listening to the corresponding disconnection regarding networked terminals by communication handle Request then enables in thread pool idle thread and the disconnection request is handled for worker thread;
Handle resets module 80302, if true for listening to the disconnection regarding networked terminals by the communication handle Recognize, then recycle the communication handle and be placed in the communication handle queue;
Connection request processing module 804, if for the connection request received depending on networked server regarding networked terminals, The idle thread then enabled in thread pool is worker thread, to handle the connection request;
It connects permission and confirms module 805, for receiving and parsing through the connection request for regarding networked terminals, by the connection It is described regarding the MAC Address of networked terminals and regarding networked terminals number in request, the information with regarding networked terminals described in storage It is compared, confirms the connection permission for regarding networked terminals;
Communication handle acquisition module 806, for obtaining a communication handle from regarding connected network communication handle queue, according to institute It states and initializes the communication handle regarding the MAC Address of networked server and the MAC Address regarding networked terminals, and pass through described Communication handle return allows the response to network.
Preferably, the system also includes:
Thread management module 807 if for not having idle thread in the thread pool, is waited for until there is free disengaged line Journey;Wherein, the worker thread is recovered as idle thread after being finished.
The embodiment of the present invention includes advantages below:
The embodiment of the present invention applies the characteristic regarding networking, by creating the communication sentence of thread pool and multiplexing based on MAC Address Handle reduces establishment and destroying threads, establishment and destroys the resource overhead of communication handle, therefore reduces to CPU and memory Performance requirement, while ensure that the safety of connection;Permission is connected by confirmation, further ensures the safety of connection;It is logical It crosses and the limit of setting event and processing procedure is limited so that thread pool thread utilization is more efficient;Pass through thread pool thread The disconnection of connection and communication handle recycling are handled, improves the utilization ratio of thread pool thread.
Because in the preferred embodiment of the embodiment of the present invention, restriction is made to the thread management in thread pool, therefore improve The utilization ratio of thread.
For device embodiment, since it is basicly similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described by the way of progressive, the highlights of each of the examples are with The difference of other embodiment, just to refer each other for identical similar part between each embodiment.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can be provided as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be with reference to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in flow and/or box combination.These can be provided Computer program instructions are set to all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine so that is held by the processor of computer or other programmable data processing terminal equipments Capable instruction generation is used to implement in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes The device for the function of specifying.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing terminal equipments In the computer-readable memory to work in a specific way so that the instruction being stored in the computer-readable memory generates packet The manufacture of command device is included, which realizes in one flow of flow chart or multiple flows and/or one side of block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that Series of operation steps are performed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction offer performed on computer or other programmable terminal equipments is used to implement in one flow of flow chart or multiple flows And/or specified in one box of block diagram or multiple boxes function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, those skilled in the art once know base This creative concept can then make these embodiments other change and modification.So appended claims are intended to be construed to Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements are not only wrapped Those elements are included, but also including other elements that are not explicitly listed or are further included as this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, it is wanted by what sentence "including a ..." limited Element, it is not excluded that also there are other identical elements in the process including the element, method, article or terminal device.
Networked resources management method and system are regarded to one kind provided by the present invention above, are described in detail, herein In apply specific case the principle of the present invention and embodiment be expounded, the explanation of above example is only intended to sides Assistant solves the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, think of according to the present invention Think, in specific embodiments and applications there will be changes, in conclusion the content of the present specification should not be construed as pair The limitation of the present invention.

Claims (10)

1. one kind regards networked resources management method, which is characterized in that the method is applied to regard in networking, including:
Communication handle queue and inactive queue of task are monitored depending on networked server;The communication handle regards networking clothes by described The MAC Address of business device and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for caching pending regard The resource request of networked terminals;
If listening to setting event, the idle thread enabled in thread pool is worker thread, to handle the setting event;
When being disconnected depending on networked terminals, recycling is described to regard the corresponding communication handle of networked terminals.
2. according to the method described in claim 1, it is characterized in that, if described listen to setting event, enable in thread pool Idle thread for worker thread, include the step of the setting event to handle:
If listening to the corresponding resource request regarding networked terminals by communication handle, an idle line in thread pool is enabled Journey is worker thread, and the resource request for regarding networked terminals is received and parsed through by the communication handle;
The resource request regarding networked terminals and corresponding communication handle are encapsulated, are put into inactive queue of task at waiting Reason;
If listening in the inactive queue of task has task arrival, it is work to enable an idle thread in thread pool Thread by the corresponding communication handle of the task, handles the corresponding resource request of the task.
3. according to the method described in claim 1, it is characterized in that, described when being disconnected depending on networked terminals, described in recycling The step of communication handle corresponding depending on networked terminals, includes:
If listening to the corresponding disconnection regarding networked terminals by communication handle to ask, an idle line in thread pool is enabled Journey handles described disconnect for worker thread and asks;
If listening to the disconnection regarding networked terminals by the communication handle to confirm, recycle the communication handle and be placed in In the communication handle queue.
4. it according to the method described in claim 1, it is characterized in that, further includes:
If the connection request received depending on networked server regarding networked terminals, an idle thread in thread pool is enabled For worker thread, to handle the connection request;
The connection request for regarding networked terminals is received and parsed through, the MAC of networked terminals will be regarded described in the connection request Address and regarding networked terminals number, is compared with the information depending on networked terminals described in storage, confirms and described regards networked terminals Connection permission;
A communication handle is obtained from regarding connected network communication handle queue, according to the MAC Address regarding networked server and institute The MAC Address stated regarding networked terminals initializes the communication handle, and allows the response to network by communication handle return.
5. it according to the method described in claim 1, it is characterized in that, further includes:
If there is no idle thread in the thread pool, wait for until there is free idle thread;Wherein, the worker thread is performing After be recovered as idle thread.
6. one kind regards networked resources and manages system, which is characterized in that the system is applied to regard in networking, including:
Module is monitored, for monitoring communication handle queue and inactive queue of task;The communication handle regards networking by described The MAC Address of server and the MAC Address initialization regarding networked terminals;The inactive queue of task is used for caching pending Depending on the resource request of networked terminals;
Event processing module is set, if for listening to setting event, it is worker thread to enable the idle thread in thread pool, To handle the setting event;
Communication handle recycling module regards the corresponding communication of networked terminals for when being disconnected depending on networked terminals, recycling to be described Handle.
7. system according to claim 6, which is characterized in that the setting event processing module includes:
If resource request parsing module for listening to the corresponding resource request regarding networked terminals by communication handle, opens It is worker thread with an idle thread in thread pool, is received and parsed through by the communication handle described regarding networked terminals Resource request;
Resource request cache module for the resource request regarding networked terminals and corresponding communication handle to be encapsulated, is put into Inactive queue of task is medium pending;
Resource request processing module if having task arrival for listening in the inactive queue of task, enables thread pool In an idle thread for worker thread, by the corresponding communication handle of the task, handle the corresponding resource of the task Request.
8. system according to claim 6, which is characterized in that the handle recycling module includes:
Request processing module is disconnected, if being asked for listening to the corresponding disconnection regarding networked terminals by communication handle, is opened It is that worker thread is asked to handle described disconnect with an idle thread in thread pool;
Handle resets module, if confirming for listening to the disconnection regarding networked terminals by the communication handle, recycles The communication handle is placed in the communication handle queue.
9. system according to claim 6, which is characterized in that further include:
Connection request processing module if for the connection request received depending on networked server regarding networked terminals, enables An idle thread in thread pool is worker thread, to handle the connection request;
It connects permission and confirms module, it, will be in the connection request for receiving and parsing through the connection request for regarding networked terminals It is described regarding the MAC Address of networked terminals and regarding networked terminals number, with being compared described in storage depending on the information of networked terminals It is right, confirm the connection permission for regarding networked terminals;
For obtaining a communication handle from regarding connected network communication handle queue, connection is regarded according to described for communication handle acquisition module The MAC Address of network server and the MAC Address regarding networked terminals initialize the communication handle, and pass through the communication sentence Handle return allows the response to network.
10. system according to claim 6, which is characterized in that further include:
Thread management module if for not having idle thread in the thread pool, is waited for until there is free idle thread;Wherein, The worker thread is recovered as idle thread after being finished.
CN201611201043.1A 2016-12-22 2016-12-22 A kind of view networked resources management method and system Active CN108228338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611201043.1A CN108228338B (en) 2016-12-22 2016-12-22 A kind of view networked resources management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611201043.1A CN108228338B (en) 2016-12-22 2016-12-22 A kind of view networked resources management method and system

Publications (2)

Publication Number Publication Date
CN108228338A true CN108228338A (en) 2018-06-29
CN108228338B CN108228338B (en) 2019-06-11

Family

ID=62656335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611201043.1A Active CN108228338B (en) 2016-12-22 2016-12-22 A kind of view networked resources management method and system

Country Status (1)

Country Link
CN (1) CN108228338B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409104A (en) * 2018-09-20 2019-03-01 视联动力信息技术股份有限公司 A kind of method and system that interface shows
CN109474661A (en) * 2018-09-25 2019-03-15 视联动力信息技术股份有限公司 A kind of processing method and system of network request event
CN109522110A (en) * 2018-11-19 2019-03-26 视联动力信息技术股份有限公司 A kind of multiple task management system and method based on view networking
CN109525460A (en) * 2018-11-26 2019-03-26 视联动力信息技术股份有限公司 A kind of method and apparatus of view networking number resource monitoring
CN109814996A (en) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 Streaming media control method, device and storage medium, computer equipment
CN110233772A (en) * 2019-04-22 2019-09-13 视联动力信息技术股份有限公司 A kind of view networked system test method and device
CN110474813A (en) * 2019-08-28 2019-11-19 视联动力信息技术股份有限公司 A kind of network management and view networked system
CN110798450A (en) * 2019-09-25 2020-02-14 视联动力信息技术股份有限公司 Audio and video data processing method and device and storage medium
CN110933112A (en) * 2019-12-26 2020-03-27 视联动力信息技术股份有限公司 Network access authentication method, device and storage medium
CN110958396A (en) * 2019-12-23 2020-04-03 视联动力信息技术股份有限公司 Holder control method and device, electronic equipment and storage medium
CN112035255A (en) * 2020-08-28 2020-12-04 北京浪潮数据技术有限公司 Thread pool resource management task processing method, device, equipment and storage medium
CN112148493A (en) * 2020-09-30 2020-12-29 武汉中科通达高新技术股份有限公司 Streaming media task management method and device and data server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001290A (en) * 2006-01-09 2007-07-18 杭州世导科技有限公司 System for multi-media integrated accessing
WO2007127336A2 (en) * 2006-04-28 2007-11-08 Towsend Analytics, Ltd. Order management for electronic securities trading
US8417825B2 (en) * 2005-03-09 2013-04-09 Apple Inc. Communications handles and proxy agents
CN103281172A (en) * 2013-05-13 2013-09-04 天津市天安怡和信息技术有限公司 Pooling communication method between highway electronic prepaid card and encryption machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8417825B2 (en) * 2005-03-09 2013-04-09 Apple Inc. Communications handles and proxy agents
CN101001290A (en) * 2006-01-09 2007-07-18 杭州世导科技有限公司 System for multi-media integrated accessing
WO2007127336A2 (en) * 2006-04-28 2007-11-08 Towsend Analytics, Ltd. Order management for electronic securities trading
CN103281172A (en) * 2013-05-13 2013-09-04 天津市天安怡和信息技术有限公司 Pooling communication method between highway electronic prepaid card and encryption machine

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
廖宏建 等: ""完成端口实现高性能服务端通信层的关键问题"", 《计算机应用》 *
蒋健,王昱主编: "《GlassFish 开源的Java EE应用服务器》", 31 October 2007 *
邱铁编著: "《 Linux应用与开发典型实例精讲》", 31 May 2010 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409104A (en) * 2018-09-20 2019-03-01 视联动力信息技术股份有限公司 A kind of method and system that interface shows
CN109474661A (en) * 2018-09-25 2019-03-15 视联动力信息技术股份有限公司 A kind of processing method and system of network request event
CN109522110A (en) * 2018-11-19 2019-03-26 视联动力信息技术股份有限公司 A kind of multiple task management system and method based on view networking
CN109522110B (en) * 2018-11-19 2020-03-31 视联动力信息技术股份有限公司 Multitask management system and method based on video networking
CN109525460A (en) * 2018-11-26 2019-03-26 视联动力信息技术股份有限公司 A kind of method and apparatus of view networking number resource monitoring
CN109814996A (en) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 Streaming media control method, device and storage medium, computer equipment
CN109814996B (en) * 2019-01-04 2024-03-22 平安科技(深圳)有限公司 Streaming media transmission control method and device, storage medium and computer equipment
CN110233772A (en) * 2019-04-22 2019-09-13 视联动力信息技术股份有限公司 A kind of view networked system test method and device
CN110233772B (en) * 2019-04-22 2021-11-19 视联动力信息技术股份有限公司 Method and device for testing video networking system
CN110474813A (en) * 2019-08-28 2019-11-19 视联动力信息技术股份有限公司 A kind of network management and view networked system
CN110798450A (en) * 2019-09-25 2020-02-14 视联动力信息技术股份有限公司 Audio and video data processing method and device and storage medium
CN110798450B (en) * 2019-09-25 2022-08-23 视联动力信息技术股份有限公司 Audio and video data processing method and device and storage medium
CN110958396A (en) * 2019-12-23 2020-04-03 视联动力信息技术股份有限公司 Holder control method and device, electronic equipment and storage medium
CN110933112A (en) * 2019-12-26 2020-03-27 视联动力信息技术股份有限公司 Network access authentication method, device and storage medium
CN110933112B (en) * 2019-12-26 2022-12-23 视联动力信息技术股份有限公司 Network access authentication method, device and storage medium
CN112035255A (en) * 2020-08-28 2020-12-04 北京浪潮数据技术有限公司 Thread pool resource management task processing method, device, equipment and storage medium
CN112148493A (en) * 2020-09-30 2020-12-29 武汉中科通达高新技术股份有限公司 Streaming media task management method and device and data server

Also Published As

Publication number Publication date
CN108228338B (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN108228338B (en) A kind of view networked resources management method and system
CN108121588B (en) A kind of method and its view networking access server of access external resource
CN108063741A (en) A kind of transport protocol conversion method and apparatus
CN108023910A (en) A kind of terminal monitoring method and system based on regarding networking
CN108075920A (en) A kind of management method and system regarding networked terminals
CN108173804A (en) It is a kind of to access the method for internet and regarding connection cat client by regarding networking
CN109451264A (en) A kind of method and system of monitoring device membership
CN108012106A (en) A kind of method and system regarding networking monitoring source synchronous
CN107959819A (en) A kind of method and apparatus for realizing video conferencing system Dispatching monitor and control system
CN108173803A (en) It is a kind of to access the method for internet and regarding connection cat server-side by regarding networking
CN108632238A (en) A kind of method and apparatus of permission control
CN108173895A (en) A kind of communication means and device
CN109302472A (en) A kind of view networked resources method for releasing and view networking share Platform Server
CN109167962A (en) It is a kind of to turn server depending on networked resources method for releasing and monitoring association
CN109617956A (en) A kind of data processing method and device
CN109474715A (en) A kind of resource allocation method and device based on view networking
CN109379254A (en) A kind of detection method and system of the network connection based on video conference
CN109889779A (en) A kind for the treatment of method and apparatus of packet out-ordering
CN110225083A (en) Data push method and device based on view networking
CN109462594A (en) A kind of data processing method and system based on view networking
CN110048903A (en) A kind of association turns gateway status monitoring method and device
CN110049280A (en) The treating method and apparatus of monitoring data
CN109640027A (en) Call method and device
CN109151061A (en) A kind of date storage method and device
CN109729184A (en) A kind of method and apparatus of view networking service processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100000 Dongcheng District, Beijing, Qinglong Hutong 1, 1103 house of Ge Hua building.

Applicant after: Video Link Power Information Technology Co., Ltd.

Address before: 100000 Beijing Dongcheng District gogoa building A1103-1113

Applicant before: BEIJING VISIONVERA INTERNATIONAL INFORMATION TECHNOLOGY CO., LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant