Disclosure of Invention
To this end, the present disclosure provides a method, apparatus, readable storage medium, computing device, and a gating management system for authorizing a batch of devices in an effort to solve or at least alleviate at least one of the problems presented above.
According to one aspect of the disclosed embodiments, there is provided a method for authorizing a batch device, including:
monitoring and receiving a plurality of UDP requests initiated by a plurality of clients;
caching the plurality of UDP requests to a first queue;
forwarding the UDP requests of the first queue to the gating equipment corresponding to the requests respectively;
receiving streaming data responded by each door control device;
caching the streaming data to a second queue;
and respectively forwarding the multiple groups of streaming data of the second queue to clients corresponding to the groups of streaming data.
Optionally, forwarding the plurality of UDP requests of the first queue to a gating device corresponding to each request, includes:
and selecting an idle first UDP service from a first UDP service pool for the currently processed UDP request of the first queue, and forwarding the currently processed UDP request of the first queue to a gating device corresponding to the request by using the first UDP service.
Optionally, before forwarding the plurality of UDP requests of the first queue to the gating device corresponding to each request, the method further includes:
load information of door control equipment is obtained;
for the UDP request of the first queue which is currently processed, if the request is determined to be directed to the gating equipment with the load exceeding the preset threshold value, caching the UDP request of the first queue which is currently processed to a third queue;
and restoring the UDP request of the third queue to the first queue when the load of the gating equipment corresponding to the UDP request of the third queue is detected to be lower than a preset threshold value.
Optionally, the load information includes at least one of the following information:
transmission bandwidth, number of concurrent connections, and task processing status.
Optionally, forwarding the multiple sets of streaming data in the second queue to clients corresponding to the sets of streaming data respectively includes:
and selecting an idle second UDP service from a second UDP service pool for the streaming data of the second queue which is currently processed, and forwarding the streaming data of the second queue which is currently processed to a client corresponding to the streaming data by using the second UDP service.
Optionally, the method further comprises:
and saving a communication log of the client and the gating equipment.
According to another aspect of the present disclosure, there is provided an authorizing apparatus of a batch device, comprising:
the request receiving module is used for monitoring and receiving a plurality of UDP requests initiated by a plurality of clients; caching the plurality of UDP requests to a first queue;
the request processing module is used for respectively forwarding the plurality of UDP requests of the first queue to the gating equipment corresponding to each request;
the response data receiving module is used for receiving the streaming data responded by each door control device; caching the streaming data to a second queue;
and the response data processing module is used for respectively forwarding the multiple groups of streaming data of the second queue to the client corresponding to each group of streaming data.
According to yet another aspect of the present disclosure, there is provided a readable storage medium having executable instructions thereon that, when executed, cause a computer to perform operations comprised by an authorization method for a batch device as described above.
According to yet another aspect of the present disclosure, there is provided a computing device comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to perform operations included in the above-described method of authorizing a batch device.
According to yet another aspect of the present disclosure, there is provided a gating management system including:
a plurality of clients, a plurality of door control devices and at least one of the above-described mass device authorization means.
According to the technical scheme provided by the disclosure, a plurality of UDP requests initiated by a plurality of clients are monitored and received, the plurality of UDP requests are cached to a first queue, the plurality of UDP requests of the first queue are respectively forwarded to corresponding gating devices of the requests, and streaming data responded by the gating devices are received; caching the streaming data into a second queue, and respectively forwarding multiple groups of streaming data of the second queue to clients corresponding to the groups of streaming data; the agent service is established between the client and the gating equipment, the data interaction between the client and the gating equipment is uniformly managed, the system safety is improved, and the data flow is managed by using the cache queue, so that the possibility of high concurrency request is reduced, and the stability of system operation is improved.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 is a block diagram of an example computing device 100 arranged to implement an authorization method for a batch device in accordance with the present disclosure. In a basic configuration 102, computing device 100 typically includes a system memory 106 and one or more processors 104. The memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing including, but not limited to: processor 104 may include one or more levels of caches, such as a first level cache 110 and a second level cache 112, a processor core 114, and registers 116 the example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof the example memory controller 118 may be used with processor 104, or in some implementations, memory controller 118 may be an internal portion of processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory including, but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 106 may include an operating system 120, one or more programs 122, and program data 124. In some implementations, the program 122 may be configured to execute instructions on an operating system by the one or more processors 104 using the program data 124.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to basic configuration 102 via bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display terminal or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via one or more communication ports 164 over a network communication link.
The network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media in a modulated data signal, such as a carrier wave or other transport mechanism. A "modulated data signal" may be a signal that has one or more of its data set or changed in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or special purpose network, and wireless media such as acoustic, radio Frequency (RF), microwave, infrared (IR) or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a personal computer including desktop and notebook computer configurations, as well as in the form of a device such as a cabinet server, a blade server, or the like.
Wherein the one or more programs 122 of the computing device 100 include instructions for performing an authorization method for a batch device according to the present disclosure.
Fig. 2 illustrates a flow chart of an authorization method 200 for a batch device, according to one embodiment of the present disclosure, the authorization method 200 for a batch device begins at step S210.
S210, monitoring and receiving a plurality of UDP requests initiated by a plurality of clients;
s220, caching a plurality of UDP requests to a first queue;
s230, respectively forwarding a plurality of UDP requests of the first queue to the gate control equipment corresponding to each request;
s240, receiving streaming data responded by each door control device;
s250, caching the streaming data to a second queue;
and S260, respectively forwarding the multiple groups of streaming data of the second queue to the clients corresponding to the groups of streaming data.
According to the embodiment of the disclosure, the UDP proxy gateway service is established, the UDP request of the client is buffered and then forwarded to the gating device, and the streaming data responded by the gating device is buffered and then forwarded to the client, so that unified management and scheduling of access of the gating device are realized, and meanwhile, the probability of high concurrent access of a single gating device is reduced.
Fig. 3 illustrates a flow chart of an authorization method 300 for a batch device according to yet another embodiment of the present disclosure, the authorization method 300 for a batch device begins at step S310.
S310, monitoring and receiving a plurality of UDP requests initiated by a plurality of clients;
s320, caching a plurality of UDP requests to a first queue;
s330, selecting an idle first UDP service from a first UDP service pool for the UDP request of the first queue which is currently processed, and forwarding the UDP request of the first queue which is currently processed to a gating device corresponding to the request by using the idle first UDP service;
s340, receiving streaming data responded by each door control device;
s350, caching the streaming data to a second queue;
s360, selecting an idle second UDP service from the second UDP service pool for the streaming data of the second queue which is currently processed, and forwarding the streaming data of the second queue which is currently processed to a client corresponding to the streaming data by using the idle second UDP service.
According to the embodiment of the disclosure, the first UDP service pool and the second UDP service pool are respectively established and used for forwarding UDP request data and response data of the gating device according to the queue sequence, so that the data forwarding efficiency can be improved. The first UDP service pool and the second UDP service pool may include a plurality of different physical devices, or may include different service processes in the same device.
Fig. 4 illustrates a flowchart of an authorization method 400 for a batch device according to yet another embodiment of the present disclosure, the authorization method 400 for a batch device beginning at step S410.
S410, monitoring and receiving a plurality of UDP requests initiated by a plurality of clients;
s420, caching a plurality of UDP requests to a first queue;
s430, acquiring load information of the door control equipment;
s440, if the UDP request of the first queue which is processed currently is determined to be directed to the gating device with the load exceeding the preset threshold, caching the UDP request of the first queue which is processed currently to a third queue;
s450, detecting that the load of the gate control equipment corresponding to the UDP request of the third queue is lower than a preset threshold, and restoring the UDP request of the third queue to the first queue;
s460, selecting an idle first UDP service from a first UDP service pool for the UDP request of the first queue which is currently processed, and forwarding the UDP request of the first queue which is currently processed to a gating device corresponding to the request by using the idle first UDP service;
s470, receiving streaming data responded by each door control device;
s480, caching the streaming data to a second queue;
s490, selecting an idle second UDP service from the second UDP service pool for the streaming data of the second queue which is currently processed, and forwarding the streaming data of the second queue which is currently processed to the client corresponding to the streaming data by using the idle second UDP service.
According to the embodiment of the disclosure, the UDP requests of the door control equipment with the load exceeding the preset threshold value are cached, so that the condition that the same door control equipment is accessed in a high concurrency mode can be avoided, and the running stability of the system is improved.
Alternatively, the load condition of the door control apparatus may be determined by one or more of the following: transmission bandwidth, number of concurrent connections, and task processing status. The transmission bandwidth of the gating device, or the number of concurrent connections, or the task processing state can be determined by monitoring the streaming data forwarding condition. For example, when the gating device supports concurrent access, counting transmission bandwidths of the gating device and the local, and when the transmission bandwidth reaches a preset first threshold, caching a new UDP request pointing to the gating device; for another example, when the gating device supports concurrent access, counting the number of connections between the gating device and the local, and when the number of connections reaches a preset second threshold, buffering a new UDP request directed to the gating device; for another example, when the gating device only supports a single transmission task, it is determined whether the current gating device is in a task processing state, if so, a new UDP request directed to the gating device is cached, otherwise, the new UDP request is sent to the gating device.
According to a further embodiment of the present disclosure, the communication log of the client and the door control device is locally saved, so that traceability of remote control data of the door control device is achieved.
Fig. 5 is a process diagram of a client communicating with a gating device, a communication body including the client, a UDP proxy gateway, and the gating device, according to an embodiment of the present disclosure. In the figure, < < uses > > represents a service call.
Specifically, a plurality of service programs are operated in the UDP proxy gateway, wherein the UDP monitoring service is used for monitoring the UDP request of the user, and when a new UDP request is monitored, the service of the cache client request caches the client request. And then, the UDP service 1 is called to interact data with the door control equipment, and after the data responded by the door control equipment is received, the service for caching the data responded by the door control equipment caches the data responded by the door control equipment. Finally, the UDP service 2 calls the cached response data and sends the response data to the client.
Fig. 6 is a schematic diagram of a process in which a client communicates with a gating device according to still another embodiment of the present disclosure, and a communication body includes a plurality of clients (A1 to AN), UDP proxy gateways (gateway running proxy listening service B, proxy clients C1 to CN, and proxy clients E1 to EN), and gating devices E (E1 to EN).
The specific implementation process is as follows: a1 sends UDP request to UDP proxy gateway, the source IP of request data packet is IP of A1, the target IP is IP of gating equipment E1, request data packet also includes request instruction "A"; b, monitoring the request of A1, and caching the request to a UDP gateway proxy request queue; after detecting that data exists in a UDP gateway proxy request queue, distributing a request forwarded from Cx to E, wherein the source IP of a request data packet is the IP of Cx, the target IP is the IP of gating equipment E1, and the request data packet also comprises a request instruction A; and then, the Cx receives the streaming data fed back by the gating equipment E1, the source IP of the streaming data is the IP of E1, the target IP is the IP of the Cx, and the Cx receives the streaming data responded by the gating equipment E1 and caches the streaming data to the UDP gateway proxy response queue. After detecting that the UDP gateway proxy response queue has data, distributing Dx to forward the streaming data to A, wherein the source IP of the data packet of the streaming data is the IP of Dx, and the target IP is the IP of A1.
Referring to fig. 7, an authorization apparatus for a batch device provided by the present disclosure includes:
a request receiving module 710, configured to monitor and receive a plurality of UDP requests initiated by a plurality of clients; caching the plurality of UDP requests to a first queue;
a request processing module 720, configured to forward the multiple UDP requests of the first queue to a gating device corresponding to each request, respectively;
a response data receiving module 730, configured to receive streaming data responded by each gating device; caching the streaming data to a second queue;
and the response data processing module 740 is configured to forward the multiple groups of streaming data in the second queue to clients corresponding to the groups of streaming data respectively.
For specific limitations of the authorization means of the batch device, reference may be made to the above limitation of the authorization method of the batch device, which is not repeated here.
Referring to fig. 8, the present disclosure provides a gating system for a bank, comprising: the system comprises a monitoring center, a network node and a branch deployment client, wherein the network node deploys a plurality of internet traffic (IoT) hosts, namely door control equipment, and UDP NAT service equipment of the monitoring center is an authorization device of the batch equipment and is used for carrying out unified scheduling management on UDP requests sent to the door control equipment and streaming data responded by the door control equipment.
It should be understood that the various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present disclosure, or certain aspects or portions of the methods and apparatus of the present disclosure, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the disclosure.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the various methods of the present disclosure according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media comprise computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
It should be appreciated that in the foregoing description of exemplary embodiments of the disclosure, various features of the disclosure are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various disclosed aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed disclosure requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this disclosure.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the disclosure and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for performing functions performed by elements for purposes of this disclosure.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the disclosure has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above disclosure, will appreciate that other embodiments are contemplated within the scope of the disclosure as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the disclosed subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The disclosure of the present disclosure is illustrative, but not limiting, of the scope of the disclosure, which is defined by the appended claims.