[go: up one dir, main page]

CN112799795B - Service implementation method, process management method, device, equipment and storage medium - Google Patents

Service implementation method, process management method, device, equipment and storage medium Download PDF

Info

Publication number
CN112799795B
CN112799795B CN201911114903.1A CN201911114903A CN112799795B CN 112799795 B CN112799795 B CN 112799795B CN 201911114903 A CN201911114903 A CN 201911114903A CN 112799795 B CN112799795 B CN 112799795B
Authority
CN
China
Prior art keywords
message
sending
sub
business
processes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911114903.1A
Other languages
Chinese (zh)
Other versions
CN112799795A (en
Inventor
李越
毛东杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201911114903.1A priority Critical patent/CN112799795B/en
Publication of CN112799795A publication Critical patent/CN112799795A/en
Application granted granted Critical
Publication of CN112799795B publication Critical patent/CN112799795B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the disclosure discloses a service implementation method, a process management method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a task message of a specific task from a server; determining one or more business processes running on the network device according to the task message and forwarding the task message to the business processes; determining, by the service process, a corresponding service instruction of a sub-device corresponding to the service process according to the task message, where the corresponding service instruction is used to control the sub-device to execute an operation required by the specific task; the technical scheme of sending the corresponding service to the sub-equipment can utilize the independence of the processes, reduces the coupling between different services, and ensures that the service processes in the network equipment have the characteristics of high decoupling, reusability and expansibility.

Description

Service implementation method, process management method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a service implementation method, a process management method, a device, equipment and a storage medium.
Background
Modern industry and smart manufacturing are increasingly demanding on the degree of intelligence of devices, and often require complex manufacturing tasks to be accomplished through collaboration and unified scheduling between devices. The interconnection and intercommunication between manufacturing equipment can be realized through the internet of things technology, however, in the process of providing the disclosure, the inventor finds that the current manufacturing equipment generally uses a single architecture, the coupling between services is strong, and the requirements of reusability, expansibility, quick deployment and the like are difficult to meet.
Disclosure of Invention
In order to solve the problems in the related art, embodiments of the present disclosure provide a service implementation method, a process management method, a device, equipment, and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a service implementation method for a network device, where the method includes:
acquiring a task message of a specific task from a server;
Determining one or more business processes running on the network device according to the task message and forwarding the task message to the business processes;
Determining, by the service process, a corresponding service instruction of a sub-device corresponding to the service process according to the task message, where the corresponding service instruction is used to control the sub-device to execute an operation required by the specific task;
and sending the corresponding service instruction to the sub-equipment.
With reference to the first aspect, in a first implementation manner of the first aspect, the method further includes:
acquiring state information of a sub-device corresponding to one or more sub-device processes running on the network device through the sub-device processes;
And sending the state information to a server.
With reference to the first aspect, in a second implementation manner of the first aspect, the method further includes:
Realizing data conversion service between networks connected with the network equipment through a gateway process running on the network equipment; and/or
And realizing the security management of the network equipment, the server and the sub-equipment through a security process running on the network equipment.
With reference to any one of the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the method further includes any one or more of the following operations:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
the external communication component is used for realizing communication between the process and the server, and forwarding the message from the corresponding theme of the server to the process according to the theme subscribed by the process.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the present disclosure:
Said determining, from said task message, one or more business processes running on said network device, comprising: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the present disclosure:
the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
With reference to any one of the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the method further includes any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
In a second aspect, an embodiment of the present disclosure provides a process management method for a network device, including:
acquiring a business process file, wherein the business process file is used for running a corresponding business process on the network equipment;
sending a registration message and a topic subscription message of the business process to an external communication component through the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
With reference to the second aspect, in a first implementation manner of the second aspect, the present disclosure:
The obtaining the business process file comprises obtaining the business process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment.
With reference to the second aspect, in a second implementation manner of the second aspect, the method further includes:
When a new piece of sub-equipment is accessed to the network equipment, a piece of sub-equipment process file related to the new piece of sub-equipment is acquired, and the piece of sub-equipment process file is used for acquiring the state information of the new piece of sub-equipment and sending the state information to the server.
With reference to the second aspect, any one of the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the method further includes any one or more of the following operations:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
And sending a logoff message of a process running on the network device to the server through the external communication component.
With reference to the second aspect, any one of the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the method further includes any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
In a third aspect, an embodiment of the present disclosure provides a service implementation apparatus for a network device, including:
The first acquisition module is configured to acquire a task message of a specific task from the server;
A first determining module configured to determine one or more business processes running on the network device from the task message and forward the task message to the business processes;
The second determining module is configured to determine, according to the task message, a corresponding service instruction of a sub-device corresponding to the service process through the service process, where the corresponding service instruction is used to control the sub-device to execute an operation required by the specific task;
and the first sending module is configured to send the corresponding service instruction to the sub-equipment.
With reference to the third aspect, in a first implementation manner of the third aspect, the present disclosure:
The first obtaining module is further configured to obtain state information of a sub-device corresponding to one or more sub-device processes running on the network device;
the first sending module is further configured to send the status information to a server.
With reference to the third aspect, in a second implementation manner of the third aspect, the apparatus further includes:
A data conversion module configured to implement a data conversion service between networks connected to the network device through a gateway process running on the network device; and/or
A security module configured to enable security management of the network device, the server, and the child device by a security process running on the network device.
With reference to any one of the third aspect, the first implementation manner of the third aspect, and the second implementation manner of the third aspect, the present disclosure further includes, in a third implementation manner of the third aspect, a first interaction module configured to perform any one or more of the following operations:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
the external communication component is used for realizing communication between the process and the server, and forwarding the message from the corresponding theme of the server to the process according to the theme subscribed by the process.
With reference to the third implementation manner of the third aspect, in a fourth implementation manner of the third aspect, the present disclosure is:
Said determining, from said task message, one or more business processes running on said network device, comprising: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
With reference to the fourth implementation manner of the third aspect, the present disclosure is in a fifth implementation manner of the third aspect:
the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
With reference to any one of the third aspect, the first implementation manner of the third aspect, and the second implementation manner of the third aspect, in a sixth implementation manner of the third aspect, the apparatus further includes a first local module configured to perform any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
In a fourth aspect, an embodiment of the present disclosure provides a process management apparatus for a network device, including:
The second acquisition module is configured to acquire a business process file, wherein the business process file is used for running a corresponding business process on the network equipment;
A second interaction module configured to send a registration message and a topic subscription message of the business process to an external communication component via the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
With reference to the fourth aspect, in a first implementation manner of the fourth aspect, the present disclosure:
The obtaining the business process file comprises obtaining the business process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment.
With reference to the fourth aspect, in a second implementation manner of the fourth aspect, the apparatus further includes:
And the third acquisition module is configured to acquire a sub-equipment process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment, wherein the sub-equipment process file is used for acquiring the state information of the new sub-equipment and sending the state information to the server.
With reference to the fourth aspect, any one of the first implementation manner of the fourth aspect and the second implementation manner of the fourth aspect, in a third implementation manner of the fourth aspect, the second interaction module is further configured to perform any one or more of the following operations:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
And sending a logoff message of a process running on the network device to the server through the external communication component.
With reference to any one of the fourth aspect, the first implementation manner of the fourth aspect, and the second implementation manner of the fourth aspect, in a fourth implementation manner of the fourth aspect, the apparatus further includes a second local module configured to perform any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
In a fifth aspect, embodiments of the present disclosure provide an electronic device comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to perform the method steps of:
acquiring a task message of a specific task from a server;
Determining one or more business processes running on the network device according to the task message and forwarding the task message to the business processes;
Determining, by the service process, a corresponding service instruction of a sub-device corresponding to the service process according to the task message, where the corresponding service instruction is used to control the sub-device to execute an operation required by the specific task;
and sending the corresponding service instruction to the sub-equipment.
With reference to the fifth aspect, in a first implementation manner of the fifth aspect, the one or more computer instructions are further executed by the processor to implement the following method steps:
acquiring state information of a sub-device corresponding to one or more sub-device processes running on the network device through the sub-device processes;
And sending the state information to a server.
With reference to the fifth aspect, in a second implementation manner of the fifth aspect, the one or more computer instructions are further executed by the processor to implement the following method steps:
Realizing data conversion service between networks connected with the network equipment through a gateway process running on the network equipment; and/or
And realizing the security management of the network equipment, the server and the sub-equipment through a security process running on the network equipment.
With reference to any one of the fifth aspect, the first implementation manner of the fifth aspect, and the second implementation manner of the fifth aspect, in a third implementation manner of the fifth aspect, the one or more computer instructions are further executed by the processor to implement any one or more of the following operations:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
the external communication component is used for realizing communication between the process and the server, and forwarding the message from the corresponding theme of the server to the process according to the theme subscribed by the process.
With reference to the third implementation manner of the fifth aspect, in a fourth implementation manner of the fifth aspect, the present disclosure:
Said determining, from said task message, one or more business processes running on said network device, comprising: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
With reference to the fourth implementation manner of the fifth aspect, in a fifth implementation manner of the fifth aspect, the present disclosure:
the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
With reference to any one of the fifth aspect, the first implementation manner of the fifth aspect, and the second implementation manner of the fifth aspect, in a sixth implementation manner of the fifth aspect, the one or more computer instructions are further executed by the processor to implement any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
In a sixth aspect, embodiments of the present disclosure provide an electronic device comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to perform the method steps of:
acquiring a business process file, wherein the business process file is used for running a corresponding business process on the network equipment;
sending a registration message and a topic subscription message of the business process to an external communication component through the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
With reference to the sixth aspect, in a first implementation manner of the sixth aspect, the present disclosure:
The obtaining the business process file comprises obtaining the business process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment.
With reference to the sixth aspect, in a second implementation manner of the sixth aspect, the one or more computer instructions are executed by the processor to implement the following method steps:
When a new piece of sub-equipment is accessed to the network equipment, a piece of sub-equipment process file related to the new piece of sub-equipment is acquired, and the piece of sub-equipment process file is used for acquiring the state information of the new piece of sub-equipment and sending the state information to the server.
With reference to any one of the sixth aspect, the first implementation manner of the sixth aspect, and the second implementation manner of the sixth aspect, in a third implementation manner of the sixth aspect, the one or more computer instructions are further executed by the processor to implement any one or more of the following operations:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
And sending a logoff message of a process running on the network device to the server through the external communication component.
With reference to any one of the sixth aspect, the first implementation manner of the sixth aspect, and the second implementation manner of the sixth aspect, in a fourth implementation manner of the sixth aspect, the one or more computer instructions are further executed by the processor to implement any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
In a seventh aspect, embodiments of the present disclosure provide a readable storage medium having stored thereon computer instructions which, when executed by a processor, implement a method as in any of the fourth implementation forms of the first to second aspects.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
According to the technical scheme provided by the embodiment of the disclosure, the network equipment can send the corresponding service instruction to the sub-equipment related to the task information through one or more service processes, so that the independence of the service processes is utilized, the coupling between different services is reduced, and the application program in the network equipment has the characteristics of high decoupling, reusability and expansibility.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Other objects, purposes and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 illustrates an exemplary system architecture in which a business implementation method and a process management method may be applied in accordance with an embodiment of the present disclosure;
fig. 2A illustrates a flow chart of a service implementation method for a network device according to an embodiment of the present disclosure;
FIG. 2B illustrates a flowchart for obtaining sub-device state information, according to an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of a process management method for a network device according to an embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of a network device according to an embodiment of the present disclosure;
Fig. 5 shows a software architecture schematic for a network device according to an embodiment of the present disclosure;
fig. 6 shows a block diagram of a service implementation apparatus for a network device according to an embodiment of the present disclosure;
FIG. 7 shows a block diagram of a process management apparatus for a network device according to an embodiment of the present disclosure;
fig. 8 shows a block diagram of an electronic device according to an embodiment of the disclosure;
Fig. 9 illustrates a schematic structure of a computer system suitable for use in implementing a service implementation method and a process management method for a network device according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, portions irrelevant to description of the exemplary embodiments are omitted in the drawings.
In this disclosure, it should be understood that terms such as "comprises" or "comprising," etc., are intended to indicate the presence of features, numbers, steps, acts, components, portions, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, acts, components, portions, or combinations thereof are present or added.
In addition, it should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As mentioned above, the existing manufacturing equipment generally uses a single architecture, so that the coupling between services is strong, and it is difficult to meet the requirements of multiplexing, expanding, quick deployment and the like.
In view of the above-mentioned drawbacks, the technical solution provided in the embodiments of the present disclosure is that a network device obtains a task message of a specific task from a server, determines one or more service processes running on the network device according to the task message, and forwards the task message to the service process, through which a corresponding service instruction of a sub-device corresponding to the service process is determined according to the task message, where the corresponding service instruction is used to control an operation required by the sub-device to execute the specific task to send the corresponding service instruction to the sub-device.
According to the technical scheme, corresponding service instructions can be sent to the sub-devices required for completing the specific tasks through one or more service processes according to the task messages, and the sub-devices are controlled to cooperate with each other to complete the specific tasks, so that the independence of the service processes can be utilized, the coupling among different services is reduced, and the high-decoupling, multiplexing and expandable Internet of things system is realized.
Fig. 1 illustrates an exemplary system architecture 100 in which a business implementation method and a process management method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include sub-devices 101, 102, and 103, a network device 104, and a server 105. Network 106 is the medium used to provide communication links between sub-devices 101, 102, and 103 and network device 104, and network 107 is the medium used to provide communication links between the network device 104 and server 105. The networks 106 and 107 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc., and the networks 106 and 107 may be of the same type or of different types. Network device 104 may be a computer system or device, such as an embedded gateway device, that provides data translation services between multiple networks (e.g., networks 106 and 107).
The sub-devices 101, 102, and 103 interact with the network device 104 through the network 106 to receive or send messages and the like. In different application scenarios, the sub-devices 101, 102 and 103 may implement corresponding service functions. The sub-equipment can receive the service instruction from the network equipment and complete corresponding service according to the service instruction. For example, assuming that the sub-device is a puncher, after the sub-device receives a "punching" service instruction from the connected network device, the corresponding "punching" service can be completed; assuming that the sub-equipment is a grooving machine, after receiving a grooving service instruction from the connected network equipment, the sub-equipment can finish corresponding grooving service; assuming that the sub-device is a transmission belt, after receiving a service instruction of "transmission" from the connected network device, the sub-device can complete a corresponding "transmission" service, and the like. The present application is not particularly limited with respect to the kind of sub-device and the type of service completed.
The server 105 interacts with the network device 104 through the network 107 to receive or send messages and the like. Server 105 may be, for example, a cloud server that may maintain and manage information about tasks that sub-devices 101, 102, and 103 are capable of performing, states of the sub-devices, etc., and may send corresponding task messages to network device 104 according to business needs.
It should be noted that, the service implementation method for a network device provided in the embodiments of the present disclosure may be generally executed by the network device 104. Accordingly, the service implementation apparatus for a network device provided in the embodiments of the present disclosure may be generally disposed in the network device 104.
It should be understood that the number of sub-devices, network devices, servers, and networks in fig. 1 are merely illustrative. There may be any number of sub-devices, network devices, servers, and networks, as desired for implementation.
Fig. 2A shows a flowchart of a service implementation method for a network device according to an embodiment of the present disclosure.
As shown in fig. 2A, the service implementation method for a network device includes the following steps S101 to S104.
In step S101, a task message of a specific task is acquired from a server.
According to an embodiment of the disclosure, the network device is connected to the sub-devices d1, …, dn, n being a positive integer. At least one of the sub-devices d1, … and dn may independently complete at least one task or complete at least one task together with other sub-devices, and a task message corresponding to the at least one task may be stored in the server.
In step S102, one or more business processes running on the network device are determined from the task message and the task message is forwarded to the business processes.
According to an embodiment of the disclosure, the network device runs a service process m_w1, …, m_wm, M being a positive integer. Each of the business processes may control one or more of the sub-devices d1, …, dn according to the task message of the specific task to complete the corresponding business w1, …, wm. According to the embodiment of the disclosure, any two business processes and corresponding businesses have no repeated functions, so that the mutual independence between any two business processes is realized.
According to the embodiment of the disclosure, the network device may determine one or more services and a service process corresponding to the services according to the acquired task message. For example, assuming that the task message W is acquired by the network device, it may be determined that the topic of the task message W is subscribed by the service process m_w1, the service process m_w2, and the service process m_w3, so as to determine the service process m_w1, the service process m_w2, and the service process m_w3.
In step S103, through the service process, a corresponding service instruction of the sub-device corresponding to the service process is determined according to the task message.
According to an embodiment of the disclosure, the corresponding business instructions are used to control operations required by the sub-devices to perform the specific tasks.
According to the embodiment of the disclosure, the business process can analyze the task message to obtain business information related to the business process, and determine the sub-equipment corresponding to the business information and the corresponding business instruction thereof. For example, a service required to complete the particular task may be determined based on the parsing result, and then one or more sub-devices associated with the service and corresponding service instructions for the sub-devices may be determined. For example, taking the service process m_w1 as an example, the service process m_w1 may parse three services W1, W2 and W3 according to the task message W, where the service W2 is a service related to the service process m_w1, and then the service process m_w1 determines the sub-devices d1 and d2 related to the service W1, and may further determine a corresponding service instruction order1 of the sub-device d1 and a corresponding service instruction order2 of the sub-device d 2.
It will be appreciated that the control instructions, procedures, data structures, configuration information, communication protocols, etc. of the various sub-devices, which are required to be executed to complete the corresponding service, may be different specifications, and that the corresponding service instructions are written according to the specifications, so as to ensure that the sub-devices can correctly execute the corresponding service instructions and cooperate with each other to complete the specific task.
In step S104, the corresponding service instruction is sent to the sub-device.
According to the embodiment of the disclosure, the business process can send the corresponding business instructions to one or more sub-devices, and the control of the cooperative work of the plurality of sub-devices through the network device can be realized, so that huge single application programs do not need to be run on a server side to respectively control the sub-devices, the system load is balanced, and the working efficiency of the system is improved.
For example, the service process m_w1 may send a corresponding service instruction order1 to the sub-device d1 and send a corresponding service instruction order2 to the sub-device d2, so that the sub-devices d1 and d2 can complete the corresponding services w1 and w2 according to the corresponding service instructions order1 and order2, respectively.
According to the embodiment of the disclosure, the network device can send corresponding service instructions to the sub-devices required for completing the specific tasks through one or more service processes, so that the independence of the service processes is utilized, the coupling among different services is reduced, and the independent maintenance, upgrading and logout of a single service process are facilitated. In addition, different tasks can be realized by combining different business processes, so that the reusability of the system is improved. New business functions can be realized by adding new processes, so that new tasks are completed, and the system expansion is facilitated. In this way, highly decoupled, reusable and scalable system features are achieved.
Fig. 2B illustrates a flowchart of acquiring sub-device state information according to an embodiment of the present disclosure.
As shown in fig. 2B, the service implementation method for a network device according to an embodiment of the present disclosure further includes step S201 to step S202.
In step S201, status information of a child device corresponding to one or more child device processes running on the network device is acquired through the child device processes.
In step S202, the status information is sent to the server.
According to an embodiment of the disclosure, when the network device is connected to the sub-devices d1, …, dn, a sub-device process m_d1, …, m_dn, n is a positive integer, where the sub-devices d1, …, dn are in one-to-one correspondence with the sub-device process m_d1, …, m_dn.
According to the embodiment of the disclosure, the sub-device process is configured to obtain state information of a corresponding sub-device, and send the state information to a server, so that the server can obtain state information of all sub-devices connected to the network device.
According to the embodiment of the disclosure, the state information of the sub-device may include any information capable of describing the state of the sub-device, such as basic information (e.g., name, model, etc.), use condition (e.g., in use, idle, etc.), unavailable cause (e.g., oil leakage, failure, no power on, etc.), and completable service, which is not particularly limited by the present disclosure.
According to an embodiment of the present disclosure, the service implementation method for a network device further includes implementing a data conversion service between networks connected to the network device through a gateway process running on the network device.
According to an embodiment of the present disclosure, the service implementation method for a network device further includes implementing security management of the network device, a server, and one or more sub-devices through a security process running on the network device.
According to embodiments of the present disclosure, a network device may be a computer system or device that provides data conversion services between multiple networks (e.g., a network connecting the network device to a server, a network connecting the network device to a sub-device, a network connecting the network device to a different sub-device, etc.) connected to the network device. In particular, the multiple networks may use different communication protocols, data formats, or languages, and even architectures may be completely different, and the network device may act as a translator for repackaging the received message to accommodate the needs of the destination system. In addition, the network device may also perform processes such as filtering and security checking on the received message to ensure security management of the network device and one or more sub-devices connected to the network device.
According to the embodiment of the disclosure, the network device can realize data conversion service between networks connected with the network device through a gateway process running on the network device, and can also perform operations such as filtering and security checking on acquired messages through a security process running on the network device, so as to realize security management on the network device and one or more sub-devices.
According to embodiments of the present disclosure, one or more processes may be run on the network device, including any of the following processes: business process, sub-equipment process, gateway process, security process.
According to the embodiment of the disclosure, the network equipment is connected with a plurality of sub-equipment types, and by correspondingly configuring a plurality of service processes, the sub-equipment can be controlled by the service processes to cooperate with each other so as to complete a plurality of tasks. In this way, resource waste caused by deploying a plurality of application programs for a plurality of tasks is reduced; when the sub-equipment, the business and the like are changed, only the corresponding process (such as adding, deleting or modifying) is needed, and other processes do not need to be processed, so that the development and maintenance cost is reduced; because the common functions are not repeated among different processes, the processes have the characteristics of independence, single function and the like, the coupling among different functions is reduced, and the application programs in the network equipment have the characteristics of high decoupling, reusability and expansibility.
According to an embodiment of the present disclosure, the service implementation method for a network device further includes any one or more of the following operations:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
the external communication component is used for realizing communication between the process and the server, and forwarding the message from the corresponding theme of the server to the process according to the theme subscribed by the process.
According to embodiments of the present disclosure, when a new child device is connected to the network device, the identification information of the child device and the identification information of the network device may be sent to the server, for example, through a mobile client of a user of the network device, and the server sends a child device related business process file and/or a child device process file to the network device, where the business process file is used to run a business process on the network device, and the child device process file is used to run a child device process on the network device.
According to embodiments of the present disclosure, the external communication component may be part of the network device or may be separate from the network device. The processes register to the external communication component and send topic subscription messages to the external communication component, which aggregates topics subscribed by the processes and sends topic subscription messages of the processes to the server. Accordingly, the server sends a message subscribed by the process in the network device to the external communication component, and after the external communication component receives the message from the server, the external communication component determines which process or processes should forward the message to according to the topic subscription condition of each process. On the other hand, the process can also send a logout message and/or an unsubscribe message to the external communication component, and the external communication component sends the logout message and/or the unsubscribe message of the process to the server, so that the server does not attempt to execute tasks by using the logged-out process any more, and does not send the unsubscribe message any more, thereby ensuring the normal and stable operation of the whole system.
According to an embodiment of the disclosure, the determining one or more business processes running on the network device according to the task message includes: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes. The business process only subscribes to the theme related to the business which is completed by the business process, if the theme of the task message is consistent with the theme subscribed by the business process, the task message indicates that the specific task corresponding to the task message needs to call the business process to control the corresponding sub-equipment, and then the task message can be forwarded to the business process. Therefore, task disassembly and process scheduling are conveniently realized in a topic subscription mode, the system structure is simplified, and the system efficiency is improved.
According to an embodiment of the disclosure, the task message includes service information related to the one or more service processes, and the determining, according to the task message, a corresponding service instruction of a sub-device corresponding to the service process includes: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof. The task message may relate to one service process or may relate to a plurality of service processes, and the service process may obtain service information related to the task message by parsing the task message, so as to determine a corresponding sub-device and a service instruction thereof according to the service information. Therefore, task messages can be generated for different service processes without being required to be generated respectively, and the task messages only need to contain service information of all related service processes, and the service information related to the task messages is obtained through service process analysis, so that the complexity of system design is greatly reduced.
According to an embodiment of the present disclosure, the service implementation method further includes any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
Communication between various processes running on the network device may be achieved by sending registration, deregistration, topic subscription, unsubscribe, etc. messages to the local connection manager. The processes do not need to independently establish communication connection with other processes and maintain the online states of the other processes, but only need to interact with a local connection manager, and the local connection manager uniformly manages the online states of the processes, the messages allowed to be received and the like, so that the system implementation complexity is simplified and the system efficiency is improved.
Fig. 3 shows a flowchart of a process management method for a network device according to an embodiment of the present disclosure.
As shown in fig. 3, the process management method for a network device according to an embodiment of the present disclosure includes steps S301 and S302.
In step S301, a business process file is obtained, where the business process file is used to run a corresponding business process on the network device.
In step S302, a registration message and a topic subscription message of the business process are sent to an external communication component through the business process.
The external communication component is used for realizing communication between a process running on the network device and a server, the topic subscription message is used for determining a topic subscribed to by the service process registered with the external communication component, when the external communication component acquires a task message of the topic from the server, the task message is forwarded to the service process, and the task message is used by the service process for determining a corresponding service instruction of a sub-device corresponding to the service process.
According to an embodiment of the present disclosure, acquiring a business process file includes acquiring a business process file related to a new child device when the new child device accesses the network device.
According to an embodiment of the disclosure, the process management method for a network device further includes, when a new sub-device accesses the network device, acquiring a sub-device process file related to the new sub-device, where the sub-device process file is used to acquire state information of the new sub-device and send the state information to the server.
According to an embodiment of the present disclosure, the process management method for a network device further includes any one or more of the following operations:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
And sending a logoff message of a process running on the network device to the server through the external communication component.
According to embodiments of the present disclosure, when a new child device is connected to the network device, the identification information of the child device and the identification information of the network device may be sent to the server, for example, through a mobile client of a user of the network device, and the server sends a child device related business process file and/or a child device process file to the network device, where the business process file is used to run a business process on the network device, and the child device process file is used to run a child device process on the network device. In this case, the process can be considered to have been registered with the server, so that repeated registration with the server via the external communication component is not required. In other cases, the process file may be obtained from another server or from another approach, for example, and registered with the server through an external communication component after the process has been run.
According to embodiments of the present disclosure, the external communication component may be part of the network device or may be separate from the network device. The processes register to the external communication component and send topic subscription messages to the external communication component, which aggregates topic subscription messages of each process and sends topic subscription messages of the processes to the server. Accordingly, the server sends a message subscribed by the process in the network device to the external communication component, and after the external communication component receives the message from the server, the external communication component determines which process or processes should forward the message to according to the topic subscription condition of each process. On the other hand, the process can also send a logout message and/or an unsubscribe message to the external communication component, and the external communication component sends the logout message and/or the unsubscribe message of the process to the server, so that the server does not attempt to execute tasks by using the logged-out process any more, and does not send the unsubscribe message any more, thereby ensuring the normal and stable operation of the whole system.
According to an embodiment of the disclosure, the determining one or more business processes running on the network device according to the task message includes: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes. The business process only subscribes to the theme related to the business which is completed by the business process, if the theme of the task message is consistent with the theme subscribed by the business process, the task message indicates that the specific task corresponding to the task message needs to call the business process to control the corresponding sub-equipment, and then the task message can be forwarded to the business process. Therefore, task disassembly and process scheduling are conveniently realized in a topic subscription mode, the system structure is simplified, and the system efficiency is improved.
According to an embodiment of the present disclosure, the process management method for a network device further includes any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
Communication between various processes running on the network device may be achieved by sending registration, deregistration, topic subscription, unsubscribe, etc. messages to the local connection manager. The processes do not need to independently establish communication connection with other processes and maintain the online states of the other processes, but only need to interact with a local connection manager, and the local connection manager uniformly manages the online states of the processes, the messages allowed to be received and the like, so that the system implementation complexity is simplified and the system efficiency is improved.
Fig. 4 shows a schematic structural diagram of a network device according to an embodiment of the present disclosure.
As shown in fig. 4, the network device may include one or more traffic processes (traffic processes m_w1, …, m_wm), one or more child device processes (child device processes m_d1, …, m_dn), a network process, a security process, and a local connection manager, where M and n are both positive integers.
According to embodiments of the present disclosure, message interaction may occur between a process running on the network device and the server through an external communication component (e.g., an upper cloud component). The cloud component can realize the functions of message transmission, distribution, encryption, security assurance and the like.
According to embodiments of the present disclosure, a process may send at least one or more of the following messages to an upward cloud component: the registration information of the process, the logoff information of the process, the topic subscription information of the process and the unsubscribe information of the process. The cloud component may send at least one or more of the following messages to the server: a registration message of a process running on the network device, a logoff message of a process running on the network device, a subject subscription message of a process running on the network device, an unsubscribe message of a process running on the network device.
According to embodiments of the present disclosure, when one or more other processes different from the existing process are added to the network device, the network device may send a registration message to the cloud component. For example, when one or more other sub-devices different from the sub-devices d1, …, dn are connected to a network device, other sub-device processes corresponding to the other sub-devices may be deployed in the network device, and a registration message of the other sub-device processes is sent to the cloud component; when a task corresponding to the network device needs to add one or more other services different from the services w1, … and wm, other service processes corresponding to the other services can be deployed in the network device, and a registration message of the other service processes is sent to the cloud component.
According to the embodiment of the disclosure, when one or more processes need to be logged out in the network device, the network device can send corresponding logging-out messages to the upper cloud component and the server by the upper cloud component. For example, assuming that one or more of the sub-devices d1, …, dn need to be disconnected from the network device, a corresponding sub-device process may be logged off by sending a log-off message to the cloud-up component and the cloud-up component to the server; assuming that one or more services corresponding to the network device need to be deleted, a cancellation message may be sent to the server by the upward cloud component and the upward cloud component to cancel the corresponding service process. According to embodiments of the present disclosure, processes may be deleted after logout to save storage space of the network device or may be reserved for later use.
According to the embodiment of the disclosure, the process may further send a topic subscription message to a cloud component and the cloud component sends a topic subscription message to a server, and the server may send a message corresponding to a topic subscribed by a process running on the network device to the network device according to the topic subscription message. And the upper cloud component forwards the message to the corresponding process according to the subscription theme of each process.
According to an embodiment of the present disclosure, the service implementation method for a network device further includes implementing any one or more of the following operations of a process running on the network device by a local connection manager running on the network device: process registration, process logout, process topic subscription, and message passing between processes.
According to embodiments of the present disclosure, the message interaction between the local connection manager and the process may be implemented by the local connection manager running on the network device. The local connection manager can realize functions of message transmission, distribution, encryption, security assurance and the like.
According to the embodiment of the disclosure, when one or more other processes different from the existing process need to be added in the network device, the registration of the other processes can be completed with the local connection manager; when one or more processes need to be logged out in the network equipment, the local connection manager can be used for logging out the other processes; the process on the network device may also implement topic subscription through the local connection manager, thus receiving only messages of topics to which it subscribes.
According to embodiments of the present disclosure, message interaction between the processes may be implemented. For example, assuming that process M1 needs to send an interaction message to process M2, process M1 may send the interaction message to the local connection manager first, and the local connection manager sends the interaction message to process M2 to complete the message interaction.
According to an embodiment of the present disclosure, the local connection manager is implemented based on a remote signaling message queue transport protocol.
According to the embodiment of the disclosure, the remote signaling message queue transmission (Message Queuing Telemetry Transport, MQTT) protocol is a publish-subscribe protocol based on a transmission control protocol (Transmission Control Protocol, TCP), and is designed for very limited memory devices and unreliable communication of networks with very low network bandwidth, and is very suitable for communication of the internet of things. The local connection manager is realized based on a remote signaling message queue transmission protocol, for example, a local MQTT agent can be operated on network equipment, and the local connection manager is realized based on the agent, so that the efficiency and the safety of message transmission can be improved.
Fig. 5 shows a software architecture schematic for a network device according to an embodiment of the present disclosure.
As shown in fig. 5, assuming that a network device is connected to the sub-devices d1, …, dn, the corresponding task may be decomposed into services w1, …, wm, n and m are all positive integers, and the software architecture for the network device may include four levels of an application layer, a middle layer, an operating system and a hardware layer.
According to an embodiment of the disclosure, the application layer may be deployed with a sub-device process m_d1, …, m_dn corresponding to the sub-device d1, …, dn, a service process m_w1, …, m_wm corresponding to the service w1, …, wm, a gateway process for implementing a data conversion service, and a security process for implementing security management.
According to embodiments of the present disclosure, the middle tier may be deployed with one or more support class processes to support the functional implementation of one or more processes in the application layer. For example, processes for implementing support class functions such as process registration, process logout, process cloud, process communication, process data management, process log, and the like; the operating system may be a Linux operating system; the hardware may be embedded hardware.
It should be noted that, those skilled in the art may design the intermediate layer, the operating system and the hardware portion according to actual needs, which is not particularly limited in the present application.
Fig. 6 shows a block diagram of a service implementation apparatus 600 for a network device according to an embodiment of the present disclosure. The apparatus may be implemented as part or all of an electronic device by software, hardware, or a combination of both.
As shown in fig. 6, the service implementation apparatus 600 for a network device includes a first acquisition module 601, a first determination module 602, a second determination module 603, and a first transmission module 604.
A first obtaining module 601 configured to obtain a task message of a specific task from a server;
A first determining module 602 configured to determine one or more business processes running on the network device according to the task message and forward the task message to the business processes;
A second determining module 603, configured to determine, according to the task message, a corresponding service instruction of a sub-device corresponding to the service process through the service process, where the corresponding service instruction is used to control an operation required by the sub-device to execute the specific task;
a first sending module 604 is configured to send the corresponding service instruction to the sub-device.
According to an embodiment of the present disclosure, the first obtaining module 601 is further configured to obtain, by one or more sub-device processes running on the network device, status information of a sub-device corresponding to the sub-device processes;
The first sending module 604 is further configured to send the status information to a server.
The service implementation apparatus 600 for a network device further includes a data conversion module 605 and/or a security module 606 according to an embodiment of the present disclosure.
The data conversion module 605 is configured to implement a data conversion service between networks connected to the network device through a gateway process running on the network device;
The security module 606 is configured to enable security management of the network device, server, and one or more sub-devices through a security process running on the network device.
According to an embodiment of the present disclosure, the service implementation apparatus 600 for a network device further includes a first interaction module 607.
The first interaction module 607 is configured to perform any one or more of the following:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
the external communication component is used for realizing communication between the process and the server, and forwarding the message from the corresponding theme of the server to the process according to the theme subscribed by the process.
According to an embodiment of the disclosure, the determining one or more business processes running on the network device according to the task message includes: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
According to an embodiment of the disclosure, the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
The service implementation apparatus 600 for a network device further includes a first local module 608 according to an embodiment of the present disclosure.
The first local module 608 is configured to perform any one or more of the following:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
According to an embodiment of the present disclosure, the process includes any of the following processes: business process, sub-equipment process, gateway process, security process.
According to an embodiment of the present disclosure, the local connection manager is implemented based on a remote signaling message queue transport protocol.
Fig. 7 shows a block diagram of a process management apparatus 700 for a network device according to an embodiment of the present disclosure. The apparatus may be implemented as part or all of an electronic device by software, hardware, or a combination of both.
As shown in fig. 7, the process management apparatus 700 for a network device includes a second acquisition module 701 and a second interaction module 702.
A second obtaining module 701, configured to obtain a service process file, where the service process file is used to run a corresponding service process on the network device;
a second interaction module 702 configured to send a registration message and a topic subscription message of the business process to an external communication component via the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
According to an embodiment of the disclosure, the acquiring the business process file includes acquiring the business process file related to the new sub-device from the server when the new sub-device accesses the network device.
According to an embodiment of the present disclosure, the second interaction module 702 is further configured to perform any one or more of the following operations:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
And sending a logoff message of a process running on the network device to the server through the external communication component.
According to an embodiment of the present disclosure, the process apparatus 700 for a network device further includes a third acquisition module 703 and/or a second local module 704.
The third obtaining module 703 is configured to obtain a sub-device process file related to a new sub-device when the new sub-device accesses the network device, where the sub-device process file is used to obtain state information of the new sub-device and send the state information to the server.
The second local module 704 is configured to perform any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
Fig. 8 shows a block diagram of an electronic device 800 according to an embodiment of the disclosure.
As shown in fig. 8, the electronic device 800 includes a memory 801 and a processor 802. The memory 801 is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 802 to perform the method steps of:
acquiring task information from a server;
Determining one or more business processes running on the network equipment according to the task information;
Determining one or more pieces of sub-equipment related to the task information and corresponding business instructions of the sub-equipment through the business process, wherein the corresponding business instructions are used for controlling the sub-equipment to execute the operation required by the specific task;
and sending the corresponding service instruction to the sub-equipment.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement the following method steps:
acquiring state information of a sub-device corresponding to one or more sub-device processes running on the network device through the sub-device processes;
And sending the state information to a server.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement the following method steps:
Realizing data conversion service between networks connected with the network equipment through a gateway process running on the network equipment; and/or
Security management of the network device, the server, and the one or more sub-devices is achieved through a security process running on the network device.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement one or more of the following method steps:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
the external communication component is used for realizing communication between the process and the server, and forwarding the message from the corresponding theme of the server to the process according to the theme subscribed by the process.
According to an embodiment of the disclosure, the determining one or more business processes running on the network device according to the task message includes: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
According to an embodiment of the disclosure, the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement one or more of the following method steps:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
According to an embodiment of the present disclosure, the one or more computer instructions are executed by the processor 802 to implement the following method steps:
acquiring a business process file, wherein the business process file is used for running a corresponding business process on the network equipment;
sending a registration message and a topic subscription message of the business process to an external communication component through the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
According to the embodiment of the disclosure, the acquiring the business process file includes acquiring the business process file related to the new sub-device when the new sub-device accesses the network device.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement the following method steps:
When a new piece of sub-equipment is accessed to the network equipment, a piece of sub-equipment process file related to the new piece of sub-equipment is acquired, and the piece of sub-equipment process file is used for acquiring the state information of the new piece of sub-equipment and sending the state information to the server.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement one or more of the following method steps:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
And sending a logoff message of a process running on the network device to the server through the external communication component.
According to an embodiment of the present disclosure, the one or more computer instructions are also executed by the processor 802 to implement one or more of the following method steps:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
the local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes.
Fig. 9 shows a schematic diagram of a computer system 900 suitable for use in implementing a service implementation method and a process management method for a network device according to an embodiment of the present disclosure.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901, which can execute various processes in the above-described embodiments in accordance with a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 909 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the system 900 are also stored. The CPU901, ROM902, and RAM903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
The following components are connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, according to embodiments of the present disclosure, the methods described above may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a readable medium thereof, the computer program comprising program code for performing the data management and/or access methods described above. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules referred to in the embodiments of the present disclosure may be implemented in software or in programmable hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a readable storage medium, which may be a readable storage medium contained in the electronic device or the computer system in the above-described embodiment; or may be a readable storage medium, alone, that is not assembled into the device. The readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the inventive concepts described herein. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (26)

1. A service implementation method for a network device, comprising:
acquiring a task message of a specific task from a server;
Determining one or more business processes running on the network device according to the task message and forwarding the task message to the business processes;
Determining, by the service process, a corresponding service instruction of a sub-device corresponding to the service process according to the task message, where the corresponding service instruction is used to control the sub-device to execute an operation required by the specific task;
and sending the corresponding service instruction to the sub-equipment.
2. The method as recited in claim 1, further comprising:
acquiring state information of a sub-device corresponding to one or more sub-device processes running on the network device through the sub-device processes;
And sending the state information to a server.
3. The method as recited in claim 1, further comprising:
Realizing data conversion service between networks connected with the network equipment through a gateway process running on the network equipment; and/or
And realizing the security management of the network equipment, the server and the sub-equipment through a security process running on the network equipment.
4. A method according to any one of claims 1 to 3, further comprising any one or more of the following operations:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
The external communication component is used for realizing communication between the process and the server, and forwarding a message from a corresponding theme of the server to the process according to the theme subscribed by the process; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
5. The method according to claim 4, wherein:
Said determining, from said task message, one or more business processes running on said network device, comprising: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
6. The method according to claim 5, wherein:
the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
7. A method according to any one of claims 1 to 3, further comprising any one or more of the following operations:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
The local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
8. A process management method for a network device, comprising:
acquiring a business process file, wherein the business process file is used for running a corresponding business process on the network equipment;
sending a registration message and a topic subscription message of the business process to an external communication component through the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
9. The method according to claim 8, wherein:
The obtaining the business process file comprises obtaining the business process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment.
10. The method as recited in claim 8, further comprising:
When a new piece of sub-equipment is accessed to the network equipment, a piece of sub-equipment process file related to the new piece of sub-equipment is acquired, and the piece of sub-equipment process file is used for acquiring the state information of the new piece of sub-equipment and sending the state information to the server.
11. The method of any one of claims 8-10, further comprising any one or more of:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
12. The method of any one of claims 8-10, further comprising any one or more of:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
The local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
13. A service implementation apparatus for a network device, comprising:
The first acquisition module is configured to acquire a task message of a specific task from the server;
A first determining module configured to determine one or more business processes running on the network device from the task message and forward the task message to the business processes;
The second determining module is configured to determine, according to the task message, a corresponding service instruction of a sub-device corresponding to the service process through the service process, where the corresponding service instruction is used to control the sub-device to execute an operation required by the specific task;
and the first sending module is configured to send the corresponding service instruction to the sub-equipment.
14. The apparatus according to claim 13, wherein:
The first obtaining module is further configured to obtain state information of a sub-device corresponding to one or more sub-device processes running on the network device;
the first sending module is further configured to send the status information to a server.
15. The apparatus as recited in claim 13, further comprising:
A data conversion module configured to implement a data conversion service between networks connected to the network device through a gateway process running on the network device; and/or
A security module configured to enable security management of the network device, the server, and the child device by a security process running on the network device.
16. The apparatus of any one of claims 13-15, further comprising a first interaction module configured to perform any one or more of the following:
Sending a registration message of the process to an external communication component through the process;
sending a logoff message of the process to the external communication component through the process;
Sending a topic subscription message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component;
The external communication component is used for realizing communication between the process and the server, and forwarding a message from a corresponding theme of the server to the process according to the theme subscribed by the process; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
17. The apparatus according to claim 16, wherein:
Said determining, from said task message, one or more business processes running on said network device, comprising: and determining the one or more business processes according to the theme of the task message and the theme subscribed by the business processes.
18. The apparatus according to claim 17, wherein:
the task message includes business information related to the one or more business processes;
The determining the corresponding service instruction of the sub-device corresponding to the service process according to the task message comprises the following steps: and analyzing the task message to obtain service information related to the service process, and determining sub-equipment corresponding to the service information and corresponding service instructions thereof.
19. The apparatus of any one of claims 13-15, further comprising a first local module configured to perform any one or more of:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
The local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
20. A process management apparatus for a network device, comprising:
The second acquisition module is configured to acquire a business process file, wherein the business process file is used for running a corresponding business process on the network equipment;
A second interaction module configured to send a registration message and a topic subscription message of the business process to an external communication component via the business process,
Wherein:
the external communication component is used for realizing communication between a process running on the network equipment and a server;
The topic subscription message is used for determining topics subscribed to by the business process registered with the external communication component;
When the external communication component acquires the task message of the theme from the server, the task message is forwarded to the business process, and the task message is used by the business process to determine the corresponding business instruction of the sub-device corresponding to the business process.
21. The apparatus according to claim 20, wherein:
The obtaining the business process file comprises obtaining the business process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment.
22. The apparatus as recited in claim 20, further comprising:
And the third acquisition module is configured to acquire a sub-equipment process file related to the new sub-equipment when the new sub-equipment is accessed to the network equipment, wherein the sub-equipment process file is used for acquiring the state information of the new sub-equipment and sending the state information to the server.
23. The apparatus of any one of claims 20-22, wherein the second interaction module is further configured to perform any one or more of the following:
sending a logoff message of the process to the external communication component through the process;
Sending an unsubscribe message of the process to the external communication component through the process;
sending, by the external communication component, a topic subscription message to the server for a process running on the network device;
sending an unsubscribe message of a process running on the network device to the server through the external communication component;
sending a registration message of a process running on the network device to the server through the external communication component;
Sending a logoff message of a process running on the network device to the server through the external communication component; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
24. The apparatus of any one of claims 20-22, further comprising a second local module configured to perform any one or more of:
Sending a registration message of the process to a local connection manager through the process;
sending a logoff message of the process to the local connection manager through the process;
Sending a topic subscription message of the process to the local connection manager through the process;
sending an unsubscribe message of the process to the local connection manager through the process;
The local connection manager is used for realizing communication between the processes and forwarding messages from other processes to the processes according to the topic subscribed by the processes; wherein the process comprises any of the following processes: business process, sub-equipment process, gateway process, security process.
25. An electronic device comprising a memory and a processor; wherein the memory is for storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any of claims 1-12.
26. A readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the method steps of any of claims 1 to 12.
CN201911114903.1A 2019-11-14 2019-11-14 Service implementation method, process management method, device, equipment and storage medium Active CN112799795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911114903.1A CN112799795B (en) 2019-11-14 2019-11-14 Service implementation method, process management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911114903.1A CN112799795B (en) 2019-11-14 2019-11-14 Service implementation method, process management method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112799795A CN112799795A (en) 2021-05-14
CN112799795B true CN112799795B (en) 2024-06-18

Family

ID=75803771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911114903.1A Active CN112799795B (en) 2019-11-14 2019-11-14 Service implementation method, process management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112799795B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257488A (en) * 2021-12-17 2022-03-29 苏州融萃特种机器人有限公司 Multi-directional loading robot synchronous and cooperative motion control system and method
CN115862208A (en) * 2022-11-30 2023-03-28 广州广电运通智能科技有限公司 Business processing method, device and storage medium of rail transit gate software

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357266A (en) * 2015-09-30 2016-02-24 山东乾云启创信息科技股份有限公司 Universal SOCKET communication and process management platform applied to multiple scenes and method
CN109032767A (en) * 2018-07-26 2018-12-18 苏州科达科技股份有限公司 Transaction processing system, method, apparatus and the storage medium of asynchronous multi-process

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9098830B2 (en) * 2010-11-30 2015-08-04 Sap Se System and method for a process broker and backend adapter based process integration
US9660943B2 (en) * 2014-04-25 2017-05-23 International Business Machines Corporation Messaging based signaling for communications sessions
CN106506322A (en) * 2015-09-08 2017-03-15 阿里巴巴集团控股有限公司 The implementation method of business function and device
CN109194736B (en) * 2018-08-30 2021-04-27 百度在线网络技术(北京)有限公司 Message duplicate removal method and device, electronic equipment, medium and unmanned vehicle

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357266A (en) * 2015-09-30 2016-02-24 山东乾云启创信息科技股份有限公司 Universal SOCKET communication and process management platform applied to multiple scenes and method
CN109032767A (en) * 2018-07-26 2018-12-18 苏州科达科技股份有限公司 Transaction processing system, method, apparatus and the storage medium of asynchronous multi-process

Also Published As

Publication number Publication date
CN112799795A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
US8584081B2 (en) Server side application integration framework
US10999405B2 (en) Method for processing access requests and web browser
CN111193602B (en) Automatic operation and maintenance management system and method
CN111614729B (en) Method and device for controlling kubernetes container cluster and electronic equipment
CN101447891B (en) Service model self-adapting system and method thereof
JP7697071B2 (en) Technique for interfacing between web services and interface description language (IDL)-based remote procedure call (RPC) services and optical communication system implementing same
CN105183452A (en) Spring AOP based remote protocol service middleware for monitoring power distribution device
CN112799795B (en) Service implementation method, process management method, device, equipment and storage medium
CN115733746B (en) Deployment method, device and equipment of service grid unit and storage medium
CN105260842B (en) Communication method and system between heterogeneous ERP systems
CN112671697A (en) Data processing method, device and system of comprehensive monitoring system
CN106605213A (en) System for support in event of intermittent connectivity, corresponding local device, and corresponding cloud computing platform
US20030050983A1 (en) External event processor system and method
CN110855739A (en) Container technology-based remote and heterogeneous resource unified management method and system
CN117201609B (en) Ship-oriented data use and storage management method and device for acquisition actuation equipment
CN114615320B (en) Service management method, device, electronic equipment and computer readable storage medium
CN117118982A (en) Message transmission method, device, medium and equipment based on cloud primary multi-cluster
CN116755799A (en) Service arrangement system and method
CN115361298A (en) Service management method based on data subscription and distribution network
Hughes et al. A loosely-coupled binding model for Wireless Sensor Networks
EP1257088A2 (en) Event publishing service system and method
CN116208593B (en) Integrated monitoring system comprising interactive gateway and data interaction method
Beebe Towards a global traffic control (dispatcher) algorithm-interface prototype design
CN102594614A (en) Software version monitoring method of message middleware and data exchange equipment
US20040088395A1 (en) Method for probing a server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant