CN113852509B - Equipment access method, system, medium and electronic terminal - Google Patents

Equipment access method, system, medium and electronic terminal Download PDF

Info

Publication number
CN113852509B
CN113852509B CN202111165039.5A CN202111165039A CN113852509B CN 113852509 B CN113852509 B CN 113852509B CN 202111165039 A CN202111165039 A CN 202111165039A CN 113852509 B CN113852509 B CN 113852509B
Authority
CN
China
Prior art keywords
function
access
access mode
equipment
accessed
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
CN202111165039.5A
Other languages
Chinese (zh)
Other versions
CN113852509A (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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202111165039.5A priority Critical patent/CN113852509B/en
Publication of CN113852509A publication Critical patent/CN113852509A/en
Application granted granted Critical
Publication of CN113852509B publication Critical patent/CN113852509B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • 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/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

The invention provides a device access method, a system, a medium and an electronic terminal, wherein the method comprises the following steps: a plurality of function instructions for realizing protocol functions are created in advance, and the protocol functions comprise: standard protocol functions and proprietary protocol functions; acquiring function related information of a function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol; acquiring the functional requirement of equipment to be accessed; according to the function requirement and the function association information, configuring an access mode of the equipment to be accessed to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; completing equipment access according to the final access mode; the method of the invention better realizes the optimization of the access mode of the equipment, avoids the repeated development of functions and has less access procedures.

Description

Equipment access method, system, medium and electronic terminal
Technical Field
The present invention relates to the field of internet of things, and in particular, to a device access method, a system, a medium, and an electronic terminal.
Background
The internet of things (IoT, internet of things), i.e. "internet of everything connected". Various devices access the platform through a protocol, the protocol generally comprises a standard protocol, a private protocol and the like, the functions and access modes supported by different protocols are different, and different requirements are provided for software development and server performance.
At present, a certain protocol access device is manually selected according to service requirements, the protocol needs to contain the complete functions of the service requirements, however, the complete functions of most of the service requirements are difficult to be met by using a certain protocol access device, and if a new development function or a new protocol is adopted or a mode of associating different devices after being accessed into a plurality of protocols is adopted, the problems of repeated development of functions, non-universality of a specific protocol, complex service flow, low access performance and the like are easily generated; and some special functions in the service demand need the private protocol to carry out the equipment access, because the private protocol can usually access the equipment quantity less, CPU and memory occupy higher, when the equipment that needs to be accessed exceeds the accessible equipment quantity of the private protocol, easily lead to the access procedure quantity to increase, the business flow complexity is higher, personnel and running cost are higher, the access procedure is the procedure realization of access protocol.
Disclosure of Invention
The invention provides a device access method, a system, a medium and an electronic terminal, which are used for solving the problems that in the prior art, when a device is accessed, repeated development of functions is easy to generate, the number of access programs is large, the complexity of service flow is high, and personnel and operation cost are high.
The device access method provided by the invention comprises the following steps:
a plurality of function instructions for implementing protocol functions are created in advance, wherein the protocol functions comprise: standard protocol functions and proprietary protocol functions;
acquiring function related information of the function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol;
acquiring the functional requirement of equipment to be accessed;
according to the function requirement and the function association information, configuring an access mode of the equipment to be accessed to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed;
and according to the final access mode, completing the access of the equipment.
Optionally, the obtaining manner of the priority score includes:
acquiring parameter information of the functional instruction, wherein the parameter information at least comprises one of the following: the method comprises the following steps of function realization, code complexity, whether standard protocol is adopted, signaling network flow, transport layer protocol, security parameters and whether heartbeat connection is adopted;
and scoring the function instructions corresponding to different protocols according to the parameter information and a preset scoring rule, and obtaining the priority score.
Optionally, the step of configuring the access mode of the device to be accessed according to the function requirement and the function association information includes:
acquiring a connection function requirement and/or a special function requirement in the function requirements;
acquiring a first access mode with higher priority according to the connection function requirement and the priority;
acquiring a second access mode which can meet the corresponding function in the special function requirement and has higher priority score according to the special function requirement and the priority score;
and determining a final access mode of the equipment to be accessed according to the first access mode and/or the second access mode.
Optionally, the step of determining the final access mode of the device to be accessed according to the first access mode and/or the second access mode includes:
determining the first access mode as a connection function access mode of the equipment to be accessed;
determining the second access mode as a special function access mode of the equipment to be accessed;
and taking the connection function access mode and/or the special function access mode as the final access mode.
Optionally, according to the final access mode, the step of completing the device access includes:
executing a device connection function request by utilizing a connection function in an access program of a first access mode in a final access mode to finish device connection, wherein the device connection function request corresponds to a connection function requirement of a device to be accessed;
and executing a special function request of the equipment by using an access program of a second access mode in the final access mode to finish the function execution, wherein the special function request of the equipment corresponds to the special function requirement of the equipment to be accessed.
Optionally, the step of configuring the access mode of the device to be accessed according to the function requirement and the function association information further includes:
if the first access mode can meet the corresponding function in the special function requirement, taking the access program in the first access mode as the access program in the second access mode;
and according to the special function requirement, determining the corresponding relation between the access program and the equipment to be accessed in the second access mode, and further determining the final access mode.
Optionally, according to the second access manner, the step of executing the device function request includes:
according to the second access mode, sending the special function request of the equipment to a corresponding access program;
if the connection with the equipment to be accessed exists in the access program, directly executing the special function request of the equipment;
if the access program does not have the connection with the equipment to be accessed, establishing the connection with the equipment to be accessed by utilizing the connection function in the access program, and further executing the special function request of the equipment;
and after the special function of the equipment is requested to be executed, releasing the connection between the equipment to be accessed and the access program according to the preset connection timeout release time.
The invention also provides a device access system, comprising:
the preprocessing module is used for creating a plurality of function instructions for realizing protocol functions in advance, wherein the protocol functions comprise: standard protocol functions and proprietary protocol functions; acquiring function related information of the function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol;
the acquisition module is used for acquiring the functional requirements of the equipment to be accessed;
the access module is configured to configure an access mode of the device to be accessed according to the function requirement and the function association information, and obtain a final access mode, where the final access mode includes: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; completing equipment access according to the final access mode; the preprocessing module, the acquisition module and the access module are connected.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as described in any of the above.
The invention also provides an electronic terminal, comprising: a processor and a memory;
the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, so as to cause the terminal to perform the method according to any one of the above.
The invention has the beneficial effects that: the device access method, the system, the medium and the electronic terminal of the invention are characterized in that a plurality of function instructions for realizing protocol functions are created in advance, and the protocol functions comprise: standard protocol functions and proprietary protocol functions; acquiring function related information of a function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol; acquiring the functional requirement of equipment to be accessed; configuring an access mode of equipment to be accessed according to the function requirements and the function association information to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; and according to the final access mode, completing the equipment access; the method has the advantages of better realizing the optimization of the access mode of the equipment, avoiding the problem of repeated development of functions, along with less number of access programs, lower complexity of service flow, lower cost of personnel and operation, and more convenient implementation.
Drawings
Fig. 1 is a schematic flow chart of a device access method in an embodiment of the present invention.
Fig. 2 is a schematic flow chart of acquiring priority scores in a device access method according to an embodiment of the present invention.
Fig. 3 is a schematic flow chart of a configuration access mode in a device access method in an embodiment of the present invention.
Fig. 4 is a schematic flow chart of completing device access in the device access method in the embodiment of the invention.
Fig. 5 is a schematic structural diagram of a device access system according to an embodiment of the present invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present invention by way of illustration, and only the components related to the present invention are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
The inventor finds that with the development of the internet of things technology, information intercommunication is receiving more and more attention, various devices access to a platform through various protocols, the protocols generally comprise standard protocols, proprietary protocols and the like, and the standard protocols of video types include: GB28181, GB35114, ONVIF, etc., proprietary protocols such as: the proprietary protocol of the manufacturer, the SDK of the manufacturer (Software Development Kit ) and the like are different in function and access mode supported by different protocols, and have different requirements on software development and server performance. At present, a certain protocol access device is manually selected according to service requirements, the protocol needs to contain the complete functions of the service requirements, however, the complete functions of most of the service requirements are difficult to be met by using a certain protocol access device, and if a new development function or a new protocol is adopted or a mode of associating different devices after being accessed into a plurality of protocols is adopted, the problems of repeated development of functions, non-universality of a specific protocol, complex service flow, low access performance and the like are easily generated; and some special functions in the service demands need the private protocol to access the equipment, because the private protocol can access the equipment generally, the CPU and the memory occupy higher, when the equipment needing to be accessed exceeds the number of the accessible equipment of the private protocol, the number of access programs is easy to increase, the complexity of the service flow is higher, and the personnel and the running cost are higher, wherein the access programs are realized by the programs of the access protocol. Therefore, the inventor proposes a device access method, a system, a medium and an electronic terminal, by creating a plurality of function instructions for implementing protocol functions in advance, where the protocol functions include: standard protocol functions and proprietary protocol functions; acquiring function related information of a function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol; acquiring the functional requirement of equipment to be accessed; configuring an access mode of equipment to be accessed according to the function requirements and the function association information to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; and according to the final access mode, completing the equipment access; the method has the advantages of better realizing the optimization of the access mode of the equipment, avoiding the problem of repeated development of functions, having less number of access programs, lower complexity of service flow, effectively reducing personnel and operation cost, being more convenient to implement, having higher degree of automation and saving equipment access resources.
As shown in fig. 1, the device access method in this embodiment includes:
s101: a plurality of function instructions for implementing protocol functions are created in advance, wherein the protocol functions comprise: standard protocol functions and proprietary protocol functions; by creating a plurality of function instructions for realizing protocol functions in advance, the fusion of protocol functions is well realized, the priority judgment of the realization effect of the protocol functions in each access protocol can be conveniently carried out later, the final access mode is determined according to the function requirement and priority score of the equipment to be accessed later, and the customization and optimization of the equipment access mode are realized. The standard protocol functions are the functions of GB28181 protocol and ONVIF protocol of video equipment, and the private protocol functions are the functions of private protocols provided by manufacturers, such as the functions of SDK protocol of the manufacturers, and the like. The creation mode of the functional instruction may adopt the existing technical means to create the functional instruction, which is not described herein. The function instructions are data for implementing functions of different protocols.
In some embodiments, based on the universality of the standard protocol, in the process of creating the function instruction for implementing the private protocol function, if the private protocol function is the same as the standard protocol function and the implemented code flow is the same, the function instruction for implementing the function of the private protocol is not created any more, thereby avoiding the generation of repeated development of the function and reducing the development workload.
In some embodiments, when initializing, all the function instructions are traversed, whether the corresponding protocol function is realized is judged, and the fields of whether the corresponding protocol function is realized are dynamically stored in the database, so that the user can conveniently identify whether all the protocol functions are realized.
S102: acquiring function related information of the function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol; the access protocol name is the name of a protocol realizing the protocol function, and whether the function is realized refers to whether the function instruction is realized corresponding to the protocol function. By acquiring the function association information of the function instruction, the corresponding better access mode can be determined conveniently according to the function association information, and the access rationality of the equipment is improved.
S103: acquiring the functional requirement of equipment to be accessed; such as real-time video viewing requirements, video location temperature viewing requirements, etc.
S104: according to the function requirement and the function association information, configuring an access mode of the equipment to be accessed to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; for example: judging whether the function instruction realizes the corresponding function in the function requirement according to the function requirement and the function association information, acquiring the function instruction realizing the corresponding function in the function requirement, sorting the function instruction realizing the corresponding function according to the priority score, acquiring the function instruction with the highest priority score, further determining an access program corresponding to the function instruction, and determining the corresponding relation between the access program and the equipment to be accessed according to the number of the access equipment in the function requirement, namely, how many pieces of equipment to be accessed are accessed to the corresponding access program, and further acquiring a final access mode. By configuring the access mode to be accessed according to the function requirements and the function association information, customization and optimization of the access mode of the equipment to be accessed can be better realized, the degree of automation is higher, the development cost and the development time are effectively saved, and the practicability is higher.
S105: and according to the final access mode, completing the access of the equipment. By fusing protocol functions, a better access mode is determined, optimization of the access mode is better realized, the number of access programs is reduced, the use of a private protocol is reduced, the use of a certain access protocol or access mode for equipment access is avoided, occupation of a CPU (Central processing Unit), a memory, a network and the like is reduced, operation is stable, and usability is high.
As shown in fig. 2, in order to obtain a priority score of an implementation effect of a protocol function in each access protocol, and improve a fitting degree of the priority score and the implementation effect of the protocol function, the inventor proposes that the method for obtaining the priority score includes:
s201: acquiring parameter information of the functional instruction, wherein the parameter information at least comprises one of the following: the method comprises the following steps of function realization, code complexity, whether standard protocol is adopted, signaling network flow, transport layer protocol, security parameters and whether heartbeat connection is adopted; by acquiring the parameter information of the function instruction, the priority judgment and scoring of the function instruction realizing the protocol function can be facilitated. The function implementing step refers to the number of steps of the function instruction to implement the corresponding protocol function.
S202: and scoring the function instructions corresponding to different protocols according to the parameter information and a preset scoring rule, and obtaining the priority score. For example: presetting an identification of a function implementation step as A, wherein the highest score is 10, when the function implementation step of the function instruction is smaller than or equal to 10, A=10-n+1, and when the function implementation step of the function instruction is larger than 10, A=0; the method comprises the steps that a code complexity mark is preset to be B, the highest score is 10, when parameters in a function instruction are complex, B=B-3, when the flow of the function instruction in the function instruction is more, B=B-3, when the parameters to be calculated in the function instruction are more, B=B-4, wherein the judgment of the complexity, the flow and the parameters to be calculated of the parameters in the function instruction can be carried out in a threshold setting mode, if the number of the parameters in the function instruction exceeds a preset parameter threshold, the parameters in the function instruction are complex, and the corresponding score is obtained to be B=B-3; the method comprises the steps that whether an identifier of a standard protocol is C or not is preset, the highest score is 10, C=10 when an access protocol corresponding to a function instruction is the standard protocol, and C=2 when the access protocol corresponding to the function instruction is a non-standard protocol; presetting an identification of a signaling network flow as D, wherein the highest score is 10, when the signaling network flow of the function instruction is smaller than or equal to 512 bytes, D=10, when the signaling network flow of the function instruction is larger than 512 bytes and smaller than or equal to 1024 bytes, D=8, when the signaling network flow of the function instruction is larger than 1024 bytes and smaller than or equal to 2048 bytes, D=1, and when the signaling network flow of the function instruction is in other range, D=1; presetting an identification of a transport layer protocol as E, wherein the highest score is 10, E=5 when the transport layer protocol corresponding to the function instruction is TCP (transmission control protocol ), and E=3 when the transport layer protocol corresponding to the function instruction is UDP (user datagram protocol ); presetting an identifier of a security parameter as F, wherein the highest score is 10, F=10 when the security parameter of the function instruction is a digital certificate, F=5 when the security parameter of the function instruction is private encryption and decryption, and F=0 when the function instruction is a plaintext; the flag of whether the heartbeat connection is preset to be G, the highest score is 5, G=5 when the function instruction is the heartbeat connection, and G=0 when the function instruction is not the heartbeat connection. Further, when the function instruction does not implement the corresponding protocol function, the corresponding priority score is 0, and when the function instruction can implement the corresponding protocol function, the corresponding priority score is a+b+c+d+e+f+g, so as to complete the determination of the priority score. The foregoing is merely an example, and is not intended to limit the parameter information or the scoring rule specifically, and those skilled in the art may configure or adjust the components of the highest score and the parameter information in combination with the service scenario, which is not described herein.
As shown in fig. 3, in some embodiments, the step of configuring the access manner of the device to be accessed according to the function requirement and the function association information includes:
s301: acquiring a connection function requirement and/or a special function requirement in the function requirements;
s302: acquiring a first access mode with higher priority according to the connection function requirement and the priority; and the first access mode uses a standard protocol to access the equipment. For example: according to the connection function requirements, determining function instructions meeting the connection function requirements, sorting the function instructions meeting the connection function requirements according to priority scores, acquiring a first priority list, acquiring the function instruction with the highest priority score in the first priority list, further acquiring an access program corresponding to the function instruction with the highest priority score, and acquiring the corresponding relation between the equipment to be accessed and the access program according to the number of the equipment to be accessed in the connection function requirements. And further determining a first access mode.
S303: acquiring a second access mode which can meet the corresponding function in the special function requirement and has higher priority score according to the special function requirement and the priority score; and the second access mode uses a private protocol to access the equipment. For example: according to the special function requirements, determining function instructions meeting the special function requirements, sorting the function instructions meeting the special function requirements according to the priority scores, acquiring a second priority list, acquiring the function instruction with the highest priority score in the second priority list, further acquiring an access program corresponding to the function instruction, and acquiring the corresponding relation between the equipment to be accessed and the corresponding access program according to the number of the equipment to be accessed in the special function requirements.
S304: and determining a final access mode of the equipment to be accessed according to the first access mode and/or the second access mode.
In some embodiments, the step of determining the final access mode of the device to be accessed according to the first access mode and/or the second access mode includes:
determining the first access mode as a connection function access mode of the equipment to be accessed; the first access mode is used for online connection of equipment;
determining the second access mode as a special function access mode of the equipment to be accessed;
and taking the connection function access mode and/or the special function access mode as the final access mode.
In some embodiments, the step of configuring the access mode of the device to be accessed according to the function requirement and the function association information further includes:
if the first access mode can meet the corresponding function in the special function requirement, taking the access program in the first access mode as the access program in the second access mode; because the first access mode uses the standard protocol to access the device, the number of accessible devices of the standard protocol is more, and the CPU and the memory occupy more, so that the first access mode is preferentially used, and the private protocol can be avoided, for example: if the access program in the first access mode can meet the corresponding function in the special function requirement, the priority score corresponding to the access program is properly increased, the access program in the first access mode is used as the access program in the second access mode, multiplexing of the heartbeat link in the first access mode is realized, and new connection establishment is reduced.
And according to the special function requirement, determining the corresponding relation between the access program and the equipment to be accessed in the second access mode, and further determining the final access mode.
Referring to fig. 4, in order to improve the rationality of device access and reduce the number of accesses to the private protocol, the inventor proposes that, according to the final access mode, the steps for completing device access include:
s401: executing a device connection function request by utilizing a connection function in an access program of a first access mode in a final access mode, completing device connection, and performing continuous heartbeat keep-alive by utilizing a heartbeat function in the access program of the first access mode, wherein the device connection function request corresponds to a connection function requirement of a device to be accessed;
s402: and executing a special function request of the equipment by using an access program of a second access mode in the final access mode to finish the function execution, wherein the special function request of the equipment corresponds to the special function requirement of the equipment to be accessed.
In some embodiments, according to the second access manner, the step of executing the device function request includes:
according to the second access mode, sending the special function request of the equipment to a corresponding access program;
if the connection with the equipment to be accessed exists in the access program, directly executing the special function request of the equipment;
if the access program does not have the connection with the equipment to be accessed, the connection function in the access program is utilized to establish the connection with the equipment to be accessed, and then the special function request of the equipment is executed.
In some embodiments, after the device specific function request is executed, the connection between the device to be accessed and the access procedure is released according to a preset connection timeout release time. By periodically releasing the connection between the equipment and the access program, the repeated request performance is ensured, and the situation that multiple access modes are always connected on line is avoided.
In some embodiments, when the device connection function request fails to execute, a next function instruction in a first priority list is acquired according to the first priority list, where the first priority list is a priority ordered list of function instructions meeting the device connection function requirement, and the first priority list is ordered from high to low, and device access is performed according to an access procedure corresponding to the next function instruction.
In some embodiments, when the execution of the special function request of the device fails, a next function instruction in a second priority list is acquired according to the second priority list, where the second priority list is a priority-ordered list of function instructions meeting special function requirements of the device, and the second priority list is ordered from high to low, and device access is performed according to an access procedure corresponding to the next function instruction.
Embodiment one:
in a video monitoring and reconstruction project of a certain park, 2000 paths of video IPC (Internet protocol video CAMERA) equipment exist, and the functional requirements are as follows: real-time video of all IPC devices is checked and stored, and entrance guard data of 100 IPC personnel at a park gate are stored; the specific description is as follows: the device name is configured on the device, and the park needs to keep track of the previous device and name; the scheme is modified as follows:
1. because the access control data of 100 IPC personnel are only supported by the SDK of the manufacturer, the equipment connection of the SDK of the corresponding manufacturer needs to be developed to obtain the access control data function;
2. 1900 IPCs configure the ONVIF equipment connection function, namely equipment information is exported by a previous video monitoring system, a new system is imported again, and only one ONVIF access program is needed; the preferred GB28181 is not used here because GB28181 requires each device to configure platform information;
3. 1900 IPCs configure the real-time streaming function of the ONVIF equipment, the ONVIF protocol is complete signaling separation, and access program abnormality does not affect the real-time video and storage of the equipment;
4. 1900 IPC configuration ONVIFs acquire device names and synchronize the device names to a platform;
in summary, the park can complete video monitoring transformation by only one manufacturer SDK access program and one ONVIF access program, and if all manufacturer SDKs are used for accessing, at least 20 access programs are needed, and the number of access programs is large. The above embodiments are merely examples, and those skilled in the art may adapt according to actual situations, which are not described herein.
Embodiment two:
some steel mill projects, there are 600 video IPC equipment, and the functional requirement: video viewing and storage of all IPC devices, wherein 200 IPCs support users to view video position temperature values; the implementation is as follows:
1. 600 IPCs configure the ONVIF device connection function, namely, the finishing device information is imported into a new system, and an ONVIF access program is needed;
2. 200 IPC (Internet protocol) extra configuration manufacturer SDKs are accessed to acquire a video position temperature value (only the manufacturer SDKs support the function), the function is required for users to check irregularly, less equipment is checked at a unified moment, and one manufacturer SDK is accessed;
in summary, the above items only need one manufacturer SDK access program and one ONVIF access program, if all manufacturer SDKs are used to access, at least 6 access programs are needed, the number of access programs is large, optimization of the device access mode is realized, occupation of a CPU, a memory, a network and the like is reduced, functions are stable, usability is high, and repeated development of functions is reduced. The above embodiments are merely examples, and those skilled in the art may adapt according to actual situations, which are not described herein.
As shown in fig. 5, this embodiment further provides a device access system, including:
the preprocessing module is used for creating a plurality of function instructions for realizing protocol functions in advance, wherein the protocol functions comprise: standard protocol functions and proprietary protocol functions; acquiring function related information of the function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol;
the acquisition module is used for acquiring the functional requirements of the equipment to be accessed;
the access module is configured to configure an access mode of the device to be accessed according to the function requirement and the function association information, and obtain a final access mode, where the final access mode includes: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; completing equipment access according to the final access mode; the preprocessing module, the acquisition module and the access module are connected. In the device access system in this embodiment, a plurality of function instructions for implementing protocol functions are created in advance, where the protocol functions include: standard protocol functions and proprietary protocol functions; acquiring function related information of a function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol; acquiring the functional requirement of equipment to be accessed; configuring an access mode of equipment to be accessed according to the function requirements and the function association information to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; and according to the final access mode, completing the equipment access; the method has the advantages of better realizing the optimization of the access mode of the equipment, avoiding the problem of repeated development of functions, along with less number of access programs, lower complexity of service flow, lower personnel and operation cost, more convenient implementation, more reasonable access mode and higher degree of automation.
In some embodiments, the obtaining the priority score includes:
acquiring parameter information of the functional instruction, wherein the parameter information at least comprises one of the following: the method comprises the following steps of function realization, code complexity, whether standard protocol is adopted, signaling network flow, transport layer protocol, security parameters and whether heartbeat connection is adopted;
and scoring the function instructions corresponding to different protocols according to the parameter information and a preset scoring rule, and obtaining the priority score.
In some embodiments, the step of configuring the access mode of the device to be accessed according to the function requirement and the function association information includes:
acquiring a connection function requirement and/or a special function requirement in the function requirements;
acquiring a first access mode with higher priority according to the connection function requirement and the priority;
acquiring a second access mode which can meet the corresponding function in the special function requirement and has higher priority score according to the special function requirement and the priority score;
and determining a final access mode of the equipment to be accessed according to the first access mode and/or the second access mode.
In some embodiments, the step of determining the final access mode of the device to be accessed according to the first access mode and/or the second access mode includes:
determining the first access mode as a connection function access mode of the equipment to be accessed;
determining the second access mode as a special function access mode of the equipment to be accessed;
and taking the connection function access mode and/or the special function access mode as the final access mode.
In some embodiments, according to the final access mode, the step of completing the access of the device includes:
executing a device connection function request by utilizing a connection function in an access program of a first access mode in a final access mode to finish device connection, wherein the device connection function request corresponds to a connection function requirement of a device to be accessed;
and executing a special function request of the equipment by using an access program of a second access mode in the final access mode to finish the function execution, wherein the special function request of the equipment corresponds to the special function requirement of the equipment to be accessed.
In some embodiments, the step of configuring the access mode of the device to be accessed according to the function requirement and the function association information further includes:
if the first access mode can meet the corresponding function in the special function requirement, taking the access program in the first access mode as the access program in the second access mode;
and according to the special function requirement, determining the corresponding relation between the access program and the equipment to be accessed in the second access mode, and further determining the final access mode.
In some embodiments, according to the second access manner, the step of executing the device function request includes:
according to the second access mode, sending the special function request of the equipment to a corresponding access program;
if the connection with the equipment to be accessed exists in the access program, directly executing the special function request of the equipment;
if the access program does not have the connection with the equipment to be accessed, establishing the connection with the equipment to be accessed by utilizing the connection function in the access program, and further executing the special function request of the equipment;
and after the special function of the equipment is requested to be executed, releasing the connection between the equipment to be accessed and the access program according to the preset connection timeout release time.
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the methods of the present embodiments.
The embodiment also provides an electronic terminal, including: a processor and a memory;
the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, so that the terminal executes any one of the methods in the present embodiment.
The computer readable storage medium in this embodiment, as will be appreciated by those of ordinary skill in the art: all or part of the steps for implementing the method embodiments described above may be performed by computer program related hardware. The aforementioned computer program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver, and a communication interface, where the memory and the communication interface are connected to the processor and the transceiver and complete communication with each other, the memory is used to store a computer program, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer program, so that the electronic terminal performs each step of the above method.
In this embodiment, the memory may include a random access memory (Random Access Memory, abbreviated as RAM), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (10)

1. A method for device access, comprising:
a plurality of function instructions for implementing protocol functions are created in advance, wherein the protocol functions comprise: standard protocol functions and proprietary protocol functions;
acquiring function related information of the function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol;
acquiring the functional requirement of equipment to be accessed;
according to the function requirement and the function association information, configuring an access mode of the equipment to be accessed to obtain a final access mode, wherein the final access mode comprises: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed;
and according to the final access mode, completing the access of the equipment.
2. The device access method according to claim 1, wherein the obtaining the priority score includes:
acquiring parameter information of the functional instruction, wherein the parameter information at least comprises one of the following: the method comprises the following steps of function realization, code complexity, whether standard protocol is adopted, signaling network flow, transport layer protocol, security parameters and whether heartbeat connection is adopted;
and scoring the function instructions corresponding to different protocols according to the parameter information and a preset scoring rule, and obtaining the priority score.
3. The device access method according to claim 1, wherein the step of configuring the access manner of the device to be accessed according to the function requirement and the function association information comprises:
acquiring a connection function requirement and/or a special function requirement in the function requirements;
acquiring a first access mode with higher priority according to the connection function requirement and the priority;
acquiring a second access mode which can meet the corresponding function in the special function requirement and has higher priority score according to the special function requirement and the priority score;
and determining a final access mode of the equipment to be accessed according to the first access mode and/or the second access mode.
4. A device access method according to claim 3, wherein the step of determining the final access mode of the device to be accessed according to the first access mode and/or the second access mode comprises:
determining the first access mode as a connection function access mode of the equipment to be accessed;
determining the second access mode as a special function access mode of the equipment to be accessed;
and taking the connection function access mode and/or the special function access mode as the final access mode.
5. The device access method according to claim 1, wherein the step of completing device access according to the final access mode comprises:
executing a device connection function request by utilizing a connection function in an access program of a first access mode in a final access mode to finish device connection, wherein the device connection function request corresponds to a connection function requirement of a device to be accessed;
and executing a special function request of the equipment by using an access program of a second access mode in the final access mode to finish the function execution, wherein the special function request of the equipment corresponds to the special function requirement of the equipment to be accessed.
6. The device access method according to claim 3, wherein the step of configuring the access manner of the device to be accessed according to the function requirement and the function association information further comprises:
if the first access mode can meet the corresponding function in the special function requirement, taking the access program in the first access mode as the access program in the second access mode;
and according to the special function requirement, determining the corresponding relation between the access program and the equipment to be accessed in the second access mode, and further determining the final access mode.
7. The device access method of claim 5, wherein the step of performing a device function request according to the second access mode comprises:
according to the second access mode, sending the special function request of the equipment to a corresponding access program;
if the connection with the equipment to be accessed exists in the access program, directly executing the special function request of the equipment;
if the access program does not have the connection with the equipment to be accessed, establishing the connection with the equipment to be accessed by utilizing the connection function in the access program, and further executing the special function request of the equipment;
and after the special function of the equipment is requested to be executed, releasing the connection between the equipment to be accessed and the access program according to the preset connection timeout release time.
8. A device access system, comprising:
the preprocessing module is used for creating a plurality of function instructions for realizing protocol functions in advance, wherein the protocol functions comprise: standard protocol functions and proprietary protocol functions; acquiring function related information of the function instruction, wherein the function related information comprises: access protocol name, whether a function is implemented, and priority score for representing an implementation effect of a corresponding protocol function in a single protocol;
the acquisition module is used for acquiring the functional requirements of the equipment to be accessed;
the access module is configured to configure an access mode of the device to be accessed according to the function requirement and the function association information, and obtain a final access mode, where the final access mode includes: one or more access programs corresponding to the function instructions, and a correspondence between the access programs and the device to be accessed; completing equipment access according to the final access mode; the preprocessing module, the acquisition module and the access module are connected.
9. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program implementing the method according to any of claims 1 to 7 when executed by a processor.
10. An electronic terminal, comprising: a processor and a memory;
the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, to cause the terminal to perform the method according to any one of claims 1 to 7.
CN202111165039.5A 2021-09-30 2021-09-30 Equipment access method, system, medium and electronic terminal Active CN113852509B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111165039.5A CN113852509B (en) 2021-09-30 2021-09-30 Equipment access method, system, medium and electronic terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111165039.5A CN113852509B (en) 2021-09-30 2021-09-30 Equipment access method, system, medium and electronic terminal

Publications (2)

Publication Number Publication Date
CN113852509A CN113852509A (en) 2021-12-28
CN113852509B true CN113852509B (en) 2023-06-27

Family

ID=78977439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111165039.5A Active CN113852509B (en) 2021-09-30 2021-09-30 Equipment access method, system, medium and electronic terminal

Country Status (1)

Country Link
CN (1) CN113852509B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267436A (en) * 2008-04-11 2008-09-17 中兴通讯股份有限公司 A data management system for multi-service access device and its data management method
CN102387564A (en) * 2011-11-08 2012-03-21 中国联合网络通信集团有限公司 Internet of things access method, device and gateway
CN109672602A (en) * 2019-01-03 2019-04-23 青岛聚好联科技有限公司 A kind of method and apparatus remotely accessing VPN
CN111585958A (en) * 2020-04-01 2020-08-25 西安电子科技大学 Self-adaptive access method and system for heterogeneous equipment of Internet of things platform
CN112333227A (en) * 2020-09-11 2021-02-05 浙江工业大学 Internet of things platform of mixed type protocol based on rule engine
CN112698869A (en) * 2020-12-31 2021-04-23 青岛海尔科技有限公司 Instruction determination method and device, storage medium and electronic device
CN112769762A (en) * 2020-12-22 2021-05-07 广州技象科技有限公司 Distributed efficient Internet of things equipment access method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11163486B2 (en) * 2019-11-25 2021-11-02 Micron Technology, Inc. Memory sub-system-bounded memory function

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267436A (en) * 2008-04-11 2008-09-17 中兴通讯股份有限公司 A data management system for multi-service access device and its data management method
CN102387564A (en) * 2011-11-08 2012-03-21 中国联合网络通信集团有限公司 Internet of things access method, device and gateway
CN109672602A (en) * 2019-01-03 2019-04-23 青岛聚好联科技有限公司 A kind of method and apparatus remotely accessing VPN
CN111585958A (en) * 2020-04-01 2020-08-25 西安电子科技大学 Self-adaptive access method and system for heterogeneous equipment of Internet of things platform
CN112333227A (en) * 2020-09-11 2021-02-05 浙江工业大学 Internet of things platform of mixed type protocol based on rule engine
CN112769762A (en) * 2020-12-22 2021-05-07 广州技象科技有限公司 Distributed efficient Internet of things equipment access method
CN112698869A (en) * 2020-12-31 2021-04-23 青岛海尔科技有限公司 Instruction determination method and device, storage medium and electronic device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
物联网平台如何支持设备的多样化接入;阿里云开发者社区;《https://developer.aliyun.com/article/786002》;1-3 *
物联网末端多通道接入协议选择与优化研究与实现;张涛;《优秀硕士学位论文全文数据库》;全文 *
物联网设备接入管理平台关键技术研究;盛俊阳;《优秀硕士学位全文数据库》;全文 *

Also Published As

Publication number Publication date
CN113852509A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN107995215B (en) Control method and device of intelligent household equipment and cloud platform server
US20210099516A1 (en) Technologies for transparent function as a service arbitration for edge systems
CN111580995B (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
US20200374288A1 (en) Block chain-based multi-chain management method and system, electronic device, and storage medium
CN110032382A (en) A kind of vehicle electronic control unit upgrade method, system and terminal device
US10178163B2 (en) Server-processor hybrid system for processing data
WO2021088964A1 (en) Inference system, inference method, electronic device and computer storage medium
CN108427705A (en) Electronic device, distributed system journal querying method and storage medium
CN110855792B (en) Message pushing method, device, equipment and medium
CN113094062A (en) Upgrading method and device
CN111629371B (en) Screen projection method and system
CN113361913A (en) Communication service arranging method, device, computer equipment and storage medium
CN113852509B (en) Equipment access method, system, medium and electronic terminal
CN116881040A (en) Service operation processing method and device, electronic device and storage medium
CN113965628A (en) Message scheduling method, server and storage medium
CN115914319A (en) Remote management method and system for virtual reality equipment
CN111416851A (en) Method for session synchronization among multiple load balancers and load balancer
CN110474891A (en) Business access control method and device based on multisystem smart machine
CN115102804A (en) Data routing method and device for vehicle-mounted gateway, vehicle-mounted gateway and storage medium
CN111740972B (en) Method, device, equipment and storage medium for updating communication protocol stack information
CN111353811B (en) Unified resource issuing method and system
CN114915656A (en) Internet of vehicles terminal access method, device, storage medium and electronic equipment
CN113553206A (en) Data event execution method and device, electronic equipment and computer readable medium
CN104660403A (en) Equipment authorization method and server
US20230153159A1 (en) Hardware Accelerator Service Aggregation

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