CN111447102B - SDN network device access method and device, computer device and storage medium - Google Patents

SDN network device access method and device, computer device and storage medium Download PDF

Info

Publication number
CN111447102B
CN111447102B CN202010122323.3A CN202010122323A CN111447102B CN 111447102 B CN111447102 B CN 111447102B CN 202010122323 A CN202010122323 A CN 202010122323A CN 111447102 B CN111447102 B CN 111447102B
Authority
CN
China
Prior art keywords
session
acquisition equipment
access
acquisition
cache
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.)
Active
Application number
CN202010122323.3A
Other languages
Chinese (zh)
Other versions
CN111447102A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010122323.3A priority Critical patent/CN111447102B/en
Publication of CN111447102A publication Critical patent/CN111447102A/en
Priority to PCT/CN2020/117979 priority patent/WO2021169275A1/en
Application granted granted Critical
Publication of CN111447102B publication Critical patent/CN111447102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an SDN network device access method, an SDN network device access device, a computer device and a storage medium. The SDN network device access method comprises the following steps: receiving a data acquisition request of an access terminal; analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier; inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier; if the corresponding session cache exists in the system cache, session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier; if the corresponding session cache does not exist in the system cache, inquiring the state of a session lock corresponding to the acquisition equipment identifier, and according to the state of the session lock, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier or placing the data acquisition request into a waiting queue. The invention also discloses an SDN network device access device, a computer device and a storage medium.

Description

