CN115514667A - Access service processing method, system, device, electronic equipment and storage medium - Google Patents

Access service processing method, system, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115514667A
CN115514667A CN202211118641.8A CN202211118641A CN115514667A CN 115514667 A CN115514667 A CN 115514667A CN 202211118641 A CN202211118641 A CN 202211118641A CN 115514667 A CN115514667 A CN 115514667A
Authority
CN
China
Prior art keywords
plug
access
terminal
service
request
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.)
Pending
Application number
CN202211118641.8A
Other languages
Chinese (zh)
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202211118641.8A priority Critical patent/CN115514667A/en
Publication of CN115514667A publication Critical patent/CN115514667A/en
Pending legal-status Critical Current

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/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • H04L41/5054Automatic deployment of services triggered by the service manager, e.g. service implementation by automatic configuration of network components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
    • H04L47/762Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions triggered by the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The present disclosure provides an access service processing method, system, device, electronic device and storage medium, the method comprising: acquiring at least one access component and downloading at least one plug-in corresponding to each access component; the access component corresponds to at least one plug-in, and different plug-ins are matched with terminals of different models; authenticating the at least one plug-in response to a start request sent by the access component; and providing business services for the terminals of corresponding models based on the plug-in which the authentication passes, wherein the business services at least comprise access services of the terminals and remote control services of the terminals.

Description

Access service processing method, system, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to an access service processing method, system, apparatus, electronic device, and storage medium.
Background
With the development of the internet of things, an internet of things platform is developed, and the internet of things platform can manage massive terminals, such as internet of things devices, but various internet of things devices have different modes of accessing the internet of things due to different hardware manufacturers, for example, the access protocol, the application development language, the application deployment mode and the application monitoring management mode are greatly different among the devices, so that the access of the terminals to the internet of things platform is very complicated.
Disclosure of Invention
The present disclosure provides an access service processing method, which includes:
acquiring at least one access component and downloading at least one plug-in corresponding to each access component; the access assembly corresponds to at least one plug-in, and different plug-ins are matched with terminals of different models;
responding to a starting request sent by the access component, and authenticating at least one plug-in;
and providing service for the terminal of the corresponding model based on the plug-in which the authentication passes, wherein the service at least comprises an access service of the terminal and a remote control service of the terminal.
In an optional example, based on a plug-in that passes authentication, a service is provided for a terminal of a corresponding model, including:
responding to an operation request sent by the terminal aiming at the plug-in, and operating the plug-in after the authentication is passed;
receiving an access request sent by a plug-in, wherein the access request is sent to the plug-in by a terminal;
and accessing the terminal into the Internet of things based on the access request so as to provide access service.
In an optional example, after authenticating the at least one plug-in response to the initiation request sent by the access component, the method further includes:
generating a visual list based on the plug-ins passing the authentication and the models of the terminals corresponding to the plug-ins passing the authentication, wherein the visual list comprises the corresponding relation between the plug-ins and the terminals;
publishing the visualization list to the web page;
the operation request is sent after the user of the terminal confirms the plug-in on the visual list.
In an alternative example, the service includes a remote control service, and the service is provided for a terminal of a corresponding model based on a plug-in that passes authentication, and includes:
acquiring control information aiming at a first terminal to be controlled, wherein the control information is equipment information sent by the first terminal through a first plug-in, or the control information is information sent by a second terminal through a second plug-in;
and sending a control instruction to the first plug-in unit based on the control information to instruct the first plug-in unit to send the control instruction to the first terminal so as to enable the first terminal to execute the operation corresponding to the control instruction.
In an alternative example, authenticating at least one plug-in response to a start request sent by an access component includes:
in response to the initiation request, initiating the plug-in;
receiving handshake information sent by a started plug-in, wherein the handshake information carries configuration information configured by the plug-in; the configuration information comprises at least one of a communication protocol version, a data protocol version and a network address;
and authenticating the plug-in based on the configuration information to determine whether the configuration information of the plug-in is adapted to the current operating environment.
In an optional example, after acquiring the at least one access component, the method further comprises:
allocating a target port meeting a first condition for each plug-in corresponding to the access component from a plurality of ports included in the port pool; the first condition comprises a condition that the port is not used and not reserved or a condition that the port is not used and reserved;
after authenticating the at least one plug-in, the method further comprises:
and binding the target port for the authenticated plug-in so as to enable the plug-in to access the terminal based on the target port.
In an optional example, after the target port is bound for the authenticated plug-in, the method further includes:
when receiving a running/restarting request aiming at the plug-in, checking the target port to determine whether the target port is used by other plug-ins;
after the target port passes the verification, running the plug-in;
screening the ports meeting the second condition from the port pool under the condition that the target port fails to be checked, and binding the ports meeting the second condition with the plug-in; wherein the second condition is that the port is not used.
In an optional example, after acquiring at least one access component and downloading at least one plug-in corresponding to each access component, the method further includes:
acquiring an interface definition language corresponding to the plug-in;
converting the interface definition language into a piling code;
based on the piling code, each plug-in is accessed.
In an optional example, after accessing the terminal of the corresponding model based on the plug-in that passes the authentication, the method further includes:
receiving a processing request sent by an access component aiming at a target plug-in at least one plug-in;
and executing a processing operation corresponding to the processing request on the target plug-in based on the processing request, wherein the processing operation comprises at least one of starting, stopping, restarting and state monitoring.
In an alternative example, the processing operation includes status monitoring, and based on the processing request, the processing operation corresponding to the processing request is executed on the target plug-in, including:
in the running process of the target plug-in, acquiring monitoring information of the plug-in the running process through an instance object corresponding to the target plug-in; the monitoring information comprises a heartbeat data packet sent by the plug-in and/or an operation log of the plug-in the operation process;
monitoring the running state and/or the service state of the plug-in based on the monitoring information; the service state is used for representing the state of the plug-in providing service for the terminal;
restarting the plug-in with the fault in the running state, and stopping the plug-in with the fault in the service state.
In an alternative example, based on the processing request, performing a processing operation corresponding to the processing request on the target plug-in, includes:
stopping the operation of the target plug-in under the condition that the processing request is a stop operation request;
under the condition that the processing request is a restarting request, re-authenticating the target plug-in, and restarting the target plug-in after the authentication is passed;
and under the condition that the processing request is an updating request, updating the target plug-in based on the updating data carried by the updating request.
The present disclosure also provides an access service system, which includes: the system comprises an external interface, a plug-in management service module and a business service module; wherein: the external interface is used for butting at least one access assembly and communicating with the plug-in management service module, and the business service module is used for communicating with the running plug-in;
the external interface is used for butting at least one access assembly;
a plug-in management service module for downloading at least one plug-in and responding to
The access component authenticates at least one plug-in unit aiming at a starting request sent by the plug-in unit;
a service module for providing corresponding type of terminal based on the plug-in unit passing authentication
And the service at least comprises an access service of the terminal and a remote control service of the terminal.
In an optional example, the plug-in management service module communicates with at least one plug-in based on a uniform interface definition specification;
the unified interface definition specification is generated by converting an interface definition language into pile driving codes and based on the pile driving codes.
In an optional example, the external interface is further configured to receive a processing request sent by the access component for a target plug-in the at least one plug-in, and send the processing request to the management service module;
and the plug-in management service module is further used for executing processing operation corresponding to the processing request on the target plug-in based on the processing request, wherein the processing operation comprises at least one of starting, stopping, restarting and state monitoring.
In an alternative example, the access service system runs on a server, the at least one plug-in runs on the server, and/or runs on a host connected to the server.
The present disclosure also provides an access service processing apparatus, which includes:
the acquisition module is used for acquiring at least one access component and downloading at least one plug-in corresponding to each access component; the access assembly corresponds to at least one plug-in, and different plug-ins correspond to terminals of different models;
the authentication module is used for responding to a starting request sent by the access component aiming at the plug-ins and authenticating at least one plug-in;
and the service module is used for providing service for the terminal with the corresponding model based on the plug-in which the authentication passes, and the service at least comprises the access service of the terminal and the remote control service of the terminal.
The present disclosure also provides a computer-readable storage medium storing a computer program that causes a processor to execute the access service processing method.
The present disclosure also provides an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing an access service processing method when executing the processor.
By adopting the access service processing method provided by the application, at least one access component can be obtained, and at least one plug-in corresponding to each access component can be downloaded; responding to a starting request sent by the access component aiming at the plug-in, and authenticating at least one plug-in; and providing business services for the terminals of the corresponding models based on the plug-ins passing the authentication, wherein the business services at least comprise access services of the terminals and remote control services of the terminals, the access components correspond to at least one plug-in with the same attribute, and different plug-ins correspond to the terminals of different models.
On the one hand, plug-ins corresponding to terminals of different models are downloaded to the Internet of things platform in a unified mode, the plug-ins are authenticated, after the authentication is passed, access service and remote control service can be provided for the terminals of the corresponding models through the plug-ins, and therefore the terminals of the different models can be accessed into the Internet of things platform through the matched plug-ins and the service provided by the Internet of things platform is used. Therefore, even if the access protocol, the application development language, the application deployment mode and the application monitoring management mode of each terminal are different, one plug-in is operated to join the Internet of things platform from the user side, the Internet of things platform does not need to be independently connected with each terminal from the Internet of things platform side, and a plurality of terminals can be connected with each other only through the plug-in operated on the platform, so that the communication connection between the Internet of things platform and the plurality of terminals is established through the plug-in, the operation of a user for joining the Internet of things platform is simplified, and the operation of the Internet of things platform for accessing the terminals of different types is also simplified.
On the other hand, each plug-in can be managed through one corresponding access assembly, if the access assembly initiates a starting request, the plug-ins can be authenticated, so that the plug-ins can be uniformly supervised through the access assembly, centralized management of the plug-ins by the Internet of things platform is further realized, and the problem of faults caused by more platform resources occupied and more threads in multi-thread operation when the plug-ins are discretely managed is avoided.
The foregoing description is only an overview of the technical solutions of the present disclosure, and the embodiments of the present disclosure are described below in order to make the technical means of the present disclosure more clearly understood and to make the above and other objects, features, and advantages of the present disclosure more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. It should be noted that the sizes and shapes of the figures in the drawings are not to be considered true scale, but are merely intended to schematically illustrate the present invention. The same or similar reference numbers in the figures refer to the same or similar elements or elements having the same or similar functions.
Fig. 1 schematically illustrates a communication environment diagram of an access service handling method;
fig. 2 schematically shows a flow chart of steps of an access service processing method of the present application;
FIG. 3 schematically illustrates a schematic diagram of the unified management of plug-ins by an access component of the present application;
fig. 4 schematically shows an operating environment diagram of the access service processing method of the present application;
fig. 5 schematically shows a specific flowchart of the access service processing method of the present application;
fig. 6 schematically shows a framework diagram of an access service system of the present application;
fig. 7 schematically shows a framework diagram of the access service processing apparatus of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In the related art, in the field of internet of things, numerous internet of things devices need to be connected to an internet of things platform to control the internet of things devices through the internet of things platform. However, since numerous internet of things devices have great differences among access protocols, application development languages, application deployment modes and application monitoring management modes, when each internet of things device is to be accessed to an internet of things platform to use service provided by the internet of things, the problem that the access process is complex exists.
In view of the above, the present application proposes the following core concepts to solve the above technical problems: the access application of different equipment protocols is abstracted into uniform plug-ins, and different plug-ins correspond to different types of terminals, so that the terminals of the same type can access the Internet of things through one plug-in passing authentication, and business services are provided for the terminals through the plug-ins.
The plug-in can communicate with the Internet of things platform through a unified interface definition specification, and therefore the plug-in has programming language independence, and therefore the Internet of things platform can be in butt joint with plug-ins of multiple programming languages through the interface definition specification.
Referring to fig. 1, a communication environment schematic diagram of the access service processing method of the present application is shown, and as shown in fig. 1, the access service processing method includes an internet of things platform, a plurality of terminals, a third party platform and a third party application, where the third party application can be understood as a manufacturer of the terminal, the manufacturer enters the third party platform through the third party application, and communicates with the internet of things platform through the third party platform, so as to abstract an access application of an internet of things device produced by the manufacturer as a plug-in to upload to the internet of things platform.
After the Internet of things platform authenticates the uploaded plug-ins, the plug-ins can be deployed on the platform of the platform and published on a visual web page, when a user with a terminal needs to access the Internet of things equipment to the Internet of things platform, the plug-ins adaptive to the terminal of the user can be selected on the visual web page and operated, so that the operated plug-ins can help the terminal to access the Internet of things platform, and the user of the Internet of things equipment can use the business service provided by the Internet of things platform to manage and control the terminal.
The terminal can comprise internet of things equipment, such as bar codes, radio frequency identification, sensors, global positioning systems, laser scanning and other various sensing equipment. Other types of devices, such as cell phones, home appliances, etc., may also be included.
The plug-in management service can be communicated between a third-party user and the plug-in so as to respond to a management instruction of the third-party user to the plug-in and perform operations such as starting, restarting, stopping, authenticating and the like on the plug-in.
Next, an access service processing method of the present application is introduced, and referring to fig. 2, a flowchart of steps of an access service processing method is shown, and as shown in fig. 2, the method may be executed by a plug-in management service of an internet of things platform, and specifically may include the following steps:
step S201: the method comprises the steps of obtaining at least one access component and downloading at least one plug-in corresponding to each access component.
The access assembly corresponds to at least one plug-in, and different plug-ins are matched with terminals of different models.
Step S202: responding to a starting request sent by the access component, and authenticating at least one plug-in;
step S203: and providing business services for the terminals of corresponding models based on the plug-ins passing the authentication, wherein the property business services at least comprise access services of the terminals and remote control services of the terminals.
In this embodiment, the access component and the plug-in may be created and uploaded by a third-party user through a third-party platform, and in practice, the third-party user may be a manufacturer of the terminal or a manufacturer providing an access application (an application accessed to the internet of things platform) for the terminal.
The plug-in is understood to mean the access application of the terminal to the internet of things, in the application, different plug-ins are matched with terminals of different models, specifically, a third-party user can create plug-ins adaptive to the plug-ins based on access protocols and application development languages of the terminals of different models, so that the plug-ins can be used as the access application of the terminal to the internet of things and then added to the internet of things, and therefore, the terminal of different models can be helped to be rapidly accessed to the internet of things by matching one plug-in with each type of terminal.
The access component can be understood as micro-service for providing management on the uploaded plug-ins for the third-party user, and after the third-party user can log in the Internet of things platform, the third-party user initiates instructions such as plug-in stopping, plug-in starting and plug-in restarting to the plug-in management service through the access component, so that the purpose of managing the uploaded plug-ins is achieved.
One access component may correspond to at least one plug-in with the same attribute, and the same attribute may refer to the same manufacturer, or may refer to the same batch, that is, after a third-party user uploads one access component, one or more plug-ins belonging to the same manufacturer or the same batch may be subsequently uploaded, so that one or more plug-ins may be managed by one access component. One plug-in can be matched with one terminal or a plurality of terminals belonging to the same model, that is, one plug-in can be accessed to the terminals of the same model, so that a plurality of terminals of the same model can be accessed to the Internet of things platform.
That is, the same terminal manufacturer or outsourcer accessing the application can manage a plurality of plug-ins created by itself. Under the condition that one access assembly corresponds to one plug-in, the plug-in corresponding to each type of terminal can be managed independently, under the condition that one access assembly corresponds to a plurality of plug-ins, the plug-ins of the same manufacturer or the same batch can be managed independently, and under the condition, compared with the condition that one plug-in corresponds to one access assembly, the resource occupation of the access assembly on the Internet of things platform can be reduced, and the running efficiency of the Internet of things platform is improved.
Therefore, the plug-in is managed through the access assembly, and the plug-in is matched with the terminal, so that the access assembly is arranged to match the monitoring management mode of the access application of the terminals of different models, and the unified management of the access application of different terminals is realized.
In specific implementation, a third-party user may start a certain plug-in through the access component, so that the plug-in management service may start the downloaded plug-in response to a start request sent by the access component for the plug-in, and when starting, at least one plug-in is authenticated first.
Wherein, authenticating the plug-in may be understood as: checking whether the communication protocol version, the data protocol version, the network address and the protocol address of the plug-in are matched with the platform of the Internet of things or not, if so, passing authentication, representing that the plug-in is compatible with the platform of the Internet of things and can communicate with the platform of the Internet of things, namely, before starting the plug-in, checking whether the data protocol and the communication protocol of the plug-in are compatible with the data protocol and the communication protocol of the platform of the Internet of things or not, and if so, carrying out information interaction on the plug-in and the platform of the Internet of things.
The plug-in which the authentication is passed can be started, and the plug-in which the authentication is not passed can be stopped and the information of the authentication which is not passed is fed back to the access assembly, so that the third-party user can modify the data protocol and the communication protocol of the plug-in and then re-authenticate the plug-in when knowing that the authentication is not passed through the access assembly.
The plug-in components passing the authentication are matched with the terminal on one hand and the Internet of things platform on the other hand, so that the plug-in components can be used as a communication bridge for the terminal to communicate with the Internet of things platform, and are used for providing access service for the terminal to access the Internet of things platform and providing remote control service for the terminal, so that the terminal is controlled by the Internet of things platform to execute corresponding operation.
During specific implementation, when the terminal needs to be accessed to the internet of things platform, the plug-in unit that the authentication passes can be operated, so that the terminal is accessed to the plug-in unit, and the plug-in unit is pre-deployed on the internet of things platform (that is to say, when the plug-in unit is operated, the plug-in unit is actually operated on the internet of things platform), therefore, the terminal is accessed to the plug-in unit, so that the terminal is accessed to the internet of things platform, and then information interaction can be carried out with the internet of things platform, which is specifically embodied as follows: on one hand, the terminal can access the Internet of things platform and send data to the Internet of things platform; on the other hand, the terminal can receive a control command sent by the Internet of things platform through the plug-in, and then corresponding operation is executed.
It should be noted that after the terminal accesses the plug-in, the plug-in can continuously operate, so as to ensure real-time communication between the terminal and the internet of things platform. One plug-in can be connected to one terminal of the same type or a plurality of terminals of the same type.
According to the technical scheme, adaptive plug-ins can be uploaded to terminals of different models on the platform of the Internet of things, the plug-ins are used as access applications of the terminals, so that the terminals can be added into the Internet of things through the access plug-ins, when the plug-ins are started, the plug-ins are authenticated, after the authentication is passed, the representation plug-ins are compatible with the platform of the Internet of things, and therefore the plug-ins can transfer information between the terminals and the platform of the Internet of things, and the platform of the Internet of things can provide business services for the terminals.
On one hand, even if different terminals have differences of access protocols, application development languages and application deployment modes, for the terminal side, the terminal side can be added to the Internet of things platform only by establishing connection with the matched plug-in, so that the operation of accessing the terminal to the Internet of things platform is simplified.
On the other hand, for the platform side of the internet of things, no matter what kind of terminal, the purpose of providing service for the terminal can be achieved only by performing information interaction with the corresponding plug-in, so that the access applications of terminals of various types are brought into the platform of the internet of things for unified deployment and management.
In an alternative example, the process of authenticating the plug-in may be as follows: in response to the launch request, launching the plug-in using the command line; receiving handshake information sent by the started plug-in; and authenticating the plug-in based on the configuration information to determine whether the configuration information of the plug-in is adapted to the current operating environment.
The handshake information carries configuration information configured by the plug-in; the configuration information includes at least one of a communication protocol version, a data protocol version, a network address.
In this embodiment, since the plug-in may be understood as an access application for accessing the terminal to the internet of things, when the plug-in communicates with the platform of the internet of things and the terminal, a data protocol and a communication protocol are required, where the communication protocol is used to specify a communication mode between the plug-in and the terminal, and the data protocol is used to specify a data exchange format between the plug-in and the terminal.
The communication Protocol may include a TCP (Transmission Control Protocol), a UDP (User Data Protocol), an MQTT (Message Queuing Telemetry Transport) Protocol, and a CoAP Protocol, where MQTT is an instant messaging Protocol and CoAP is a computer Protocol applied to the internet of things.
The data protocol may include: JSON (JSON Object notification, JS Object profile) format protocol, text format protocol, and binary format protocol.
The network address may indicate a network range in which a terminal that the plug-in may serve is located, that is, the terminal within the network range allows the plug-in to be accessed to join the internet of things.
The internet of things platform can check the data protocol version and the communication protocol version carried in the handshake information, specifically, whether the data protocol version and the communication protocol version are versions of protocols allowed by the platform or not can be checked, whether a network address is a network allowed to be accessed or not is checked, and after the check is successful, the plug-in is compatible with the operating environment of the internet of things platform, so that the operation of the internet of things platform can be allowed.
Because the access application of each terminal is abstracted into the plug-in unit uniformly, the access service and the remote control service are provided for the Internet of things equipment through the plug-in unit, the following implementation scheme is further provided for improving the concentration degree of the operation and maintenance management of the Internet of things platform on the plug-in unit and reducing the management complexity:
referring to fig. 3, a schematic diagram of a further unified management of plug-ins by an access component is shown, and as shown in fig. 3, the plug-ins may be started/stopped/restarted and status monitored by a plug-in management server under the triggering of the access component.
Specifically, the plug-in can provide an access service for accessing the terminal to the platform of the internet of things, and a data forwarding service when the terminal is interacted with data between the terminal and the platform of the internet of things after accessing the platform of the internet of things. Accordingly, as shown in fig. 3, several further embodiments are provided in this alternative example:
in a further embodiment: as shown in fig. 3, the life cycle of a plurality of plug-ins is managed, including deployment, start, stop, restart, and status monitoring of the plug-ins.
A further embodiment two: the plug-in implements a unified interface definition specification that supports all mainstream programming languages to interface with the internet of things platform through the unified interface definition specification.
A third further embodiment: and managing a port pool, allocating externally available ports for each plug-in application, and ensuring the ports to be unchanged in the best effort.
< embodiment one > management of the lifecycle of multiple plug-ins, including deployment, start, stop, restart, status monitoring of plug-ins.
The deployment of the plug-in can be understood as a deployment mode of the plug-in the platform of the internet of things, specifically, the plug-in can be deployed at a cloud or an edge, wherein the cloud can be a server running the platform of the internet of things, and the edge can be understood as a physical machine connected with the server.
As shown in fig. 1, whether deployed in the cloud or at the edge, the plug-in may be uploaded by the third party platform, and then the internet of things platform downloads the uploaded plug-in to the edge or to the server.
Wherein, the starting of the plug-in may refer to: after the plug-in is downloaded by the platform of the internet of things, the process of pulling up the plug-in through the command line is requested by the start of the access component, it should be noted that after the plug-in is started, the plug-in needs to be authenticated first to check the version, the data protocol, the network type, the network address, the communication protocol and the like of the plug-in, and the plug-in passing the authentication can be normally deployed and operated.
Wherein, the restarting of the plug-in may refer to: and restarting the process of the plug-in by receiving the restart request of the access component, wherein the restart comprises the restart of the plug-in under the condition that the operation of the plug-in fails, and the restart of the plug-in under the condition that the plug-in fails in the service.
The state monitoring is mainly used for actively monitoring the running state of the plug-in application, performing fault prompt and supporting automatic restart of a fault plug-in.
In specific implementation, after the terminal of the corresponding model is accessed based on the plug-in passing the authentication, a processing request sent by the access component for a target plug-in at least one plug-in can be received; and executing a processing operation corresponding to the processing request to the target plug-in based on the processing request.
Wherein the processing operation comprises at least one of starting, stopping, restarting and status monitoring.
In this embodiment, the target plug-in is any one of at least one plug-in corresponding to the access component. Specifically, as shown in fig. 3, the processing request includes a start request, a stop request, a restart request, and a status monitoring request, and in the case of the start request, the target plugin may be started, where, as shown in fig. 3, in the case of the start request, the plugin may be authenticated first, for example, handshake information sent by the plugin is received, and the plugin is authenticated based on the handshake information;
in the case of a stop request, the operation of the target plug-in may be stopped, and in the case of a restart request, the target plug-in may be restarted.
Correspondingly, under the condition of state monitoring, the state monitoring of the running state of the plug-in is required, in the embodiment of the present application, the running state may include the running state and/or the service state of the plug-in, and specifically, only the running state of the plug-in may be monitored, or only the service state of the plug-in may be monitored, or both the running state and the service state of the plug-in may be monitored.
The running state may refer to a running condition of a process of the plug-in, that is, whether the process runs normally, and the service state may refer to whether forwarding of an interactive data packet between the internet of things platform and the internet of things device is normal in a process that the plug-in provides a service of the internet of things device.
As shown in fig. 3, the plug-in management service provides three modules, namely, a port pool management module, a plug-in authentication module and an instance object, wherein the port pool management module is used for allocating ports for the plug-ins and is responsible for using and recycling the ports, the plug-in authentication module is used for authenticating the plug-ins, and the instance object is used for executing start, stop, restart and status monitoring operations on the plug-ins according to a start request, a stop request, a restart request and a status monitoring request.
For the state monitoring request, as shown in fig. 3, in the running process of the target plug-in, monitoring information of the plug-in the running process can be acquired through an instance object corresponding to the target plug-in; monitoring the running state and/or the service state of the plug-in based on the monitoring information; and then restarting the plug-in with the fault in the running state, and stopping the plug-in with the fault in the service state.
The service state is used for representing the state of the service provided by the plug-in for the terminal, and the monitoring information comprises a heartbeat data packet sent by the plug-in and/or an operation log of the plug-in the operation process.
In this embodiment, monitoring information of the plug-in the running process may be acquired by the instance object, where in the case that the monitoring information includes a running log, the plug-in writes the running log into a specified channel during running, and the instance object may acquire the running log written by the plug-in by monitoring the channel.
Under the condition that the monitoring information comprises the heartbeat data packet, the heartbeat data packet sent by the plugin is generally sent to the Internet of things platform, the instance object can capture the heartbeat data packet at regular time, and the running state of the plugin is determined according to the captured heartbeat data packet.
Specifically, the running state and the service state of the plug-in can be determined through the running log, and the running state of the plug-in can be determined through the heartbeat data packet, for example, whether the plug-in process is alive or not and whether the service provided by the plug-in is available or not can be detected, such as httpserver service, tcp server service and the like, so that whether the running state of the plug-in is faulty or not can be detected; when the fault code occurs in the running log, the service state of the plug-in can be determined to have a fault.
When determining that the plug-in has a fault, the instance object may feed back a fault state to the access component, and restart the plug-in, for example, restart the process of pulling up the plug-in again if a restart request for the fault state feedback by the access component is received.
As described above, in addition to monitoring the running state and/or the service state of the plug-in, the plug-in may also be started, restarted, and other operations through the access component, specifically:
stopping the operation of the target plug-in under the condition that the processing request is a stop operation request;
under the condition that the processing request is a restarting request, re-authenticating the target plug-in, and restarting the target plug-in after the authentication is passed;
and under the condition that the processing request is an updating request, updating the target plug-in based on the updating data carried by the updating request.
In this embodiment, when the processing request is a request to stop operating, the operation of the target plug-in is stopped, and since the target plug-in accesses the matched terminal, the operation of the target plug-in is stopped, so that the access service and the remote control service to the terminal are stopped; and when the processing request is a restart request, the target plug-in can be restarted, and then the access of the terminal adapted by the target plug-in is restarted, namely the access service and the remote control service of the terminal of the same model are restarted.
In this embodiment, the processing request may include an update request in addition to the stop request and the restart request, and in some cases, the plug-in may be used as an access application of the terminal to access the internet of things, and there may be a need to update the plug-in at intervals.
By adopting the first embodiment, even if the terminal has great difference in application monitoring management modes, the lifecycle management of starting, stopping, restarting, state monitoring and the like can be performed on the plug-in through the request sent by the access component, so that the monitoring management of the corresponding terminal is realized.
< embodiment two > the plug-in implements a unified interface definition specification.
In the second embodiment, the docking between the plug-in and the platform of the internet of things is generally realized through the corresponding interface, wherein, in order to improve the simplicity of docking a plurality of plug-ins by the platform of the internet of things, an interface definition language can be set in advance, and then, when the plug-ins need to be docked, the interface definition language can be converted into a piling code, so that both communication sides of the plug-ins and the platform of the internet of things can commonly comply with the same interface definition specification based on the piling code, and the plug-in management service and the plug-ins communicate based on the specification.
In specific implementation, after the plug-in is downloaded, the interface definition language corresponding to the plug-in can be acquired; converting the interface definition language into a piling code; and accessing each plug-in based on the piling code.
In this embodiment, the pile driving code may also be referred to as a pile code, where the pile code is given an implementation that is temporary/to be edited such that the user may temporarily not edit the piece of code without affecting the use of the program. In the present application, a standard interface specification between the plug-in management service and the plug-in may be defined, the plug-in management service and the plug-in jointly comply with the interface specification, and communication is performed based on the specification, so that the plug-in management service can communicate with different plug-ins through the interface specification.
Specifically, an interface definition language can be obtained first, and the interface definition language is converted into a piling code of a service, a method and a message structure through a scaffold tool, so that plug-in management service calling is more convenient.
By adopting the second embodiment, different plug-ins can communicate with the plug-in management service through the unified interface specification, the communication compatibility between the management plug-in service and different plug-ins is improved, and therefore communication between the Internet of things platform and terminals of different models can be achieved.
< embodiment three > Port pool management
In this embodiment, the port pool includes a plurality of ports, the ports are used for being allocated to plug-ins, and the plug-ins bind the ports and provide external services to a terminal (internet of things device). It mainly includes port allocation, port maintenance, port usage, port reclamation, etc.
In specific implementation, after obtaining the plug-in, a target port meeting a first condition may be allocated to each plug-in corresponding to the access component from a plurality of ports included in the port pool;
accordingly, the allocated target ports may be bound to the plug-in unit, so that the plug-in unit may provide services to the outside through the target ports, wherein after authenticating at least one of the downloaded plug-in units, the target ports may be bound to the plug-in units that have passed the authentication, so that the plug-in units access the terminal based on the target ports.
Wherein the first condition comprises a condition that the port is unused and unreserved, or a condition that the port is unused and reserved.
In this embodiment, the ports in the port pool are used to be allocated to the plug-in to provide a communication channel between the plug-in and the terminal, where the ports allocated to the plug-in may join a reservation list, and the reservation list includes the ports allocated to the plug-in but the plug-in is not yet running. The ports being used by the plug-in can be added into a use list, and the ports of the plug-in which is running are included in the use list; so that the remaining ports in the port pool can be assigned to the new card.
Wherein the same port is either in the reservation list or in the usage list.
The first condition set in this embodiment includes a condition that the port is not used and not reserved, or a condition that the port is not used and is reserved, so that when the port is allocated, the allocation may be performed according to the state of the port, as described above, the state of the port may include an idle state, a standby state, and a use state, where the idle state indicates that the port is not reserved for the plug-in and is not used by the plug-in, the standby state indicates that the port is reserved for the plug-in and is not used by the plug-in, and the use state indicates that the port is used by the plug-in.
In an alternative example, a port in an idle state may be preferentially selected from the port pool to the plug, that is, a port in an idle state that is not used by the plug and is not reserved for the plug is selected, if there is no port in an idle state, a port in a standby state may be selected, that is, an unused port is selected to the plug, and if there is neither a port in an idle state nor a port in a standby state in the port pool, port allocation fails.
Thus, when each plug-in is allocated with a port, the plug-in can preferentially obtain an unused and unreserved port, so that the port can be independently used by the plug-in, and the problem that the ports are used in a crossed manner is avoided.
Accordingly, upon receiving a run/restart request for a plug-in, the target port may be checked to determine whether the target port is used by other plug-ins.
After the target port passes the verification, running a plug-in; screening the ports meeting the second condition from the port pool under the condition that the target port fails to be checked, and binding the ports meeting the second condition with the plug-in; wherein the second condition is that the port is not used.
The access component can stop, run or restart the plug-in, wherein in the case of restarting, the plug-in needs to be restarted, and the plug-in needs to establish a binding relationship with the port again.
Specifically, the state of the target port may be obtained, if the state is an idle state or a standby state, the target port and the plug-in may be restarted after being bound, and if the state is a use state, the check is not passed, and a port meeting a second condition needs to be screened from the port pool, where the second condition may be a condition that the port is not used, that is, in this case, the plug-in may be given from the port in the idle state or the standby state.
In an alternative example, if the access component sends a stop request for a plug-in, when the plug-in is stopped, the port allocated for the plug-in may be deallocated to make the state of the port stand-by, i.e. the participating port is moved from the usage list into the reservation list to characterize that the port is allocated to the plug-in but not used by the plug-in.
In yet another alternative example, if the access component sends a delete request for a plug-in, when the plug-in is deleted, the port allocated to the plug-in may be released, that is, the port is removed from both the usage list and the reservation list, and the port is released completely, so that the port is in an idle state, and thus the port may be allocated to another new plug-in.
By adopting the embodiment of the application, the ports can be checked again, so that the allocated ports can maintain the original ports as much as possible before and after each plug-in unit is restarted, the problem that the ports need to be switched when the terminal is accessed again is avoided, and the efficiency of the terminal for accessing the plug-in units again is improved.
Through the embodiment, the unified operation and maintenance of the plug-ins corresponding to various types of terminals by the Internet of things platform are realized, as described above, after the plug-ins are deployed on the Internet of things platform, the Internet of things platform can issue a visual list for displaying the plug-ins already deployed on the platform, wherein the visual list can include the corresponding relation between the names of the plug-ins and the models of the terminals, and a user can determine which plug-ins the terminal held by the user needs to correspond to through the corresponding relation, so that after the corresponding plug-ins are selected and the terminal is clicked to operate, the plug-ins can be operated, the terminal can be randomly accessed into the plug-ins, and the plug-ins are deployed on the Internet of things platform, so that the terminal can be accessed into the Internet of things platform through the operated plug-ins.
< procedure of providing business service to terminal by platform of internet of things >
Specifically, the internet of things platform can provide access service and remote control service for the terminal through the plug-in, the access service can be a service for the terminal to join the internet of things platform, and the remote control service can be a service for the internet of things platform remote control terminal to execute corresponding operations.
In specific implementation, for the access service, the plug-in after the authentication is passed can be operated in response to an operation request sent by the terminal for the plug-in; then, receiving an access request sent by the plug-in, wherein the access request is sent to the plug-in by a terminal; and then, based on the access request, the terminal is accessed to the Internet of things so as to provide access service.
Correspondingly, the internet of things platform may generate the visualization list based on the plug-in that passes the authentication and the model of the terminal corresponding to the plug-in that passes the authentication, and may publish the visualization list on the web page.
Correspondingly, the operation request is sent after the user of the terminal confirms the plug-in on the visual list, and the visual list comprises the corresponding relation between the plug-in and the terminal.
In this embodiment, the plugin can be published in the visual list after being authenticated, and at the same time, the model of the terminal adapted to the plugin is also published in the visual list, and a terminal user can specify which plugin needs to be selected by the terminal owned by the terminal user through the visual list, for example, a terminal xinhaus S41C1 corresponding to the plugin 001, the user can select the plugin 001 and click to operate, so that the operating plugin 001 can establish connection with the terminal.
It should be noted that, when logging in the internet of things platform on the terminal, the internet of things platform is clicked to operate, the plug-in can be connected with the terminal through the distributed port, under the condition that the terminal does not have a display screen, the internet of things platform can be logged in by means of other intelligent terminals, wireless communication can be carried out between the terminal and the intelligent terminal through Bluetooth or infrared, the terminal is added into a wireless communication equipment list of the intelligent terminal, the intelligent terminal logs in the internet of things platform, a user selects the model of the corresponding plug-in and the terminal and clicks to operate, at the moment, the operating plug-in can automatically try to shake hands with the selected terminal in the wireless communication equipment list through the distributed port, and therefore the terminal is accessed, and the terminal is added into the internet of things platform.
By adopting the implementation mode, access service can be provided for various Internet of things devices.
The remote control service can include remote control of the terminal by the Internet of things platform based on equipment information uploaded by the terminal, and can also include remote control of another terminal based on information uploaded by one terminal.
In specific implementation, control information for a first terminal to be controlled may be acquired, and based on the control information, a control instruction may be sent to the first plug-in to instruct the first plug-in to send the control instruction to the first terminal, so that the first terminal executes an operation corresponding to the control instruction.
The control information is the device information sent by the first terminal through the first plug-in, or the control information is the information sent by the second terminal through the second plug-in.
In this embodiment, under the condition that the control information is the device information sent by the first terminal through the first plug-in, the terminal may upload the device information of itself at regular time, specifically, the device information may be determined according to the control requirement, for example, when the control requirement is that the temperature of the control terminal is kept within a fixed range, the device information may include the temperature of the terminal, and if the control requirement is that the control terminal is required to perform an opening operation (commonly used for access control) when a condition is satisfied, the device information may be an image of an visitor collected by the terminal.
In this embodiment, the terminal that is controlled is called the first terminal, and the first terminal can send this equipment information to the thing networking platform through first plug-in components, and the thing networking platform can confirm the control strategy to the terminal according to this equipment information, if the temperature surpasss and predetermines the temperature, can issue the refrigeration instruction to first terminal, and when first terminal received this refrigeration instruction and issued, it refrigerates to open self refrigerating plant. For another example, when the device information is an image of an interviewer, and the internet of things platform determines that the interviewer is an authorized user based on the image of the interviewer, the internet of things platform sends an opening instruction to the first plug-in, the first plug-in sends the opening instruction to the first terminal, and the first terminal executes opening operation randomly.
Exemplarily, the first terminal is a refrigerator, the state of articles stored in the refrigerator needs to be monitored, and the temperature of the refrigerator is adjusted in time, the refrigerator can be added to the internet of things platform in advance, then, the refrigerator sends the state of the articles and the refrigeration temperature of the refrigerator to the first plug-in at regular time, and the first plug-in feeds back the state of the articles to the internet of things platform, so that the internet of things platform can determine whether the refrigeration temperature of the refrigerator is proper or not based on the state of the articles, if not, the proper temperature is packaged as an instruction and sent to the first plug-in, the first plug-in sends the refrigerator, and the refrigerator refrigerates according to the refrigeration temperature in the instruction, so as to ensure the quality of the stored articles.
Under the condition that the control information is information sent by the second terminal through the second plug-in, the first terminal can be controlled by the second terminal to execute corresponding operations, so that interconnection and mutual control among the Internet of things devices are achieved. The control information can be determined according to control requirements, the model and the network address of the first terminal can be carried in the control information, and then when the second plug-in sends the control information to the Internet of things platform, the Internet of things platform can determine the first plug-in according to the signal and the network address of the terminal, the control instruction corresponding to the control information is sent to the first plug-in, at the moment, the first plug-in sends the control instruction to the first terminal, and then the first terminal can be controlled by the second terminal to execute corresponding operation.
The method includes the steps that a user needs to start an electric cooker at home in a different place, a mobile phone and the electric cooker can be connected into an Internet of things platform in advance, the mobile phone and the electric cooker are provided with respective plug-in units, the user clicks a controlled device 'electric cooker' to select starting after logging in the Internet of things platform through the mobile phone, then the mobile phone sends starting control information to a second plug-in unit, the second plug-in unit sends the starting control information to the Internet of things platform, the Internet of things platform determines that the controlled device is the electric cooker based on the starting control information, then a starting instruction can be sent to a first plug-in unit corresponding to the electric cooker, the first plug-in unit feeds the starting instruction back to the electric cooker, and therefore the electric cooker starts to enter a cooking mode.
Of course, the above is merely an exemplary illustration and does not represent a specific limitation to the application scenario.
Next, a method for processing an access service according to the present application is generally described, and referring to fig. 4 and 5, fig. 4 shows a schematic operating environment diagram of the method for processing an access service according to the present application, and fig. 5 shows a specific flowchart of the method for processing an access service according to the present application.
As shown in fig. 4, the system comprises a plug-in management service, an access component and an internet of things platform, wherein both the plug-in management service and the access component can be used as a micro service of the internet of things platform; the plug-in management service, the access component and the plug-in can be respectively deployed on different hosts, the plug-in management service and the access component can be called through a gRPC method, and the plug-in management service and the plug-in can also be called through a gRPC method, so that an application on one device calls an application on another device, and a distributed operating environment is formed.
The access component sends a start/stop/restart request to the plug-in management service, and the plug-in management service starts/stops/restarts the corresponding plug-in based on the start/stop/restart request.
The access component sends a state monitoring request to the plug-in management service, and the plug-in management service monitors the state of the corresponding plug-in based on the state monitoring request.
The terminal can send an access request to the plugin, the plugin sends the access request to the Internet of things platform, and the Internet of things platform is used for providing access service, so that the terminal is added to the Internet of things platform;
and then, the terminal can send the control information of the terminal to the plug-in, the plug-in sends the control information to the Internet of things platform, and the Internet of things platform then sends a control instruction to the terminal through the plug-in.
Specifically, as shown in fig. 5, the whole may include the following steps:
1.1, firstly, a third party platform creates an access component;
1.2, the external interface that will insert the subassembly and provide through thing networking platform uploads to thing networking platform, specifically, can register this access subassembly with the service registration center earlier, like this, other little services, like plug-in management service alright with can pass through the service center and call this access subassembly, when calling, can call through gRPC.
1.3, the plug-in management service can allocate a port for the customized access component, and the port can be used for a plug-in corresponding to the customized access component.
And 2.1, uploading the plug-in to a specified address through an external interface provided by the platform of the Internet of things by the third-party platform.
3.1, the third party platform sends out a request for starting the access assembly through the access assembly;
3.2, the plug-in management service starts the access component based on the starting request, and establishes communication with the access component;
3.3, then, the plug-in management service, in response to the start request, needs to start the plug-in, specifically, a procedure comprising the following 3.4 and 3.5:
3.4, downloading the plug-in from the designated address, establishing the interface with the plug-in through the interface definition specification, in this case, allocating a port for the plug-in, generating an instance object corresponding to the plug-in, and managing the plug-in through the instance object.
3.5, authenticating the plug-in by the Internet of things platform;
and 3.6, after the authentication is passed, the plug-in sends a handshake message to the Internet of things platform and receives information returned by the Internet of things platform, so that the connection with the Internet of things platform is established.
Then, the plug-in management service can perform life cycle management and state monitoring on the plug-ins, and specifically comprises the following steps of 3.7-3.11:
3.7, the instance object monitors a specific channel, and logs written into the channel by the plug-in process are collected and printed out to finish log recovery.
3.8, the plug-in management service sends a state monitoring instruction to the instance object corresponding to the plug-in, and then the instance object acquires the working state and the service state of the plug-in;
3.9, the instance object reports the monitored working state and the monitored business state to the plug-in management service;
3.10, the plug-in management service determines that the plug-in has operation failure according to the working state and the service state, and automatically restarts the plug-in;
3.11, the instance object receives the restart information, restarts the plug-in, and when restarting the plug-in, the instance object can perform recheck on the port of the plug-in, the port passing the check continues to be used, and if the check port is different, the port needs to be redistributed.
4.1, the access component sends a request for stopping the plug-in to the plug-in management service;
4.2, the plug-in management service responds to the stop request, and sends an instruction for stopping the plug-in to the instance object, and the instance object stops the plug-in.
< terminal accessing Internet of things platform by using plug-in >
5.1, the terminal selects a plug-in and operates, and in the operation process of the plug-in, the plug-in is connected with the terminal through the distributed port and receives data (control information) sent by the terminal; meanwhile, periodic heartbeat packets can be uploaded to an internet of things platform (IOT platform) so that the internet of things platform can keep communication connection with the plug-in;
5.2, the plug-in receives the data and reports the data to the Internet of things platform;
6.1, the Internet of things platform issues a control instruction to the plug-in according to the reported data;
6.2, the plug-in returns a control instruction to the terminal, and the terminal executes the responding operation under the driving of the control instruction.
By adopting the technical scheme of the embodiment of the application, on one hand, even if different terminals have differences of access protocols, application development languages and application deployment modes, the terminals can be added to the Internet of things platform only by establishing connection with matched plug-ins, so that the operation of accessing the terminals to the Internet of things platform is simplified.
On the other hand, for the platform side of the internet of things, no matter what kind of terminal, the purpose of providing service for the terminal can be achieved only by performing information interaction with the corresponding plug-in, so that the access applications of terminals of various types are brought into the platform of the internet of things for unified deployment and management.
On the other hand, the life cycle of the plug-in can be managed through the access assembly, so that the operation fault of the plug-in can be found in time, the fault can be eliminated in time, and the fault problem occurring after the terminal is accessed into the Internet of things platform is avoided.
In another aspect, the access component and the plugin management service may be called by a gRPC method, and the plugin management service and the plugin may also be called by a gRPC method, so that the plugin may be allowed to be deployed at an edge or in a cloud, so as to implement distributed management, operation and maintenance of the plugin management service on a plurality of plugins.
Based on the same inventive concept, the present application further provides an access service system, and as shown in fig. 6, a schematic diagram of a framework of the access service system is shown, and as shown in fig. 6, the system includes: an external interface 601, a plug-in management service module 602 (the plug-in management service of the above embodiment) and a business service module 603.
The external interface 601 is used for interfacing at least one access component 604 and communicating with the plug-in management service module 602, and the business service module 603 is used for communicating with the running plug-in 605;
an external interface 601 for interfacing with at least one access component 604;
a plug-in management service module 602, configured to download the at least one plug-in 605, and authenticate the at least one plug-in 605 in response to a start request sent by the access component 604 for the plug-in 605;
the service module 603 is configured to provide a service for the terminal of the corresponding model based on the plug-in 605 that passes the authentication, where the service includes at least an access service of the terminal and a remote control service of the terminal.
As shown in fig. 6, the plug-in management service module 602 and the plug-in 605 are called by a gRPC method, and the plug-in management service module 602 and the access component 604 are called by a gRPC method. The terminal and the plug-in 605 can communicate through communication protocols such as TCP/UDP/MQTT/CoAP and the like, and can exchange data through JSON/text/binary, wherein the plug-in and the service module can communicate, and the communication protocol adopted by the communication can be MQTT.
In an alternative example, as in the previous embodiment, the plug-in management service module 602 communicates with at least one plug-in 605 based on a unified interface definition specification;
the unified interface definition specification is generated by converting an interface definition language into pile driving codes and based on the pile driving codes.
In an optional example, the external interface 601 is further configured to receive a processing request sent by the access component for a target plug-in the at least one plug-in, and send the processing request to the management service module;
and the plug-in management service module is further used for executing processing operation corresponding to the processing request on the target plug-in based on the processing request, wherein the processing operation comprises at least one of starting, stopping, restarting and state monitoring.
In an alternative embodiment, the access service system runs on a server, and the at least one plug-in runs on the server, and/or runs on a host connected to the server. That is, some of the plurality of plug-ins may run on the server and another portion of the plurality of plug-ins may run on the host.
In an optional example, the plug-in management service module further includes a plurality of instance objects, wherein different instance objects correspond to different plug-ins, and the plug-in management service module communicates with the corresponding plug-ins through the instance objects.
Based on the same inventive concept, the present application further provides an access service processing apparatus, as shown in fig. 7, which shows a schematic structural diagram of the access service processing apparatus, and as shown in fig. 7, the access service processing apparatus may be located in a plug-in management service, and specifically may include the following modules:
an obtaining module 701, configured to obtain at least one access component and download at least one plug-in corresponding to each access component; the access assembly corresponds to at least one plug-in, and different plug-ins correspond to terminals of different models;
an authentication module 702, configured to authenticate at least one plugin in response to a start request sent by an access component for the plugin;
the service module 703 is configured to provide a service for the terminal of the corresponding model based on the plug-in that passes the authentication, where the service includes at least an access service of the terminal and a remote control service of the terminal.
Optionally, the service module 703 includes:
the operation unit is used for responding to an operation request sent by the terminal aiming at the plug-in, and operating the plug-in after the authentication is passed;
the receiving unit is used for receiving an access request sent by the plug-in, and the access request is sent to the plug-in by the terminal;
and the access unit is used for accessing the terminal into the Internet of things based on the access request so as to provide access service.
Optionally, the apparatus further comprises:
the list generation module is used for generating a visual list based on the plug-ins passing the authentication and the models of the terminals corresponding to the plug-ins passing the authentication, wherein the visual list comprises the corresponding relation between the plug-ins and the terminals;
the list publishing module is used for publishing the visual list to the web page; the operation request is sent after the user of the terminal confirms the plug-in on the visual list.
Optionally, the service module 703 includes:
the information acquisition unit is used for acquiring control information aiming at a first terminal to be controlled, wherein the control information is equipment information sent by the first terminal through a first plug-in unit, or the control information is information sent by a second terminal through a second plug-in unit;
and the instruction issuing unit is used for sending a control instruction to the first plug-in unit based on the control information so as to instruct the first plug-in unit to send the control instruction to the first terminal, so that the first terminal executes the operation corresponding to the control instruction.
Optionally, the authentication module 702 includes:
a start unit for starting the plug-in using the command line in response to the start request;
the device comprises a handshake information receiving unit, a starting unit and a starting unit, wherein the handshake information receiving unit is used for receiving handshake information sent by a started plug-in, and the handshake information carries configuration information configured by the plug-in; the configuration information comprises at least one of a communication protocol version, a data protocol version and a network address;
and the authentication unit is used for authenticating the plug-in based on the configuration information so as to determine whether the configuration information of the plug-in is adapted to the current operating environment.
Optionally, the apparatus further comprises:
the port allocation module is used for allocating a target port meeting a first condition for each plug-in unit corresponding to the access assembly from a plurality of ports included in the port pool; the first condition comprises a condition that the port is not used and not reserved or a condition that the port is not used and reserved;
and the port binding module is used for binding the target port for the plug-in which the authentication passes so as to enable the plug-in to access the terminal based on the target port.
Optionally, the apparatus further comprises:
the port checking module is used for checking the target port when receiving a running/restarting request aiming at the plug-in unit so as to determine whether the target port is used by other plug-in units;
the first processing module is used for running the plug-in after the target port passes the verification;
the second processing module is used for screening the ports meeting the second condition from the port pool under the condition that the target port check is not passed, and binding the ports meeting the second condition with the plug-in; wherein the second condition is that the port is not used.
Optionally, the apparatus further comprises:
the interface definition language acquisition module is used for acquiring an interface definition language corresponding to the plug-in;
the conversion module is used for converting the interface definition language into piling codes;
and the access module is used for accessing each plug-in unit based on the piling codes.
Optionally, the apparatus further comprises:
the processing request receiving module is used for receiving a processing request sent by the access component aiming at a target plug-in at least one plug-in;
and the processing module is used for executing processing operation corresponding to the processing request to the target plug-in based on the processing request, wherein the processing operation comprises at least one of starting, stopping, restarting and state monitoring.
Optionally, the processing operation includes condition monitoring, and the processing module includes:
the monitoring information acquisition unit is used for acquiring monitoring information of the plug-in the running process through the instance object corresponding to the target plug-in the running process of the target plug-in; the monitoring information comprises a heartbeat data packet sent by the plug-in and/or an operation log of the plug-in the operation process;
the state monitoring unit is used for monitoring the running state and/or the service state of the plug-in unit based on the monitoring information; the service state is used for representing the state of the plug-in providing service for the terminal;
and the fault processing unit is used for restarting the plug-in with the fault in the running state and stopping the plug-in with the fault in the service state.
Optionally, the processing module is specifically configured to:
under the condition that the processing request is a request for stopping running, stopping running of the target plug-in to stop the business service of the terminal matched with the target plug-in;
under the condition that the processing request is a restarting request, re-authenticating the target plug-in, and restarting the target plug-in after the authentication is passed so as to restart the service of the terminal matched with the target plug-in;
and under the condition that the processing request is an updating request, updating the target plug-in based on the updating data carried by the updating request.
The device embodiments are similar to the method embodiments and will not be described again.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
Finally, it should also be noted that, unless otherwise defined, the terms "first," "second," and the like as used herein do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
The foregoing detailed description is provided for an access service processing method, an access service system, an access service processing apparatus, an electronic device, and a storage medium, and specific examples are applied herein to explain the principles and embodiments of the present disclosure, and the descriptions of the foregoing embodiments are only used to help understand the method and the core idea of the present disclosure; meanwhile, for a person skilled in the art, according to the idea of the present disclosure, the specific embodiments and the application range may be changed, and in conclusion, the content of the present specification should not be construed as a limitation of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Reference herein to "one embodiment," "an embodiment," or "one or more embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Moreover, it is noted that instances of the word "in one embodiment" are not necessarily all referring to the same embodiment.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The disclosure may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (18)

