WO2022161283A1 - 由通用服务实体执行的进程控制的方法 - Google Patents

由通用服务实体执行的进程控制的方法 Download PDF

Info

Publication number
WO2022161283A1
WO2022161283A1 PCT/CN2022/073216 CN2022073216W WO2022161283A1 WO 2022161283 A1 WO2022161283 A1 WO 2022161283A1 CN 2022073216 W CN2022073216 W CN 2022073216W WO 2022161283 A1 WO2022161283 A1 WO 2022161283A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
state
request
action
resources
Prior art date
Application number
PCT/CN2022/073216
Other languages
English (en)
French (fr)
Inventor
张乾
Original Assignee
京东方科技集团股份有限公司
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 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2022161283A1 publication Critical patent/WO2022161283A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/80Homes; Buildings
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/30Control
    • G16Y40/35Management of things, i.e. controlling in accordance with a policy or in order to achieve specified objectives

Definitions

  • the present disclosure relates to a process control method performed by a general service entity, a process control method performed by an application entity, a process control method for the Internet of Things, an electronic device, a computer-readable medium, and a system.
  • IoT technology is a networked application and service centered on machine intelligent interaction. By embedding wireless or wired communication modules and application processing logic in IoT devices, it can meet users' informatization requirements for monitoring, command and dispatch, data collection and measurement.
  • IoT devices also known as entities
  • the Internet of Things manages various IoT devices by building an IoT management platform.
  • the IoT management platform generates resources corresponding to IoT devices to represent IoT devices, and controls IoT devices by operating the resources.
  • the application terminal can subscribe to the notification of each resource change through the IoT management platform, so as to further manage and control the IoT device.
  • a smart home platform is a common IoT management platform.
  • the physical household appliances are connected to the smart home platform through wired or wireless means, the smart home platform generates virtual household appliances (that is, resources) for the physical household appliances, and the application terminal accesses the virtual household appliances through the smart home platform, and then Realize remote monitoring and control of household appliances.
  • Embodiments of the present disclosure provide a process control method performed by a general service entity, a process control method performed by an application entity, a process control method for the Internet of Things, an electronic device, a computer-readable medium, and a system.
  • An embodiment of the present disclosure provides a method for process control executed by a general service entity, including: receiving a request to create an advanced state resource, the advanced state resource being related to one state resource among a plurality of state resources in the process management resource create the advanced state resource as a sub-resource of the process management resource according to the request for creating an advanced state resource; and process the process management resource, and convert the current state attribute of the process management resource into the process management resource.
  • the value is set to the identifier of the state resource associated with the advance state resource.
  • the request for creating an advance state resource further includes an advance control attribute corresponding to the advance state resource, and the value of the current state attribute in the process management resource is set to the value of the state resource associated with the advance state resource.
  • the identifier further includes: in the case that the advance control attribute indicates that the advance state resource is enabled, setting the value of the current state attribute in the process management resource to a value corresponding to the advance state resource; When the control attribute indicates that the advanced state resource is disabled, the value of the current state attribute in the process management resource is set to the value of the initial state attribute of the process management resource.
  • creating the advance state resource as a sub-resource of the process management resource further includes: creating a state resource associated with the advance state resource as a sub-resource of the advance state resource, wherein the state resource Link to at least one action resource through a state action attribute.
  • creating the advance state resource as a sub-resource of the process management resource further includes creating an identifier of the state resource associated with the advance state resource as an attribute of the advance state resource, and adding the advance state resource to the A subset of the action resources included in the state resource associated with the advance state resource is created as a sub-resource of the advance state resource.
  • creating the advance state resource as a sub-resource of the process management resource further includes: associating an identifier of the state resource with the advance state resource and an identifier of at least one action resource included in the state resource
  • the composed index pair is created as a property of the advanced state resource.
  • creating the advance state resource as a sub-resource of the process management resource further includes creating a state status attribute of the advance state resource, wherein the state state attribute indicates whether the process management resource is processing the advance state resource, and creating a state transition attribute of the advanced state resource, wherein the state transition attribute indicates a condition for transitioning to a subsequent state resource and a subsequent state resource.
  • the request for multiple state resources creates the multiple state resources as sub-resources of the process management resource; receives a request for creating at least one action resource, wherein the at least one action resource and the middle of the multiple state resources are received; and according to the request to create at least one action resource, linking the at least one action resource to its corresponding state resource.
  • the at least one action resource of the state resource associated with the advance state resource includes a target resource and a target operation, and the method further includes: triggering a target operation for the target resource.
  • An embodiment of the present disclosure provides a process control method executed by an application entity, including: sending a request for creating an advanced state resource, wherein the advanced state resource and one state resource among multiple state resources in the process management resource associated, and the advance state resource is linked to at least one action resource of its associated state resource; receiving a response to create an advance state resource, wherein the response to create an advance state resource indicates that the advance state resource was created as a
  • the described process manages the sub-resources of the resource.
  • the request for creating an advance state resource further includes an advance control attribute corresponding to the advance state resource, where the advance control attribute indicates enabling the advance state resource or disabling the advance state resource.
  • the request to create an advanced state resource includes an identifier of a state resource associated with the advanced state resource.
  • the request to create an advanced state resource includes: an identifier of a state resource associated with the advanced state resource, and a set of identifiers of an action resource, wherein the set of identifiers of the action resource is the advanced state A subset of the identifiers of all action resources included in the state resource associated with the resource.
  • the request to create an advance state resource includes: an identifier of a state resource associated with the advance state resource, and an identifier of one of a plurality of action resources included in the state resource.
  • the request to create an advanced state resource further includes a state transition attribute, wherein the state transition attribute indicates a condition for transitioning to the subsequent state resource and the subsequent state resource.
  • send a request to create a process management resource before sending a request to create an advanced state resource, send a request to create a process management resource; send a request to create a plurality of state resources, wherein the request to create a plurality of state resources indicates the plurality of state resources as the a sub-resource of a process management resource; and sending a request to create at least one action resource, wherein the at least one action resource corresponds to one state resource of the plurality of state resources.
  • the embodiments of the present disclosure provide a process control method for the Internet of Things, including: sending, by an application entity, a request for creating a process management resource to a general service entity; receiving the request for creating a process management resource by the general service entity, and according to The request for creating a process management resource creates a process management resource; the application entity sends a request for creating a plurality of state resources to the general service entity; the general service entity receives the request for creating a plurality of state resources, and creates a plurality of state resources according to the The resource request creates the plurality of state resources as sub-resources of the process management resource; the application entity sends a request to create at least one action resource to the general service entity, wherein the at least one action resource is associated with the plurality of One of the state resources corresponds to a state resource; the general service entity receives a request to create at least one action resource, and links the at least one action resource to its corresponding state resource according to the request to create at least one action resource ; Send a
  • the at least one action resource of the state resource associated with the advance state resource includes a target resource and a target operation, and the method further includes: triggering a target operation for the target resource.
  • Embodiments of the present disclosure also provide a method executed by an IoT terminal, including: displaying multiple states in an IoT process that have been set and actions associated with the multiple states; acquiring information for adjusting the IoT process , the information for adjusting the Internet of Things process instructs the Internet of Things process to enter one of the multiple states, and based on the information for adjusting the Internet of Things process, instructs the Internet of Things device associated with the state to perform a The action associated with the state.
  • the displaying multiple states in the set IoT process and the actions associated with the multiple states may further include: displaying an IoT smart scene setting interface, where the IoT smart scene setting interface includes the set a plurality of Internet of Things processes; and in response to triggering selection of an Internet of Things process among the plurality of physical network processes, displaying a detailed settings page for further settings for the selected physical network process, and in the detailed settings page Multiple states in the IoT process and multiple actions associated with the multiple states are displayed above.
  • the acquiring the information for adjusting the IoT process further includes: in response to triggering selection of one of the multiple states in the IoT process, acquiring the information for adjusting the IoT process, the adjusting the IoT process information indicating that the IoT process enters the selected state; or in response to the selection of an action triggering one of a plurality of actions in the IoT process, the information for adjusting the IoT process is obtained, and the adjusting IoT process is The information of the process instructs the IoT process to process the selected action.
  • the instructing the IoT device associated with the state to perform the action associated with the state further comprises: sending a request to create an advance state resource to a service gateway of the Internet of Things to indicate the state associated with the state
  • the IoT device performs an action associated with the state.
  • the embodiment of the present disclosure also provides an apparatus for process control performed by a general service entity, including: a receiving module, configured to receive a request for creating an advanced state resource, the advanced state resource and a plurality of states in the process management resource A state resource in the resources is associated, and the advance state resource is linked to at least one action resource of its associated state resource; a creation module is configured to create the advance state resource according to the request for creating an advance state resource a sub-resource of the process management resource; and an activation module for processing the process management resource and setting the value of the current state attribute in the process management resource to the state resource associated with the advance state resource identifier.
  • An embodiment of the present disclosure provides an apparatus for process control executed by an application entity, including: a sending module, configured to send a request for creating an advanced state resource, wherein the advanced state resource and multiple states in the process management resource A state resource in the resources is associated, and the advance state resource is linked to at least one action resource of its associated state resource; a receiving module is configured to receive a response for creating an advance state resource, wherein the advance state resource is created. The response indicates that the advanced state resource is created as a sub-resource of the process management resource.
  • the embodiments of the present disclosure provide an IoT system for process control, including an application entity and a general service entity, the system is configured to perform: the application entity sends a request for creating a process management resource to the general service entity; The service entity receives the request for creating process management resources, and creates process management resources according to the request for creating process management resources; the application entity sends a request for creating multiple state resources to the general service entity; the general service entity receives and creates multiple state resources.
  • the application entity sends a request for creating at least one action resource to the general service entity , wherein the at least one action resource corresponds to one state resource among the plurality of state resources;
  • the general service entity receives a request for creating at least one action resource, and according to the request for creating at least one action resource, Linking the at least one action resource to its corresponding state resource;
  • the application entity sends a request for creating an advance state resource to the general service entity, the advance state resource and one of the multiple state resources in the process management resource
  • the state resource is associated, and the advance state resource is linked to at least one action resource of its associated state resource;
  • the general service entity receives the request to create an advance state resource, and according to the request to create an advance state resource
  • the advance state resource is created as a sub-resource of the process management resource; and the process management resource is processed by the general service entity, and the value of the current state attribute in the process management resource
  • Embodiments of the present disclosure provide an electronic device.
  • the electronic device includes: one or more processors; and one or more memories, wherein the memories have computer readable code stored therein, the computer readable code when executed by the one or more processors , execute the above method.
  • a computer-readable storage medium having instructions stored thereon, the instructions, when executed by a processor, cause the processor to perform the above method.
  • a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer readable medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various aspects described above or in various optional implementations of the various aspects described above.
  • the embodiments of the present disclosure it is possible to simulate the conditions for triggering an operation of an action resource, so that a user can intuitively observe the effect of an operation that triggers a certain action resource, and at the same time, other state resources and processes in the process management resource are not affected.
  • Implementation of control The embodiment of the present disclosure enables the user to immediately observe the operation of each IoT device set by the user after completing the setting of the smart scene, and determine whether to further adjust the smart scene based on this, thereby improving the setting of the smart scene efficiency.
  • the embodiment of the present disclosure also enables the user to set a certain state in the process to be skipped and enter the next state after discovering the failure of the IoT device, so that the intelligent scene is not interrupted due to the device failure.
  • FIG. 1A shows a schematic architecture diagram of the Internet of Things according to an embodiment of the present disclosure.
  • FIG. 1B shows a schematic diagram of connections between various devices according to an embodiment of the present disclosure.
  • FIG 1C shows an interface diagram of ASN-AE according to an embodiment of the present disclosure.
  • FIG. 1D shows a schematic diagram of a smart production scenario according to an embodiment of the present disclosure.
  • FIG. 2A shows a flowchart of a method of process control performed by a generic service entity according to an embodiment of the present disclosure.
  • FIG. 2B shows a flowchart of a method of process control performed by an application entity according to an embodiment of the present disclosure.
  • FIG. 2C shows an interaction diagram between a generic service entity and an application entity according to an embodiment of the present disclosure.
  • FIG. 3A is a schematic diagram illustrating the change of process management resources before and after a general service entity creates an advanced state resource according to an embodiment of the present disclosure.
  • 3B shows a schematic diagram of a state resource according to an embodiment of the present disclosure.
  • FIG. 3C shows another schematic diagram of the change of process management resources before and after the general service entity creates the advance state resource according to an embodiment of the present disclosure.
  • 3D shows a schematic diagram of an advanced state resource according to an embodiment of the present disclosure.
  • FIG. 4 shows yet another interaction diagram between a generic service entity and an application entity according to an embodiment of the present disclosure.
  • FIG. 5 shows a flow chart of process control utilizing advanced state resources according to an embodiment of the present disclosure.
  • FIGS. 6A to 6D illustrate interface change diagrams of setting an advance state resource by a mobile terminal according to an embodiment of the present disclosure.
  • 6E shows a flowchart of a method performed by an IoT terminal according to an embodiment of the present disclosure.
  • FIG. 7 shows a structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the Internet of Things uses communication technologies such as local networks or the Internet to connect sensors, controllers, machines, people, and things in new ways to form the connection between people and things, and things and things.
  • the Internet of Things is an extension of the Internet. It includes the Internet and all resources on the Internet, and is compatible with all applications on the Internet. With the application of IoT technology in various fields, various new application fields such as smart home, smart transportation, and smart health have emerged.
  • FIG. 1A shows a schematic architecture diagram of the Internet of Things according to an embodiment of the present disclosure.
  • FIG. 1B shows a schematic diagram of connections between various devices according to an embodiment of the present disclosure.
  • 1C shows an interface diagram of ASN-AE according to an embodiment of the present disclosure.
  • FIG. 1D shows a schematic diagram of a smart production scenario according to an embodiment of the present disclosure.
  • client devices of various terminals access the network and access the general service layer through the network, and the general service layer supports various applications, thus forming a terminal + network + application architecture.
  • various household devices can use a local area network (LAN) to access a general service platform, and such local area network access can be done in a wireless or wired manner.
  • the local area network can be a personal area network (PAN), for example, taking a wireless personal area network (WPAN) as an example, various technologies such as Bluetooth, IrDA, Home RF, ZigBee, or UWB (Ultra-Wideband Radio) can be used to achieve access.
  • PAN personal area network
  • WPAN wireless personal area network
  • UWB Ultra-Wideband Radio
  • an IoT entity eg, an IoT terminal device or a software module in a node device
  • the data or information can be stored as a separate resource.
  • the Internet of Things entity may send a request to the general service entity, thereby updating the resource corresponding to the Internet of Things entity stored on the general service entity, so as to reflect the state of the device operated by the Internet of Things entity.
  • This update can be real-time or periodic, or it can be triggered by a certain condition.
  • other IoT entities communicating with the general service entity can learn the status of the device corresponding to the IoT entity by accessing the updated resources; or, other IoT entities communicating with the general service entity can update the resources to operate.
  • the resources referred to here include resources of various entities (eg, can be embodied as software modules in IoT devices, such as AE, CSE, etc.).
  • An entity may represent a software module of a communication device, and a generic service entity may represent a software module of a service platform, which may be local or remote.
  • the operation on the updated resource includes, for example, obtaining the information of the updated resource, deleting the information of the updated resource, notifying the third party of the information of the updated resource, or performing operations on other resources based on the information of the updated resource. operate.
  • a resource may include attributes and sub-resources, where the attributes are used to store information related to the resource (for example, the identifier of the resource, the physical location of the AE corresponding to the resource, the state information of the resource, etc.), and the sub-resource is the next level of the resource
  • a resource includes an index to the next-level resource.
  • the application entity AE may include the application entity ASN-AE in the application service node and the application entity AND-AE in the application specific node.
  • the application entity ASN-AE can be TVs, smart home appliances (such as smart refrigerators, smart microwave ovens, etc.), charging cars, desktop computers, notebook computers, smart phones, tablet computers, music players (such as mp3 players, etc.) and other Terminals (eg, mobile terminals, smart terminals) that include a processor and memory.
  • IoT-related applications can be installed on the application entity ASN-AE to set the operation of the application entity AND-AE through the common service entity CSE.
  • the general service entity CSE, the application entity ASN-AE (eg, mobile terminal) in the application service node, the first application entity in the application dedicated node and the second application entity in the application dedicated node may be connected through a network.
  • the above-mentioned devices can communicate with each other directly or indirectly, for example, send and receive data and/or signals with each other through a network.
  • the network can be the Internet of Things (Internet of Things) based on the Internet and/or a telecommunication network, which can be a wired network or a wireless network, for example, it can be a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN) ), cellular data communication networks and other electronic networks that can realize the function of information exchange.
  • Internet of Things Internet of Things
  • a telecommunication network which can be a wired network or a wireless network, for example, it can be a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN) ), cellular data communication networks and other electronic networks that can realize the function of information exchange.
  • the application entity AND-AE may be a small IoT device such as a thermometer, an air conditioner, a fan, and a lamp.
  • the CSE can create corresponding resources on them. The CSE controls these AND-AEs through the operation of the corresponding resources.
  • the operator operates at the ASN-AE (eg, edits a smart scene) and sends a request to the CSE to create a smart scene (eg, a request to create a process management resource, a request to create an action resource, a request to create a state resource request, etc.), so that each AND-AE can be linked.
  • ASN-AE can set up a smart scene as shown in Figure 1C to control IoT devices, including temperature sensors, air conditioners, and fans.
  • IoT devices including temperature sensors, air conditioners, and fans.
  • such a smart home scenario can be set to: when the temperature sensor detects that the ambient temperature is greater than 31 degrees Celsius, turn on the air conditioner, adjust the fan to the first gear of natural wind, turn on the head swing, and send a message to the terminal device (such as a mobile phone APP)
  • the scene triggers the notification.
  • the temperature sensor performs detection again, and when the temperature sensor detects that the ambient temperature is less than 29 degrees Celsius, the air conditioner is turned off and the fan is adjusted to the fourth gear of natural wind.
  • IoT production equipment includes: heating equipment, reaction equipment, cooling equipment, additional cooling equipment, and filtering equipment.
  • Such smart production scenarios can be set up:
  • the solution will be bottled. If it is detected that the quality of the filtered solution does not meet the quality standard, the solution is transferred to a heating device.
  • step 4 if the timer fails in step 4, all the solution must be transferred to the heating device for reheating. This results in a solution that has already reached the conditions for transfer to the cooling equipment needing to be reheated and reacted, wasting production time. At the same time, if the failure time is long, the reaction time may be too long and the pH value of the solution is too low, so that the reaction fails and precious raw materials are wasted.
  • the embodiments of the present disclosure provide a process control method in the Internet of Things, so as to improve the current process control method of the Internet of Things.
  • FIG. 2A shows a flowchart of a method 20 of process control performed by a generic service entity according to an embodiment of the present disclosure.
  • FIG. 2B shows a flowchart of a method 21 of process control performed by an application entity according to an embodiment of the present disclosure.
  • Figure 2C shows an interaction diagram between a generic service entity and an application entity according to an embodiment of the present disclosure.
  • a method 20 for process control performed by a general service entity includes steps S201 to S203 .
  • step S201 a request for creating an advanced state resource is received, and the advanced state resource is associated with one state resource among a plurality of state resources in the process management resources.
  • step S202 according to the request for creating an advance state resource, the advance state resource is created as a sub-resource of the process management resource.
  • step S203 the process management resource is processed, and the value of the current state attribute in the process management resource is set as the identifier of the state resource associated with the advance state resource.
  • the value of the current state attribute in the process management resource is set to be the same as that of the advance state resource.
  • the identifier of the state resource associated with the resource further includes: if the advance control attribute indicates that the advance state resource is enabled (for example, the value of the advance control attribute ⁇ advancedControl> is enable), setting the current state resource in the process management resource to be enabled.
  • the value of the state attribute is set to the value corresponding to the advance state resource.
  • the value of the current state attribute in the process management resource is set to be the same as that of the process Manages the value of the resource's initial state property.
  • the general service entity may also receive a request for creating a process management resource, and create a process management resource according to the request for creating a process management resource; receive a request for creating multiple state resources, and create the multiple state resources as sub-resources of the process management resource according to the request for creating multiple state resources; receive a request to create at least one action resource, wherein the at least one action resource is associated with the multiple state resources; corresponding to one of the state resources; and linking the at least one action resource to its corresponding state resource according to the request to create at least one action resource.
  • the at least one action resource of the state resource associated with the advance state resource includes a target resource and a target operation, and the method further includes: triggering a target operation for the target resource.
  • a method 21 for process control performed by an application entity includes steps S211 to S212 .
  • step S211 a request for creating an advanced state resource is sent, wherein the advanced state resource is associated with one state resource among a plurality of state resources in the process management resources.
  • the request for creating an advanced state resource may further include an advanced control attribute (eg, ⁇ advancedControl>) corresponding to the advanced state resource, where the advanced control attribute indicates enabling the advanced state resource or disabling the advanced state resource .
  • an advanced control attribute eg, ⁇ advancedControl>
  • step S212 a response for creating an advanced state resource is received, wherein the response for creating an advanced state resource indicates that the advanced state resource is created as a sub-resource of the process management resource.
  • the application entity may also send a request to create a process management resource; send a request to create multiple state resources, wherein the request to create multiple state resources indicates the multiple state resources.
  • a state resource as a sub-resource of the process management resource; and sending a request to create at least one action resource, wherein the at least one action resource corresponds to one state resource of the plurality of state resources.
  • the general service entity can obtain the request for creating an advanced state resource from the application entity, and after further parsing the request, it is determined that an action resource associated with a certain state resource is to be processed in advance, thereby improving the efficiency of the process.
  • a process control method 22 for the Internet of Things includes the following steps.
  • an application entity eg, ASN-AE in FIG. 2C, application APP
  • a general service entity eg, CSE
  • step S222 the request for creating a process management resource is received by the general service entity, and a process management resource (for example, ⁇ processManagement>) is created according to the request for creating a process management resource.
  • a process management resource for example, ⁇ processManagement>
  • the general service entity sends a creation success response to the application entity after the process management resource is successfully created.
  • step S223 the application entity (eg, ASN-AE in FIG. 2C, application APP) sends a request for creating multiple state resources to the general service entity.
  • the application entity eg, ASN-AE in FIG. 2C, application APP
  • step S224 the request for creating multiple state resources is received by the general service entity, and the multiple state resources (for example, ⁇ state>) are created as the process management resource according to the request for creating multiple state resources subresource.
  • the general service entity sends a creation success response to the application entity after the state resource is successfully created.
  • step S225 the application entity sends a request for creating at least one action resource to the general service entity, wherein the at least one action resource corresponds to one state resource among the plurality of state resources.
  • step S226 a request for creating at least one action resource is received by the general service entity, and according to the request for creating at least one action resource, the at least one action resource (for example, ⁇ action>) is linked to its corresponding state resource.
  • the general service entity sends a creation success response to the application entity after successfully creating the action resource.
  • step S227 a request for creating an advance state resource is sent by the application entity to the general service entity, the advance state resource is associated with one state resource among a plurality of state resources in the process management resource, and the advance state resource is A resource is linked to at least one action resource of its associated state resource.
  • the request for creating an advance state resource further includes an advance control attribute corresponding to the advance state resource, and the advance control attribute indicates enabling the advance state resource or disabling the advance state resource.
  • Step S227 is similar to step S211 in method 21, and details are not described herein again.
  • step S228, the general service entity receives the request for creating an advanced state resource, and creates the advanced state resource as a sub-resource of the process management resource according to the request for creating an advanced state resource.
  • Step S228 is similar to step S201 and step S202 in method 20, and details are not repeated here.
  • the general service entity sends a creation success response to the application entity after successfully creating the advanced state resource.
  • step S229 the process management resource is processed by the general service entity, and the value of the current state attribute in the process management resource is set as the identifier of the state resource associated with the advance state resource.
  • the value of the current state attribute in the process management resource is set to be associated with the advance state resource
  • the identifier of the state resource further includes: in the case that the advance control attribute indicates that the advance state resource is enabled, setting the value of the current state attribute in the process management resource to a value corresponding to the advance state resource; In the case where the early control attribute indicates that the early state resource is disabled, the value of the current state attribute in the process management resource is set to the value of the initial state attribute of the process management resource.
  • the at least one action resource of the state resource associated with the advance state resource includes a target resource and a target operation
  • the method further includes: triggering a target operation for the target resource.
  • the state resource associated with the advanced state resource is state_2
  • the CSE processes the action resource associated with state_2.
  • the target resource corresponding to the action resource is the AND-AE (eg, a smart device) shown in FIG. 2C
  • the AND-AE executes the corresponding target action.
  • the CSE After completing the processing of the entire process, the CSE will re-monitor the initial state in the process management resources, and start the entire process with the initial state as the start.
  • the user completes the following settings: when the temperature sensor detects that the ambient temperature is greater than 31 degrees Celsius, the air conditioner is turned on, the fan is adjusted to the first gear of natural wind, the head is turned on, and the terminal device is turned on. (For example, a mobile phone APP) sends a scene trigger notification.
  • the temperature sensor performs detection again, and when the temperature sensor detects that the ambient temperature is less than 29 degrees Celsius, the air conditioner is turned off and the fan is adjusted to the fourth gear of natural wind.
  • the user can send a request to create an advanced state resource to the CSE through ASN-AE after completing the setting, the request indicates that the simulation has been achieved and the current ambient temperature is greater than 31 Celsius conditions, please CSE try to perform the associated operations in the subsequent state resources and action resources. If the CSE turns on the air conditioner and adjusts the fan to the first gear of natural wind and turns on the head swing, then the user can be sure that the current smart scene setting is successful. If the CSE fails to turn on the air conditioner, it means that the smart scene setting is incorrect or failed.
  • the production line administrator completes the following smart production scenario settings: 1 Turn on the heating device to heat the solution to be produced and turn on the timer. If the pH value is detected to be less than 3, add Cooling water; 2 If it is detected that the temperature of the solution to be produced is greater than 70 degrees Celsius, transfer the solution to be produced to the reaction equipment, at the same time turn off the heating equipment, and turn on the stirrer in the reaction equipment. Restart the timer.
  • the production line administrator can send a request to CSE to create an advanced state resource through ASN-AE, which indicates that the simulation has reached the condition that the current reaction time has reached 2 hours, and then the solution is transferred to the cooling equipment, so that the production of the solution able to continue.
  • the method 20 and the method 21 of the embodiments of the present disclosure it is possible to simulate the condition that the operation of triggering the action resource has been reached, so that the user can intuitively observe the effect of the operation that triggers a certain action resource, and at the same time, the process is not affected.
  • Implementation of other state resources and process control in management resources enables the user to immediately observe the operation of each IoT device set by the user after completing the setting of the smart scene, and determine whether to further adjust the smart scene based on this, thereby improving the setting of the smart scene Efficiency and work efficiency.
  • the embodiment of the present disclosure also enables the user to set skipping a certain state in the process and enter the next state after discovering the failure of the IoT device, so that the intelligent scene is not interrupted due to the device failure.
  • FIG. 3A is a schematic diagram illustrating the change of process management resources before and after a general service entity creates an advanced state resource according to an embodiment of the present disclosure.
  • 3B shows a schematic diagram of a state resource according to an embodiment of the present disclosure.
  • Fig. 3C shows another schematic diagram of process management resource changes before and after a general service entity creates an advanced state resource according to an embodiment of the present disclosure.
  • 3D shows a schematic diagram of an advanced state resource according to an embodiment of the present disclosure.
  • process management resources can be defined with ⁇ ProcessManagement> as a tag in CSE.
  • other potential process-related resources include: ⁇ state> sub-resources of the ⁇ processManagement> resource, sub- ⁇ action> resources of the ⁇ state> resource referenced through the stateAction attribute of each ⁇ state> resource , the resource referenced by the stateTransitions attribute of each ⁇ state> resource, the resource referenced by the actionSubjectResources, objectResourceID, subjectResourceID, evalCriteria attribute of each related ⁇ action> resource, the ⁇ accessManagement> resource, and the ⁇ accessControlPolicy referenced by all other related resources > Resources and more.
  • the present disclosure does not limit this.
  • a process management resource residing in a CSE may include multiple sub-resources and multiple attributes.
  • the process management resource may include various attributes shown in Table 1. Those skilled in the art should understand that Table 1 is only an example, and the process management resource may also include more or less attributes.
  • the request for creating an advanced state resource may further include an advance control attribute ⁇ advancedControl> corresponding to the advanced state resource.
  • the value of the advanced control attribute ⁇ advancedControl> is enable, disable or NULL.
  • the attribute value indicates whether to enable the advance state resource, that is, whether to enable advancing a certain state.
  • a process management resource includes multiple state resources as sub-resources.
  • the state resource may include various attributes shown in Table II.
  • Table 1 is only an example, and the state resource may also include more or less attributes.
  • the generic service entity When a generic service entity manages an "Enabled” or “Activated” process and encounters an error condition (such as being unable to access a ⁇ state> or ⁇ action> resource), the generic service entity shall update the stateStatus property of the current ⁇ state> resource To "inactive”, update the processStatus attribute of the ⁇ processManagement> resource to "Aborted”, thereby aborting the process.
  • the association relationship between the process management resource, the state resource and the action resource that have been created on the general service entity may be as shown in FIG. 3C .
  • the generic service entity uses the ⁇ processManagement> resource to define and manage a process (Process). Then, a state resource ( ⁇ state> resource) corresponding to the state in the process is created as a child resource of the ⁇ processManagement> resource.
  • the ⁇ action> resources corresponding to the actions performed by the generic service entity for each state are also created as sub-resources of each ⁇ state> resource and linked via the stateAction attribute.
  • the evalCriteria defined by the child ⁇ action> resources of each ⁇ state> resource will not be monitored by the generic service entity until the process is activated and the process has transitioned to the state defined by each ⁇ state> resource. If no evalCriteria is defined for a child ⁇ action> resource of the ⁇ state> resource, the generic service entity shall perform the corresponding action when the process is activated and the process has transitioned to the state defined by the ⁇ state> resource.
  • the application entity ASN-AE can further configure the activateConditions and endConditions properties. That is, the user can define the criteria used by the general service entity to trigger the activation and termination of the process. Once the process is enabled by the application entity ASN-AE (eg the user turns on the smart scene), user-defined criteria (eg, turn on the air conditioner when the temperature sensor detects an ambient temperature greater than 31 degrees Celsius) will be monitored by the general service entity.
  • the application entity ASN-AE can further configure the first state in the process through the initialState attribute of the ⁇ processManagement> resource.
  • the application entity ASN-AE may update the processControl attribute of the ⁇ processManagement> resource to instruct the generic service entity to enable, disable or suspend the process.
  • the request for creating an advanced state resource includes the advanced control attribute ⁇ advancedControl> corresponding to the advanced state resource
  • the current state attribute in the process management resource is changed.
  • Setting the value to the identifier of the state resource associated with the advance state resource also includes: in the case where the advance control attribute indicates that the advance state resource is enabled (eg, the value of the advance control attribute ⁇ advancedControl> is enable) , the value of the current state attribute in the process management resource is set to the value corresponding to the advance state resource.
  • the value of the current state attribute in the process management resource is set to be the same as that of the process Manages the value of the resource's initial state property.
  • the generic service entity When managing a process, the generic service entity shall monitor the standard properties (eg activateConditions, endConditions, stateTransitions) defined in the ⁇ processManagement> and ⁇ state> resources of the process to determine if/when to execute the corresponding ⁇ action> resource defined by the process action.
  • the generic service entity should update the state attributes (eg stateStatus, processStatus, currentState) defined in the process's ⁇ processManagement> and ⁇ state> resources.
  • the generic service entity can update the currentState property of the ⁇ processManagement> resource to the resource identifier of the ⁇ state> resource being processed, update the stateStatus property of the ⁇ state> resource to "active", and check the stateAction
  • the ⁇ action> resource defined in the attribute For unconditional actions where evalCriteria is empty, the generic service entity shall execute the action as soon as it starts processing ⁇ state>. Otherwise, the generic service entity SHOULD monitor the evalCriteria attribute of the ⁇ action> resource to determine if/when to execute the action.
  • the generic service entity should also monitor the evalCriteria parameter defined in the stateTransitions attribute of the ⁇ state> resource. Generic service entities can perform state transitions if any of the criteria defined in stateTransitions are met.
  • the generic service entity When performing a state transition, the generic service entity MAY update the stateStatus property of the current ⁇ state> resource to "inactive" and the next ⁇ state> resource (if any) to "active". If the next ⁇ state> resource is not applicable (e.g. the generic service entity has finished processing the last state in the process, the generic service entity shall end the process by updating the processStatus attribute of the ⁇ processManagement> resource to a value of "Completed".
  • the generic service entity may also monitor the criteria defined in the endConditions attribute of the ⁇ processManagement> resource. If any of the criteria defined in endConditions are met, the generic service entity will end the process by updating the current ⁇ state> resource's stateStatus property to "inactive" and the ⁇ processManagement> resource's processStatus property to the value "Completed”.
  • the generic service entity When the generic service entity manages the process, if an error condition is encountered (such as the generic service entity cannot access the ⁇ state> or ⁇ action> resource), the generic service entity shall update the stateStatus property of the current ⁇ state> resource to "inactive", ⁇ The processStatus property of the processManagement> resource is updated to "Aborted", which aborts the process.
  • the general service entity creates the advance state resource as a sub-resource of the process management resource according to the request for creating an advance state resource.
  • the relationship between the created advance state resource and the state resource and action resource in the process management resource is shown in Figure 3C.
  • an advance state resource can be linked to a state resource and an action resource through the stateAction property.
  • the following shows how the advance state resource is linked with the state resource and the action resource with reference to FIG. 3D , but those skilled in the art should understand that the embodiments of the present disclosure do not carry out how to link the advance state resource with the state resource and the action resource. limit.
  • the application entity sends a request to create an advanced state resource, wherein the advanced state resource is associated with one state resource among multiple state resources in the process management resource, and The advance state resource is linked to at least one action resource of its associated state resource.
  • the request for creating an advanced state resource includes: an identifier of the state resource associated with the advanced state resource. Therefore, after receiving such an advanced state resource request, in the above step S202, the general service entity creating the advanced state resource as a sub-resource of the process management resource further includes: combining the advanced state resource with the advanced state resource.
  • An associated state resource is created as a sub-resource of the advance state resource, wherein the state resource is linked to at least one action resource through a state action attribute.
  • an advanced state resource includes a target state attribute (eg, ⁇ targetState>) that indicates its associated state resource, and an advanced state resource is implicitly linked to at least one of its associated state resources through the target state attribute
  • An action resource eg, ⁇ targetState>
  • Figure 3D shows that the advance state resource is associated to the state resource with the identifier state1.
  • CSE will simulate that the current smart scene has met all the conditions for executing state1, and will execute all associated actions in state1 in sequence. For example, assume state1 and its corresponding action resource instructions: when the temperature sensor detects that the ambient temperature is greater than 31 degrees Celsius, turn on the air conditioner (for example, action1), adjust the fan to natural wind level (for example, action2), and turn on the head swing (for example, action3). At this time, CSE will instruct not to detect whether the ambient temperature is greater than 31 degrees Celsius, but directly turn on the air conditioner, adjust the fan to the first gear of natural wind, and turn on the swing head.
  • a target state attribute eg, ⁇
  • the application entity sends a request to create an advanced state resource, wherein the advanced state resource is associated with one state resource among multiple state resources in the process management resource, and
  • the advance state resource is linked to at least one action resource of its associated state resource.
  • the request for creating an advanced state resource includes: an identifier of a state resource associated with the advanced state resource, and a set of identifiers of an action resource, wherein the set of identifiers of the action resource is the advanced state A subset of the identifiers of all action resources included in the state resource associated with the resource.
  • creating the advance state resource of the general service entity as a sub-resource of the process management resource further includes: relating the advance state resource to The identifier of the associated state resource is created as an attribute of the advance state resource, and a subset of the action resources included in the state resource associated with the advance state resource is created as a sub-resource of the advance state resource.
  • the advance state resource includes a target state attribute (eg, ⁇ targetState>), which indicates its associated state resource.
  • the advance state resource includes a state action attribute through which at least one action resource is explicitly linked to its associated state resource.
  • Figure 3D shows that the advance state resource is associated to the state resource with identifier state2.
  • CSE will simulate that the current smart scene has met all the conditions for executing action2 of state2, and will execute all the associated actions in state2 in sequence. For example, assume state2 and its corresponding action resource instructions: when the temperature sensor detects that the ambient temperature is less than 29 degrees Celsius, turn off the air conditioner (action1), adjust the fan to natural wind fourth gear (action2), and turn off the swing (action3). At this time, CSE will instruct not to detect whether the ambient temperature is less than 31 degrees Celsius and not to turn off the air conditioner, but directly adjust the fan to the fourth gear of natural wind and turn off the swing head.
  • the application entity sends a request to create an advanced state resource, wherein the advanced state resource is associated with one state resource among the multiple state resources in the process management resource, and The advance state resource is linked to at least one action resource of its associated state resource.
  • the request for creating an advanced state resource includes: an identifier of a state resource associated with the advanced state resource, and an identifier of one of a plurality of action resources included in the state resource.
  • the general service entity creating the advanced state resource as a sub-resource of the process management resource further includes: an identifier of the state resource associated with the advanced state resource and the An index pair consisting of identifiers of at least one action resource included in the state resource is created as an attribute of the advance state resource.
  • the advance state resource includes a state action identifier (eg, ⁇ stateActionIDs>), which is a list of index pairs consisting of an identifier of the state resource and an identifier of at least one action resource included in the state resource. At least one action resource of a state resource that is explicitly linked to its associated state resource is advanced by the state action identification attribute.
  • Figure 3D shows that the advance state resource is associated to the state resource with the identifier state2, and is linked to the action resource action2 of the state resource state2. At this point, CSE will simulate that the current smart scene has met all the conditions for executing action2 of state2, and will execute all the associated actions in state2 in sequence.
  • state2 and its corresponding action resource instructions when the temperature sensor detects that the ambient temperature is less than 29 degrees Celsius, turn off the air conditioner (action1), adjust the fan to natural wind fourth gear (action2), and turn off the swing (action3).
  • CSE will instruct not to detect whether the ambient temperature is less than 31 degrees Celsius and not to turn off the air conditioner, but directly adjust the fan to the fourth gear of natural wind and turn off the swing head.
  • the application entity may also send a request for creating an advanced state resource, wherein the request for creating an advanced state resource includes: a state transition attribute, wherein, The state transition attribute indicates the conditions for transitioning to the connected state resource and the connected state resource.
  • creating the advanced state resource as a sub-resource of the process management resource by the general service entity further includes: creating a state state attribute of the advanced state resource, wherein the state state attribute indicates the process management whether the resource is processing the advanced state resource, and creating a state transition attribute for the advanced state resource, wherein the state transition attribute indicates the conditions for transitioning to the subsequent state resource and the subsequent state resource.
  • the advance status resource includes the current status (eg, ⁇ currentStatus>), which indicates whether the advance state is currently the active state of the process, that is, whether the process management resource is processing the Advance state resources.
  • Supported values for this property include "active" and "inactive”.
  • the advance state resource includes a state transition attribute (eg, ⁇ stateTransitions>) that indicates the conditions for the continuation of the state resource and the continuation of the state resource.
  • a state transition attribute includes a list of criteria used to determine if/when to transition from that state to another state.
  • Each entry in this list is defined as an index pair consisting of the following two elements: evalCriteria: a condition identifying the state transition; next state: a resource identifier for the next ⁇ state> resource. If this ⁇ state> resource represents the last state in the process, this property should be empty.
  • the embodiments of the present disclosure it is possible to simulate the conditions for triggering an operation of an action resource, so that a user can intuitively observe the effect of an operation that triggers a certain action resource, and at the same time, other state resources and processes in the process management resource are not affected.
  • Implementation of control The embodiment of the present disclosure enables the user to immediately observe the operation of each IoT device set by the user after completing the setting of the smart scene, and determine whether to further adjust the smart scene based on this, thereby improving the setting of the smart scene efficiency.
  • the embodiment of the present disclosure also enables the user to set a certain state in the process to be skipped and enter the next state after discovering the failure of the IoT device, so that the intelligent scene is not interrupted due to the device failure.
  • FIG. 4 shows yet another interaction diagram between a generic service entity and an application entity according to an embodiment of the present disclosure.
  • step S401 the application entity (eg, ASN-AE) creates a ⁇ processManagement> resource on the CSE, that is, below the ⁇ CSEBase> resource.
  • the ⁇ processManagement> resource is created on an intelligent gateway such as the CSE, which automatically performs state activation changes, etc.
  • step S402 the application entity instructs the CSE to create all ⁇ state> resources related to the process.
  • the ⁇ state> resource is created as a child resource of the ⁇ processManagement> resource.
  • step S403 the application entity instructs the CSE to create an ⁇ action> resource under the ⁇ state> resource, each ⁇ action> resource corresponds to the corresponding ⁇ state> resource, and the ⁇ action> resource is assigned to the ⁇ action> resource through the ⁇ state>resources/stateAction attribute The resource is linked to the ⁇ state> resource.
  • step S404 the application entity instructs the CSE to create the above-mentioned advanced state resource ⁇ advancedState>.
  • the ⁇ advancedState> resource is created as a child resource of the ⁇ processManagement> resource.
  • step S405a the application entity instructs the CSE to enable the process by updating the processControl attribute of the ⁇ processManagement> resource to the "Enable” value.
  • the application entity instructs the CSE to enable the advanced state resource by updating the advancedControl attribute of the ⁇ processManagement> resource to the "Enable” value.
  • step S405b the general service entity verifies each resource defined in the process to verify whether the resource exists and can be accessed by the creator of the ⁇ processManagement> resource.
  • step S405c if the verification of the general service entity is successful, the general service entity should update the value of processStatus to "Enabled".
  • the generic service entity then starts monitoring the conditions defined in the activateConditions attribute of the ⁇ processManagement> resource.
  • step S406a the general service entity determines whether the conditions defined in the activateConditions attribute are satisfied, or whether the activateConditions attribute is NULL.
  • step S406b when the general service entity determines that the condition defined in the activateConditions attribute is satisfied, or determines that the activateConditions attribute is NULL, the processStatus attribute of the ⁇ processManagement> resource is set to the "Activated" value.
  • the generic service entity shall also set the currentState property to the value configured in the initialState property.
  • the generic service entity can stop monitoring the conditions defined in the activateConditions property and start monitoring the conditions defined in endConditions.
  • step S407 if ⁇ AdvancedState> is not NULL and advancedAontrol is "True” or “enabled", the host should start processing each ⁇ state> resource in the flow from the state associated with the AdvancedState resource of the ⁇ processManagement> resource.
  • ⁇ AdvancedState> is NULL, or advancedAontrol is "NULL” or "disabled"
  • the generic service entity shall process each ⁇ state> resource in the process starting from the state defined by the initialState attribute of the ⁇ processManagement> resource.
  • the generic service entity can evaluate and execute the action linked to the ⁇ state> resource through the stateAction attribute.
  • Generic service entities should also monitor state transition conditions defined in the state's stateTransitions property. Whenever the generic service entity detects that a state transition is required based on the stateTransitions property defined in the current ⁇ state> resource, the generic service entity shall update the currentState property with the resource identifier of the next ⁇ state> resource.
  • a generic service entity when entering a ⁇ state> resource, can do the following.
  • the generic service entity shall set the value of the stateStatus attribute of the ⁇ state> resource indicated in the currentState attribute of the ⁇ processManagement> resource to "active".
  • the generic service entity evaluates the stateAction property of the ⁇ state> resource. For an ⁇ action> resource whose evalCriteria attribute of the ⁇ action> resource is NULL (ie, an unconditional action), the generic service entity shall immediately execute the corresponding action defined by the ⁇ action> resource when transitioning to the ⁇ state> resource.
  • the generic service entity shall monitor the ⁇ action> resource's evalCriteria attribute to determine if/when to trigger and execute the action.
  • the generic service entity then monitors the criteria specified in the stateTransitions attribute of the ⁇ state> resource.
  • the generic service entity shall update the stateStatus of the current ⁇ state> resource to "inactive" and update the resource identifier of the next ⁇ state> resource with ⁇ processManagement > currentState of the resource. Then, the generic service entity should transition to the next state.
  • the general service entity updates the value of the processState attribute to Paused.
  • the process control is reactivated. If the value of the processControl attribute is updated to Disable, It means that the general service entity should end the process control.
  • the generic service entity shall set the processStatus attribute to "Disabled”.
  • a generic service entity shall set the stateStatus property of all child ⁇ state> resources to "inactive”.
  • Generic service entities should have the currentState property set to "NULL”. The generic service entity should stop monitoring the conditions defined in the endConditions property.
  • the general service entity updates the processState property value to Paused.
  • the processControl property value is updated to Enable, the process control is reactivated. If the processControl property value is updated to Disable, It means that the general service entity should end the process control.
  • the general service entity When the trigger condition in endConditions is reached, or the general service entity detects that there is no subsequent state change to occur, the general service entity should set the value of the processState attribute to Completed, and set the value of the stateStatus attribute of all child ⁇ state> resources to all Set to inactive.
  • the general service entity sets currentState to NULL and stops monitoring the trigger conditions specified in endConditions.
  • the application entity may restart a completed process by instructing to update the process control to "Enable".
  • processStatus When processStatus is "Disabled", the generic service entity shall allow child ⁇ status> resources to be added, modified or removed from the process. Otherwise, the host CSE will reject requests to add, modify, or delete ⁇ state> resources from the process.
  • the generic service entity When processStatus is "Disabled", the generic service entity shall allow updating the activateConditions, endConditions and initialState properties of the ⁇ processManagement> resource. Otherwise, the generic service entity SHOULD reject requests to update these attributes.
  • the generic service entity allows new updates and deletions of child ⁇ state> resources only when processStatus is closed, otherwise it is not allowed.
  • the activateConditions, endConditions and initialState property values are the same.
  • the generic service entity When processStatus changes from "Disabled” to "Enabled”, the generic service entity shall check that all required resources related to the process exist and that the creator of the ⁇ processManagement> resource has the necessary permissions to execute operations on these resources with the process related operations. Necessary permissions include RETRIEVE permissions on the resource and CREATE, UPDATE, and DELETE permissions (if/if applicable) (eg, the process contains an ⁇ action> resource that results in an UPDATE operation on the target resource). In addition, the generic service entity should also check that the creator of the ⁇ processManagement> resource has the necessary permissions to operate on all process-related resources while the generic service entity is managing the process. If at any time the Generic Service Entity determines that the creator does not have sufficient rights, the Generic Service Entity shall not enable the process if it is not already enabled, and abort the process when it is enabled or activated.
  • FIG. 5 shows a flow chart of process control utilizing advanced state resources according to an embodiment of the present disclosure.
  • the user completes the following settings: when the temperature sensor detects that the ambient temperature is greater than 31 degrees Celsius (eg state_1), turn on the air conditioner (eg, state_1::action_1), and adjust the fan to The natural wind is one gear and the head is turned on (for example, state_1::action_2), and a scene trigger notification (for example, state_1::action_3) is sent to the terminal device (for example, a mobile APP).
  • the temperature sensor detects that the ambient temperature is greater than 31 degrees Celsius
  • turn on the air conditioner eg, state_1::action_1
  • the natural wind is one gear and the head is turned on
  • a scene trigger notification for example, state_1::action_3
  • the terminal device for example, a mobile APP
  • the temperature sensor performs detection again, and when the temperature sensor detects that the ambient temperature is less than 29 degrees Celsius (for example, state_2), turn off the air conditioner (for example, state_2::action_1), and adjust the fan to the fourth gear of natural wind (for example, state_2::action_2).
  • state_2::action_1 the fourth gear of natural wind
  • the advance state resource which indicates that the simulation has reached the trigger condition of state_1, and the air conditioner has been turned on (that is, state_1::action_1 has been executed).
  • the CSE determines that the value of advancedcontrol is true or enable, the CSE adjusts the fan to the first gear of natural wind and turns on the head swing.
  • the user can determine that the current smart scene setting is successful. If the CSE fails to adjust the fan successfully, the smart scene setting is wrong or failed.
  • FIGS. 6A to 6D illustrate interface change diagrams of setting an advance state resource by a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 6E shows a flowchart of a method 60 performed by an IoT terminal according to an embodiment of the present disclosure.
  • An Internet of Things management APP is installed on the mobile terminal.
  • the method 60 according to an embodiment of the present disclosure includes the following steps.
  • step S601 multiple states in the set IoT process and actions associated with the multiple states are displayed.
  • the displaying multiple states in the set IoT process and the actions associated with the multiple states may further include: displaying an IoT smart scene setting interface, where the IoT smart scene setting interface includes the set a plurality of Internet of Things processes; and in response to triggering selection of an Internet of Things process among the plurality of physical network processes, displaying a detailed settings page for further settings for the selected physical network process, and in the detailed settings page Multiple states in the IoT process and multiple actions associated with the multiple states are displayed above.
  • FIG. 6A shows an example of an IoT smart scene setting interface on which multiple IoT processes are displayed.
  • the first IoT process may be to prompt the user that the door is locked after locking the door.
  • the second IoT process may be to prompt the user that the laundry has been completed after the laundry is completed.
  • the third IoT process may be: when the temperature sensor detects that the ambient temperature is greater than 31 degrees Celsius, the air conditioner is turned on, the fan is adjusted to the first gear of natural wind, and the head is turned on, and a scene trigger notification is sent to the terminal device (such as a mobile phone APP).
  • the terminal device such as a mobile phone APP
  • the temperature sensor performs detection again, and when the temperature sensor detects that the ambient temperature is less than 29 degrees Celsius, the air conditioner is turned off and the fan is adjusted to the fourth gear of natural wind.
  • the user can trigger the selection of an IoT process among the multiple physical network processes by long pressing/clicking on a process (for example, the area in the dotted line box) in FIG. Dialog for further settings of the networking process.
  • the terminal APP will pop up a dialog box, which asks whether further pre-execution of the scene setting is to be set.
  • the pre-execute button the setting of the pre-resource will be triggered.
  • step S602 the information for adjusting the IoT process is obtained, and the information for adjusting the IoT process indicates that the IoT process enters one of the multiple states.
  • the acquiring the information for adjusting the IoT process further includes: in response to triggering selection of one of the multiple states in the IoT process, acquiring the information for adjusting the IoT process, the adjusting the IoT process The information instructs the IoT process to enter the selected state.
  • the acquiring the information for adjusting the IoT process further includes: in response to triggering selection of one action among the plurality of actions in the IoT process, acquiring the information for adjusting the IoT process, the adjusting the IoT process The information instructs the IoT process to handle the selected action.
  • the terminal APP lists the step-by-step execution steps in the IoT process according to the smart scene preset by the user.
  • the interface that lists the step-by-step execution steps in the IoT process is also a detailed setting page for further settings for the selected physical network process.
  • the user drags the black check box up and down with his finger on the screen, and selects a pre-executed cut-in position according to his needs, thereby triggering the selection of one of the multiple states in the Internet of Things process or triggering the selection of one state of the IoT process.
  • Selection of one action of multiple actions in a networked process Taking the solid line box as an example, it indicates that the simulation achieves the condition that the temperature is greater than 31 degrees Celsius, and then directly turns on the air conditioner. Taking the dotted box as an example, it indicates that the simulation achieves the condition that the air conditioner is turned on, and then directly turns on the fan adjustment.
  • the terminal APP obtains the information for adjusting the IoT process.
  • step S603 based on the information for adjusting the IoT process, the IoT device associated with the state is instructed to perform an action associated with the state.
  • the instructing the IoT device associated with the state to perform the action associated with the state further comprises: sending a request to create an advance state resource to a service gateway of the Internet of Things to indicate the state associated with the state
  • the IoT device performs an action associated with the state.
  • embodiments of the present disclosure also provide an IoT terminal, which includes a display and a processor.
  • the display is configured to display multiple states in the set IoT process and actions associated with the multiple states.
  • a processor configured to obtain information for adjusting the Internet of Things process, the information for adjusting the Internet of Things process indicates that the Internet of Things process enters one of the plurality of states, and based on the information for adjusting the Internet of Things process, The IoT device associated with the state is instructed to perform an action associated with the state.
  • FIG. 7 shows a structural diagram of an electronic device 700 according to an embodiment of the present disclosure.
  • an electronic device 700 may include a processor 701 and a memory 702 . Both the processor 701 and the memory 702 may be connected by a bus 703 .
  • the virtual resource transfer device 700 may be a tower server, a rack server (Rack), a blade server (Blade Server), a rack server and the like.
  • the processor 701 can perform various actions and processes according to programs stored in the memory 702 .
  • the processor 701 may be an integrated circuit chip, which has signal processing capability.
  • the aforementioned processors may be general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs off-the-shelf programmable gate arrays
  • the methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and may be of an X86 architecture or an ARM architecture.
  • the memory 702 stores computer instructions, and when the computer instructions are executed by the processor 701 , the above-mentioned method 200 for sending a cross-resource event notification is implemented.
  • Memory 702 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory.
  • the nonvolatile memory may be read only memory (ROM), programmable read only memory (PROM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), or flash memory.
  • Volatile memory may be random access memory (RAM), which acts as an external cache.
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDRSDRAM double data rate synchronous dynamic Random Access Memory
  • ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • SLDRAM Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Memory Bus Random Access Memory
  • the embodiment of the present disclosure also provides an apparatus for process control performed by a general service entity, including: a receiving module, configured to receive a request for creating an advanced state resource, the advanced state resource and a plurality of states in the process management resource A state resource in the resources is associated, and the advance state resource is linked to at least one action resource of its associated state resource; a creation module is configured to create the advance state resource according to the request for creating an advance state resource a sub-resource of the process management resource; and an activation module configured to process the process management resource and set the value of the current state attribute in the process management resource to the state resource associated with the advance state resource identifier.
  • An embodiment of the present disclosure provides an apparatus for process control executed by an application entity, including: a sending module, configured to send a request for creating an advanced state resource, wherein the advanced state resource and multiple states in the process management resource A state resource in the resources is associated, and the advance state resource is linked to at least one action resource of its associated state resource; a receiving module is configured to receive a response for creating an advance state resource, wherein the advance state resource is created. The response indicates that the advanced state resource is created as a sub-resource of the process management resource.
  • the embodiments of the present disclosure provide an IoT system for process control, including an application entity and a general service entity, the system is configured to perform: the application entity sends a request for creating a process management resource to the general service entity; The service entity receives the request for creating process management resources, and creates process management resources according to the request for creating process management resources; the application entity sends a request for creating multiple state resources to the general service entity; the general service entity receives and creates multiple state resources.
  • the application entity sends a request for creating at least one action resource to the general service entity , wherein the at least one action resource corresponds to one state resource among the plurality of state resources;
  • the general service entity receives a request for creating at least one action resource, and according to the request for creating at least one action resource, Linking the at least one action resource to its corresponding state resource;
  • the application entity sends a request for creating an advance state resource to the general service entity, the advance state resource and one of the multiple state resources in the process management resource
  • the state resource is associated, and the advance state resource is linked to at least one action resource of its associated state resource;
  • the general service entity receives the request to create an advance state resource, and according to the request to create an advance state resource
  • the advance state resource is created as a sub-resource of the process management resource; and the process management resource is processed by the general service entity, and the value of the current state attribute in the process management resource
  • the present disclosure also provides a computer-readable storage medium on which computer instructions are stored, and when the computer instructions are executed by a processor, the above-mentioned method can be implemented.
  • computer-readable storage media in embodiments of the present disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. It should be noted that computer-readable storage media described herein are intended to include, but not be limited to, these and any other suitable types of memory.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the various example embodiments of the present disclosure may be implemented in hardware or special purpose circuits, software, firmware, logic, or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor or other computing device. While aspects of the embodiments of the present disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it is to be understood that the blocks, apparatus, systems, techniques, or methods described herein may be taken as non-limiting Examples are implemented in hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Architecture (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开涉及一种由通用服务实体执行的进程控制的方法、由应用实体执行的进程控制的方法和用于物联网的进程控制方法。其中,由通用服务实体执行的进程控制的方法,包括:接收创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源;以及对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。

Description

由通用服务实体执行的进程控制的方法
相关申请的交叉引用
本申请要求于2021年1月26日提交的中国专利申请第202110105811.8的优先权,该中国专利申请的全文通过引用的方式结合于此以作为本申请的一部分。
技术领域
本公开涉及一种由通用服务实体执行的进程控制的方法、由应用实体执行的进程控制的方法、用于物联网的进程控制方法、电子设备、计算机可读介质和系统。
背景技术
物联网技术是一种以机器智能交互为核心的、网络化的应用与服务。它通过在物联网设备内部嵌入无线或有线通信模块以及应用处理逻辑,实现用户对监控、指挥调度、数据采集和测量等方面的信息化需求。
随着物联网技术的发展,已经有越来越多的物联网设备(又称为实体)接入到物联网中。物联网通过搭建物联网管理平台来管理各个物联网设备。物联网管理平台生成与物联网设备相对应的资源来表示物联网设备,并通过操作资源来控制物联网设备。应用终端可以通过物联网管理平台订阅各个资源变动的通知,从而实现对物联网设备的进一步管控。
智能家居平台是一种常见的物联网管理平台。其中,实体家用电器通过有线或无线方式接入到智能家居平台中,智能家居平台为实体的家用电器生成虚拟家用电器(也即资源),应用终端通过智能家居平台对虚拟家用电器进行访问,进而实现对家用电器的远程监控和控制。
目前,物联网在实体和资源的进程控制上仍存在进一步改进的必要。
发明内容
本公开实施例提供了一种由通用服务实体执行的进程控制的方法、由应用实体执行的进程控制的方法、用于物联网的进程控制方法、电子设备、计算机可读介质和系统。
本公开实施例提供了一种由通用服务实体执行的进程控制的方法,包括:接收创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联;根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源;以及对所述进程管理资源的处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
例如,所述创建提前状态资源的请求还包括所述提前状态资源对应的提前控制属性,所述将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符还包括:在所述提前控制属性指示启用所述提前状态资源的情况下,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相对应的值;在所述提前控制属性指示禁用所述提前状态资源的情况下,将进程管理资源中的当前状态属性的值设置为与所述进程管理资源的初始状态属性的值。
例如,将所述提前状态资源创建为所述进程管理资源的子资源还包括:将与所述提前状态资源相关联的状态资源创建为所述提前状态资源的子资源,其中,所述状态资源通过状态动作属性链接至至少一个动作资源。
例如,将所述提前状态资源创建为所述进程管理资源的子资源还包括:将与所述提前状态资源相关联的状态资源的标识符创建为所述提前状态资源的属性,以及将所述提前状态资源相关联的状态资源所包括的动作资源的子集创建为所述提前状态资源的子资源。
例如,将所述提前状态资源创建为所述进程管理资源的子资源还包括:将与所述提前状态资源相关联的状态资源的标识符以及所述状 态资源包括的至少一个动作资源的标识符组成的索引对创建为所述提前状态资源的属性。
例如,将所述提前状态资源创建为所述进程管理资源的子资源还包括:创建所述提前状态资源的状态状况属性,其中,所述状态状况属性指示进程管理资源是否正在处理所述提前状态资源,以及,创建所述提前状态资源的状态转移属性,其中,所述状态转移属性指示转移至接续状态资源的条件以及接续的状态资源。
例如,在接收到创建提前状态资源的请求之前,接收创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;接收创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;以及根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源。
例如,所述与提前状态资源相关联的状态资源的至少一个动作资源包括目标资源以及目标操作,所述方法还包括:针对所述目标资源触发目标操作。
本公开实施例提供了一种由应用实体执行的进程控制的方法,包括:发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;接收创建提前状态资源的响应,其中,所述创建提前状态资源的响应指示所述提前状态资源被创建为所述进程管理资源的子资源。
例如,所述创建提前状态资源的请求还包括所述提前状态资源对应的提前控制属性,所述提前控制属性指示启用所述提前状态资源或禁用所述提前状态资源。
例如,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符。
例如,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符、以及动作资源的标识符集合,其中,所 述动作资源的标识符集合为所述提前状态资源相关联的状态资源所包括的所有动作资源的标识符的子集。
例如,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符、所述状态资源包括的多个动作资源之一的标识符。
例如,所述创建提前状态资源的请求还包括状态转移属性,其中,所述状态转移属性指示转移至接续状态资源的条件以及接续的状态资源。
例如,在发送创建提前状态资源的请求之前,发送创建进程管理资源的请求;发送创建多个状态资源的请求,其中,所述创建多个状态资源的请求指示所述多个状态资源作为所述进程管理资源的子资源;以及发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应。
本公开实施例提供了一种用于物联网的进程控制方法,包括:由应用实体向通用服务实体发送创建进程管理资源的请求;由通用服务实体接收所述创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;由应用实体向通用服务实体发送创建多个状态资源的请求;由通用服务实体接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;由应用实体向通用服务实体发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;由通用服务实体接收创建至少一个动作资源的请求,并根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源;由应用实体向通用服务实体发送用于创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;由通用服务实体接收所述创建提前状态资源的请求,并根据所述创建提前状态资源的请求将所述提前状态资源创建为所述进程管理资源的子资源;以及由通用服务实体对所述进程管理资源进行处理,并将进程管理资源中 的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
例如,所述与提前状态资源相关联的状态资源的至少一个动作资源包括目标资源以及目标操作,所述方法还包括:针对所述目标资源触发目标操作。
本公开实施例还提供了一种由物联网终端执行的方法,包括:显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作;获取调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所述多个状态中的一个状态,以及基于所述调整物联网进程的信息,指示与所述状态相关联的物联网设备执行与所述状态相关联的动作。
例如,所述显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作还包括:显示物联网智能场景设置界面,所述物联网智能场景设置界面包括已设置的多个物联网进程;以及响应于触发对所述多个物理网进程中的一个物联网进程的选择,显示对所选择的物理网进程进行进一步设置的详细设置页面,并且在所述详细设置页面上显示所述物联网进程中的多个状态以及与所述多个状态相关联的多个动作。
例如,所述获取调整物联网进程的信息还包括:响应于触发对所述物联网进程中的多个状态的一个状态的选择,获取所述调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所选择的状态;或者响应于触发对所述物联网进程中的多个动作的一个动作的选择,获取所述调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程处理所选择的动作。
例如,所述指示与所述状态相关联的物联网设备执行与所述状态相关联的动作还包括:向物联网的服务网关发送创建提前状态资源的请求,以指示与所述状态相关联的物联网设备执行与所述状态相关联的动作。
本公开实施例还提供了一种用于通用服务实体执行的进程控制的装置,包括:接收模块,用于接收创建提前状态资源的请求,所述 提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;创建模块,用于根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源;以及激活模块,用于对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
本公开实施例提供了一种用于应用实体执行的进程控制的装置,包括:发送模块,用于发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;接收模块,用于接收创建提前状态资源的响应,其中,所述创建提前状态资源的响应指示所述提前状态资源被创建为所述进程管理资源的子资源。
本公开实施例提供了一种用于进程控制的物联网系统,包括应用实体和通用服务实体,所述系统被配置为执行:由应用实体向通用服务实体发送创建进程管理资源的请求;由通用服务实体接收所述创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;由应用实体向通用服务实体发送创建多个状态资源的请求;由通用服务实体接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;由应用实体向通用服务实体发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;由通用服务实体接收创建至少一个动作资源的请求,并根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源;由应用实体向通用服务实体发送用于创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;由通用服务实体接收所述创建提前状态资源的请求,并根据所述创建提前状态资源的请求将所述提前状态资源创建为所述进程管理资源的子资源;以及由通用服务实体对所述 进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
本公开的实施例提供了一种电子设备。该电子设备包括:一个或多个处理器;和一个或多个存储器,其中,所述存储器中存储有计算机可读代码,所述计算机可读代码当由所述一个或多个处理器运行时,执行上述的方法。
根据本公开的又一实施例,还提供了一种计算机可读存储介质,其上存储有指令,所述指令在被处理器执行时,使得所述处理器执行上述方法。
根据本公开的另一方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各个方面或者上述各个方面的各种可选实现方式中提供的方法。
利用本公开实施例,可以模拟已经达到触发动作资源的操作的条件,使得用户可以直观的观察到触发某个动作资源的操作的效果,同时,也不影响进程管理资源中的其它状态资源和进程控制的实现。本公开实施例能够让用户在完成智能场景的设置之后,就能立刻观察到其设置的各个物联网设备的操作,并基于此确定是否要对智能场景进行进一步的调整,提高了智能场景的设置效率。本公开实施例还能够让用户发现物联网设备故障之后,能够设置跳过进程中的某个状态,而进入下一状态,从而使得智能场景不因设备故障而中断。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员而言,在没有做出创造性劳动的前提下,还可以根据这些附图获得其他的附图。以下附图并未刻意按实际尺寸等比例缩放绘制,重点在于示出本公开 的主旨。
图1A示出了根据本公开的实施例的物联网示意性的架构图。
图1B示出根据本公开的实施例的各个设备之间的连接的示意图。
图1C示出了根据本公开的实施例的ASN-AE的界面图。
图1D示出了根据本公开的实施例的智能生产场景的示意图。
图2A示出了根据本公开的实施例的由通用服务实体执行的进程控制的方法的流程图。
图2B示出了根据本公开的实施例的由应用实体执行的进程控制的方法的流程图。
图2C示出了根据本公开的实施例的通用服务实体和应用实体之间的交互图。
图3A示出了根据本公开的实施例的通用服务实体创建提前状态资源前后的进程管理资源的变化的示意图。
图3B示出了根据本公开的实施例的状态资源的示意图。
图3C示出了根据本公开的实施例的通用服务实体创建提前状态资源前后的进程管理资源的变化的又一示意图。
图3D示出了根据本公开的实施例的提前状态资源的示意图。
图4示出了根据本公开的实施例的通用服务实体和应用实体之间的又一交互图。
图5示出了根据本公开的实施例的利用提前状态资源而进行进程控制的流程图。
图6A至图6D示出了根据本公开的实施例的移动终端设置提前状态资源的界面变化图。
图6E示出了根据本公开的实施例的由物联网终端执行的方法的流程图。
图7示出了根据本公开实施例的电子设备的结构图。
具体实施方式
为了使得本公开的目的、技术方案和优点更为明显,下面将参照附图详细描述根据本公开的示例实施例。显然,所描述的实施例仅仅 是本公开的一部分实施例,而不是本公开的全部实施例,应理解,本公开不受这里描述的示例实施例的限制。
在本说明书和附图中,具有基本上相同或相似步骤和元素用相同或相似的附图标记来表示,且对这些步骤和元素的重复描述将被省略。同时,在本公开的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性或排序。
随着信息技术尤其是互联网技术的发展,用于实现信息化、远程管理控制和智能化的网络的物联网技术正逐渐成熟。物联网利用局部网络或互联网等通信技术把传感器、控制器、机器、人员和物等通过新的方式联接在一起,形成人与物、物与物相联。物联网是互联网的延伸,它包括互联网及互联网上所有的资源,兼容互联网所有的应用。随着物联网技术在各个领域的应用,出现了诸如智能家居、智能交通、智慧健康等各种新的应用领域。
图1A示出了根据本公开的实施例的物联网示意性的架构图。图1B示出根据本公开的实施例的各个设备之间的连接的示意图。图1C示出了根据本公开的实施例的ASN-AE的界面图。图1D示出了根据本公开的实施例的智能生产场景的示意图。
如图1A所示,各种终端的客户端设备接入网络,并且通过网络接入到通用服务层,而通用服务层支持各种应用,从而形成了终端+网络+应用的架构。例如,在智能家居领域,各种家用设备可以利用局域网(LAN)接入通用服务平台,这样的局域网接入可以采用诸如无线或者有线方式。可选地,所述局域网可以是个域网(PAN),例如以无线个域网(WPAN)为例,可以采用Bluetooth、IrDA、Home RF、ZigBee、或UWB(Ultra-Wideband Radio)等各种技术来实现接入。
如前所述,当物联网实体(例如,物联网终端设备或者节点设备中的软件模块)将数据或信息传输到通用服务实体后,该数据或信息可以作为单独的资源进行存储。此外,物联网实体可以向通用服务实体发送请求,从而更新通用服务实体上存储的与该物联网实体对应的资源,以便反映该物联网实体所运行的设备的状态。这种更新可以是实时的或者是周期性的,也可以由某一条件进行触发。由此,与该通 用服务实体通信的其他物联网实体可以通过访问更新的资源,而获悉该物联网实体所对应的设备的状态;或者,与该通用服务实体通信的其他物联网实体可以对更新的资源进行操作。应注意,这里所称的资源,包括各种实体(例如,可以体现为物联网设备中的软件模块,诸如AE、CSE等实体)的资源。实体可以表示一通信设备的软件模块,而通用服务实体可以表示服务平台的软件模块,而服务平台可以是本地的或者是远程的。可选地,对更新的资源进行操作包括,例如,获取更新的资源的信息、删除更新的资源的信息、将更新的资源的信息通知给第三方,或者基于更新的资源的信息对其他资源进行操作。
在本公开中,所描述的实体,例如应用实体AE,通用服务实体CSE,以及数据等都可以通过资源进行表示。具体地,资源可以包括属性和子资源,其中属性用来存储资源相关的信息(例如,资源的标识符、资源对应的AE的物理位置、资源的状态信息等),子资源是资源的下一级资源,资源包括指向下一级资源的索引。
应用实体AE可以包括应用服务节点中的应用实体ASN-AE和应用专用节点中的应用实体AND-AE。应用实体ASN-AE可以为电视、智能家电设备(例如,智能冰箱、智能微波炉等)、充电汽车、台式电脑、笔记本电脑、智能手机、平板电脑、音乐播放器(例如mp3播放器等)以及其他包括处理器和存储器的终端(例如,移动终端,智能终端)。应用实体ASN-AE上可以安装物联网相关应用,以通过通用服务实体CSE来对应用实体AND-AE的操作进行设置。
参考图1B,通用服务实体CSE、应用服务节点中的应用实体ASN-AE(例如,手机终端)、应用专用节点中的第一应用实体和应用专用节点中的第二应用实体可以通过网络连接。上述各设备之间可以直接或间接地互相通信,例如,通过网络互相发送和接收数据和/或信号。
网络可以是基于互联网和/或电信网的物联网(Internet of Things),其可以是有线网也可以是无线网,例如,其可以是局域网(LAN)、城域网(MAN)、广域网(WAN)、蜂窝数据通信网络等能实现信息交换功能的电子网络。
在一些实施例中,应用实体AND-AE可以是温度计、空调、风扇、灯等小型物联网设备。当这些AND-AE注册在CSE之后,CSE可在其上创建对应的资源。CSE通过对应资源的操作来控制这些AND-AE。
在一些实施例中,操作者在ASN-AE进行操作(例如,编辑智能场景),向CSE发送创建智能场景的请求(例如,创建进程管理资源的请求、创建动作资源的请求、创建状态资源的请求等等),进而使得各个AND-AE可以联动。
例如,在图1C中涉及的智能家居场景中,各种物联网设备之间可以进行联动。ASN-AE可以设置如图1C所示的智能场景来控制物联网设备,这些物联网设备包括:温度传感器、空调设备、和风扇设备。例如,这样的智能家居场景可以被设置为:当温度传感器检测到环境温度大于31摄氏度时,开启空调,并将风扇调节至自然风一档并开启摆头,向终端设备(例如手机APP)发送场景触发通知。一小时后,温度传感器再次执行检测,并当温度传感器检测到环境温度小于29摄氏度时,关闭空调,并将风扇调节至自然风四档。
然而,在这样的场景中,基于当前的物联网的进程控制方法,在用户设置完之后,用户并不能立即观测到空调开启或风扇的调节,而是必须等待温度传感器监测到温度大于31度的时候才可以进行自动化执行智能场景。因此,用户在完成设置之后并不能立刻获知空调的开启和风扇的调节是否设置成功,或者这样的设置是否合适。因此需要对当前的物联网的进程控制方法进行改进,以使得用户在完成设置之后,即使当前的环境温度仍小于31度,也可以模拟已经达成当前环境温度已经大于31的条件,进而开启空调和风扇,观察空调和风扇的操作情况。
再例如,在图1D中涉及的智能生产场景中,各种物联网生产设备之间也可以进行联动。假设物联网生产设备包括:加热设备、反应设备、冷却设备、额外冷却设备和过滤设备。可以设置这样的智能生产场景:
①打开加热设备对待生产的溶液进行加热并开启定时器,如果检 测到PH值小于3,则添加冷却水;
②如果检测到待生产的溶液的温度大于70摄氏度,将待生产的溶液传输至反应设备,同时关闭加热设备,开启反应设备中搅拌器。重启定时器。如果检测到PH值小于3,则添加热水;
③如果检测到溶液温度小于60摄氏度,则将溶液返回至加热设备重新加热,重启定时器;
④当定时器指示反应时长已达2小时,则将反应完成的溶液传输至冷却设备,关闭反应设备中的搅拌器,重启定时器,打开第一冷却装置;
⑤当定时器指示反应时长已达1小时,检测溶液温度,如果溶液温度仍大于60摄氏度,则将该的溶液传输至额外冷却设备,打开第二冷却装置。如果溶液温度小于60摄氏度,则将该的溶液传输至过滤设备,开启过滤器。
⑥如果检测到过滤后的溶液的品质达到质量标准,则将溶液装瓶。如果检测到过滤后的溶液的品质仍未达到质量标准,则将溶液传输至加热设备。
然而,在这样的场景中,基于当前的物联网的进程控制方法,如果在步骤④中定时器出现设备故障,必须将溶液全部传输至加热设备中重新加热。这样会导致本已达到传输至冷却设备的条件的溶液需要重新加热和反应,浪费生成时间。同时,如果故障时间较长,则可能导致反应时间过长,溶液的PH值过低,从而反应失败,浪费了珍贵的原材料。因此需要对当前的物联网的进程控制方法进行改进,以使得生产线管理员在完成生产设备的设置之后,即使定时器出现设备故障,也可以模拟已经达成当前反应时长已达2小时的条件,进而将溶液传输至冷却设备,使得溶液的生产能够继续。
为此,本公开的实施例提供了一种物联网中的进程控制方法,以对当前的物联网的进程控制方法进行改进。
图2A示出了根据本公开的实施例的由通用服务实体执行的进程控制的方法20的流程图。图2B示出根据本公开的实施例的由应用实体执行的进程控制的方法21的流程图。图2C示出了根据本公开 的实施例的通用服务实体和应用实体之间的交互图。
参考图2A,根据本公开实施例的由通用服务实体(例如,CSE)执行的进程控制的方法20包括步骤S201至步骤S203。
在步骤S201中,接收创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联。
在步骤S202中,根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源。
在步骤S203中,对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
可选地,在所述创建提前状态资源的请求中包括提前状态资源对应的提前控制属性的情况下,在步骤S203中,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符还包括:在所述提前控制属性指示启用所述提前状态资源(例如,提前控制属性<advancedControl>的值为enable)的情况下,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相对应的值。在所述提前控制属性指示禁用所述提前状态资源(例如,提前控制属性<advancedControl>的值为disable或NULL)的情况下,将进程管理资源中的当前状态属性的值设置为与所述进程管理资源的初始状态属性的值。
可选地,在通用服务实体执行步骤S201之前,通用服务实体还可以接收创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;接收创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;以及根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源。
可选地,所述与提前状态资源相关联的状态资源的至少一个动作资源包括目标资源以及目标操作,所述方法还包括:针对所述目标资 源触发目标操作。
参考图2B,根据本公开实施例的由应用实体(例如,ASN-AE)执行的进程控制的方法21包括步骤S211至步骤S212。
在步骤S211中,发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联。
其中,所述创建提前状态资源的请求还可以包括所述提前状态资源对应的提前控制属性(例如,<advancedControl>),所述提前控制属性指示启用所述提前状态资源或禁用所述提前状态资源。
在步骤S212中,接收创建提前状态资源的响应,其中,所述创建提前状态资源的响应指示所述提前状态资源被创建为所述进程管理资源的子资源。
可选地,在发送创建提前状态资源的请求之前,应用实体还可以发送创建进程管理资源的请求;发送创建多个状态资源的请求,其中,所述创建多个状态资源的请求指示所述多个状态资源作为所述进程管理资源的子资源;以及发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应。
利用方法20和方法21,通用服务实体可以从应用实体获取到创建提前状态资源的请求,并在进一步解析该请求之后,确定要提前处理与某个状态资源相关联某个动作资源,从而提高了物联网的进程管理的效率。
参见图2C,结合上述的方法20和方法21,根据本公开实施例的用于物联网的进程控制方法22包括以下步骤。
在步骤S221中,由应用实体(例如,图2C中的ASN-AE,应用APP)向通用服务实体(例如,CSE)发送创建进程管理资源的请求。
在步骤S222中,由通用服务实体接收所述创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源(例如,<processManagement>)。可选地,通用服务实体在成功创建进程管理资源后向所述应用实体发送创建成功响应。
在步骤S223中,由应用实体(例如,图2C中的ASN-AE,应用APP)向通用服务实体发送创建多个状态资源的请求。
在步骤S224中,由通用服务实体接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源(例如,<state>)创建为所述进程管理资源的子资源。可选地,通用服务实体在成功创建状态资源后向所述应用实体发送创建成功响应。
在步骤S225中,由应用实体向通用服务实体发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应。
在步骤S226中,由通用服务实体接收创建至少一个动作资源的请求,并根据所述创建至少一个动作资源的请求,将所述至少一个动作资源(例如,<action>)链接至其对应的状态资源。可选地,通用服务实体在成功创建动作资源后向所述应用实体发送创建成功响应。
在步骤S227中,由应用实体向通用服务实体发送用于创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源。其中,所述创建提前状态资源的请求还包括所述提前状态资源对应的提前控制属性,所述提前控制属性指示启用所述提前状态资源或禁用所述提前状态资源。步骤S227类似于方法21中的步骤S211,在此就不再赘述。
在步骤S228中,由通用服务实体接收所述创建提前状态资源的请求,并根据所述创建提前状态资源的请求将所述提前状态资源创建为所述进程管理资源的子资源。步骤S228类似于方法20中的步骤S201和步骤S202,在此就不再赘述。可选地,通用服务实体在成功创建提前状态资源后向所述应用实体发送创建成功响应。
在步骤S229中,由通用服务实体对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
其中,在所述创建提前状态资源的请求还包括所述提前状态资源对应的提前控制属性的情况下,所述将进程管理资源中的当前状态属 性的值设置为与所述提前状态资源相关联的状态资源的标识符还包括:在所述提前控制属性指示启用所述提前状态资源的情况下,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相对应的值;在所述提前控制属性指示禁用所述提前状态资源的情况下,将进程管理资源中的当前状态属性的值设置为与所述进程管理资源的初始状态属性的值。
其中,所述与提前状态资源相关联的状态资源的至少一个动作资源包括目标资源以及目标操作,所述方法还包括:针对所述目标资源触发目标操作。例如,如图2C所示,在提前状态资源相关联的状态资源为state_2的情况下,CSE处理与state_2相关联的动作资源。假设该动作资源对应的目标资源为图2C所示的AND-AE(例如,智能设备),该AND-AE执行相应的目标动作。
在完成整个进程的处理后,CSE将重新监控进程管理资源中的初始状态,并以该初始状态作为起始,重新开始整个进程。
例如,在图1C中涉及的智能家居场景中,用户完成如下设置:当温度传感器检测到环境温度大于31摄氏度时,开启空调,并将风扇调节至自然风一档并开启摆头,向终端设备(例如手机APP)发送场景触发通知。一小时后,温度传感器再次执行检测,并当温度传感器检测到环境温度小于29摄氏度时,关闭空调,并将风扇调节至自然风四档。
此时,为了更为直接的观察到该智能场景是否设置成功,用户在完成设置之后可以通过ASN-AE向CSE发送创建提前状态资源的请求,该请求指示:模拟已经达成当前环境温度已经大于31摄氏度的条件,请CSE尝试执行后续的状态资源和动作资源中的关联操作。如果CSE开启空调并将风扇调节至自然风一档并开启摆头,那么用户可以确定当前的智能场景设置成功。如果CSE未能成功开启空调,则说明智能场景设置错误或失败。
再例如,在图1D中涉及的智能生产场景中,生产线管理员完成如下的智能生产场景设置:①打开加热设备对待生产的溶液进行加热并开启定时器,如果检测到PH值小于3,则添加冷却水;②如果检测到 待生产的溶液的温度大于70摄氏度,将待生产的溶液传输至反应设备,同时关闭加热设备,开启反应设备中搅拌器。重启定时器。如果检测到PH值小于3,则添加热水;③如果检测到溶液温度小于60摄氏度,则将溶液返回至加热设备重新加热,重启定时器;④当定时器指示反应时长已达2小时,则将反应完成的溶液传输至冷却设备,关闭反应设备中的搅拌器,重启定时器,打开第一冷却装置;⑤当定时器指示反应时长已达1小时,检测溶液温度,如果溶液温度仍大于60摄氏度,则将该的溶液传输至额外冷却设备,打开第二冷却装置。如果溶液温度小于60摄氏度,则将该的溶液传输至过滤设备,开启过滤器。⑥如果检测到过滤后的溶液的品质达到质量标准,则将溶液装瓶。如果检测到过滤后的溶液的品质仍未达到质量标准,则将溶液传输至加热设备。
此时,如果在步骤④中定时器出现设备故障,并且溶液已达到传输至冷却设备的条件。此时,生产线管理员可以通过ASN-AE向CSE发送创建提前状态资源的请求,该请求指示:模拟已经达成当前反应时长已达2小时的条件,进而将溶液传输至冷却设备,使得溶液的生产能够继续。
由此,利用本公开实施例的方法20和方法21,可以模拟已经达到触发动作资源的操作的条件,使得用户可以直观的观察到触发某个动作资源的操作的效果,同时,也不影响进程管理资源中的其它状态资源和进程控制的实现。本公开实施例能够让用户在完成智能场景的设置之后,就能立刻观察到其设置的各个物联网设备的操作,并基于此确定是否要对智能场景进行进一步的调整,提高了智能场景的设置效率和工作效率。本公开实施例还能够让用户发现物联网设备故障之后,能够设置跳过进程中的某个状态,而进入下一状态,从而使得智能场景不因设备故障而中断。
图3A示出了根据本公开的实施例的通用服务实体创建提前状态资源前后的进程管理资源的变化的示意图。图3B示出了根据本公开的实施例的状态资源的示意图。图3C示出了根据本公开的实施例的通用服务实体创建提前状态资源前后的进程管理资源的变化的又一 示意图。图3D示出了根据本公开的实施例的提前状态资源的示意图。
例如,进程管理资源在CSE中可以以<ProcessManagement>作为标签来进行定义。除了<processManagement>资源外,与进程相关的其他潜在资源还包括:<processManagement>资源的<state>子资源、通过每个<state>资源的stateAction属性引用的<state>资源的子<action>资源、通过每个<state>资源的stateTransitions属性引用的资源、通过每个相关<action>资源的actionSubjectResources、objectResourceID、subjectResourceID、evalCriteria属性引用的资源、<accessManagement>资源和所有其他相关资源所引用的<accessControlPolicy>资源等等。本公开对此不进行限制。
参考图3A,在创建提前状态资源之前,驻留在CSE中的进程管理资源可以包括多个子资源和多个属性。
例如,如图3A所示,进程管理资源可以包括表一中所示的各种属性。本领域技术人员应当理解,表一仅仅为示例,进程管理资源还可以包括更多或更少属性。
表一:进程管理资源的属性
Figure PCTCN2022073216-appb-000001
Figure PCTCN2022073216-appb-000002
Figure PCTCN2022073216-appb-000003
可选地,所述创建提前状态资源的请求还可以包括提前状态资源对应的提前控制属性<advancedControl>。提前控制属性<advancedControl>的值为enable、disable或者为NULL。该属性值指示是否启用提前状态资源,也即是否开启将某个状态提前。
例如,进程管理资源中包括多个状态资源作为子资源。例如,如图3B所示,状态资源可以包括表二中所示的各种属性。本领域技术人员应当理解,表一仅仅为示例,状态资源还可以包括更多或更少属 性。
表二:状态资源的属性
Figure PCTCN2022073216-appb-000004
当通用服务实体管理一个"Enabled"或"Activated"的进程,并遇到错误条件(例如无法访问<state>或<action>资源)时,通用服务实体应将当前<状态>资源的stateStatus属性更新为"inactive",将<processManagement>资源的processStatus属性更新为"Aborted",从而中止该进程。
例如,在创建提前状态资源之前,已在通用服务实体上创建的进程管理资源、状态资源以及动作资源的关联关系可以如图3C所示。
参考图3C,通用服务实体利用<processManagement>资源来定义和管理进程(Process)。然后,与进程中的状态相对应的状态资源(<state>资源)被创建为<processManagement>资源的子资源。与通用 服务实体对每个状态所执行的操作相对应的<action>资源也被创建为每个<state>资源的子资源,并通过stateAction属性链接。由每个<state>资源的子<action>资源定义的evalCriteria不会被通用服务实体监控,直到进程被激活并且进程已经过渡到由每个<state>资源定义的状态。如果没有为<state>资源的子<action>资源定义evalCriteria,那么当进程被激活并且进程已经过渡到<state>资源定义的状态时,通用服务实体应执行相应的动作。
应用实体ASN-AE可以进一步配置activateConditions和endConditions属性。也即用户可以定义通用服务实体用于触发进程的激活和结束的标准。一旦该进程被应用实体ASN-AE启用(例如用户开启智能场景),用户定义的标准(例如,当温度传感器检测到环境温度大于31摄氏度时,开启空调)将由通用服务实体监控。
应用实体ASN-AE可以进一步通过<processManagement>资源的initialState属性进行配置进程中的第一个状态。应用实体ASN-AE可以更新<processManagement>资源的processControl属性,以指示通用服务实体启用、禁用或暂停进程。
可选地,在所述创建提前状态资源的请求中包括提前状态资源对应的提前控制属性<advancedControl>的情况下,参考图3A在上述的步骤S203中,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符还包括:在所述提前控制属性指示启用所述提前状态资源(例如,提前控制属性<advancedControl>的值为enable)的情况下,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相对应的值。在所述提前控制属性指示禁用所述提前状态资源(例如,提前控制属性<advancedControl>的值为disable或NULL)的情况下,将进程管理资源中的当前状态属性的值设置为与所述进程管理资源的初始状态属性的值。
在管理进程时,通用服务实体应监控进程的<processManagement>和<state>资源中定义的标准属性(如activateConditions、endConditions、stateTransitions),以确定是否/何时执行进程的<action>资源定义的相应动作。在管理进程时,通用服务实体应更新进程的 <processManagement>和<state>资源中定义的状态属性(如stateStatus、processStatus、currentState)。
当进入一个状态时,通用服务实体可以将<processManagement>资源的currentState属性更新为正在处理的<state>资源的资源标识符,更新该<state>资源的stateStatus属性值为"active",并检查stateAction属性中定义的<action>资源。可选地,对于evalCriteria为空的无条件动作,通用服务实体应在开始处理<state>时立即执行动作。否则,通用服务实体应监控<action>资源的evalCriteria属性,以确定是否/何时执行该动作。通用服务实体还应监视<state>资源的stateTransitions属性中定义的evalCriteria参数。如果任何在stateTransitions中定义的标准被满足时,通用服务实体可以执行状态转换。
当执行状态转换时,通用服务实体可以将当前<state>资源的stateStatus属性更新为"inactive",并将下一个<state>资源(如果有)的stateStatus属性更新为"active"。如果下一个<state>资源不适用(例如通用服务实体已经完成了对进程中最后一个状态的处理,则通用服务实体应将<processManagement>资源的processStatus属性更新为"Completed"值,从而结束进程。
当通用服务实体管理进程时,通用服务实体可以还可以监控<processManagement>资源的endConditions属性中定义的标准。如果endConditions中定义的任何标准被满足时,通用服务实体将通过更新当前<state>资源的stateStatus属性为"inactive"和<processManagement>资源的processStatus属性为"Completed"的值来结束该进程。
当通用服务实体管理进程时,如果遇到错误条件(例如通用服务实体无法访问<state>或<action>资源),通用服务实体应将当前<state>资源的stateStatus属性更新为"inactive",<processManagement>资源的processStatus属性更新为"Aborted",从而中止该进程。
在上述的步骤S202中,通用服务实体根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源。其创建的提前状态资源与进程管理资源中的状态资源、动作资源的关 联关系如图3C所示。例如,提前状态资源可以通过stateAction属性链接至状态资源和动作资源。以下参考图3D示出提前状态资源如何与状态资源和动作资源进行链接的方式,但是本领域技术人员应当理解本公开的实施例对如何将提前状态资源连链接至状态资源和动作资源并不进行限制。
参考图3D,其示意性地示出了提前状态资源与状态资源和动作资源进行链接的三种方式。
例如,在方式一中,在上述的步骤S211中,应用实体发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源。其中,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符。由此,在接收到这样的提前状态资源请求之后,在上述的步骤S202中,通用服务实体将所述提前状态资源创建为所述进程管理资源的子资源还包括:将与所述提前状态资源相关联的状态资源创建为所述提前状态资源的子资源,其中,所述状态资源通过状态动作属性链接至至少一个动作资源。
在方式一中,提前状态资源包括目标状态属性(例如,<targetState>),其指示其关联的状态资源,并且提前状态资源通过该目标状态属性隐式地链接至该其关联的状态资源的至少一个动作资源。图3D示出了提前状态资源关联至标识符为state1的状态资源。此时,CSE将模拟当前的智能场景已经满足执行state1的所有条件,并且将依次执行state1中的所有关联的动作。例如,假设state1和其对应的动作资源指示:当温度传感器检测到环境温度大于31摄氏度时,开启空调(例如,action1),并将风扇调节至自然风一档(例如,action2)并开启摆头(例如,action3)。此时,CSE将指示不检测环境温度是否大于31摄氏度,而直接开启空调,并将风扇调节至自然风一档并开启摆头。
例如,在方式二中,在上述的步骤S211中,应用实体发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的 多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源。其中,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符、以及动作资源的标识符集合,其中,所述动作资源的标识符集合为所述提前状态资源相关联的状态资源所包括的所有动作资源的标识符的子集。由此,在接收到这样的提前状态资源请求之后,在上述的步骤S202中,通用服务实体所述提前状态资源创建为所述进程管理资源的子资源还包括:将与所述提前状态资源相关联的状态资源的标识符创建为所述提前状态资源的属性,以及将所述提前状态资源相关联的状态资源所包括的动作资源的子集创建为所述提前状态资源的子资源。
在方式二中,提前状态资源包括目标状态属性(例如,<targetState>),其指示其关联的状态资源。并且提前状态资源包括状态动作属性,通过该状态动作属性显式地链接至该其关联的状态资源的至少一个动作资源。图3D示出了提前状态资源关联至标识符为state2的状态资源。此时,CSE将模拟当前的智能场景已经满足执行state2的动作action2的所有条件,并且将依次执行state2中的所有关联的动作。例如,假设state2和其对应的动作资源指示:当温度传感器检测到环境温度小于29摄氏度时,关闭空调(action1),并将风扇调节至自然风四档(action2)并关闭摆头(action3)。此时,CSE将指示不检测环境温度是否小于31摄氏度并且不关闭空调,而直接将风扇调节至自然风四档并关闭摆头。
例如,在方式三中,在上述的步骤S211中,应用实体发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源。其中,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符、所述状态资源包括的多个动作资源之一的标识符。由此,在上述的步骤S202中,通用服务实体将所述提前状态资源创建为所述进程管理资源的子资源还包括:将与所述提前状态资源相关联的状态资源的标 识符以及所述状态资源包括的至少一个动作资源的标识符组成的索引对创建为所述提前状态资源的属性。
在方式三中,提前状态资源包括状态动作标识(例如,<stateActionIDs>),其是由状态资源的标识符以及所述状态资源包括的至少一个动作资源的标识符组成的索引对的列表。通过该状态动作标识属性提前状态资源显式地链接至该其关联的状态资源的至少一个动作资源。图3D示出了提前状态资源关联至标识符为state2的状态资源,并且链接至状态资源state2的动作资源action2。此时,CSE将模拟当前的智能场景已经满足执行state2的动作action2的所有条件,并且将依次执行state2中的所有关联的动作。例如,假设state2和其对应的动作资源指示:当温度传感器检测到环境温度小于29摄氏度时,关闭空调(action1),并将风扇调节至自然风四档(action2)并关闭摆头(action3)。此时,CSE将指示不检测环境温度是否小于31摄氏度并且不关闭空调,而直接将风扇调节至自然风四档并关闭摆头。
例如,在方式一、方式二和方式三中,在上述的步骤S211中,应用实体还可以发送创建提前状态资源的请求,其中,所述创建提前状态资源的请求包括:状态转移属性,其中,所述状态转移属性指示转移至接续状态资源的条件以及接续的状态资源。在上述的步骤S202中,通用服务实体将所述提前状态资源创建为所述进程管理资源的子资源还包括:创建所述提前状态资源的状态状况属性,其中,所述状态状况属性指示进程管理资源是否正在处理所述提前状态资源,以及,创建所述提前状态资源的状态转移属性,其中,所述状态转移属性指示转移至接续状态资源的条件以及接续的状态资源。
例如,在方式一、方式二和方式三中,提前状态资源包括当前状况(例如,<currentStatus>),其指示提前状态当前是否为进程的活动状态,也即,进程管理资源是否正在处理所述提前状态资源。此属性支持的值包括"active"和"inactive"。提前状态资源包括状态转移属性(例如,<stateTransitions>),该属性指示接续状态资源的条件以及接续的状态资源。例如,状态转移属性包括用于确定是否/何时从该状 态过渡到另一状态的标准的列表。该列表中的每个条目被定义为由以下两个元素组成的索引对:evalCriteria:标识状态转移的条件;next state:下一个<state>资源的资源标识符。如果这个<state>资源代表进程中的最后一个状态,则这个属性应为空。
利用本公开实施例,可以模拟已经达到触发动作资源的操作的条件,使得用户可以直观的观察到触发某个动作资源的操作的效果,同时,也不影响进程管理资源中的其它状态资源和进程控制的实现。本公开实施例能够让用户在完成智能场景的设置之后,就能立刻观察到其设置的各个物联网设备的操作,并基于此确定是否要对智能场景进行进一步的调整,提高了智能场景的设置效率。本公开实施例还能够让用户发现物联网设备故障之后,能够设置跳过进程中的某个状态,而进入下一状态,从而使得智能场景不因设备故障而中断。
图4示出了根据本公开的实施例的通用服务实体和应用实体之间的又一交互图。
在步骤S401中,应用实体(例如,ASN-AE)在CSE上面也就是<CSEBase>资源的下面创建<processManagement>资源。例如,<processManagement>资源被创建在诸如CSE的智能网关上,由CSE自动执行状态激活变更等。
在步骤S402中,应用实体指示CSE创建所有涉及到进程的<state>资源。<state>资源被创建为<processManagement>资源的子资源。
在步骤S403中,应用实体指示CSE在<state>资源的下创建<action>资源,每一个<action>资源都对应着相应的<state>资源,通过<state>resources/stateAction attribute将<action>资源与<state>资源进行连接。
在步骤S404中,应用实体指示CSE创建上述的提前状态资源<advancedState>。<advancedState>资源被创建为<processManagement>资源的子资源。上述过程参考以上描述的过程,本公开在此不再赘述。
在步骤S405a中,应用实体指示CSE通过将<processManagement>资源的processControl属性更新为"Enable"值来启用进程。可选地,应用实体指示CSE通过将<processManagement>资源的 advancedControl属性更新为"Enable"值来启用提前状态资源。
在步骤S405b中,通用服务实体验证进程中定义的每个资源,以验证该资源是否存在,是否可被<processManagement>资源的创建者访问。
在步骤S405c中,如果通用服务实体验证成功,通用服务实体应更新processStatus的值为"Enabled"。然后,通用服务实体开始监控<processManagement>资源的activateConditions属性中定义的条件。
在步骤S406a中,通用服务实体确定activateConditions属性中定义的条件是否被满足,或确定activateConditions属性是否为NULL。
在步骤S406b中,在通用服务实体确定activateConditions属性中定义的条件被满足,或确定activateConditions属性为NULL的情况下,将<processManagement>资源的processStatus属性设置为"Activated"值。
如果<AdvancedState>不是NULL,且advancedControl为“True”或“enabled”,则通用服务实体将currentState属性设置为AdvancedState资源中配置的值,然后,通用服务实体将<processManagement>资源的processStatus属性设置为"Activated"。
如果<AdvancedState>为NULL,或advancedAontrol为“NULL”或“disabled”,则通用服务实体也应将currentState属性设置为在initialState属性中配置的值。
此时,通用服务实体可以停止监控activateConditions属性中定义的条件,并开始监控endConditions中定义的条件。
在步骤S407中,如果<AdvancedState>不是NULL,且advancedAontrol为“True”或“enabled”,则主机应从<processManagement>资源的AdvancedState资源所关联的状态开始处理流程中的各个<state>资源。
如果<AdvancedState>为NULL,或advancedAontrol为“NULL”或“disabled”,则通用服务实体应从<processManagement>资源的initialState属性定义的状态开始处理进程中的每个<state>资源。
当<state>资源的对应的<action>的执行条件被满足时,通用服务实体可以评估并执行通过stateAction属性链接到该<state>资源的动作。通用服务实体还应监控在状态的stateTransitions属性中定义的状态转换条件。每当通用服务实体根据当前<state>资源中定义的stateTransitions属性检测到需要进行状态转换时,通用服务实体应以下一个<state>资源的资源标识符更新currentState属性。
例如,进入一个<state>资源时,通用服务实体可以执行以下操作。
首先,通用服务实体应将<processManagement>资源的currentState属性中指示的<state>资源的stateStatus属性值设置为"active"。
接着,当<state>资源被激活时,通用服务实体评估<state>资源的stateAction属性。对于一个<action>资源的evalCriteria属性为NULL(即无条件动作)的<action>资源,通用服务实体应在过渡到<state>资源时立即执行<action>资源定义的相应动作。
对于具有evalCriteria属性不是NULL的<action>资源(即一个有条件的动作),通用服务实体应监控<action>资源的evalCriteria属性,以确定是否/何时触发和执行动作。
当<action>的evalCriteria属性值(也即,执行动作的触发条件)是NULL的时候,就直接进入状态后直接执行相关动作,当evalCriteria属性值不是NULL的时候,进入状态后,则继续监控evalCriteria相关的信息变化。
然后,通用服务实体监控<state>资源的stateTransitions属性中指定的标准。
最后,如果检测到通用服务实体满足了stateTransitions属性中定义的条件之一,通用服务实体应将当前<state>资源的stateStatus更新为"inactive",并以下一个<state>资源的资源标识符更新<processManagement>资源的currentState。然后,通用服务实体应过渡到下一个状态。
如果应用实体指示将processControl的属性值更新为暂停,则通用服务实体将processState属性值更新为Paused,当processControl属 性值更新为Enable的时候,再重新激活这个进程控制,如果processControl属性值更新为Disable,则代表通用服务实体应结束该进程控制。
如果应用实体指示将<processManagement>资源的processControl属性更新为"Disable",通用服务实体应将processStatus属性设置为"Disabled"。通用服务实体应将所有子<state>资源的stateStatus属性设置为"inactive"。通用服务实体应将currentState属性设置为"NULL"。通用服务实体应停止监控在endConditions属性中定义的条件。
如果应用实体指示将processControl的属性值更新为Pause,则通用服务实体将processState属性值更新为Paused,当processControl属性值更新为Enable的时候,再重新激活这个进程控制,如果processControl属性值更新为Disable,则代表通用服务实体应结束该进程控制。
当endConditions中的触发条件达成,或者通用服务实体检测到已经没有后续的状态变更要发生了,通用服务实体应该将processState属性值设置为Completed,并将所有的子<state>资源的stateStatus属性值全部设置为inactive。通用服务实体将currentState设置为NULL,并停止进行监控endConditions中规定的触发条件。
应用实体可以通过指示将进程控制更新为"Enable"来重新启动已经完成的进程。
当processStatus为"Disabled"时,通用服务实体应允许从进程中添加、修改或删除子<状态>资源。否则,主机CSE将拒绝从进程中添加、修改或删除<state>资源的请求。
当processStatus为"Disabled"时,通用服务实体应允许更新<processManagement>资源的activateConditions、endConditions和initialState属性。否则,通用服务实体应拒绝更新这些属性的请求。
只有在processStatus是关闭状态时,通用服务实体才允许子<state>资源的新建更新删除,否则是不允许的。activateConditions,endConditions and initialState属性值同理。
当processStatus从"Disabled"转为"Enabled"时,通用服务实体 应检查所有与进程相关的所需资源是否存在,并且<processManagement>资源的创建者拥有必要的权限,以便在这些资源上执行与进程相关的操作。必要的权限包括对资源的RETRIEVE权限以及CREATE、UPDATE和DELETE权限(如果/如果适用的话)(例如,进程包含一个<action>资源,导致对目标资源进行UPDATE操作)。此外,通用服务实体还应检查<processManagement>资源的创建者是否具有必要的权限,以便在通用服务实体在管理进程期间对所有进程相关资源进行操作。如果在任何时候,通用服务实体确定创建者没有足够的权限,通用服务实体应在进程尚未启用时不启用该进程,并在启用或激活时中止该进程。
图5示出了根据本公开的实施例的利用提前状态资源而进行进程控制的流程图。
例如,在图1C中所示的智能场景中,用户完成如下设置:当温度传感器检测到环境温度大于31摄氏度(例如state_1)时,开启空调(例如,state_1::action_1),并将风扇调节至自然风一档并开启摆头(例如,state_1::action_2),向终端设备(例如手机APP)发送场景触发通知(例如,state_1::action_3)。一小时后,温度传感器再次执行检测,并当温度传感器检测到环境温度小于29摄氏度(例如state_2)时,关闭空调(例如,state_2::action_1),并将风扇调节至自然风四档(例如,state_2::action_2)。并在完成智能场景的设置后,设置并开启提前状态资源,该提前状态资源指示:模拟已达成state_1的触发条件,并且空调已经开启(也即state_1::action_1已经执行完毕)。此时,如果CSE判断advancedcontrol的值为true或enable,则CSE将风扇调节至自然风一档并开启摆头。
此时用户可以确定当前的智能场景设置成功。如果CSE未能成功调节风扇,则说明智能场景设置错误或失败。
图6A至图6D示出了根据本公开的实施例的移动终端设置提前状态资源的界面变化图。图6E示出了根据本公开的实施例的由物联网终端执行的方法60的流程图。该移动终端上安装有物联网管理APP。
根据本公开实施例的方法60包括以下步骤。
在步骤S601中,显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作。
例如,所述显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作还包括:显示物联网智能场景设置界面,所述物联网智能场景设置界面包括已设置的多个物联网进程;以及响应于触发对所述多个物理网进程中的一个物联网进程的选择,显示对所选择的物理网进程进行进一步设置的详细设置页面,并且在所述详细设置页面上显示所述物联网进程中的多个状态以及与所述多个状态相关联的多个动作。
图6A示出了物联网智能场景设置界面的示例,其上显示了多个物联网进程。例如,第一物联网进程可以是锁门后提示用户门已锁。第二物联网进程可以是在完成洗衣后提示用户已经完成洗衣。第三物联网进程可以是:当温度传感器检测到环境温度大于31摄氏度时,开启空调,并将风扇调节至自然风一档并开启摆头,向终端设备(例如手机APP)发送场景触发通知。一小时后,温度传感器再次执行检测,并当温度传感器检测到环境温度小于29摄氏度时,关闭空调,并将风扇调节至自然风四档。用户在长按/点击图1A中的一个进程(例如,虚线框中的区域)即可触发对所述多个物理网进程中的一个物联网进程的选择,此时可以触发是否要对该物联网进程进行进一步设置的对话框。
如图6B所示,用户在触发详细设置页面的显示之后,终端APP将弹出对话框,其询问是否要对该场景设置进一步的预先执行。此时,如果用户点击预先执行按钮,将触发对提前资源的设置。
在步骤S602中,获取调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所述多个状态中的一个状态。
例如,所述获取调整物联网进程的信息还包括:响应于触发对所述物联网进程中的多个状态的一个状态的选择,获取所述调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所选择的状态。
例如,所述获取调整物联网进程的信息还包括:响应于触发对所述物联网进程中的多个动作的一个动作的选择,获取所述调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程处理所选择的动作。
如图6C所示,终端APP根据用户预设的智能场景,罗列出该物联网进程中的分步执行步骤。罗列物联网进程中的分步执行的步骤的界面也即对所选择的物理网进程进行进一步设置的详细设置页面。
如图6D所示,用户屏幕手指上下拖动黑色选框,根据其需要选择预先执行的切入位置,以此触发对所述物联网进程中的多个状态的一个状态的选择或对所述物联网进程中的多个动作的一个动作的选择。以实线框为例,其指示模拟达成温度大于31摄氏度的条件,进而直接开启空调。以虚线框为例,其指示模拟达成空调已开启的条件,进而直接开启风扇调节。通过黑色选框,终端APP获取到调整物联网进程的信息。
在步骤S603中,基于所述调整物联网进程的信息,指示与所述状态相关联的物联网设备执行与所述状态相关联的动作。
例如,所述指示与所述状态相关联的物联网设备执行与所述状态相关联的动作还包括:向物联网的服务网关发送创建提前状态资源的请求,以指示与所述状态相关联的物联网设备执行与所述状态相关联的动作。
由此,本公开的实施例还提供了一种物联网终端,其包括显示器和处理器。其中显示器,被配置为显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作。处理器,被配置为获取调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所述多个状态中的一个状态,以及基于所述调整物联网进程的信息,指示与所述状态相关联的物联网设备执行与所述状态相关联的动作。
图7示出了根据本公开实施例的电子设备700的结构图。
参见图7,电子设备700可以包括处理器701和存储器702。处理器701和存储器702都可以通过总线703相连。虚拟资源转移设备 700可以是塔式服务器、机架服务器(Rack)、刀片服务器(Blade Server)、机柜式服务器等。
处理器701可以根据存储在存储器702中的程序执行各种动作和处理。具体地,处理器701可以是一种集成电路芯片,具有信号的处理能力。上述处理器可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,可以是X86架构或ARM架构的。
存储器702存储有计算机指令,在计算机指令被处理器701执行时实现上述发送跨资源事件通知的方法200。存储器702可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(ROM)、可编程只读存储器(PROM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)或闪存。易失性存储器可以是随机存取存储器(RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(SDRAM)、双倍数据速率同步动态随机存取存储器DDRSDRAM)、增强型同步动态随机存取存储器(ESDRAM)、同步连接动态随机存取存储器(SLDRAM)和直接内存总线随机存取存储器(DR RAM)。应注意,本文描述的方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本公开实施例还提供了一种用于通用服务实体执行的进程控制的装置,包括:接收模块,用于接收创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;创建模块,用于根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源;以及激活模块, 用于对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
本公开实施例提供了一种用于应用实体执行的进程控制的装置,包括:发送模块,用于发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;接收模块,用于接收创建提前状态资源的响应,其中,所述创建提前状态资源的响应指示所述提前状态资源被创建为所述进程管理资源的子资源。
本公开实施例提供了一种用于进程控制的物联网系统,包括应用实体和通用服务实体,所述系统被配置为执行:由应用实体向通用服务实体发送创建进程管理资源的请求;由通用服务实体接收所述创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;由应用实体向通用服务实体发送创建多个状态资源的请求;由通用服务实体接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;由应用实体向通用服务实体发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;由通用服务实体接收创建至少一个动作资源的请求,并根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源;由应用实体向通用服务实体发送用于创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联,并且所述提前状态资源链接至其关联的状态资源的至少一个动作资源;由通用服务实体接收所述创建提前状态资源的请求,并根据所述创建提前状态资源的请求将所述提前状态资源创建为所述进程管理资源的子资源;以及由通用服务实体对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
本公开还提供了一种计算机可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时可以实现上述的方法。类似地,本 公开实施例中的计算机可读存储介质可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。应注意,本文描述的计算机可读存储介质旨在包括但不限于这些和任意其它适合类型的存储器。
需要说明的是,附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
一般而言,本公开的各种示例实施例可以在硬件或专用电路、软件、固件、逻辑,或其任何组合中实施。某些方面可以在硬件中实施,而其他方面可以在可以由控制器、微处理器或其他计算设备执行的固件或软件中实施。当本公开的实施例的各方面被图示或描述为框图、流程图或使用某些其他图形表示时,将理解此处描述的方框、装置、系统、技术或方法可以作为非限制性的示例在硬件、软件、固件、专用电路或逻辑、通用硬件或控制器或其他计算设备,或其某些组合中实施。
在上面详细描述的本发明的示例实施例仅仅是说明性的,而不是限制性的。本领域技术人员应该理解,在不脱离本发明的原理和精神的情况下,可对这些实施例或其特征进行各种修改和组合,这样的修改应落入本发明的范围内。

Claims (21)

  1. 一种由通用服务实体执行的进程控制的方法,包括:
    接收创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联;
    根据所述创建提前状态资源的请求,将所述提前状态资源创建为所述进程管理资源的子资源;以及
    对所述进程管理资源进行处理,并将所述进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
  2. 如权利要求1所述的进程控制的方法,其中,所述创建提前状态资源的请求还包括所述提前状态资源对应的提前控制属性,所述将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符还包括:
    在所述提前控制属性指示启用所述提前状态资源的情况下,将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相对应的值;
    在所述提前控制属性指示禁用所述提前状态资源的情况下,将进程管理资源中的当前状态属性的值设置为与所述进程管理资源的初始状态属性的值。
  3. 如权利要求1所述的进程控制的方法,其中,将所述提前状态资源创建为所述进程管理资源的子资源还包括:
    将与所述提前状态资源相关联的状态资源创建为所述提前状态资源的子资源,其中,所述状态资源通过状态动作属性链接至至少一个动作资源。
  4. 如权利要求1所述的进程控制的方法,其中,将所述提前状态资源创建为所述进程管理资源的子资源还包括:
    将与所述提前状态资源相关联的状态资源的标识符创建为所述提前状态资源的属性,以及
    将所述提前状态资源相关联的状态资源所包括的动作资源的子集创建为所述提前状态资源的子资源。
  5. 如权利要求1所述的进程控制的方法,其中,将所述提前状态资源创建为所述进程管理资源的子资源还包括:
    将与所述提前状态资源相关联的状态资源的标识符以及所述状态资源包括的至少一个动作资源的标识符组成的索引对创建为所述提前状态资源的属性。
  6. 如权利要求1所述的进程控制的方法,其中,将所述提前状态资源创建为所述进程管理资源的子资源还包括:
    创建所述提前状态资源的状态状况属性,其中,所述状态状况属性指示进程管理资源是否正在处理所述提前状态资源,以及,
    创建所述提前状态资源的状态转移属性,其中,所述状态转移属性指示转移至接续状态资源的条件以及接续的状态资源。
  7. 如权利要求1所述的进程控制的方法,其中,在接收到创建提前状态资源的请求之前,还包括:
    接收创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;
    接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;
    接收创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;以及
    根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源。
  8. 如权利要求7所述的进程控制的方法,其中,所述与提前状态资源相关联的状态资源的至少一个动作资源包括目标资源以及目标操作,所述方法还包括:针对所述目标资源触发目标操作。
  9. 一种由物联网终端执行的方法,包括:
    显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作;
    获取调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所述多个状态中的一个状态,以及
    基于所述调整物联网进程的信息,指示与所述状态相关联的物联 网设备执行与所述状态相关联的动作。
  10. 如权利要求9所述的方法,其中,所述显示已设置的物联网进程中的多个状态以及与所述多个状态相关联的动作还包括:
    显示物联网智能场景设置界面,所述物联网智能场景设置界面包括已设置的多个物联网进程;以及
    响应于触发对所述多个物理网进程中的一个物联网进程的选择,显示对所选择的物理网进程进行进一步设置的详细设置页面,并且在所述详细设置页面上显示所述物联网进程中的多个状态以及与所述多个状态相关联的多个动作。
  11. 如权利要求10所述的方法,其中,所述获取调整物联网进程的信息还包括:
    响应于触发对所述物联网进程中的多个状态的一个状态的选择,获取所述调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程进入所选择的状态;或者
    响应于触发对所述物联网进程中的多个动作的一个动作的选择,获取所述调整物联网进程的信息,所述调整物联网进程的信息指示所述物联网进程处理所选择的动作。
  12. 如权利要求10所述的方法,其中,所述指示与所述状态相关联的物联网设备执行与所述状态相关联的动作还包括:
    向物联网的服务网关发送创建提前状态资源的请求,以指示与所述状态相关联的物联网设备执行与所述状态相关联的动作。
  13. 一种用于物联网的进程控制方法,包括:
    由应用实体向通用服务实体发送创建进程管理资源的请求;
    由通用服务实体接收所述创建进程管理资源的请求,并根据所述创建进程管理资源的请求创建进程管理资源;
    由应用实体向通用服务实体发送创建多个状态资源的请求;
    由通用服务实体接收创建多个状态资源的请求,并根据所述创建多个状态资源的请求将所述多个状态资源创建为所述进程管理资源的子资源;
    由应用实体向通用服务实体发送创建至少一个动作资源的请求, 其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应;
    由通用服务实体接收创建至少一个动作资源的请求,并根据所述创建至少一个动作资源的请求,将所述至少一个动作资源链接至其对应的状态资源;
    由应用实体向通用服务实体发送用于创建提前状态资源的请求,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联;
    由通用服务实体接收所述创建提前状态资源的请求,并根据所述创建提前状态资源的请求将所述提前状态资源创建为所述进程管理资源的子资源;以及
    由通用服务实体对所述进程管理资源进行处理,并将进程管理资源中的当前状态属性的值设置为与所述提前状态资源相关联的状态资源的标识符。
  14. 如权利要求13所述的进程控制的方法,其中,所述与提前状态资源相关联的状态资源的至少一个动作资源包括目标资源以及目标操作,所述方法还包括:针对所述目标资源触发目标操作。
  15. 一种由应用实体执行的进程控制的方法,包括:
    发送创建提前状态资源的请求,其中,所述提前状态资源与进程管理资源中的多个状态资源中的一个状态资源相关联;以及
    接收创建提前状态资源的响应,其中,所述创建提前状态资源的响应指示所述提前状态资源被创建为所述进程管理资源的子资源。
  16. 如权利要求15所述的进程控制的方法,其中,所述创建提前状态资源的请求还包括所述提前状态资源对应的提前控制属性,所述提前控制属性指示启用所述提前状态资源或禁用所述提前状态资源。
  17. 如权利要求15所述的进程控制的方法,其中,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符。
  18. 如权利要求15所述的进程控制的方法,其中,所述创建提 前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符、以及动作资源的标识符集合,其中,所述动作资源的标识符集合为所述提前状态资源相关联的状态资源所包括的所有动作资源的标识符的子集。
  19. 如权利要求15所述的进程控制的方法,其中,所述创建提前状态资源的请求包括:与所述提前状态资源相关联的状态资源的标识符、所述状态资源包括的多个动作资源之一的标识符。
  20. 如权利要求15所述的进程控制的方法,其中,所述创建提前状态资源的请求还包括状态转移属性,其中,
    所述状态转移属性指示转移至接续状态资源的条件以及接续的状态资源。
  21. 如权利要求15所述的进程控制的方法,其中,在发送创建提前状态资源的请求之前,还包括:
    发送创建进程管理资源的请求;
    发送创建多个状态资源的请求,其中,所述创建多个状态资源的请求指示所述多个状态资源作为所述进程管理资源的子资源;以及
    发送创建至少一个动作资源的请求,其中,所述至少一个动作资源与所述多个状态资源的中的一个状态资源相对应。
PCT/CN2022/073216 2021-01-26 2022-01-21 由通用服务实体执行的进程控制的方法 WO2022161283A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110105811.8A CN114791848A (zh) 2021-01-26 2021-01-26 进程控制的方法、电子设备和系统
CN202110105811.8 2021-01-26

Publications (1)

Publication Number Publication Date
WO2022161283A1 true WO2022161283A1 (zh) 2022-08-04

Family

ID=82460567

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/073216 WO2022161283A1 (zh) 2021-01-26 2022-01-21 由通用服务实体执行的进程控制的方法

Country Status (2)

Country Link
CN (1) CN114791848A (zh)
WO (1) WO2022161283A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109026558A (zh) * 2018-09-26 2018-12-18 北京金风慧能技术有限公司 风力发电机组的仿真测试平台以及方法
CN109752960A (zh) * 2017-11-08 2019-05-14 中兴通讯股份有限公司 一种智能家居联动控制方法及装置
US10558323B1 (en) * 2015-06-14 2020-02-11 Google Llc Systems and methods for smart home automation using a multifunction status and entry point icon

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10558323B1 (en) * 2015-06-14 2020-02-11 Google Llc Systems and methods for smart home automation using a multifunction status and entry point icon
CN109752960A (zh) * 2017-11-08 2019-05-14 中兴通讯股份有限公司 一种智能家居联动控制方法及装置
CN109026558A (zh) * 2018-09-26 2018-12-18 北京金风慧能技术有限公司 风力发电机组的仿真测试平台以及方法

Also Published As

Publication number Publication date
CN114791848A (zh) 2022-07-26

Similar Documents

Publication Publication Date Title
CN108092861B (zh) 实现设备联动的配置方法、设备联动控制方法及装置
WO2020192301A1 (zh) 设备参数的配置方法、装置和系统、终端设备和计算机可读存储介质
EP3557339A1 (en) Linked control method for internet-of-things gateway and internet-of-things gateway
US20180199386A1 (en) Method, system and device for connecting devices
WO2018107617A1 (zh) 一种权限管理方法、相关设备及系统
EP3905671A1 (en) Method and device for processing request
WO2016065813A1 (zh) 自定义智能设备场景模式的方法和装置
US20220057927A1 (en) Scene-operation method, electronic device, and non-transitory computer readable medium
WO2016058246A1 (zh) 家庭智能网关及智能家居系统
CN107003836B (zh) 用于所连接的消费者设备的灵活设备模板
CN113572799B (zh) 设备接入控制平台的方法、装置和服务器
WO2020168568A1 (zh) 数据处理方法、装置、电子设备及可读存储介质
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
US12032951B2 (en) Techniques for firmware updates with accessories
US20210274309A1 (en) Mobile application and system for associating actions with independent geographic locations
US10085147B2 (en) Configuring network access parameters
WO2022161283A1 (zh) 由通用服务实体执行的进程控制的方法
WO2018133205A1 (zh) 实现增值服务的方法、装置与云服务器
WO2023202678A1 (zh) 设备控制方法、装置、电子设备及存储介质
WO2018086413A1 (zh) 处理操作请求的方法及装置
WO2022161284A1 (zh) 一种订阅应用的方法、设备和介质
WO2021052284A1 (zh) 动作资源的创建方法及执行方法、电子装置和存储介质
CN114280951B (zh) 智能家居设备的控制方法、装置及存储介质
WO2020233488A1 (zh) 创建动作资源的方法、装置、电子设备以及存储介质
WO2020088654A1 (zh) 一种应用程序的管理方法、装置及用户终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22745158

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22745158

Country of ref document: EP

Kind code of ref document: A1