SDN network device access method and device, computer device and storage medium
Technical Field
The present invention relates to the field of networks, and in particular, to an SDN network device access method, an SDN network device access device, a SDN network computer device, and a SDN network storage medium.
Background
SDN (software define network, software defined networking) concepts have emerged in the industry for many years, and the core technology thereof separates the control plane from the data plane of the network device, so that flexible control of network traffic is realized, the network becomes more intelligent as a pipeline, and a good platform is provided for innovation of the core network and application.
However, current SDN underlying acquisition implementations have too great a limitation: SDN collectors are provided by network equipment manufacturers and can only adapt to network equipment of the manufacturers, but the bidding requirement of the current large-scale company network generally does not allow only one network equipment, so that all network equipment cannot be docked by using the controller; in addition, SDN plug-in development can be performed in a network part in the cloud computing field, but the plug-in part is strongly related to cloud platform services and cannot be used for acquisition requirements of multiple protocols, multiple scenes and multiple services; in addition, commercial collectors on the market are too simple and fixed in function to realize the customization needs inside enterprises. At present, business departments of a part of large companies select themselves to realize the bottom layer acquisition function, but introduce new problems: when each service collects information on the same equipment, the problem of resource competition and collection failure possibly exists; different businesses may have repeated acquisition resources, which causes great waste of equipment resources, even causes excessive equipment load and even equipment failure.
Disclosure of Invention
The embodiment of the invention provides an SDN network device access method, an SDN network device access device, a SDN network device access computer device and a SDN network device storage medium, which are used for solving the problems of non-uniform access entrance, single service data acquisition type, low access and acquisition efficiency, acquisition failure caused by resource competition and repeated acquisition resources.
In a first aspect, an embodiment of the present invention provides an SDN network device access method, including:
receiving a data acquisition request of an access terminal;
analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier;
inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier;
if the corresponding session cache exists in the system cache, session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier;
if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier;
and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue.
In a second aspect, an embodiment of the present invention provides an SDN network device access apparatus, including:
the receiving module is used for receiving a data acquisition request of the access terminal;
the analysis module is used for analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier;
the query module is used for querying whether a corresponding session cache exists in the system cache according to the acquisition equipment identifier;
the first execution module is used for initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier when a corresponding session cache exists in the system cache;
the second execution module is used for inquiring the state of the session lock corresponding to the acquisition equipment identifier if the corresponding session cache does not exist in the system cache;
and the third execution module is used for placing the data acquisition request into a waiting queue when the session lock corresponding to the acquisition equipment identifier is in a locking state.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the SDN network device access method when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the above-mentioned SDN network device access method.
According to the SDN network equipment access method, the SDN network equipment access device, the computer equipment and the storage medium, the unified equipment access entrance is realized through the analysis and the control of the server to different data acquisition equipment, the storage logic is not required to be provided, the data access efficiency is better ensured, the session access is directly initiated to the acquisition equipment through the setting of the session cache, the process of reestablishing the connection is omitted, the data access and the acquisition efficiency to the acquisition equipment are improved, and the burden of the computer is reduced. Further, through the setting of the session lock, the problem of acquisition failure caused by resource competition is avoided, and the waste of resources and the loss of equipment are reduced. Session access is directly initiated to the acquisition equipment through the session cache in the system cache, so that the process of reestablishing connection is omitted, and the access efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application environment of an SDN network device access method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an SDN network device access method in an embodiment of the present invention;
FIG. 3 is another flow chart of an SDN network device access method in an embodiment of the present invention;
FIG. 4 is a further flowchart of an SDN network device access method in an embodiment of the present invention;
FIG. 5 is a flowchart of an embodiment of step S40 in FIG. 2;
fig. 6 is a schematic block diagram of an SDN network device access unit in an embodiment of the invention;
fig. 7 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The SDN network device access method provided by the embodiment of the invention can be applied to an application environment as shown in fig. 1, and particularly is applied to an SDN network device access system, wherein the SDN network device access system comprises an access terminal (client), acquisition equipment and a server as shown in fig. 1, and the client and the acquisition equipment are respectively communicated with the server through a network so as to improve the access efficiency. The server receives a data acquisition request of the access terminal; analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier; inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier; if the corresponding session cache exists in the system cache, session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier; if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier; and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue. The client is also called a client, and refers to a program corresponding to the server for providing local service for the client. Clients may be, but are not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices. The acquisition device may be an SDN collector provided by a different network vendor to provide a path for querying session cache and session lock information. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, an SDN network device access method is provided, and an example of application of the method to the server in fig. 1 is described, where the method includes the following steps:
s10: and receiving a data acquisition request of the access terminal.
The access terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. When the access terminal needs to acquire or access data to the acquisition equipment, the access terminal sends a data acquisition request to the server. The data acquisition request may include information about the protocol used, acquisition device identification, AS number, etc. Optionally, the server performs data interaction with the access terminal through an API interface, and preferably, the API interface is a Restful http API interface. Optionally, before receiving the data acquisition request of the access terminal, an authentication process may be further included, i.e. the access right of the access terminal is verified. And if the identity verification passes, receiving a data acquisition request of the access terminal, and if the identity verification passes, rejecting the data acquisition request of the access terminal. The authentication may be account authentication, authentication of a terminal identification code of the access terminal, or other available authentication methods.
Further, the data acquisition request also includes an acquisition data type. After receiving the data acquisition request, the method further comprises an acquisition permission verification step, namely verifying whether the corresponding access terminal has permission for data acquisition of the data type. The acquisition permission verification can be realized through an acquisition permission configuration table, and whether the access terminal has permission for data acquisition of data corresponding to the acquired data type is inquired through the acquisition permission configuration table so as to better ensure the safety of data acquisition.
S20: analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier.
Specifically, the data acquisition request is analyzed, so that data acquisition information can be obtained. The data acquisition information comprises an acquisition equipment identifier, wherein the acquisition equipment identifier is an access terminal, and the data acquisition request corresponds to the terminal for data acquisition or access. The collection device identification may be formed by at least one of numbers, letters, symbols, or chinese. Optionally, the data acquisition information further includes an acquisition protocol, a data identifier, and the like. The collection protocol may include SNMP protocol, netcon protocol, SFTP protocol, or the like. The data identification may identify the corresponding data content or data location, etc. in a particular acquisition device.
Further, the data acquisition request may be parsed into a structure, which is a collection of data consisting of a series of data of the same type or different types. Optionally, the functions used by all the acquisition devices are abstracted into a unified structure in advance, and then the configuration of the acquisition devices is parsed onto the structure, for example: by parsing the configuration file (the configuration file is a plain text file), the device a of manufacturer h3c uses BGP protocol, AS number 65002, and relevant fields in the structure record relevant information.
Further, after the data acquisition request is parsed into the structure, the data acquisition information can be obtained by combining the structure abstracted from the acquisition equipment in advance. The acquisition protocol information can be obtained by acquiring the device identifier and/or the data identifier.
In a specific embodiment, after analyzing the data acquisition request, a verification process of access authority is further included, that is, whether the access terminal has the authority to access the acquisition device corresponding to the acquisition device identifier is verified. The access right verification can be realized through an access right configuration table, and whether the access terminal has the right of carrying out data access on the acquisition equipment corresponding to the acquisition equipment identifier or not is inquired through the access right configuration table, so that the safety of data access is better ensured.
S30: and inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier.
The session in this step refers to the session corresponding to the acquisition device. In the history access record of the access terminal, a session is stored in the system cache after the access is completed, and after a new data acquisition request is triggered, the server can check whether the session cache corresponding to the acquisition device exists in the system cache. Optionally, the session cache may be stored in the system cache, where a shelf life may be set, i.e., the corresponding session cache may be deleted beyond the shelf life. Illustratively, the shelf life may be 1 hour, 2 hours, 5 hours, or the like. Monitoring the storage time of the session caches in the system caches, and removing the corresponding session caches if the storage time of the session caches exceeds the preset time. Further, when the stored session caches in the system cache exceed a preset number, deletion processing can be performed on the session caches stored in the system cache. Optionally, the session caches with lower access frequency may be preferentially deleted according to the access frequency of the session caches in the system cache. Or sorting according to the latest access time, and deleting the session cache with the latest access time longer than the current time.
Preferably, a preset capacity may be set for the system cache. The preset capacity is a value of a preset storage capacity, and optionally, the preset capacity may be set according to the total capacity in the system cache. Illustratively, the preset capacity may be set to 70%, 80%, 90%, 95%, 100% or the like of the total capacity in the system cache. And if the buffer capacity in the system buffer exceeds the preset capacity, removing the session buffer in the system buffer by adopting a buffer algorithm. Alternatively, the caching algorithm may be implemented using the LRU (Least Recently Used) algorithm. Wherein, the LRU algorithm determines that if a data has not been accessed in the last period of time, then it is less likely to be accessed in the future. Thus, when the defined space is full of data, data that has not been accessed for the longest time can be eliminated. Specifically, the LRU algorithm may store data (session cache) with an array, mark each data item with an access timestamp, and each time a new data item is inserted, first self-increment the timestamp of the data item present in the array, and set the timestamp of the new data item to 0 and insert it into the array. Each time a data item in the array is accessed, the timestamp of the accessed data item is set to 0. When the array space is full, the data item with the largest time stamp is eliminated.
Alternatively, the LRU algorithm may be implemented using a linked list, with new data inserted into the head of the linked list each time data (session cache) is newly inserted. Each time a cache hit (i.e., data is accessed), the data is moved to the head of the linked list. Then when the linked list is full, the data at the tail of the linked list is discarded.
Optionally, the LRU algorithm may also be implemented using a linked list and hashmap. When new data items (session caches) need to be inserted, if the new data items exist in the linked list, the node is moved to the head of the linked list, if the new data items do not exist, a node is newly built and placed in the head of the linked list, and if the system cache is full, the last node of the linked list is deleted. When accessing data, if the data item exists in the linked list, the node is moved to the head of the linked list, otherwise, -1 is returned. Thus, the node at the end of the linked list is the last longest data item not accessed.
Specifically, the acquisition equipment identifier is used as a search field to inquire whether a session cache corresponding to the acquisition equipment identifier exists in the system cache.
S40: and if the corresponding session cache exists in the system cache, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier.
In the system cache, the server saves the session pointer of the last access terminal to the acquisition equipment in the session cache. Thus, subsequent access requests to the same acquisition device can be directly processed through the session pointer saved in the past. In this step, if a corresponding session cache exists in the system cache, a session pointer in the session cache is obtained.
After the session pointer is obtained, session access can be initiated by the session pointer to the acquisition equipment corresponding to the acquisition equipment identifier.
In this embodiment, if a corresponding session cache exists in the system cache, a session pointer in the session cache is obtained; and initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer. Session access is directly initiated to the acquisition equipment through the session cache in the system cache, so that the process of reestablishing connection is omitted, and the access efficiency is improved.
S50: and if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier.
After inquiring whether the corresponding session cache exists in the system cache, if the system cache does not exist, the history that the session does not exist for the acquisition device or the corresponding session cache is expired is indicated, and a new session needs to be created to access the acquisition device.
Session locking may be achieved by setting a mutex. Mutexes are also known as mutex locks. A mutex is a variable that can be in one of two states: unlocking and locking. After setting the mutex, when other threads need to use the session, it is necessary to check first whether the mutex has been locked, and if so, the thread blocks waiting for the release of the lock. In this step, no corresponding session cache exists in the system cache, the state of the session lock of the acquisition device needs to be determined, and if the session lock is in a locked state, new access cannot be initiated to the acquisition device.
S60: and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue.
In the step, if the session lock corresponding to the acquisition equipment identifier is in a locked state, the data acquisition request is put into a waiting queue. Access to the acquisition device can only be achieved after the session lock is unlocked.
In this embodiment, after receiving a data acquisition request of a receiving access terminal, analyzing the data acquisition request to obtain data acquisition information, where the data acquisition information includes an acquisition device identifier; inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier; if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier; and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue. The server side analyzes and controls different data acquisition devices, so that a unified device access entrance is realized, the data access efficiency is better ensured, the data access and acquisition efficiency of the acquisition devices can be improved through the setting of session cache, and the burden of a computer is reduced. Further, through the setting of the session lock, the problem of acquisition failure caused by resource competition is avoided.
In an embodiment, after the querying the state of the session lock corresponding to the acquisition device identifier, the SDN network device access method further includes:
and if the session lock corresponding to the acquisition equipment identifier is in an unlocked state, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier.
Specifically, if the session lock corresponding to the acquisition equipment identifier is in an unlocked state, it is indicated that the current acquisition equipment is not accessed by other access terminals, so that session access can be initiated to the acquisition equipment corresponding to the acquisition equipment identifier, and required data can be acquired. It will be appreciated that the session access may include procedures to establish a connection, encrypt negotiations, and the like. Further, after session access is initiated to the acquisition device corresponding to the acquisition device identifier, the session lock corresponding to the acquisition device identifier is adjusted to be in a locked state.
In an embodiment, as shown in fig. 3, after the data acquisition request is put into the waiting queue if the session lock corresponding to the acquisition device identifier is in a locked state, the SDN network device access method further includes:
s71: and monitoring the session lock state corresponding to the acquisition equipment identifier in real time.
And after the data acquisition request is put into a waiting queue, monitoring the session lock state of the acquisition equipment in real time. Optionally, a time interval may be preset, and the session lock state corresponding to the acquisition device identifier is detected every time the time interval elapses. The specific time interval can be set according to the actual application requirement.
S72: and if the session lock state corresponding to the acquisition equipment identifier is an unlocking state, inquiring whether the corresponding session cache exists in the system cache according to the acquisition equipment identifier.
If the session lock state corresponding to the acquisition equipment identifier is an unlocked state, the server side which has accessed the acquisition equipment identifier is indicated to complete the data access of the acquisition equipment. At this time, if the server side completes the data acquisition request of other access terminals, the session cache of the acquisition terminal is stored in the system cache. Therefore, whether the corresponding session cache exists in the system cache can be queried according to the acquisition equipment identification.
S73: and if the corresponding session cache does not exist in the system cache, initiating session access to the acquisition equipment according to the waiting queue in sequence.
And if the corresponding session cache does not exist in the system cache, initiating session access to the acquisition equipment according to the waiting queue in sequence. Specifically, session access is initiated to the acquisition device in sequence according to the order of entering the waiting queue.
S74: and if the corresponding session cache exists in the system cache, acquiring a session pointer in the session cache, and initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer.
And if the corresponding session cache exists in the system cache, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier in a session pointer mode.
In this embodiment, the session lock state corresponding to the acquisition device identifier is monitored in real time; if the session lock state corresponding to the acquisition equipment identifier is an unlocking state, inquiring whether a corresponding session cache exists in the system cache according to the acquisition equipment identifier; if the corresponding session cache does not exist in the system cache, session access is initiated to the acquisition equipment in sequence according to the waiting queue; if the corresponding session cache exists in the system cache, a session pointer in the session cache is acquired, and session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer. After entering the waiting queue, the session lock state of the acquisition equipment is monitored in real time so as to ensure that the subsequent access process can be performed in time, and on the premise that the session lock is in a locking state, whether the corresponding session cache exists in the system cache is queried again, so that the access efficiency to the acquisition equipment can be further improved.
In an embodiment, as shown in fig. 4, before receiving the data acquisition request of the access terminal, the SDN network device access method further includes:
s101: configuration information of each acquisition device is obtained.
Specifically, the acquisition device is a network device storing data, and the data interaction can be performed through the SDN collector. The configuration information may be presented in text form. Alternatively, if the configuration information is another form of file, the method may include converting the other form of file into the text form of the configuration information. For example, if the configuration information is in the form of an image, OCR recognition techniques may be employed to convert the configuration information in the form of an image into configuration information in the form of text.
S102: analyzing the configuration information of each acquisition device according to a preset analysis strategy to obtain the structural body data of each acquisition device, wherein the analysis strategy is an analysis mode of the configuration information.
Specifically, the preset analysis strategy is an analysis mode of the configuration information, optionally, the analysis strategy can be used for packaging the analysis algorithm of the configuration information into an analysis script, and then executing the analysis script can be used for analyzing the configuration information of the acquisition equipment to obtain the structural body data of each acquisition equipment.
In this embodiment, configuration information of each acquisition device is obtained in advance, and the configuration information of each acquisition device is analyzed according to a preset analysis policy to obtain structural body data of each acquisition device. The configuration information of each acquisition device can be analyzed in advance in a unified way, unified management and monitoring can be realized, and unified data acquisition of different subsequent access devices is facilitated.
In an embodiment, as shown in fig. 5, if a corresponding session cache exists in the system cache, a session access is initiated to an acquisition device corresponding to the acquisition device identifier, including:
s401: and if the corresponding session cache exists in the system cache, acquiring a session pointer in the session cache.
S402: and according to the session pointer, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier.
Specifically, in the system cache, the server saves the session pointer of the last access terminal to the acquisition device in the session cache. Thus, subsequent access requests to the same acquisition device can be directly processed through the session pointer saved in the past. And if the corresponding session cache exists in the system cache, acquiring a session pointer in the session cache. After the session pointer is obtained, session access can be initiated by the session pointer to the acquisition equipment corresponding to the acquisition equipment identifier. Session access is directly initiated to the acquisition equipment through the session cache in the system cache, so that the process of reestablishing connection is omitted, and the access efficiency is improved.
In an embodiment, an SDN network device access apparatus is provided, where the SDN network device access apparatus corresponds to an SDN network device access method in the foregoing embodiment one-to-one. As shown in fig. 6, the SDN network device access apparatus includes a receiving module 81, an analyzing module 82, a querying module 83, a first executing module 84, a second executing module 85, and a third executing module 86, where each functional module is described in detail as follows:
a receiving module 81, configured to receive a data acquisition request from an access terminal.
The parsing module 82 is configured to parse the data collection request to obtain data collection information, where the data collection information includes a collection device identifier.
And the query module 83 is configured to query whether a corresponding session cache exists in the system cache according to the acquisition device identifier.
The first execution module 84 is configured to initiate a session access to the collection device corresponding to the collection device identifier when a corresponding session cache exists in the system cache.
And the second execution module 85 is configured to query the state of the session lock corresponding to the acquisition device identifier when the corresponding session cache does not exist in the system cache.
And a third execution module 86, configured to put the data acquisition request into a waiting queue when the session lock corresponding to the acquisition device identifier is in a locked state.
Preferably, the SDN network device access device further includes a fourth execution module, configured to initiate session access to the collection device corresponding to the collection device identifier when the session lock corresponding to the collection device identifier is in an unlocked state.
Further, the SDN network device access device further includes a monitoring module, a second query module, a first processing module and a second processing module, where each functional module is described in detail as follows:
the monitoring module is used for monitoring the session lock state corresponding to the acquisition equipment identifier in real time;
the second query module is used for querying whether a corresponding session cache exists in the system cache according to the acquisition equipment identifier when the session lock state corresponding to the acquisition equipment identifier is an unlocking state;
the first processing module is used for sequentially initiating session access to the acquisition equipment according to the waiting queue when the corresponding session cache does not exist in the system cache;
and the second processing module is used for acquiring a session pointer in the session cache when the corresponding session cache exists in the system cache, and initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer.
Preferably, the SDN network device access device further includes an acquisition module and a second parsing module.
The acquisition module is used for acquiring configuration information of each acquisition device;
the second analysis module is used for analyzing the configuration information of each acquisition device according to a preset analysis strategy to obtain the structural body data of each acquisition device, wherein the analysis strategy is an analysis mode of the configuration information.
Preferably, the first execution module 84 includes a first pointer unit and a second pointer unit.
The first pointer unit is used for acquiring a session pointer in the session cache when the corresponding session cache exists in the system cache;
and the second pointer unit is used for initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
For the specific limitation of the SDN network device access means, reference may be made to the limitation of the SDN network device access method hereinabove, which is not described herein. The respective modules in the SDN network device access device may be implemented in whole or in part by software or hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is for communicating with an external server via a network connection. The computer program, when executed by a processor, implements a SDN network device access method.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
receiving a data acquisition request of an access terminal;
analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier;
inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier;
if the corresponding session cache exists in the system cache, session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier;
if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier;
and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a data acquisition request of an access terminal;
analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier;
inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier;
if the corresponding session cache exists in the system cache, session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier;
if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier;
and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. An SDN network device access method, comprising:
receiving a data acquisition request of an access terminal, acquiring an acquired data type in the data acquisition request, and verifying whether the access terminal has the authority of data acquisition on the data of the acquired data type;
if the access terminal is verified to have the authority of data acquisition of the data of the acquired data type, analyzing the data acquisition request to obtain data acquisition information, wherein the data acquisition information comprises an acquisition equipment identifier;
acquiring a preset access authority configuration table, inquiring whether the access terminal has the authority for carrying out data access on the acquisition equipment corresponding to the acquisition equipment identifier or not through the preset access authority configuration table, and inquiring whether a corresponding session cache exists in a system cache or not according to the acquisition equipment identifier if the access terminal has the authority for carrying out data access on the acquisition equipment corresponding to the acquisition equipment identifier through the preset access authority configuration table;
if the corresponding session cache exists in the system cache, session access is initiated to the acquisition equipment corresponding to the acquisition equipment identifier;
if the corresponding session cache does not exist in the system cache, inquiring the state of the session lock corresponding to the acquisition equipment identifier;
and if the session lock corresponding to the acquisition equipment identifier is in a locking state, putting the data acquisition request into a waiting queue.
2. The SDN network device access method of claim 1, wherein after the querying the state of the session lock corresponding to the collection device identifier, the SDN network device access method further comprises:
and if the session lock corresponding to the acquisition equipment identifier is in an unlocked state, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier.
3. The SDN network device access method of claim 1, wherein after the placing the data collection request in the wait queue if the session lock corresponding to the collection device identifier is in a locked state, the SDN network device access method further includes:
monitoring the session lock state corresponding to the acquisition equipment identifier in real time;
if the session lock state corresponding to the acquisition equipment identifier is an unlocking state, inquiring whether a corresponding session cache exists in a system cache according to the acquisition equipment identifier;
if the corresponding session cache does not exist in the system cache, session access is initiated to the acquisition equipment in sequence according to the waiting queue;
and if the corresponding session cache exists in the system cache, acquiring a session pointer in the session cache, and initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer.
4. The SDN network device access method of claim 1, wherein prior to the receiving the data collection request for the access terminal, the SDN network device access method further comprises:
acquiring configuration information of each acquisition device;
analyzing the configuration information of each acquisition device according to a preset analysis strategy to obtain the structural body data of each acquisition device, wherein the analysis strategy is an analysis mode of the configuration information.
5. The SDN network device access method of claim 1, wherein if a corresponding session cache exists in the system cache, initiating a session access to the collection device corresponding to the collection device identifier includes:
if the corresponding session cache exists in the system cache, acquiring a session pointer in the session cache;
and according to the session pointer, initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier.
6. An SDN network device access device, comprising:
the receiving module is used for receiving a data acquisition request of an access terminal, acquiring an acquired data type in the data acquisition request, and verifying whether the access terminal has the authority of carrying out data acquisition on the data of the acquired data type;
the analysis module is used for analyzing the data acquisition request to obtain data acquisition information if the access terminal is verified to have the authority of data acquisition of the acquired data type, wherein the data acquisition information comprises an acquisition equipment identifier;
the query module is used for acquiring a preset access authority configuration table, querying whether the access terminal has the authority for carrying out data access on the acquisition equipment corresponding to the acquisition equipment identifier or not through the preset access authority configuration table, and querying whether a corresponding session cache exists in a system cache or not according to the acquisition equipment identifier if the access terminal has the authority for carrying out data access on the acquisition equipment corresponding to the acquisition equipment identifier through the preset access authority configuration table;
the first execution module is used for initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier when the corresponding session cache exists in the system cache;
the second execution module is used for inquiring the state of the session lock corresponding to the acquisition equipment identifier when the corresponding session cache does not exist in the system cache;
and the third execution module is used for placing the data acquisition request into a waiting queue when the session lock corresponding to the acquisition equipment identifier is in a locking state.
7. The SDN network device access means of claim 6, further comprising:
and the fourth execution module is used for initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier when the session lock corresponding to the acquisition equipment identifier is in an unlocked state.
8. The SDN network device access means of claim 6, further comprising:
the monitoring module is used for monitoring the session lock state corresponding to the acquisition equipment identifier in real time;
the query module is used for querying whether a corresponding session cache exists in the system cache according to the acquisition equipment identifier when the session lock state corresponding to the acquisition equipment identifier is an unlocking state;
the first processing module is used for sequentially initiating session access to the acquisition equipment according to the waiting queue when the corresponding session cache does not exist in the system cache;
and the second processing module is used for acquiring a session pointer in the session cache when the corresponding session cache exists in the system cache, and initiating session access to the acquisition equipment corresponding to the acquisition equipment identifier according to the session pointer.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the SDN network device access method of any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the SDN network device access method of any one of claims 1 to 5.
CN202010122323.3A 2020-02-27 2020-02-27 SDN network device access method and device, computer device and storage medium Active CN111447102B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010122323.3A CN111447102B (en) 2020-02-27 2020-02-27 SDN network device access method and device, computer device and storage medium
PCT/CN2020/117979 WO2021169275A1 (en) 2020-02-27 2020-09-27 Sdn network device access method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010122323.3A CN111447102B (en) 2020-02-27 2020-02-27 SDN network device access method and device, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN111447102A CN111447102A (en) 2020-07-24
CN111447102B true CN111447102B (en) 2024-02-13