1. An access service processing method, the method comprising:
acquiring at least one access component and downloading at least one plug-in corresponding to each access component; the access component corresponds to at least one plug-in, and different plug-ins are matched with terminals of different models;
authenticating the at least one plug-in response to a start request sent by the access component;
and providing business services for the terminals of corresponding models based on the plug-in which the authentication passes, wherein the business services at least comprise access services of the terminals and remote control services of the terminals.
2. The method according to claim 1, wherein the providing business services for the terminals of the corresponding models based on the plug-in which the authentication passes comprises:
responding to an operation request sent by the terminal aiming at the plug-in, and operating the plug-in after the authentication is passed;
receiving an access request sent by the plug-in, wherein the access request is sent to the plug-in by the terminal;
and accessing the terminal into the Internet of things based on the access request so as to provide the access service.
3. The method of claim 2, wherein after authenticating the at least one plug-in response to the initiation request sent by the access component, the method further comprises:
generating a visual list based on the plug-ins passing the authentication and the models of the terminals corresponding to the plug-ins passing the authentication, wherein the visual list comprises the corresponding relation between the plug-ins and the terminals;
publishing the visualization list to a web page;
and the operation request is sent after a user of the terminal selects the plug-in on the visual list.
4. The method according to claim 1, wherein the business service comprises the remote control service, and the providing the business service for the terminal of the corresponding model based on the plug-in that passes the authentication comprises:
acquiring control information aiming at a first terminal to be controlled, wherein the control information is equipment information sent by the first terminal through a first plug-in, or the control information is information sent by a second terminal through a second plug-in;
and sending a control instruction to the first plug-in unit based on the control information so as to instruct the first plug-in unit to send the control instruction to the first terminal, so that the first terminal can execute the operation corresponding to the control instruction.
5. The method of claim 1, wherein authenticating the at least one plug-in response to the initiation request sent by the access component comprises:
in response to the launch request, launching the plug-in;
receiving handshake information sent by the started plug-in, wherein the handshake information carries configuration information configured by the plug-in; the configuration information comprises at least one of a communication protocol version, a data protocol version and a network address;
and authenticating the plug-in based on the configuration information to determine whether the configuration information of the plug-in is adapted to the current operating environment.
6. The method of claim 1, wherein after obtaining at least one access component, the method further comprises:
allocating a target port meeting a first condition to each plug-in unit corresponding to the access component from a plurality of ports included in the port pool; the first condition comprises a condition that a port is unused and unreserved, or a condition that a port is unused and reserved;
after the authenticating the at least one plug-in, the method further comprises:
and binding the target port for the authenticated plug-in so as to enable the plug-in to access the terminal based on the target port.
7. The method of claim 6, wherein after binding the target port for the authenticated plug-in, the method further comprises:
when a running/restarting request for the plug-in is received, checking the target port to determine whether the target port is used by other plug-ins;
after the target port passes the verification, the plug-in is operated;
screening a port meeting a second condition from the port pool under the condition that the target port fails to be checked, and binding the port meeting the second condition with the plug-in; wherein the second condition is that a port is not used.
8. The method of claim 1, wherein after obtaining at least one access component and downloading at least one plug-in corresponding to each of the access components, the method further comprises:
acquiring an interface definition language corresponding to the plug-in;
converting the interface definition language into pile driving code;
accessing each of the inserts based on the piling code.
9. The method according to claim 1, wherein after accessing the terminal of the corresponding model based on the plug-in which the authentication passes, the method further comprises:
receiving a processing request sent by the access component for a target plug-in unit in at least one plug-in unit;
and executing a processing operation corresponding to the processing request on the target plug-in based on the processing request, wherein the processing operation comprises at least one of starting, stopping, restarting and state monitoring.
10. The method of claim 9, wherein the processing operation comprises a status monitor, and wherein performing, based on the processing request, a processing operation corresponding to the processing request on the target plug-in comprises:
in the running process of the target plug-in, acquiring monitoring information of the plug-in the running process through an instance object corresponding to the target plug-in; the monitoring information comprises a heartbeat data packet sent by the plug-in and/or an operation log of the plug-in the operation process;
monitoring the running state and/or the service state of the plug-in unit based on the monitoring information; the service state is used for representing the state of the plug-in providing service for the terminal;
restarting the plug-in with the failure in the running state, and stopping the plug-in with the failure in the service state.
11. The method according to claim 9 or 10, wherein the performing, on the target plug-in based on the processing request, a processing operation corresponding to the processing request comprises:
stopping the operation of the target plug-in under the condition that the processing request is a stop operation request;
under the condition that the processing request is a restarting request, re-authenticating the target plug-in, and restarting the target plug-in after the authentication is passed;
and under the condition that the processing request is an updating request, updating the target plug-in based on updating data carried by the updating request.
12. An access service system, the system comprising: external interface and business service module to and with the plug-in components management service module of external interface communication, wherein:
the external interface is used for butting at least one access assembly;
the plug-in management service module is used for downloading the at least one plug-in and responding to a starting request sent by the access component to authenticate the at least one plug-in;
and the business service module is used for providing business services for the terminals of corresponding models based on the plug-in which the authentication passes, and the business services at least comprise access services of the terminals and remote control services of the terminals.
13. The service system of claim 12, wherein the plug-in management service module communicates with the at least one plug-in based on a unified interface definition specification;
wherein the unified interface definition specification is generated by converting an interface definition language into pile driving code and based on the pile driving code.
14. The service system according to claim 12, wherein the external interface is further configured to receive a processing request sent by the access component for a target plug-in unit of the at least one plug-in unit, and send the processing request to the management service module;
the plug-in management service module comprises an instance object corresponding to each plug-in;
the instance object is used for executing processing operation corresponding to the processing request on the target plug-in based on the processing request, wherein the processing operation comprises at least one of starting, stopping, restarting and state monitoring.
15. The service system of claim 12, wherein the access service system runs on a server, and wherein at least one of the plug-ins runs on the server, and/or runs on a host connected to the server.
16. An access service processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring at least one access component and downloading at least one plug-in corresponding to each access component; the access assembly corresponds to at least one plug-in, and different plug-ins correspond to terminals of different models;
the authentication module is used for responding to a starting request sent by the access component aiming at the plug-in unit and authenticating the at least one plug-in unit;
and the service module is used for providing service for the terminal with the corresponding model based on the plug-in which the authentication passes, and the service at least comprises the access service of the terminal and the remote control service of the terminal.
17. A computer-readable storage medium storing a computer program for causing a processor to perform the access service processing method according to any one of claims 1 to 11.
18. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing implementing the access service handling method according to any of claims 1-11.
CN202211118641.8A 2022-09-14 2022-09-14 Access service processing method, system, device, electronic equipment and storage medium Pending CN115514667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211118641.8A CN115514667A (en) 2022-09-14 2022-09-14 Access service processing method, system, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211118641.8A CN115514667A (en) 2022-09-14 2022-09-14 Access service processing method, system, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115514667A true CN115514667A (en) 2022-12-23