Family

ID=71650993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010122323.3A Active CN111447102B (en) 2020-02-27 2020-02-27 SDN network device access method and device, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN111447102B (en)
WO (1) WO2021169275A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447102B (en) * 2020-02-27 2024-02-13 平安科技(深圳)有限公司 SDN network device access method and device, computer device and storage medium
CN112188456B (en) * 2020-09-25 2023-02-14 三维通信股份有限公司 Bluetooth device data acquisition method and device, storage medium and electronic device
CN113076462B (en) * 2021-03-25 2024-04-30 恒安嘉新(北京)科技股份公司 Network session data query method, device, equipment and medium
CN115208841B (en) * 2021-07-09 2024-01-26 江苏省未来网络创新研究院 SDN-based industrial Internet identification flow caching processing method
CN115297174B (en) * 2022-10-10 2023-03-24 广州市易鸿智能装备有限公司 Method and device for sequentially storing out-of-order data source, electronic equipment and storage medium
CN115941485A (en) * 2022-11-03 2023-04-07 中盈优创资讯科技有限公司 Method and device for issuing queue management and control based on network element equipment configuration
CN115695594B (en) * 2023-01-03 2023-03-07 徐工汉云技术股份有限公司 Internet of things data communication method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6098093A (en) * 1998-03-19 2000-08-01 International Business Machines Corp. Maintaining sessions in a clustered server environment
CN104185148A (en) * 2014-09-15 2014-12-03 武汉地大信息工程股份有限公司 Geological environment mobile terminal collection optimizing system and method
CN105472002A (en) * 2015-12-09 2016-04-06 国家电网公司 Session synchronization method based on instant copying among cluster nodes
CN107483418A (en) * 2017-07-27 2017-12-15 阿里巴巴集团控股有限公司 Login process method, method for processing business, device and server
CN107659607A (en) * 2017-07-21 2018-02-02 国网浙江省电力公司 The external delivery system of gathered data based on distributed service processing
CN108768791A (en) * 2018-07-04 2018-11-06 山东汇贸电子口岸有限公司 A kind of information collection configuration management system and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6876994B2 (en) * 2000-05-30 2005-04-05 Matsushita Electric Industrial Co., Ltd. Data acquisition apparatus and method
CN103095859B (en) * 2011-11-04 2016-01-06 阿里巴巴集团控股有限公司 Multiple domain name session information shares method and system
US9491031B2 (en) * 2014-05-06 2016-11-08 At&T Intellectual Property I, L.P. Devices, methods, and computer readable storage devices for collecting information and sharing information associated with session flows between communication devices and servers
US10454936B2 (en) * 2015-10-23 2019-10-22 Oracle International Corporation Access manager session management strategy
CN111447102B (en) * 2020-02-27 2024-02-13 平安科技(深圳)有限公司 SDN network device access method and device, computer device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6098093A (en) * 1998-03-19 2000-08-01 International Business Machines Corp. Maintaining sessions in a clustered server environment
CN104185148A (en) * 2014-09-15 2014-12-03 武汉地大信息工程股份有限公司 Geological environment mobile terminal collection optimizing system and method
CN105472002A (en) * 2015-12-09 2016-04-06 国家电网公司 Session synchronization method based on instant copying among cluster nodes
CN107659607A (en) * 2017-07-21 2018-02-02 国网浙江省电力公司 The external delivery system of gathered data based on distributed service processing
CN107483418A (en) * 2017-07-27 2017-12-15 阿里巴巴集团控股有限公司 Login process method, method for processing business, device and server
CN108768791A (en) * 2018-07-04 2018-11-06 山东汇贸电子口岸有限公司 A kind of information collection configuration management system and method