Family

ID=84503404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211118641.8A Pending CN115514667A (en) 2022-09-14 2022-09-14 Access service processing method, system, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115514667A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076159A (en) * 2023-10-10 2023-11-17 统信软件技术有限公司 Plug-in calling method and device, electronic equipment and computer readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566954A (en) * 2009-05-31 2009-10-28 珠海金山软件股份有限公司 Method and device for managing plug-in
CN102065026A (en) * 2010-12-21 2011-05-18 百度在线网络技术(北京)有限公司 Device and method for authenticating object to be loaded
US20130191526A1 (en) * 2011-03-14 2013-07-25 Tencent Technology Shenzhen Company Limited Open plug-in management platform and plug-in management method implemented on browser
US20130191495A1 (en) * 2012-01-23 2013-07-25 Cristian Almstrand Framework and system to distribute applications for heterogeneous platforms
CN105049304A (en) * 2015-07-03 2015-11-11 中山火炬职业技术学院 Internet-of-thing terminal access gateway supporting multi-heterogeneous transmission module and application system
WO2017020458A1 (en) * 2015-07-31 2017-02-09 百度在线网络技术(北京)有限公司 Plugin calling method and device
WO2018059137A1 (en) * 2016-09-29 2018-04-05 中兴通讯股份有限公司 Internet of things terminal access device and method, and computer storage medium
CN111181991A (en) * 2020-01-03 2020-05-19 苏州融卡智能科技有限公司 Method and device for constructing terminal access platform of Internet of things
CN114047976A (en) * 2021-11-18 2022-02-15 上海电气风电集团股份有限公司 Plug-in loading method and device, electronic equipment and storage medium
CN114157692A (en) * 2021-11-30 2022-03-08 广东电网有限责任公司广州供电局 Multi-source polymorphic mass heterogeneous terminal universal access interconnection protocol conversion method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566954A (en) * 2009-05-31 2009-10-28 珠海金山软件股份有限公司 Method and device for managing plug-in
CN102065026A (en) * 2010-12-21 2011-05-18 百度在线网络技术(北京)有限公司 Device and method for authenticating object to be loaded
US20130191526A1 (en) * 2011-03-14 2013-07-25 Tencent Technology Shenzhen Company Limited Open plug-in management platform and plug-in management method implemented on browser
US20130191495A1 (en) * 2012-01-23 2013-07-25 Cristian Almstrand Framework and system to distribute applications for heterogeneous platforms
CN105049304A (en) * 2015-07-03 2015-11-11 中山火炬职业技术学院 Internet-of-thing terminal access gateway supporting multi-heterogeneous transmission module and application system
WO2017020458A1 (en) * 2015-07-31 2017-02-09 百度在线网络技术(北京)有限公司 Plugin calling method and device
WO2018059137A1 (en) * 2016-09-29 2018-04-05 中兴通讯股份有限公司 Internet of things terminal access device and method, and computer storage medium
CN111181991A (en) * 2020-01-03 2020-05-19 苏州融卡智能科技有限公司 Method and device for constructing terminal access platform of Internet of things
CN114047976A (en) * 2021-11-18 2022-02-15 上海电气风电集团股份有限公司 Plug-in loading method and device, electronic equipment and storage medium
CN114157692A (en) * 2021-11-30 2022-03-08 广东电网有限责任公司广州供电局 Multi-source polymorphic mass heterogeneous terminal universal access interconnection protocol conversion method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076159A (en) * 2023-10-10 2023-11-17 统信软件技术有限公司 Plug-in calling method and device, electronic equipment and computer readable storage medium
CN117076159B (en) * 2023-10-10 2024-01-05 统信软件技术有限公司 Plug-in calling method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10802906B2 (en) Monitoring method and apparatus of server, and storage medium
CN109525624B (en) Container login method and device and storage medium
JP4664977B2 (en) Device management method for device management system
CN109547524B (en) User behavior storage method, device, equipment and storage medium based on Internet of things
CN111061491A (en) LXC container technology-based edge computing gateway management system and method
CN113312064B (en) Method and device for installing and configuring physical machine and computer readable medium
CN112437047A (en) Remote server management method, system and related device
CN115357308B (en) Docker-based edge Internet of things agent device, system and application method
CN108833565A (en) A kind of method, apparatus of monitoring server, server and storage medium
CN111611054A (en) Application deployment method and device
CN115514667A (en) Access service processing method, system, device, electronic equipment and storage medium
CN111934904B (en) Capacity expansion method, controller and system
CN110442506B (en) Log acquisition method, device, service server, system and storage medium
CN115174551A (en) Program deployment method and device, storage medium and electronic device
CN107968725B (en) Method and device for returning and configuring configuration information of home gateway unit type terminal device
CN113938391A (en) Network distribution method and system for gateway equipment and electronic equipment
CN104104701A (en) Online service configuration updating method and system
EP2445171B1 (en) File transfer protocol client and implementing method thereof
CN115004650B (en) Node configuration method, node configuration device, distributed system and computer readable medium
CN105791005A (en) Transmission control protocol (TCP) connection based method and apparatus for implementing remote operation and maintenance management
CN105024847A (en) Network management system of a single-server multi-network-equipment adapter, and a configuration, start, and operation method of the single-server multi-network-equipment adapter
CN113645068A (en) Method for realizing automatic deployment and computer readable storage medium
CN114168137A (en) Internet of things system and method adaptive to multiple platforms
CN110650071B (en) Access management method and device of user equipment and management server
CN115514750A (en) Electronic device remote control method, server, system, medium, and device

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