Also Published As

Publication number Publication date
WO2021169275A1 (en) 2021-09-02
CN111447102A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN111447102B (en) SDN network device access method and device, computer device and storage medium
US20150347305A1 (en) Method and apparatus for outputting log information
CN110232010A (en) A kind of alarm method, alarm server and monitoring server
CN108446172B (en) Data calling method and device, computer equipment and storage medium
CN112162965B (en) Log data processing method, device, computer equipment and storage medium
CN108572970B (en) Structured data processing method and distributed processing system
CN107346270B (en) Method and system for real-time computation based radix estimation
CN107423942B (en) Service transfer method and device
CN104219235A (en) Distributed transaction requesting method and device
CN111813573B (en) Communication method of management platform and robot software and related equipment thereof
CN110661829A (en) File downloading method and device, client and computer readable storage medium
CN105260639A (en) Face recognition system data update method and device
CN111815454A (en) Data uplink method and device, electronic equipment and storage medium
CN113590433B (en) Data management method, data management system, and computer-readable storage medium
CN106612263B (en) Method and equipment for processing application access request
CN112118189B (en) Flow sampling method, computer equipment and computer readable storage medium
CN110333916A (en) Request message processing method, device, computer system and readable storage medium storing program for executing
CN113010542A (en) Service data processing method and device, computer equipment and storage medium
CN116701020A (en) Message delay processing method, device, equipment, medium and program product
CN113420050B (en) Data query management method, device, computer equipment and readable storage medium
CN114048512A (en) Method and device for processing sensitive data
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN115080504A (en) File management method, terminal and storage medium
US20210224272A1 (en) Method, device, computer apparatus, and storage medium for storing data
CN108984285B (en) Data collision flow analysis method and device, storage medium and terminal

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
GR01 Patent grant
GR01 Patent grant