ACTION RESOURCE CREATION METHOD, EXECUTION METHOD, ELECTRONIC DEVICE, AND STORAGE MEDIUM
By creating conflict priority and effective time attributes for action resources, the conflict problem between multiple action resources in smart homes against the same target resource is solved, which improves control efficiency and simplifies conflict judgment.
Patent Information
- Application Number
- JP2022517915
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-20
- Filing Date
- 2020-09-14
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-09-14
AI Technical Summary
In a smart home environment, multiple different applications issue conflicting operation instructions on the same target resource, making it difficult for the service platform to effectively control the target resource and the conflict judgment is complex.
By creating conflict priority attributes and valid time attributes for each action resource, the priority and occupancy time range of the action resource are determined, so that actions with high priority or long occupancy time are judged and performed in conflict situations.
It effectively solves the conflict problem between multiple action resources on the same target resource, improves the efficiency of the service platform's control over the target resource, and simplifies the conflict judgment process.
Smart Images

Figure 0007671741000007 
Figure 0007671741000008 
Figure 0007671741000009
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for creating an action resource, a method for executing an action resource, an electronic device, and a storage medium.
[0002] Priority information This application claims priority from Chinese Patent Application No. 201910894808.1, filed on September 20, 2019. The entire text of this application is incorporated herein by reference in its entirety.
[0003] SUMMARY OF THE DISCLOSURE Embodiments of the present disclosure relate to a method for creating an action resource, a method for performing an action, an electronic device, and a computer-readable storage medium. [Background technology]
[0004] With the rapid development of Internet of Things technology in various application fields, many devices are connected to the Internet of Things, and various new application fields such as smart home, smart transportation, smart health, etc. emerge. Internet of everything is the trend of the development of Internet of Things. In the Internet of Things system, an application entity, which is an application program, can deploy its service to a general-purpose service entity, which is a service platform. After the service of the application program is deployed on the service platform, the process of realizing the service of the application program does not require the participation of the application program, and the operation of the service can be directly realized on the service platform. The service platform provides public service functions to multiple different application programs of different manufacturers, and realizes the network connection between multiple different application programs through the service platform, thereby realizing the Internet of Everything. Summary of the Invention
[0005] At least one embodiment of the present disclosure provides a method for creating an action resource, comprising: receiving a first creation request including a target resource; and creating a first action resource for triggering a first action on the target resource based on the first creation request, wherein the creating the first action resource comprises creating at least one of a first conflict priority attribute and a first conflict priority effective time attribute for the first action resource, wherein the first conflict priority attribute represents a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource, and the first conflict priority effective time attribute represents a time range during which the first action resource will occupy the target resource.
[0006] For example, in a method provided by one embodiment of the present disclosure, the step of creating the first action resource further includes the step of creating a first collision target resource attribute and a first collision target action attribute for use in the first action resource, wherein the first collision target resource attribute represents an identification code of the target resource, and the first collision target action attribute represents an action that collides with the first action.
[0007] For example, in a method provided by one embodiment of the present disclosure, the step of creating the first action resource further includes the step of creating a first collision target resource attribute and a first collision target action attribute to be used in the first action resource, wherein the first collision target resource attribute represents an identification code of the target resource, the first collision target action attribute represents an action that collides with the first action, and the first action resource includes a collision strategy sub-resource, wherein the collision strategy sub-resource includes at least one of the first collision priority attribute and the first collision priority effective time attribute, the first collision target resource attribute, and the first collision target action attribute.
[0008] For example, in a method provided by one embodiment of the present disclosure, the step of creating the first action resource further includes the step of creating a first action state attribute for use in the first action resource, the first action state attribute representing a state of the first action.
[0009] For example, in a method provided by one embodiment of the present disclosure, the step of creating the first action resource further includes the step of creating a first action time attribute used for the first action resource, the first action time attribute being used to indicate a time parameter associated with the first action.
[0010] For example, in a method provided by one embodiment of the present disclosure, the time parameters associated with the first action include at least one of a duration after performing the first action, a start time for performing the first action, and an end time for performing the first action.
[0011] At least one embodiment of the present disclosure further provides a method for performing an action, comprising: determining a first action resource for triggering a first action on a target resource, the first action resource including a first conflict priority attribute, the first conflict priority attribute representing a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource; receiving a first data resource; and determining a second action resource that conflicts with the first action resource based on the first data resource satisfying a first trigger condition, the second action resource being a resource for triggering a second action on the target resource, and The second action resource includes a second collision priority attribute and a second collision priority effective time attribute, the second collision priority attribute representing a priority of the second action resource relative to an action resource that conflicts with the second action resource and is directed to the target resource, and the second collision priority effective time attribute representing a time range during which the second action resource monopolizes the target resource; a step of acquiring an attribute value of the first collision priority attribute, an attribute value of the second collision priority attribute, and an attribute value of the second collision priority effective time attribute to determine whether a collision judgment condition is satisfied; and a step of executing the first action on the target resource if the collision judgment condition is satisfied, and not executing the first action if the collision judgment condition is not satisfied.
[0012] For example, in an execution method provided by one embodiment of the present disclosure, satisfying the collision judgment condition includes: an attribute value of the first collision priority attribute takes precedence over an attribute value of the second collision priority attribute; or an occupancy time of the second action resource for the target resource is equal to or greater than an attribute value of the second collision priority effective time attribute; or an attribute value of the first collision priority attribute takes precedence over an attribute value of the second collision priority attribute and an occupancy time of the second action resource for the target resource is equal to or greater than an attribute value of the second collision priority effective time attribute.
[0013] For example, in an implementation method provided by an embodiment of the present disclosure, the step of determining whether an attribute value of the first collision priority attribute, an attribute value of the second collision priority attribute, and an attribute value of the second collision priority effective time attribute satisfy a collision determination condition includes a step of determining whether an attribute value of the first collision priority attribute is prioritized over an attribute value of the second collision priority attribute, and determining that the collision determination condition is satisfied if the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute; and a step of determining that the collision determination condition is satisfied if the attribute value of the first collision priority attribute is not prioritized over the attribute value of the second collision priority attribute. and acquiring an occupation time of the second action resource for the target resource, determining whether the occupation time of the second action resource for the target resource is greater than an attribute value of the second collision priority effective time attribute, determining that the collision judgment condition is satisfied if the occupation time of the second action resource for the target resource is greater than or equal to the attribute value of the second collision priority effective time attribute, and determining that the collision judgment condition is not satisfied if the occupation time of the second action resource for the target resource is less than the attribute value of the second collision priority effective time attribute.
[0014] For example, in an execution method provided by one embodiment of the present disclosure, the second action resource further includes a second action time attribute, and the step of obtaining the occupancy time of the second action resource on the target resource includes the step of obtaining an attribute value of the second action time attribute as the occupancy time of the second action resource on the target resource.
[0015] For example, in an execution method provided by one embodiment of the present disclosure, the step of determining the second action resource that conflicts with the first action resource includes the steps of determining a candidate action resource list based on the target resource and the first action, where a candidate target resource corresponding to each candidate action resource in the candidate action resource list is the same as the target resource, and a candidate action of each candidate action resource conflicts with the first action; selecting at least one candidate action resource from the candidate action resource list; obtaining an execution status of the at least one candidate action resource; determining that the execution status of the at least one candidate action resource has already been executed, and setting the at least one candidate action resource as the second action resource.
[0016] For example, in an implementation method provided by an embodiment of the present disclosure, the first action resource includes a collision strategy sub-resource including the first collision priority attribute, a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute, the first collision priority effective time attribute represents a time range during which the first action resource occupies the target resource, the first collision target resource attribute represents an identification code of the target resource, and the first collision target action attribute represents an action that collides with the first action, and the step of determining the second action resource that collides with the first action resource includes obtaining the first collision target resource attribute and the first collision target action attribute, and determining the first collision target resource attribute and the first collision target action attribute. The method includes: determining a candidate action resource list based on a target resource attribute and the first collision target action attribute, wherein an identification code of a candidate target resource corresponding to each candidate action resource in the candidate action resource list is the same as the first collision target resource attribute, and a candidate action of each candidate action resource is the same as the first collision target action attribute; selecting at least one candidate action resource from the candidate action resource list; obtaining an execution status of the at least one candidate action resource; determining that the execution status of the at least one candidate action resource has already been executed, and setting the at least one candidate action resource as the second action resource.
[0017] For example, in an execution method provided by one embodiment of the present disclosure, each of the candidate action resources includes an action state attribute, and the step of acquiring an execution status of the at least one candidate action resource includes a step of acquiring an attribute value of the action state attribute of the at least one candidate action resource as the execution status of the at least one candidate action resource.
[0018] For example, in the execution method provided by one embodiment of the present disclosure, the first action and the second action conflict with each other.
[0019] For example, in the implementation method provided by one embodiment of the present disclosure, the first action and the second action are reversed.
[0020] At least one embodiment of the present disclosure further provides a method for performing an action, the method including: determining a first action resource for triggering a first action on a target resource, the first action resource including a first conflict priority attribute, the first conflict priority attribute representing a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource; receiving a first data resource; and determining a second action resource that conflicts with the first action resource based on the first data resource satisfying a first trigger condition, the second action resource being triggered by the first data resource. The method includes a step of: acquiring an attribute value of the first collision priority attribute and an attribute value of the second collision priority attribute to determine whether a collision judgment condition is satisfied; and a step of executing the first action on the target resource if the collision judgment condition is satisfied, and not executing the first action on the target resource if the collision judgment condition is not satisfied.
[0021] At least one embodiment of the present disclosure further provides an electronic device, comprising: a memory for non-temporarily storing computer-readable instructions; and a processor for executing the computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, a method for creating an action resource according to any of the above embodiments is performed.
[0022] At least one embodiment of the present disclosure further provides an electronic device, comprising: a memory for non-transiently storing computer-readable instructions; and a processor for executing the computer-readable instructions, the computer-readable instructions, when executed by the processor, causing the processor to perform the method of performing any of the above embodiments.
[0023] At least one embodiment of the present disclosure further provides a computer-readable storage medium that non-transiently stores computer-readable instructions, which, when executed by a computer, cause the computer to perform the method for creating an action resource according to any of the above embodiments or the method for performing an action according to any of the above embodiments.
[0024] In order to more clearly describe the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments are briefly described below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, and are not limitations on the present disclosure. [Brief description of the drawings]
[0025] [Figure 1A] 1 discloses a schematic architecture diagram of an Internet of Things provided by an embodiment of the present disclosure. [Figure 1B] 1 illustrates a schematic diagram of a server / client device provided by an embodiment of the present disclosure. [Figure 1C] 1 illustrates a schematic diagram of one example of an action resource provided by some embodiments of the present disclosure. [Diagram 2]FIG. 1 is a schematic diagram of a smart home scenario in an Internet of Things environment provided by some embodiments of the present disclosure. [Diagram 3] 1 illustrates a flowchart of a method for creating an action resource provided by some embodiments of the present disclosure. [Figure 4] 1 illustrates a schematic diagram of a first action resource provided by some embodiments of the present disclosure. [Diagram 5] 1 illustrates a schematic diagram of a trigger process of a first action resource and a second action resource provided by some embodiments of the present disclosure; [Figure 6A] 13 shows a schematic diagram of another first action resource provided by some embodiments of the present disclosure; [Figure 6B] 1 illustrates a schematic diagram of a collision strategy sub-resource within a first action resource provided by some embodiments of the present disclosure; [Figure 7] 13 illustrates a schematic diagram of another first action resource provided by some embodiments of the present disclosure. [Figure 8] 1 shows a schematic diagram of a method for performing actions provided by some embodiments of the present disclosure. [Figure 9] FIG. 1 illustrates a schematic diagram of one example of performing a trigger operation on a target resource provided by some embodiments of the present disclosure. [Figure 10] 1 is a schematic diagram of an electronic device provided in accordance with some embodiments of the present disclosure. [Figure 11] 1 is a schematic diagram of a computer-readable storage medium provided in accordance with some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0026] In order to clarify the objectives, technical means and advantages of the present invention, exemplary embodiments of the present invention will be described in detail below with reference to the drawings. It is clear that the described embodiments are only some embodiments of the present invention, and are not all embodiments of the present invention. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts are within the protection scope of the present disclosure.
[0027] Unless otherwise defined, technical or scientific terms used in this disclosure shall have their ordinary meaning as understood by those of ordinary skill in the art to which this disclosure belongs. The words "first", "second" and similar words used in this disclosure do not indicate order, quantity, or importance, but are used only to distinguish different components. Similar words such as "comprise" or "have" mean that the element or object preceding the word is equivalent to the element or object listed after the word, and do not exclude other elements or objects. Similar words such as "connected" and "coupled" are not limited to physical or mechanical connections, but include electrical connections, which may be direct or indirect. "Top", "bottom", "left", "right", etc. are used only to indicate relative positional relationships, and if the absolute position of the described objects is changed, the relative positional relationships may change accordingly.
[0028] To keep the following description of the embodiments of the present disclosure clear and concise, detailed descriptions of some known features and components are omitted.
[0029] The Internet of Things is an extension of the Internet, including the Internet and all resources on the Internet, and is compatible with all applications of the Internet. The Internet of Things uses communication technologies such as local networks and the Internet to connect sensors, controllers, machines, people, objects, etc. in new ways, and to improve the communication between people and things, and between things and things.
[0030] With the development of Internet of Things technology, many different terminal devices (e.g., carbon monoxide detectors, smoke alarms, fire alarms, air detectors, etc.) are accessed by an Internet of Things platform. The Internet of Things platform can be implemented as a Common Service Entity (CSE), for example, and the terminal device can connect to the Common Service Entity by sending registration information to the Common Service Entity, which accesses the Common Service Entity to manage the terminal device. The terminal device can be represented as an Application Entity (AE), and the Application Entity accessing the Common Service Entity can perform operations such as data transmission and information interaction with the Common Service Entity.
[0031] It should be noted that the application entity described in this specification may be a terminal device of the Internet of Things or a software module in the device. The application entity and the generic service entity are logical entities, a physical device includes a logical entity, a simple terminal device includes only an application entity, a complex terminal device includes an application entity and a generic service entity, and a server includes at least a generic service entity and can include an application entity. The difference between the generic service entity included in the terminal device and the generic service entity included in the server is the difference in function, and the function included in the generic service entity of the server includes more functions such as device management.
[0032] FIG. 1A discloses a schematic architecture diagram of the Internet of Things provided by an embodiment of the present disclosure. As shown in FIG. 1A, various terminal client devices access a network and access a generic service layer through the network, while the generic service layer supports various applications, forming a terminal+network+application architecture. For example, in the field of intelligent home, various home devices can access the generic service layer by using a local area network (LAN), and such local area network access can adopt a method such as wireless or wired. Optionally, the local area network can be a personal area network (PAN), for example, a wireless personal area network (WPAN) can be used to realize access using various technologies such as Bluetooth, IrDA, Home RF, ZigBee, or UWB (Ultra-Wideband Radio);
[0033] In the present disclosure, the described entities, such as application entity AE, generic service entity CSE, and data, can all be represented by resources. A resource can have a unique identifier including attributes, and can further include sub-resources depending on the situation, in which the attributes are used to store information related to the resource, the sub-resources are the next level resources of the resource, and the resources include indexes pointing to the sub-resources.
[0034] For example, different action resources can be provided for the same target resource (i.e., target object) in different situations according to different usage scenarios. The trigger conditions of the action resources provided for the same target resource may be different, and the actions provided for the target resource may be the same or different. The action resource shown in the following FIG. 1C is just a schematic example, and in fact, those skilled in the art can provide any action trigger event according to the actual situation. In some embodiments, the action trigger event can be divided into a location event (a specific location is provided to generate an event), a time event (a specific time is provided to generate an event), an operation event (a specific operation is provided to generate an event), and a user event (e.g., sensing the presence of a specific user), etc.
[0035] For example, in some examples, the operations for a lamp may include on and off. For example, a lamp may be turned on if a master is detected waking up during the night or while sleeping. A lamp may be turned off if a master is detected lying down in bed during the night or while sleeping. Also, for example, a window may be turned on if clear weather, a gas leak, or a smoke alarm is detected. A window may be turned off if cloudy, rainy, or snowy is detected.
[0036] In some implementations, an action resource can also target multiple target resources, for example, multiple target resources (e.g., air conditioners, air purifiers, lamps, etc.) can be controlled to turn on when a location sensor detects the presence of a person within a certain range.
[0037] In another embodiment, the action resource can provide multiple trigger conditions for the action of the target resource, for example, the air conditioner can be controlled to be turned on or off when a temperature sensor detects that the temperature is higher or lower than a preset temperature threshold and a human body sensor detects that there is a person in the room.
[0038] In a complex usage environment (such as a smart home scenario), it is necessary to provide multiple different action resources for each application device to improve the user's usage experience. This allows each application device to perform appropriate functions in different usage environments. Therefore, in a smart home scenario, there may be multiple different action resources for the same target resource. Therefore, a situation may occur in which action instructions conflict simultaneously or successively for the same target resource. For example, in rainy weather, the server controls the window to be turned off, but at the same time, if the smoke alarm detects an excessive content of smoke in the air, the server controls the window to be turned on. In such a case, if the smoke content in the air is detected first, the server controls the window to be turned on, and if rain is detected later, the server controls the window to be turned off.
[0039] It is understood that if the smoke alarm detects that the smoke content in the air exceeds the standard, it means that an emergency such as a fire may occur in the room. In such a case, if the server detects rain and turns off the window, it may bring danger to people in the room. Also, if the trigger conditions of two different actions on the same target resource are met at the same time, it will be difficult for the server to realize effective control of the target resource.
[0040] 1B shows a schematic diagram of a server / client device provided by an embodiment of the present disclosure. In an Internet of Things system, a server can be used to realize the above-mentioned service platform, and a client device can be used to realize the above-mentioned terminal device.
[0041] The computer device shown in FIG. 1B can realize the server device or client device disclosed in the present disclosure. Such computers can include personal computers, laptops, tablets, mobile phones, personal digital assistance (PDA), smart glasses, smart watches, smart rings, smart helmets, and any smart portable or wearable devices. In some embodiments, the architecture of the computer device shown in FIG. 1B can also be used to realize various smart home terminal devices in the Internet of Things system, such as smart switches, smart gateways, smart rice cookers, and smart purifiers. The specific system of this embodiment uses a functional block diagram to show a hardware platform including a user interface. Such a computer device may be a general-purpose computer device or a dedicated computer device. The two types of computer devices can realize the server device or the client device of this embodiment. The computer system can implement any components currently described to provide information required for Internet of Things communication. For example, the computer system can be implemented by a computer device through its hardware devices, software programs, firmware, and combinations thereof. For convenience, only one computer device is depicted in FIG. 1B, but the related computer functions described in this embodiment to provide information required for Internet of Things communication can be implemented in a distributed manner by a series of similar platforms to distribute the processing load of the computer system.
[0042] As shown in FIG. 1B, the computer system may include a communication port 250 to which a network for realizing data communication is connected. The computer system may further include a processor group 220 for executing program instructions. The processor group 220 may be composed of at least one processor (e.g., CPU). The computer system may include an internal communication bus 210. The computer system may include various forms of program storage units and data storage units, such as various data files used for various computer processing and / or communication, program instructions executed by the processor 220. The computer system may include an input / output component 260 for supporting input / output data flow between the computer system and other components (e.g., user interface 280). The computer system may send and receive information and data via the communication port 250.
[0043] In some embodiments, the computer system described above can be used to configure a server in an Internet of Things communication system. The server in the Internet of Things communication system can be a server hardware device or a server group. The various servers in the server group can be connected via a wired or wireless network. The server group can be centralized, such as a data center. The server group can be distributed, such as a distributed system.
[0044] The computing system provided in FIG. 1B may be used to realize a client application entity AE, a client generic service entity CSE, a server application entity AE, and / or a server generic service entity CSE according to the present disclosure.
[0045] FIG. 1C illustrates an action resource ( <action>) is a schematic diagram of one example.
[0046] Taking the oneM2M protocol architecture as an example, the entities may be all entities in the oneM2M system, such as M2M (Machine to Machine) devices, M2M gateways, M2M application layers, etc. In the oneM2M architecture, resources may be uniquely addressable, and may represent such resources and specify the structure of the resources. As shown in FIG. 1C, an action resource may include at least one attribute and / or sub-resource. For example, an action resource <action>The action priority attribute (actionPriority) indicates the priority of the action resource, the subject resource address attribute (actionSubjectResource) indicates the detection target object of the action resource, the subject resource identifier attribute (SubjectResourceID) indicates the detection target object of the action resource, and the evaluation rule attribute (evalCrit eria) which indicates the trigger mode of the action resource, a trigger mode control attribute (evalControlParam) which indicates the trigger mode of the action resource, a target identifier attribute (objectResourceID) which indicates the control target of the action resource, an action attribute (activePrimitive) which indicates the action method of the action resource, an input attribute (input) which indicates the action parameter of the action resource, an output resource identifier attribute (outputResourceID) which indicates the action result of the action resource, an action result attribute (actionResult) which indicates the action result of the action resource, and a dependent sub-resource ( <dependency>For example, an action resource may further include multiple dependent sub-resources.
[0047] The action priority indicates the priority between multiple action resources triggered by the same trigger condition. For example, when the carbon monoxide concentration in the air is greater than a preset threshold, it is possible to control all of the windows and doors to be turned on. The action priority indicates the priority between an action resource corresponding to the control of opening a window and an action resource corresponding to the control of opening a door, that is, the order of precedence. For example, an action priority for which the action resource of the target resource is a window takes precedence over an action priority for which the action resource of the target resource is a door, and when the carbon monoxide concentration in the air is greater than a preset threshold, first the window is controlled to be turned on, and then the door is controlled to be turned on.
[0048] For example, the subject resource attribute of the action resource may be updated in a predefined manner. For example, an application entity registered with a server transmits information to the server periodically, in real time, or in response to the occurrence of a predefined event to update the subject resource attribute. If the information received from the application entity satisfies an action trigger condition of the action resource, a target resource corresponding to a target identifier attribute for the action resource executes a predefined action. In this specification, the subject resource attribute may also be abbreviated to a subject resource.
[0049] In some embodiments, the evaluation rule attribute may include at least one trigger condition, and the dependent sub-resource may include at least one dependency condition. When the action resource shown in FIG. 1C satisfies the trigger condition included in the evaluation rule attribute and the dependency condition included in the dependent sub-resource, it executes a preset action on the target resource corresponding to the target identifier attribute, i.e., the action defined in the action attribute.
[0050] Although a schematic example of implementing an action resource is provided in the present disclosure, those skilled in the art can understand that other manners can also be used to provide the above action resource according to different actual situations.
[0051] FIG. 2 is a schematic diagram of a smart home scenario in an Internet of Things environment provided by some embodiments of the present disclosure.
[0052] For example, take a smart home scenario as an example, in which three application entities are provided, namely, a door window control device, a gas monitoring device (for example, provided by a smart security provider), and an air monitoring purification device (for example, provided by a smart home appliance provider). It can be understood that when there are multiple intelligent control devices in a smart home Internet of Things environment, the application entity can deploy multiple services on the same target resource (i.e., target object). That is, create multiple action resources for the same target resource, and the multiple actions performed on the target resource of the multiple action resources and the trigger conditions of the multiple actions may be different.
[0053] As shown in FIG. 2, the application entity is provided corresponding to the application layer, and the generic service entity is provided in the service layer (i.e., Internet of Things platform). The actions provided by the gas monitoring device and the air monitoring and purification device through the service layer both act on the door window control device. The gas monitoring device can request the generic service entity to create an action resource 1, which represents that when the gas monitoring device detects the carbon monoxide concentration in the air through the carbon monoxide sensor and the carbon monoxide concentration exceeds a preset threshold (e.g., 20%), the generic service entity triggers the door window control device to open the window (or door) to ventilate and reduce the concentration of flammable gas (e.g., carbon monoxide). The air monitoring and purification device requests the generic service entity to create an action resource 2, which represents that the air monitoring and purification device uses an air quality monitoring sensor (e.g., a smog sensor) to detect the concentration of PM2.5 (smog) in the air, and when the concentration of PM2.5 exceeds a preset threshold, the generic service entity can trigger the door and window controller to close the window (or door), and then start the air purification device to achieve a reduction in the concentration of PM2.5 in the air. Although the above two action resources are for the same execution unit (i.e., the door and window controller), the action resource 1 controls the door and window controller to perform the operation of turning on the door and window, and the action resource 2 controls the door and window controller to perform the operation of turning off the door and window, and the action resource 1 and the action resource 2 may conflict with each other. Here, the conflict can be represented as follows: first, two action resources need to be triggered at the same time, and the two operations controlled and performed by the door window control device are opposite; and second, another action resource is triggered after one action resource, but the specific effect actually produced by the other action resource is opposite to the effect that the one action resource needs to achieve.
[0054] The embodiments of the present disclosure provide a method for creating an action resource, a method for executing an action, an electronic device, and a computer-readable storage medium, in which the method for creating an action resource can increase at least one of a conflict priority attribute and a conflict priority effective time attribute in the action resource to solve the conflict problem of the action resource.
[0055] It should be noted that in the embodiment of the present disclosure, both the method of creating an action resource and the method of executing an action are performed by a generic service entity. Flowcharts are used in the present disclosure to describe steps of the method according to the embodiment of the present disclosure. It can be understood that the previous or subsequent steps do not necessarily occur in exact order. Conversely, various steps can be processed in reverse order or simultaneously. At the same time, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0056] 3 shows a flowchart of a method for creating an action resource provided by some embodiments of the present disclosure. For example, take a smart home usage environment as an example, the above general-purpose service entity can be realized as a home management server, and the application entity (application program) can be realized as a home management application (e.g., carbon monoxide sensor, temperature sensor, door window sensor, etc.).
[0057] For example, as shown in FIG. 3, in some embodiments, a method for creating an action resource may include S101 to S102. S101: Receive a first create request that includes a target resource. S102: Create a first action resource based on the first creation request, where the first action resource is a first action resource for triggering a first action on a target resource.
[0058] For example, the first create request is used to request the generic service entity to create a first action resource.
[0059] For example, the target resource may be a window, a door, an air cleaner, a lamp, an air conditioner, etc.
[0060] It should be noted that in some embodiments provided by the present disclosure, an action performed on a window is taken as an example, that is, the target resource is a window, and the generic service entity can send a notification to a window controller to control the opening and closing of the window. In the present disclosure, "triggering a first action" can represent triggering and executing the first action.
[0061] For example, the first action may include any operation, such as an on operation, an off operation, an operation to reveal a lamp, an operation to dim a lamp, an operation to increase temperature, an operation to decrease temperature, etc. In addition, in the present disclosure, when the target resource is an air conditioner, if an action to turn on the cooling of the air conditioner needs to be performed, the first action may include an operation to turn on the air conditioner and an operation to set the air conditioner in a cooling mode. That is, in the present disclosure, an operation corresponding to an action resource may include multiple operations on the target resource, and may ultimately reach a preset effect. For example, in the above example, the first action may include two operations, namely, an operation to turn on the air conditioner and an operation to set the air conditioner in a cooling mode, and may realize the effect of turning on the air conditioner cooling.
[0062] For example, if a first trigger condition is met, a first action can be triggered for the target resource, and the first trigger condition can be set according to the actual situation. For example, in some examples, the first trigger condition may be various conditions such as the concentration of carbon monoxide is higher than a preset threshold, the concentration of PM2.5 exceeds a preset threshold, the brightness of the indoor lamp is higher or lower than a preset threshold, the user is detected within a certain range (e.g., in the bedroom, in the living room, etc.), the temperature is higher / lower than a preset temperature threshold, etc.
[0063] For example, the first creation request may be sent by an application entity (eg, an air detection device) to the generic service entity, or may be created by a user at the generic service entity to the application entity.
[0064] For example, when an application entity wants to deploy an action on the service platform, it can send a request to create an action resource of this action to the service platform, and a generic service entity deployed on the service platform can create the action resource. For example, in some examples, the first action resource is a resource for triggering a window (i.e., a first action) to be turned off (i.e., a window) (i.e., a target resource), for example, the first action resource represents a resource of "performing an off operation on a window when it is detected that the PM2.5 concentration in the air is higher than a preset threshold A (e.g., 100, 150, etc.)", the first trigger condition is that the PM2.5 concentration is higher than the preset threshold A, the target resource is a window, and the first action is to turn off the window. The preset threshold A can be set according to actual application needs. For example, the application entity may send a first creation request to a generic service entity (e.g., a home management server), and after the generic service entity passes identity verification of the application entity, may configure a first action resource in the generic service entity to perform an off operation on a window when it is detected that the PM2.5 concentration in the air is higher than a preset threshold A. For example, the PM2.5 concentration in the air may be detected by an air quality monitoring sensor registered in the service platform, and the off operation on the window may be performed in a window controller registered in the service platform.
[0065] For example, as shown in FIG. 3, in step S102, creating a first action resource includes step S1021 of creating at least one of a first collision priority attribute and a first collision priority validity time attribute to be used in the first action resource.
[0066] In the embodiments of the present disclosure, by using the collision priority and collision priority effective time of action resources, a low priority action does not affect the execution of a high priority action, and after the execution of a high priority action exceeds the collision priority effective time of the high priority action, the low priority action, i.e., the same target resource, is operated, thereby avoiding mutual collisions between different action resources and improving the execution efficiency of the actions.
[0067] FIG. 4 shows a schematic diagram of a first action resource provided by some embodiments of the present disclosure.
[0068] For example, as shown in Figure 4, the first action resource ( <action1>) may include a first conflict priority attribute (conflictPriority). The first conflict priority attribute represents the priority of the first action resource with respect to an action resource that conflicts with the first action resource and is directed to a target resource. That is, in the present disclosure, the conflict priority attribute is the priority (i.e., execution order) of multiple action resources with respect to the same target resource, and the multiple action resources conflict with each other. Note that the number of action resources that conflict with the first action resource may be one or more. Also, there may be no action resource that conflicts with the first action resource. That is, the multiple action resources other than the first action resource arranged in the generic service entity may not all conflict with the first action resource.
[0069] For example, the first collision priority attribute may be preset according to an actual application scenario. When creating an action resource, a priority of the action resource may be determined based on a target resource and a rule included in a creation request for the action resource. In one example, the priority of an action resource corresponding to a safety device may be set to the highest, the priority of an action resource corresponding to a protection device may be set to the next highest, and the priority of an action resource corresponding to a health device may be set to the lowest. For example, the safety device may refer to a carbon monoxide sensor, a smoke alarm, etc. The protection device may refer to a smog sensor, etc., and the health device may refer to a temperature sensor, etc.
[0070] For example, in the embodiment of the present disclosure, the collision priority attribute can be expressed in the form of a natural number. For example, the smaller the value of the collision priority attribute, the higher the collision priority. For example, when the value of the collision priority attribute of an action resource is 1, it represents that the collision priority of the action resource is the highest. Those skilled in the art can understand that the magnitude of the collision priority can be set in any manner without departing from the principles of the present disclosure. For example, the larger the value of the collision priority attribute, the higher the collision priority. At this time, when the value of the collision priority attribute of an action resource is 1, it represents that the collision priority of the action resource is the lowest.
[0071] It should be noted that the present disclosure also provides conflict priority attributes for multiple action resources that correspond one-to-one to multiple different target resources.
[0072] For example, as shown in Fig. 4, the first action resource may further include a first conflict priority effective time attribute (conflictSafeTime). In the present disclosure, the conflict priority effective time represents a safe action time set after comparing conflict priorities between action resources with the same target resource.
[0073] For example, the first conflict priority effective time attribute represents the time range in which the first action resource monopolizes the target resource. In the present disclosure, for the first action resource, the "exclusive time range" represents the time range in which the first action resource monopolizes the target resource with respect to the remaining action resources with a lower priority than the first action resource. That is, within the time range, any action resource with a lower priority than any first action resource cannot operate the target resource. Note that all high priority actions and low priority actions are not all continuous actions, and most actions are momentary instruction actions, and the application entity can accept the instruction and maintain the state after the instruction is executed. The main function of the conflict priority effective time attribute is that the instruction of the low priority action is used to break through the restriction of the instruction of the high priority action, and gives the instruction of the high priority action a certain effective time, and within the effective time range, the instruction of the high priority action has exclusivity to the target object (i.e., the target resource), and when the effective time range is exceeded, the high priority action no longer has exclusivity to the target object, and the low priority action issues an instruction to execute the corresponding action on the target object, and this effective time is the conflict priority effective time. The first collision priority effective time attribute can also be preset according to an actual application scenario.
[0074] FIG. 5 illustrates a schematic diagram of a trigger process of a first action resource and a second action resource provided by some embodiments of the present disclosure.
[0075] For example, in some examples, a second action resource is further disposed in the generic service entity, the second action resource triggers a resource of a second action on the target resource, and the second action resource conflicts with the first action resource. For example, the second action resource is a resource that triggers an ON operation on a window (i.e., the second action includes an ON operation), for example, when it is detected that the concentration of carbon monoxide in the air is higher than a preset threshold B (e.g., 20%), the ON operation is performed on the window. The second action resource may include a second conflict priority attribute and a second conflict priority effective time attribute, where the second conflict priority attribute represents the action resource priority of the second action resource that conflicts with the second action resource and is directed to the target resource, and the second conflict priority effective time attribute represents the time range during which the second action resource occupies the target resource. For example, the first action resource is a resource that triggers an OFF operation on a window (i.e., the first action includes an OFF operation), and performs an OFF operation on the window when, for example, it is detected that the concentration of PM2.5 in the air is higher than a preset threshold (e.g., 150). That is, the target resource of the first action resource and the target resource of the second action resource are the same, for example, the target resource of the first action resource and the target resource of the second action resource are both windows, but the first action and the second action conflict with each other, for example, the first action may be to turn off the window, and the second action may be to turn on the window.
[0076] In addition, in the present disclosure, "the second action resource and the first action resource conflict" can mean that the target resource of the first action resource and the target resource of the second action resource are the same, and the first action corresponding to the first action resource and the second action corresponding to the second action resource conflict with each other.
[0077] For example, as shown in FIG. 5, on the time axis t, time t1 precedes time t2, and time t2 precedes time t3.
[0078] In some examples, as shown in FIG. 5, at time t1, the second action resource is first triggered to execute the second action, i.e., execute an ON operation on the window. At time t2, the first action resource is triggered, and if the collision priority of the second action resource takes precedence over the collision priority of the first action resource, and the interval time between time t1 and time t2 (e.g., the interval time between time t1 and time t2 is 40 hours) is less than the time represented by the second collision priority effective time attribute corresponding to the second action resource (e.g., 72 hours (h)), the first action corresponding to the first action resource cannot be executed. At time t3, the first action resource is triggered, and if the interval time between time t1 and time t3 (e.g., the interval time between time t1 and time t3 is 80 hours) is greater than the time represented by the second collision priority effective time attribute corresponding to the second action resource, the first action corresponding to the first action resource can be executed, i.e., execute an OFF operation on the window.
[0079] In another example, at time t1, the second action resource is triggered first to execute the second action, i.e., execute an ON operation on the window. At time t2, the first action resource is triggered, and if the collision priority of the first action resource is earlier than the collision priority of the second action resource, i.e., the priority represented by the first collision priority attribute is earlier than the priority represented by the second collision priority attribute, then the first action corresponding to the first action resource can be executed, i.e., execute an OFF operation on the window.
[0080] In yet another example, at time t1, the second action resource is triggered first to execute the second action, i.e., execute an ON operation on the window. At time t2, the first action resource is triggered, and if the collision priority of the second action resource takes precedence over the collision priority of the first action resource and the interval time between time t1 and time t2 is greater than the time represented by the second collision priority effective time attribute corresponding to the second action resource, the first action corresponding to the first action resource can be executed, i.e., execute an OFF operation on the window.
[0081] In yet another example, at time t1, the second action resource is first triggered to execute the second action, i.e., execute an ON operation on the window. At time t2, the first action resource is triggered, and if the first action resource and the second action resource have the same collision priority, and the interval time between time t1 and time t2 is greater than the time represented by the second collision priority effective time attribute corresponding to the second action resource, the first action corresponding to the first action resource can be executed, i.e., execute an OFF operation on the window.
[0082] In yet another example, at time t1, the second action resource is first triggered to execute the second action, i.e., perform an ON operation on the window. At time t2, the first action resource is triggered, and the first action resource and the second action resource have the same conflict priority, and if the interval time between time t1 and time t2 is less than the time represented by the second conflict priority effective time attribute corresponding to the second action resource, the first action corresponding to the first action resource cannot be executed.
[0083] In addition, the first action resource and the second action resource of the present disclosure are not limited to the above examples, and the target resource of the first action resource and the target resource of the second action resource may both be an air conditioner, and the first action may refer to setting the air conditioner at 25°C, and the second action may refer to setting the air conditioner at 18°C.
[0084] In some embodiments, the first action resource may trigger a predefined action (e.g., turn off the door) for a target resource (e.g., a door) different from the target resource (e.g., a window) based on a first trigger condition (e.g., PM2.5 concentration is higher than a preset threshold A). For example, in one example, the predefined action and the first action may be the same, and an OFF operation may be triggered for a window based on the first trigger condition, and an OFF operation may be triggered for a door based on the first trigger condition. In another example, the predefined action and the first action may be different, and an OFF operation may be triggered for a window based on the first trigger condition, and an ON operation may be triggered for an air purifier based on the first trigger condition. That is, the first action resource may include multiple target resources, and may execute a predefined action for one or more of the multiple target resources when the trigger condition is satisfied. The multiple target resources may be different from each other, and the predefined actions corresponding to the multiple target resources may be different from each other, and the predefined actions corresponding to at least some of the target resources may be the same.
[0085] For example, in some embodiments, the first action resource is a resource that triggers an OFF operation (i.e., the first action includes an OFF operation) on a window (i.e., the target resource). For example, when it is detected that the concentration of PM2.5 in the air is higher than a preset threshold (e.g., 150), the OFF operation is performed on the window. The second action resource is a resource that triggers an ON operation (i.e., the second action includes an ON operation) on a window, for example, when it is detected that the concentration of carbon monoxide in the air is higher than a preset threshold (e.g., 20%), the ON operation is performed on the window. Table 1 below shows various attribute values of the first action resource of one example of the embodiment, and Table 2 below shows various attribute values of the second action resource of one example of the embodiment.
[0086] [Table 1]
[0087] For example, Table 1 shows 12 attribute values of the first action resource. In Table 1, the package data in the content of attribute value 8 and attribute value 7 are the same. For example, attribute value 8 can be expressed as resourceID (resource identification code) or the URI (Universal Resource Identifier) of a resource attribute.
[0088] [Table 2]
[0089] For example, Table 2 shows 12 attribute values of the second action resource. In Table 2, the package data in the content of attribute value 8 and attribute value 7 are the same. For example, attribute value 8 can be expressed as resourceID (resource identification code) or the URI of a resource attribute (Universal Resource Identifier).
[0090] For example, as can be seen from Tables 1 and 2 above, the attribute value of the first collision priority attribute of the first action resource is 4, the attribute value of the first collision priority effective time attribute is 1 hour (h), the attribute value of the second collision priority attribute of the second action resource is 1, and the attribute value of the first collision priority effective time attribute is 72h. That is, the collision priority of the first action resource is lower than the collision priority of the second action resource.
[0091] As shown in FIG. 5, at time t2, a first action resource is triggered, and the generic service entity finds an action resource that conflicts with the first action resource based on the target resource and the first action of the first action resource, and the generic service entity finds a second action resource that conflicts with the first action resource, and the conflict priority of the second action resource is higher than the conflict priority of the first action resource. At time t1, when the second action resource is triggered and the second action is executed, the generic service entity determines the occupancy time of the second action resource on the target resource, and if the interval time between time t1 and time t2 is less than the time represented by the second conflict priority effective time attribute corresponding to the second action resource (e.g., 72h), the action corresponding to the first action resource cannot be triggered and executed. If the interval time between time t1 and time t2 is greater than the time represented by the second conflict priority effective time attribute corresponding to the second action resource, the first action corresponding to the first action resource can be executed.
[0092] It should be noted that the "occupancy time of the second action resource on the target resource" may represent the duration after the second action resource is triggered and the second action is executed.
[0093] For example, in some embodiments, creating the first action resource further includes creating a first collision target resource attribute and a first collision target action attribute for use with the first action resource.
[0094] For example, in some examples, the first action resource includes at least one of a first collision priority attribute and a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute. For example, the first action resource includes a first collision priority attribute, a first collision target resource attribute, and a first collision target action attribute, or the first action resource includes a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute, or the first action resource includes a first collision priority attribute, a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute. That is, the first collision priority attribute, the first collision priority effective time attribute, the first collision target resource attribute, and the first collision target action attribute are all under the first action resource.
[0095] 6A shows a schematic diagram of another first action resource provided by some embodiments of the present disclosure. FIG. 6B shows a schematic diagram of a collision strategy sub-resource in the first action resource provided by some embodiments of the present disclosure.
[0096] For example, as shown in Figures 6A and 6B, in another example, the first action resource further includes a conflict strategy sub-resource (conflictPolicy). The conflict strategy sub-resource includes at least one of a first conflict priority attribute and a first conflict priority effective time attribute, a first conflict target resource attribute (targetObjectResourceID), and a first conflict target action attribute (targetInput). For example, the conflict strategy sub-resource includes a first conflict priority attribute, a first conflict target resource attribute, and a first conflict target action attribute, or the conflict strategy sub-resource includes a first conflict priority effective time attribute, a first conflict target resource attribute, and a first conflict target action attribute, or as shown in Figure 6B, the conflict strategy sub-resource includes a first conflict priority attribute, a first conflict priority effective time attribute, a first conflict target resource attribute, and a first conflict target action attribute. That is, the first collision priority attribute, the first collision priority effective time attribute, the first collision target resource attribute, and the first collision target action attribute are all under the collision strategy sub-resource of the first action resource.
[0097] For example, the first collision target resource attribute represents an identification code of a target resource of the first action resource. The first collision target action attribute represents an action that collides with the first action. For example, if the first action is an on operation, the first collision target action attribute can represent an off operation.
[0098] As shown in FIG. 4 and FIG. 6A, the first action resource includes a dependency priority attribute (evalPriority) indicating the priority of the dependency condition of the action resource, an action priority attribute (actionPriority), a subject resource attribute (actionSubjectResource), a subject resource identifier attribute (SubjectResourceID), an evaluation rule attribute (evalCriteria), a trigger mode attribute (evalMode), a trigger mode control attribute (evalControlParam), a target identifier attribute (objectResourceID), an action attribute (activePrimitive) of the action method, an input attribute (input) of the action parameter, an output resource identifier attribute (outputResourceID) of the action result, an action result attribute (actionResult), and a dependent sub-resource ( <dependency>), for example, the action result is a state value. Note that, when the first action resource has multiple dependency conditions, the dependency priority attribute of the first action resource represents the order of judgment of the multiple dependency conditions, and when the second action resource has multiple dependency conditions, the dependency priority attribute of the second action resource represents the order of judgment of the multiple dependency conditions.
[0099] In addition, in the present disclosure, multiple attribute values of the first action resource or the second action resource can be created based on the same creation request, and can also be created based on multiple creation requests. For example, in some examples, remaining attributes other than the dependent sub-resources of the first action resource (e.g., the first dependent sub-resource and / or the second dependent sub-resource) can be created based on the first creation request, and the dependent sub-resources of the first action resource can be created based on a third creation request sent to the generic service entity. Or, the first action state attribute and the first action time attribute of the first action resource can be created based on the first creation request, and remaining attributes other than the first action state attribute and the first action time attribute of the first action resource can be created based on a third creation request sent to the generic service entity. The present disclosure is not specifically limited on the specific creation time and process of various attributes in the first action resource and the second action resource.
[0100] For example, in some embodiments, the first action resource is a resource that triggers an OFF operation (i.e., the first action includes an OFF operation) on a window (i.e., a target resource). For example, when it is detected that the concentration of PM2.5 in the air is higher than a preset threshold (e.g., 150), an OFF operation is performed on the window. The second action resource is a resource that triggers an ON operation (i.e., the second action includes an ON operation) on a window, for example, when it is detected that the concentration of carbon monoxide in the air is higher than a preset threshold (e.g., 20%), an ON operation is performed on the window. For example, the second action resource can further include a collision strategy sub-resource, and the collision strategy sub-resource includes a second collision priority attribute, a second collision priority effective time attribute, a second collision target resource attribute, and a second collision target action attribute.
[0101] Table 3 below shows various attribute values of the first action resource in one example of the embodiment, and Table 5 below shows various attribute values of the second action resource in one example of the embodiment.
[0102] [Table 3]
[0103] For example, Table 3 shows the ten attribute values and the collision strategy sub-resource of the first action resource. Table 4 shows the collision strategy sub-resource of the first action resource.
[0104] [Table 4]
[0105] For example, as shown in Table 4, the collision strategy sub-resource of the first action resource may include four attribute values, namely, a first collision priority attribute of the first action resource, a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute.
[0106] [Table 5]
[0107] For example, Table 5 shows ten attribute values and collision strategy sub-resources of the second action resource, and Table 6 shows the collision strategy sub-resources of the second action resource.
[0108] [Table 6]
[0109] For example, as shown in Table 6, the collision strategy sub-resource of the second action resource may include four attribute values, namely, a second collision priority attribute of the second action resource, a second collision priority effective time attribute, a second collision target resource attribute, and a second collision target action attribute.
[0110] For example, in some examples, the first action resource is triggered before the second action resource, and the first action is executed to perform an OFF operation on the window. Then, when the second action resource is triggered, the generic service entity needs to match based on the collision strategy sub-resource of the second action resource, and if the generic service entity finds that the first action resource matches the matching rule defined by the collision strategy sub-resource of the second action resource, the generic service entity determines whether the collision priority of the first action resource is higher than the collision priority of the second action resource, and if the generic service entity determines that the collision priority of the second action resource is higher than the collision priority of the first action resource, it can execute the second action corresponding to the second action resource, i.e., it can execute an ON operation on the window.
[0111] Conversely, the second action resource is triggered before the first action resource, and the second action is executed to perform an ON operation on the window. Next, when the first action resource is triggered, the generic service entity needs to match based on the collision strategy sub-resource of the first action resource. If the generic service entity finds that the second action resource matches the matching rule defined by the collision strategy sub-resource of the first action resource, the generic service entity can judge whether the collision priority of the first action resource is higher than the collision priority of the second action resource. If the generic service entity determines that the collision priority with the first action resource is lower than the collision priority of the second action resource, the generic service entity needs to re-judge the occupancy time of the second action resource for the target resource. At this time, if the occupancy time of the second action resource for the target resource is less than the time indicated in the second collision priority effective time attribute of the second action resource, the first action corresponding to the first action resource will not be executed; if the occupancy time of the second action resource for the target resource is greater than or equal to the time indicated in the second collision priority effective time attribute of the second action resource, the first action corresponding to the first action resource can be executed.
[0112] For example, in some embodiments, creating the first action resource further includes creating a first action state attribute for use with the first action resource.
[0113] FIG. 7 illustrates a schematic diagram of another first action resource provided by some embodiments of the present disclosure.
[0114] For example, as shown in Figure 7, the first action resource may further include a first action status attribute (actionStatus). The first action status attribute represents the status of the first action. The first action status attribute is a status value.
[0115] For example, the attribute value of the first action state attribute includes a first setting value and a second setting value, and the state of the first action includes active or inactive. For example, when the attribute value of the first action state attribute is the first setting value, the state of the first action is active, i.e., the first setting value is active, which indicates that the first action is triggered to be executed. When the attribute value of the first action state attribute is the second setting value, the state of the first action is invalid, i.e., the second setting value is inactive, which indicates that the first action is not triggered to be executed.
[0116] For example, after a first action resource is created, if the first action has not been triggered, the attribute value of the first action state attribute is a second setting value, i.e., the state of the first action is invalid; after a first action resource is created, if the first action has been executed, the attribute value of the first action state attribute is a first setting value, i.e., the state of the first action is valid.
[0117] For example, if the first action resource is a resource that triggers an on operation (i.e., a first action) for a window (i.e., a target resource), after the first action resource is created, if the window controller is not controlled to be turned on by sending a notification to the window controller, the attribute value of the first action state attribute is a second setting value, and if the window controller is controlled to be turned on by sending a notification to the window controller, the attribute value of the first action state attribute changes from the second setting value to the first setting value.
[0118] Although the embodiments of the present disclosure are described using an example in which a first setting value represents that the state of the first action is valid and a second setting value represents that the state of the first action is invalid, the present disclosure is not limited thereto, and in some embodiments, the first setting value can also represent that the state of the first action is invalid, and accordingly, the second setting value can also represent that the state of the first action is valid.
[0119] For example, in some embodiments, creating the first action resource further includes creating a first action time attribute for use with the first action resource, e.g., the first action time attribute is used to indicate a time parameter associated with the first action.
[0120] For example, as shown in FIG. 7, the first action resource further includes a first action time attribute (actionActiveTime). The first action time attribute is a state value, and the first action time attribute represents the elapsed time after the first action has already been triggered. For example, after the first action resource is established, the first action is not triggered, and the attribute value of the first action time attribute is not set, or is empty or non-existent, and the attribute value of the first action time attribute has no corresponding meaning. After the first action resource is established, when the first action is triggered, a related timer can be established, and the timing value of the timer can be the attribute value of the first action time attribute. Note that the timing value of the timer can include values that can represent various times, such as the duration of a timer record, the start time of a timer count, and / or the end time of a timer count.
[0121] For example, the time parameter associated with the first action may include at least one of a duration after triggering the first action (i.e., after the first action is executed), a start time of executing the first action, and an end time of executing the first action. Note that in some embodiments, the time parameter associated with the first action is not necessarily a direct time, but may be an indirect time such as a number of executions.
[0122] In addition, the second action resource may further include a second action state attribute and a second action time attribute. In the embodiment of the present disclosure, unless otherwise specified, the embodiment of the present disclosure will be described by taking the first action time attribute used to indicate the duration after the first action is performed and the second action time attribute used to indicate the duration after the second action is performed as an example.
[0123] For example, in some embodiments, the first action resource may further include a first dependent sub-resource and / or a second dependent sub-resource used for the first action resource. At this time, the first creation request may include a dependency request, and the generic service entity creates the first dependent sub-resource and / or the second dependent sub-resource in the first action resource based on the dependency request. For example, the first dependent sub-resource includes a first dependency condition, the first dependency condition is related to a second action state attribute of the second action resource, the second dependent sub-resource includes a second dependency condition, and the second dependency condition is related to a second action time attribute of the second action resource. For example, in this situation, when at least one of the first dependency condition and the second dependency condition and the first trigger condition are simultaneously satisfied, a first action needs to be triggered on the target resource.
[0124] For example, when the first action resource includes multiple dependent sub-resources, the relationship between the multiple dependent sub-resources may be a necessary relationship or a sufficient relationship. The relationship between the multiple dependent sub-resources may be a sufficient relationship, and if any one of the multiple dependent sub-resources is satisfied, the first action can be triggered on the target resource; the relationship between the multiple dependent sub-resources may be a necessary relationship, and if any one of the multiple dependent sub-resources is satisfied, the first action can be triggered on the target resource. For example, in one embodiment, the first action resource includes a first dependent subresource and a second dependent subresource, and the first dependent subresource and the second dependent subresource have a sufficient relationship and the first trigger condition is satisfied, first, verify the first dependent subresource, and if the first dependent subresource verification is successful and there is no need to verify the second dependent subresource, i.e., the first action can be triggered on the target resource; if the first dependent subresource verification fails, verify the second dependent subresource, and if the second dependent subresource verification is successful, the first action can be triggered on the target resource; if the second dependent subresource verification fails, the first action cannot be triggered on the target resource. When a first dependent subresource and a second dependent subresource have a necessary relationship and a first trigger condition is satisfied, first, verify the first dependent subresource, and if the first dependent subresource verification is successful, verify the second dependent subresource, and if the second dependent subresource verification is successful, a first action can be triggered on the target resource; if the verification of any one of the first dependent subresource or the second dependent subresource fails, the first action cannot be triggered on the target resource.
[0125] For example, when a first action resource includes a first dependent sub-resource and a second dependent sub-resource, and the first dependent sub-resource and the second dependent sub-resource are in a sufficient relationship, if the first trigger condition is satisfied, the generic service entity can first determine whether a first dependency condition in the first dependent sub-resource is satisfied based on the second action state attribute, and trigger a first action on the target resource if the second action state attribute satisfies the first dependency condition. If the second action state attribute does not satisfy the first dependency condition, determine whether a second dependency condition in the second dependent sub-resource is satisfied based on the second action time attribute, and trigger a first action on the target resource if the second action time attribute satisfies the second dependency condition. If the second action state attribute does not satisfy the first dependency condition and the second action time attribute does not satisfy the second dependency condition, the generic service entity can not trigger the first action.
[0126] For example, the first dependency condition includes that the attribute value of the second action state attribute and the first setting value satisfy a first preset logical relationship, and the first setting value is valid or invalid. The second dependency condition includes that the second action time attribute and the preset action time satisfy a second preset logical relationship.
[0127] For example, in some examples, for a state, the first preset logical relationship may include equal or unequal. That is, the first preset logical relationship may represent that the attribute value of the second action state attribute is equal to the first set value, or that the attribute value of the second action state attribute is not equal to the first set value. If the first set value is valid, the first preset logical relationship may represent that the attribute value of the second action state attribute is equal to valid, or that the attribute value of the second action state attribute is not equal to valid. If the first set value is invalid, the first preset logical relationship may represent that the attribute value of the second action state attribute is equal to invalid, or that the attribute value of the second action state attribute is not equal to invalid.
[0128] For example, in some examples, for time, the second preset logical relationship may include equal to, not equal to, greater than, less than, greater than or equal to, greater than, less than, longer than, shorter than, greater than or equal to, shorter than or equal to, etc. For example, in some examples, if the second action time attribute represents a duration after triggering the second action, and the preset action time represents a time range in which the second action resource has exclusive rights over the target resource after the second action is executed, the second preset logical relationship may represent that the attribute value of the second action time attribute is greater than, or greater than, or greater than, or equal to, or longer than the preset action time. For example, in other examples, if the second action time attribute represents that the second action resource has a remaining time of exclusivity over the target resource after the second action is executed, the preset action time may be 0, and at this time, the second preset logical relationship may represent that the attribute value of the second action time attribute is equal to the preset action time.
[0129] For example, the preset action time can be preset according to actual application needs, for example, the preset action time can be 0, 5 minutes, 72 hours, etc.
[0130] For example, each dependent sub-resource of the first action resource may include at least one dependent condition. For example, in some embodiments, the first action resource may include only one dependent sub-resource, and the dependent sub-resource may include two dependent conditions, where the attribute value of the second action state attribute is not equal to the first set value and the second action time attribute is greater than the preset action time, respectively.
[0131] In addition, the second action resource may further include one or more dependent sub-resources, and each dependent sub-resource may include one or more dependent conditions. The dependent sub-resources of the second action resource may be related to the first action resource, and may also be related to other action resources, and the present disclosure is not limited thereto.
[0132] For example, in some embodiments, the first action resource further includes a first reverse action attribute (reverseAction) and a first status control attribute (statusControl), and the second action resource further includes a second reverse action attribute (reverseAction) and a second status control attribute (statusControl). By providing the first reverse action attribute, the first status control attribute, the second reverse action attribute, and the second status control attribute, it is possible to ensure that the attribute values of the first action status attribute and the attribute values of the second action status attribute are all inverse to each other at any time (except the initial time).
[0133] For example, in some embodiments, if the temperature is greater than 27 degrees Celsius, an action to turn on the air conditioner cooling can be triggered for the air conditioner, and if the temperature is less than 23 degrees Celsius, an action to turn off the air conditioner cooling can be triggered for the air conditioner. A first action resource can be arranged in the generic service entity, and if it is detected that the temperature is greater than 27 degrees Celsius, an action to turn on the air conditioner cooling can be performed for the air conditioner. A second action resource can also be arranged in the generic service entity, and if it is detected that the temperature is less than 23 degrees Celsius, an action to turn off the air conditioner cooling can be performed for the air conditioner. That is, the first action is to turn on the air conditioner cooling, and the second action is to turn off the air conditioner cooling, that is, the first action and the second action are actions that are reverse to each other. At this time, the first reverse action attribute represents an identification code of the second action resource, and the second reverse action attribute represents an identification code of the first action resource, that is, in this situation, the first action corresponding to the first action resource and the second action corresponding to the second action resource are actions that are reverse to each other. The first state control attribute indicates whether or not to change the attribute value of the second action state attribute based on the attribute value of the first action state attribute, and the second state control attribute indicates whether or not to change the attribute value of the first action state attribute based on the attribute value of the second action state attribute.
[0134] For example, the attribute value of the first state control attribute may include true or false, and the attribute value of the second state control attribute may further include true or false. When the attribute value of the first state control attribute is true, it represents that the attribute value of the second action state attribute can be changed based on the attribute value of the first action state attribute, and when the attribute value of the second state control attribute is true, it represents that the attribute value of the first action state attribute can be changed based on the attribute value of the second action state attribute. When the attribute value of the first state control attribute is false, it represents that the attribute value of the second action state attribute cannot be changed based on the attribute value of the first action state attribute, and when the attribute value of the second state control attribute is false, it represents that the attribute value of the first action state attribute cannot be changed based on the attribute value of the second action state attribute.
[0135] For example, in some examples, the attribute value of the first state control attribute is true, and the attribute value of the second state control attribute is also true, and when the first action resource and the second action resource are all established, at the initial time, the attribute value of the first action state attribute of the first action resource is the second setting value (i.e., inactive), and the attribute value of the second action state attribute of the second action resource is the second setting value (i.e., inactive); at time t1, after triggering the second action, the attribute value of the second action state attribute of the second action resource changes from the second setting value (i.e., inactive) to the first setting value (i.e., active); at this time, since the attribute value of the second action state attribute is the first setting value, the attribute value of the first action state attribute and the attribute value of the second action state attribute need to remain mutually exclusive, and the attribute value of the first action state attribute of the first action resource is the second setting value (actually no change). At time t2, after triggering the first action, the attribute value of the first action state attribute of the first action resource changes from the second setting value to the first setting value, at this time, since the attribute value of the second action state attribute is the first setting value, the attribute value of the first action state attribute and the attribute value of the second action state attribute need to be kept mutually exclusive, and the attribute value of the second action state attribute of the second action resource changes from the first setting value to the second setting value to ensure that the attribute value of the first action state attribute and the attribute value of the second action state attribute are mutually inverse. By repeatedly executing the above process, at subsequent times, the attribute value of the first action state attribute alternates between the first setting value and the second setting value, and accordingly, the attribute value of the second action state attribute alternates between the second setting value and the first setting value.
[0136] For example, in some embodiments, the first action resource further includes a first status automatic control time attribute (StatusAutoControl), and the second action resource further includes a second status automatic control time attribute.
[0137] Taking the first action resource as an example, the attribute value of the first action state attribute includes a first setting value and a second setting value, and the first setting value and the second setting value are inverse to each other.
[0138] For example, in some examples, the first state automatic control time can be represented by changing an attribute value of the first action state attribute from a first set value to a second set value based on the attribute value of the first action time attribute being equal to or greater than the attribute value of the first state automatic control time attribute. For example, when triggering the first action, the attribute value of the first action state attribute can be set to a first set value, and if the time after the first action is performed is equal to or greater than the attribute value of the first state automatic control time attribute, the attribute value of the first action state attribute can be changed from the first set value to the second set value.
[0139] For example, in another example, the first state automatic control time can be represented by changing the attribute value of the first action state attribute from the first set value to the second set value based on the attribute value of the first state automatic control time attribute being equal to 0. For example, when the first action is triggered, the attribute value of the first action state attribute is set to the first set value, and at this time, a countdown is started based on the attribute value of the first state automatic control time attribute, and when the attribute value of the first state automatic control time attribute is equal to 0, it is represented that the time after the execution of the first action is equal to the attribute value of the first state automatic control time attribute, and the attribute value of the first action state attribute is changed from the first set value to the second set value.
[0140] For example, in some embodiments, the first creation request further includes conflict strategy resource information. For example, creating the first action resource further includes creating a pre-defined conflict strategy sub-resource for the first action resource based on the conflict strategy resource information.
[0141] For example, when the first action resource includes a conflict strategy sub-resource, the step of creating the first action resource may further include the step of creating a first dependent sub-resource and / or a second dependent sub-resource used for the first action resource according to the target resource of the second action resource, the second action, and the preset conflict strategy sub-resource satisfying a matching condition, For example, the first dependent sub-resource includes a first dependent condition, the first dependent condition is associated with a second action state attribute, the second dependent sub-resource includes a second dependent condition, the second dependent condition is associated with a second action time attribute.
[0142] For example, the first action resource further includes a preset collision strategy sub-resource. Creating the preset collision strategy sub-resource for the first action resource includes creating a collision target resource identifier attribute and a collision execution method attribute for the first action resource.
[0143] For example, the preset conflict strategy sub-resource includes a conflict target resource identifier attribute (conflictobjectResourceID) and a conflict execution method attribute (conflictinput), for example, the conflict target resource identifier attribute represents an identification code of a target resource of a first action resource, and the conflict execution method attribute represents an action that conflicts with the first action.
[0144] For example, satisfying the matching condition includes that the identification code of the target resource of the second action resource and the collision target resource identifier attribute are the same, and the second action and the action represented by the collision execution method attribute are the same.
[0145] For example, in some embodiments, creating a pre-defined conflict strategy sub-resource for the first action resource further includes creating a conflict state attribute for the first action resource.
[0146] For example, the preset conflict strategy sub-resource includes a conflict status attribute (conflictStatus), and the attribute value of the conflict status attribute can include a first setting value and a second setting value. For example, the target resource of the first action resource and the target resource of the second action resource are the same target resource, and when the first action and the second action conflict with each other, the target resource of the second action resource, the second action, and the preset conflict strategy sub-resource satisfy a matching condition, and at this time, when the attribute value of the conflict status attribute is the first setting value and the attribute value of the second action status attribute is the first setting value, the first action is not triggered, and when the attribute value of the second action status attribute is the second setting value, the first action is triggered; conversely, when the attribute value of the conflict status attribute is set to the second setting value, the attribute value of the second action status attribute is the second setting value, the first action is not triggered, and when the attribute value of the second action status attribute is the first setting value, the first action is triggered.
[0147] For example, when the attribute value of the collision state attribute is a first set value, the first dependent condition includes that the attribute value of the second action state attribute is not equal to the first set value, or the first dependent condition includes that the attribute value of the second action state attribute is equal to a second set value, the first set value being valid or invalid, when the attribute value of the collision state attribute is a second set value, the first dependent condition includes that the attribute value of the second action state attribute is not equal to the second set value, or the first dependent condition includes that the attribute value of the second action state attribute is equal to the first set value, and the second dependent condition includes that the second action time attribute is greater than a preset action time.
[0148] In addition, in this disclosure, the description of the first action resource also applies to the second action resource when there is no conflict, that is, for example, the second action resource may further include a state automatic control time attribute, the second action resource may further include a preset conflict strategy sub-resource, etc.
[0149] 8 shows a schematic diagram of a method for performing an action provided by some embodiments of the present disclosure.
[0150] For example, as shown in FIG. 8, in some embodiments, the method for performing an action may include the following steps: S301: Determine a first action resource for triggering a first action on a target resource, the first action resource including a first conflict priority attribute, the first conflict priority attribute representing a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource. S302: Receive a first data resource. S303: Based on the first data resource satisfying a first trigger condition, determine a second action resource that conflicts with the first action resource, the second action resource being a resource for triggering a second action on a target resource, the second action resource including a second conflict priority attribute and a second conflict priority effective time attribute, the second conflict priority attribute representing an action resource priority of the second action resource that conflicts with the second action resource and is directed to the target resource, and the second conflict priority effective time attribute representing a time range during which the second action resource monopolizes the target resource. S304: Obtain the attribute value of the first collision priority attribute, the attribute value of the second collision priority attribute, and the attribute value of the second collision priority effective time attribute to determine whether the collision judgment condition is satisfied; if the collision judgment condition is satisfied, execute step S305: execute the first action on the target resource; if the collision judgment condition is not satisfied, execute step S306: do not execute the first action.
[0151] By using the action execution method provided by the present disclosure, the action resource conflict problem can be solved by increasing the attribute value of the conflict priority attribute and the conflict priority effective time attribute in the action resource, and the action execution efficiency can be improved.
[0152] In addition, in the present disclosure, the execution order of the above various steps is not limited, and can be executed according to any order that does not cause conflict, for example, in some examples, "determining a second action resource that conflicts with a first action resource" can be executed before step S301, or can be executed simultaneously with step S301, and the present disclosure is not limited thereto. The number of action resources that conflict with a first action resource may be one or more, that is, in the present disclosure, in step S303, the number of second action resources may be more than one.
[0153] The present disclosure is not limited to the execution method shown in FIG. 8. For example, in another embodiment, a method for executing an action may include the steps of determining a first action resource, the first action resource being a resource for triggering a first action on a target resource, the first action resource including a first conflict priority attribute, the first conflict priority attribute representing a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource; receiving a first data resource; and determining a second action resource that conflicts with the first action resource based on the first data resource satisfying a first trigger condition. The method includes: determining a priority of an action resource for a second action resource, the second action resource being a resource for triggering a second action on a target resource, the second action resource including a second collision priority attribute, the second collision priority attribute representing a priority of an action resource of a second action resource colliding with the second action resource and directed to the target resource; obtaining an attribute value of the first collision priority attribute and an attribute value of the second collision priority attribute to determine whether a collision judgment condition is satisfied; and performing the first action on the target resource if the collision judgment condition is satisfied, and not performing the first action if the collision judgment condition is not satisfied. That is, in the present disclosure, both the first action resource and the second action resource may not have a collision priority effective time attribute, and performing the first action on the target resource if the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute, and not performing the first action if the attribute value of the first collision priority attribute is not prioritized over the attribute value of the second collision priority attribute.
[0154] For example, the first action resource and the second action resource are action resources for the same target resource.
[0155] For example, in some embodiments, sensor data may be received by various sensors to determine a first data resource (which may also be referred to as a first subject resource). For example, the first data resource may be a carbon monoxide concentration, a PM2.5 concentration, a temperature, etc. For example, in a smart home usage environment, sensor data may be received by sensors such as a carbon monoxide sensor, a rainfall sensor, an air quality monitoring sensor, etc., and the first data resource may be updated using the received sensor data. A first action corresponding to a first action resource represents performing an OFF operation on a window when the concentration of PM2.5 in the air is detected to be higher than a preset threshold A (e.g., 100). At this time, the first data resource is the PM2.5 concentration detected by the air quality monitoring sensor, and when the PM2.5 concentration is higher than 100, an OFF operation may be performed on the window.
[0156] For example, an application entity (e.g., a sensor) can transmit data to the generic service entity to update the first data resource. Such updates can be real-time or periodic, or can be triggered by a condition, for example, when data detected by the application entity reaches a certain threshold, the data exceeding the threshold can be transmitted to the generic service entity for update, or when another application entity requests and obtains the first data resource.
[0157] For example, the second action and the first action are different, i.e., the second action is any other action different from the first action. For example, in some examples, the first action and the second action conflict with each other, e.g., the first action can refer to setting the air conditioner at 25°C, and the second action can refer to setting the air conditioner at 18°C. For example, in one example, the first action and the second action are inverse to each other, e.g., if the first action performs an on operation on the target resource (e.g., turn on the window, turn on the purifier), the second action can perform an off operation on the target resource (e.g., turn off the window, turn off the purifier).
[0158] For example, satisfying the collision judgment condition includes that the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute, or the occupancy time of the second action resource for the target resource is greater than the attribute value of the second collision priority effective time attribute, or the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute and the occupancy time of the second action resource for the target resource is greater than the attribute value of the second collision priority effective time attribute. In other words, the collision judgment condition is satisfied when any one of the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute and the occupancy time of the second action resource for the target resource is greater than the attribute value of the second collision priority effective time attribute is satisfied.
[0159] For example, in step S304, the step of determining whether the attribute value of the first collision priority attribute, the attribute value of the second collision priority attribute, and the attribute value of the second collision priority effective time attribute satisfy the collision determination condition includes a step of determining whether the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute, and determining that the collision determination condition is satisfied if the attribute value of the first collision priority attribute is prioritized over the attribute value of the second collision priority attribute; and a step of determining that the collision determination condition is satisfied if the attribute value of the first collision priority attribute is not prioritized over the attribute value of the second collision priority attribute. the step of acquiring an occupation time of the second action resource for the target resource, judging whether the occupation time of the second action resource for the target resource is greater than an attribute value of a second collision priority effective time attribute, and determining that the collision judgment condition is satisfied if the occupation time of the second action resource for the target resource is greater than or equal to the attribute value of the second collision priority effective time attribute, and determining that the collision judgment condition is not satisfied if the occupation time of the second action resource for the target resource is less than the attribute value of the second collision priority effective time attribute.
[0160] For example, in the embodiment of the action resources shown in Tables 1 and 2 above, if the attribute value of the first collision priority attribute of the first action resource is 4 and the attribute value of the second collision priority attribute of the second action resource is 1, in this embodiment, the attribute value of the first collision priority attribute does not take precedence over the attribute value of the second collision priority attribute. At this time, it is necessary to determine whether the occupancy time of the second action resource for the target resource is greater than the attribute value of the second collision priority effective time attribute. If the occupancy time of the second action resource for the target resource is greater than or equal to the attribute value of the second collision priority effective time attribute, it is determined that the collision judgment condition is met; if the occupancy time of the second action resource for the target resource is less than the attribute value of the second collision priority effective time attribute, it is determined that the collision judgment condition is not met.
[0161] For example, in another embodiment, if the attribute value of the first collision priority attribute of the first action resource is 2 and the attribute value of the second collision priority attribute of the second action resource is 5, in this embodiment, the attribute value of the first collision priority attribute takes precedence over the attribute value of the second collision priority attribute, and at this time, it can be determined that the collision judgment condition is satisfied.
[0162] For example, in some embodiments, the second action resource further includes a second action time attribute, and the second action time attribute is used to indicate a time parameter associated with the second action, and the step of obtaining an occupation time of the second action resource on the target resource includes obtaining an attribute value of the second action time attribute as the occupation time of the second action resource on the target resource.
[0163] For example, in step S303, determining a second action resource that conflicts with the first action resource includes: determining a candidate action resource list based on the target resource and the first action, where the candidate target resource and the target resource of each candidate action resource in the candidate action resource list are the same, and the candidate action of each candidate action resource conflicts with the first action; selecting at least one candidate action resource from the candidate action resource list; obtaining an execution status of the at least one candidate action resource; determining that the execution status of the at least one candidate action resource has already been executed, and setting the at least one candidate action resource as the second action resource.
[0164] For example, a candidate action resource in the candidate action resource list can be determined based on the target resource and the first action of the first action resource. For example, in the action resource list arranged in the general-purpose service entity, the general-purpose service entity can obtain the target resource of an action resource, the action corresponding to the action resource, the target resource of the first action resource, and the first action, determine whether the target resource of the action resource and the target resource of the first action resource are the same, and determine whether the action corresponding to the action resource and the first action collide. If the target resource of the action resource and the target resource of the first action resource are the same and the action corresponding to the action resource and the first action collide, the action resource can be a candidate action resource and a candidate action resource list can be obtained.
[0165] For example, the first action resource includes a collision strategy sub-resource, which includes a first collision priority attribute, a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute, where the first collision priority effective time attribute represents a time range during which the first action resource occupies the target resource, the first collision target resource attribute represents an identification code of the target resource, and the first collision target action attribute represents an action that collides with the first action.
[0166] For example, the step of determining a second action resource that conflicts with a first action resource includes the steps of obtaining a first conflict target resource attribute and a first conflict target action attribute, and determining a candidate action resource list based on the first conflict target resource attribute and the first conflict target action attribute, where an identification code of a candidate target resource of each candidate action resource in the candidate action resource list is the same as the first conflict target resource attribute, and a candidate action of each candidate action resource is the same as the first conflict target action attribute; selecting at least one candidate action resource from the candidate action resource list; obtaining an execution status of the at least one candidate action resource; and determining that the execution status of the at least one candidate action resource has already been executed, and setting the at least one candidate action resource as a second action resource.
[0167] For example, in some embodiments, in an action resource list disposed in a generic service entity, the generic service entity can obtain an identification code of a target resource of an action resource, an action corresponding to the action resource, a first collision target resource attribute, and a first collision target action attribute, determine whether the identification code of the target resource of the action resource and the first collision target resource attribute are the same, determine whether the action corresponding to the action resource and the action represented by the first collision target action attribute collide, and if the identification code of the target resource of the action resource and the first collision target resource attribute are the same and the action corresponding to the action resource and the action represented by the first collision target action attribute collide, the action resource can be set as a candidate action resource, and a candidate action resource list can be obtained.
[0168] Furthermore, when the first action resource includes a first collision target resource attribute and a first collision target action attribute, in the process of determining the second action resource, the general-purpose service entity can directly obtain the first collision target resource attribute and the first collision target action attribute, and determine the second action resource based on the first collision target resource attribute and the first collision target action attribute, which can save the workload of the general-purpose service entity.
[0169] For example, the execution status of the at least one candidate action resource includes having already been executed and not having been executed. In some embodiments, the generic service entity can directly determine the execution status of the at least one candidate action resource.
[0170] For example, in another embodiment, each candidate action resource includes an action state attribute, and the action state attribute represents a state of an action corresponding to the candidate action resource. The step of acquiring the execution status of the at least one candidate action resource includes acquiring an attribute value of the action state attribute of the at least one candidate action resource as the execution status of the at least one candidate action resource. For example, the attribute value of the action state attribute may include valid and invalid, and when the attribute value of the action state attribute is valid, it represents that the execution status of the candidate action resource has already been executed, and when the attribute value of the action state attribute is invalid, it represents that the execution status of the candidate action resource has not been executed.
[0171] For example, in some embodiments, the first action resource may further include a first action state attribute and a first action time attribute, and the method of performing an action may further include, after performing the first action, setting an attribute value of the first action state attribute to a first set value and setting an attribute value of the first action time attribute.
[0172] For example, the step of setting the attribute value of the first action time attribute includes the steps of establishing an action execution timer and starting counting after performing the first action, and setting the time value of the action execution timer as the attribute value of the first action time attribute. For example, the action execution timer starts counting from 0 every time.
[0173] For example, in some embodiments, the first action resource further includes a first state automatic control time attribute.
[0174] For example, in some examples, the first state automatic control time may represent changing an attribute value of the first action state attribute from a first set value to a second set value based on the first action state attribute having an attribute value of a first set value and the attribute value of the first action time attribute being equal to or greater than the attribute value of the first state automatic control time attribute. For example, after performing the first action, the performing method further includes obtaining an attribute value of the first action time attribute, determining whether the attribute value of the first action time attribute is equal to or greater than the attribute value of the first state automatic control time attribute, and changing the attribute value of the first action state attribute from the first set value to the second set value if the attribute value of the first action time attribute is equal to or greater than the attribute value of the first state automatic control time attribute.
[0175] For example, in another example, the first state automatic control time may represent that the first action state attribute has an attribute value of a first setting value, and that the attribute value of the first action state attribute is changed from the first setting value to a second setting value based on the attribute value of the first state automatic control time attribute being equal to 0. For example, after executing the first action, the execution method further includes the steps of starting a countdown based on the attribute value of the first state automatic control time attribute, acquiring the attribute value of the first state automatic control time attribute, and determining whether the attribute value of the first state automatic control time attribute is equal to 0, and changing the attribute value of the first action state attribute from the first setting value to the second setting value when the attribute value of the first state automatic control time attribute is equal to 0.
[0176] For example, the first set value and the second set value are inverse to each other, and in some examples, the first set value may be valid and, correspondingly, the second set value may be invalid.
[0177] For example, in some examples, the first action resource further includes a first dependent sub-resource including a first dependency condition and a second dependent sub-resource including a second dependency condition. After determining the second action resource and before executing the first action, the execution method may further include obtaining a second action state attribute and a second action time attribute of the second action resource, where the second action resource includes the second action state attribute and the second action time attribute, the second action state attribute represents a state of the second action, and the second action time attribute is used to indicate a time parameter associated with the second action, and triggering the first action on the target resource if the first data resource satisfies the first trigger condition, an attribute value of the second action state attribute satisfies the first dependency condition, and / or an attribute value of the second action time attribute satisfies the second dependency condition. That is, when the first action resource includes a first dependent sub-resource and a second dependent sub-resource, if the first data resource satisfies the first trigger condition, satisfies the collision judgment condition, the attribute value of the second action state attribute satisfies the first dependency condition, and the attribute value of the second action time attribute satisfies the second dependency condition, i.e., a first action can be triggered on the target resource.
[0178] For example, the first dependent condition includes the attribute value of the second action state attribute not being equal to a first set value, the first set value being valid or invalid, and the second dependent condition includes the second action time attribute being greater than a preset action time.
[0179] For example, in one embodiment, the first action resource further includes a first reverse action attribute and a first state control attribute, the second action resource further includes a second reverse action attribute and a second state control attribute, the first reverse action attribute represents an identification code of the second action resource, and the second reverse action attribute represents an identification code of the first action resource. The execution method may further include the steps of: after performing the first action, judging whether the attribute value of the first state control attribute is true, and if it is determined that the attribute value of the first state control attribute is true, setting the attribute value of the second action state attribute to a second setting value, where the first setting value and the second setting value are inverse to each other; receiving a second data resource; triggering a second action on the target resource based on the second data resource satisfying a second trigger condition; after performing the second action, changing the attribute value of the second action state attribute from the second setting value to the first setting value; judging whether the attribute value of the second state control attribute is true, and if it is determined that the attribute value of the second state control attribute is true, changing the attribute value of the first action state attribute from the first setting value to the second setting value. In this embodiment, the first action and the second action are inverse to each other, for example, when the first action is an on operation, the second action is an off operation.
[0180] For example, the execution method further includes the steps of: not executing an operation of setting the attribute value of the second action state attribute to a second set value if it is determined that the attribute value of the first state control attribute is not true; and not executing an operation of changing the attribute value of the first action state attribute from the first set value to the second set value if it is determined that the attribute value of the second state control attribute is not true. That is, in the present disclosure, the attribute value of the second action state attribute can be manipulated after executing the first action only if the attribute value of the first state control attribute is true, and the attribute value of the first action state attribute can be manipulated after executing the second action only if the attribute value of the second state control attribute is true. That is, after executing the first action, it is necessary to determine whether the attribute value of the first state control attribute is true; if it is true, it is necessary to change the attribute value of the second action state attribute to a second setting value (at this time, the attribute value of the first action state attribute is the first setting value); if it is not true (i.e., it is false), there is no need to perform an operation to change the attribute value of the second action state attribute; after executing the second action, it is necessary to determine whether the attribute value of the second state control attribute is true; if it is true, it is necessary to change the attribute value of the first action state attribute to the second setting value (at this time, the attribute value of the second action state attribute is the first setting value); if it is not true (i.e., it is false), there is no need to perform an operation to change the attribute value of the first action state attribute.
[0181] For example, sensor data may be received by various sensors to determine a second data resource (which may also be referred to as a second subject resource). For example, the second data resource may further include carbon monoxide concentration, PM2.5 concentration, temperature, etc.
[0182] For example, the first data resource and the second data resource are different, and in some examples, the first data resource may be a PM2.5 concentration and the second data resource may be a carbon monoxide concentration.
[0183] For example, an application entity (eg, a sensor) may transmit data to the generic service entity to update a second data resource.
[0184] It should be noted that there is no time order between triggering the first action and triggering the second action. For example, if the first data resource satisfies the first trigger condition, satisfies the collision judgment condition, the attribute value of the second action state attribute satisfies the first dependency condition, and / or the attribute value of the second action time attribute satisfies the second dependency condition, i.e., the first action can be triggered, and if the second data resource satisfies the second trigger condition, i.e., the second action can be triggered. It should be noted that if the second action resource includes a corresponding dependency condition and a collision judgment condition, and the second data resource satisfies the second trigger condition, satisfies the collision judgment condition of the second action resource, and satisfies the corresponding dependency condition of the second action resource, the second action can be triggered. For example, in some examples, the second action can be triggered first and then the first action, and in other examples, the first action can be triggered first and then the second action.
[0185] For example, the second trigger condition can be set according to the actual situation. For example, in some examples, the second trigger condition may be various conditions such as the concentration of carbon monoxide is higher than a preset threshold, the concentration of PM2.5 exceeds a preset threshold, the brightness of the indoor lamp is higher or lower than a preset threshold, the user is detected within a certain range (e.g., in the bedroom, in the living room, etc.), the temperature is higher / lower than a preset temperature threshold, etc.
[0186] For example, in some examples, the second trigger condition can be different from the first trigger condition. For example, the first action resource is used to turn off the window when the smog parameter (i.e., the concentration of PM2.5) is greater than a preset threshold A, and the second action resource is used to turn on the window when the concentration of carbon monoxide in the air is greater than a preset threshold B, and the first trigger condition can be provided such that the smog parameter is greater than the preset threshold A, and the second trigger condition can be provided such that the concentration of carbon monoxide is greater than the preset threshold B.
[0187] For example, the second action resource further includes a second action time attribute for indicating a time parameter related to the second action. The execution method further includes setting an attribute value of the second action time attribute after executing the second action. The manner of setting the attribute value of the second action time attribute can be the same as that of setting the attribute value of the first action time attribute, and the overlapping points will not be described.
[0188] In addition, every time a first action is executed, the attribute value of the first action time attribute is reset, i.e., the attribute value of the first action time attribute is reset to zero, and similarly, every time a second action is executed, the attribute value of the second action time attribute is reset, i.e., the attribute value of the second action time attribute is reset to zero.
[0189] In addition, in the embodiment of the method for executing an action, for detailed descriptions of the first action resource and the second action resource, reference may be made to the related descriptions of the embodiment of the method for creating an action resource, and overlapping points will not be described.
[0190] 9 illustrates a schematic example of performing a trigger operation on a target resource provided by some embodiments of the present disclosure. The example illustrated in FIG. 9 illustrates the embodiment of the action resource shown in Tables 1 and 2 above.
[0191] For example, as shown in FIG. 9, a PM 2.5 sensor AE1 (eg, an air monitoring device), a carbon monoxide sensor AE2 (eg, a gas monitoring device), and a window controller AE3 each register with a home management server CSE (ie, a generic service entity).
[0192] In the process of creating an action resource, the carbon monoxide sensor AE2 can send a second creation request for a second action resource to the home management server CSE, where the second creation request includes an action trigger subject (carbon monoxide sensor AE2), a target resource (window), a trigger condition (carbon monoxide concentration is greater than a pre-set threshold B), and an action control (turn on the window).
[0193] Based on the second creation request sent by the carbon monoxide sensor AE2, the home management server CSE can create a second action resource. In some embodiments, before creating the second action resource, the home management server CSE can determine whether there are other action resources for the same target resource. If there are no other action resources for the same target resource, the home management server CSE can create the second action resource based on the second creation request sent by the carbon monoxide sensor AE2.
[0194] The PM 2.5 sensor AE1 can send a first creation request of a first action resource to the home management server CSE, and the first creation request includes an action trigger subject (PM 2.5 sensor AE1), a target resource (window), a trigger condition (PM 2.5 concentration is greater than a preset threshold A), and an action control (turn off the window).
[0195] Based on the first creation request sent by the PM 2.5 sensor AE1, the home management server CSE can create a first action resource.
[0196] For example, after creating the first action resource, the home management service provider CSE can return a response indicating successful creation of the action resource to the PM 2.5 sensor AE1 to indicate successful creation of the first action resource, and after creating the second action resource, the home management service provider CSE can return a response indicating successful creation of the action resource to the carbon monoxide sensor AE2 to indicate successful creation of the second action resource. Note that, in the example shown in FIG. 9, a case will be described in which the first action resource and the second action resource collide with each other (i.e., the target resource of the first action resource and the target resource of the second action resource are the same, and the first action corresponding to the first action resource and the second action corresponding to the second action resource collide with each other).
[0197] In the operation process, the home management server CSE can receive an update request from the carbon monoxide sensor AE2 to update a corresponding second data resource (i.e., a second subject resource). The update request can include data of the carbon monoxide content currently detected by the carbon monoxide sensor AE2. After receiving the update request sent by the carbon monoxide sensor AE2, the home management server CSE can send a corresponding update response to the carbon monoxide sensor AE2.
[0198] Then, the home management server CSE can determine whether the data received from the carbon monoxide sensor AE2 satisfies a trigger condition (i.e., a second trigger condition) of the second action resource, and if the second data resource satisfies the trigger condition of the second action resource, the home management server CSE can determine whether the first action resource is triggered, and if the first action resource is triggered, the home management server CSE can determine whether the attribute value of the second collision priority attribute of the second action resource takes precedence over the attribute value of the first collision priority attribute of the first action resource, and if the attribute value of the second collision priority attribute takes precedence over the attribute value of the first collision priority attribute of the first action resource, the home management server CSE can send an action request to the window controller AE3 to notify the window controller AE3 to perform an action of turning on the window. After the on operation is performed, the window controller AE3 can send an action response to the home management server CSE.
[0199] For example, the home management server CSE may further receive an update request from the PM 2.5 sensor AE1 to update the corresponding first data resource (i.e., the first subject resource). For example, the update request includes PM 2.5 concentration data currently detected by the PM 2.5 sensor AE1. In some embodiments, such an update request may be sent periodically at a preset frequency, or in response to a change in the detection data. For example, the update request may be sent to the home management server CSE when it is determined that the detection data is higher than the preset threshold A. After receiving the update request sent by the PM 2.5 sensor AE1, the home management server CSE may send a corresponding update response to the PM 2.5 sensor AE1.
[0200] Then, the home management server CSE can determine whether a trigger condition of the first action resource (i.e., a first trigger condition) is met based on the PM 2.5 concentration data in the updated first data resource, and if the first data resource satisfies the trigger condition of the first action resource, the home management server CSE can determine whether a second action resource is triggered, and if the second action resource is triggered, the home management server CSE can determine whether an attribute value of a second collision priority attribute of the second action resource takes precedence over an attribute value of a first collision priority attribute of the first action resource, and if the attribute value of the first collision priority attribute does not take precedence over the attribute value of the second collision priority attribute, the home management server CSE can determine whether an occupancy time of the second action resource for the target resource is greater than an attribute value of a second collision priority effective time attribute, and if the occupancy time of the second action resource for the target resource is greater than the attribute value of the second collision priority effective time attribute, the home management server CSE can send an action request to the window controller AE3. The window controller AE3 can perform an action to turn off the window based on the received action request. After the off operation is performed, the window controller AE3 can send an action response to the server CSE.
[0201] In the present disclosure, the update request may include requesting the home management server CSE to update or set any one attribute value of the first action resource or the second action resource, and may update or set any one attribute value such as the attribute value of a first collision priority attribute in the first action resource, the attribute value of a first collision priority valid time attribute, the attribute value of a first action state attribute, the attribute value of a first action time attribute, the attribute value of a first reverse action attribute, and the attribute value of a first state control attribute, etc. The present disclosure is not limited thereto.
[0202] Some embodiments of the present disclosure further provide an electronic device. Figure 10 is a schematic diagram of an electronic device provided by some embodiments of the present disclosure.
[0203] For example, as shown in Fig. 10, the electronic device 500 may include a memory 510 and a processor 520. It should be noted that the components of the electronic device 500 shown in Fig. 10 are merely exemplary and not limiting, and the electronic device 500 may have other components according to actual application needs.
[0204] For example, the memory 510 is used to non-temporarily store computer-readable instructions, and the processor 520 is used to execute the computer-readable instructions, and when the computer-readable instructions are executed by the processor 520, the method for creating an action resource according to any of the above embodiments is performed.
[0205] For example, components such as memory 510 and processor 520 may communicate via a network connection. The network may include a wireless network, a wired network, and / or any combination of wireless and wired networks. The network may include a local area network, the Internet, a telecommunication network, an Internet of Things based on the Internet and / or a telecommunication network, and / or any combination of the above networks, etc. For example, the wired network may use twisted pair, coaxial cable or optical fiber transmission for communication, and the wireless network may use, for example, 3G / 4G / 5G mobile communication network, Bluetooth, Zigbee or WiFi and other communication methods. This disclosure does not limit the type and function of the network.
[0206] For example, the processor 520 may control other components in the electronic device 500 to perform desired functions. The processor 520 may be a central processing unit (CPU), a microprocessor, or other device having data processing and / or program execution capabilities. The central processing unit (CPU) may be of X86 or ARM architecture, etc.
[0207] For example, the memory 510 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include random access memory (RAM) and / or cache memory (cache). The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer-readable instructions may be stored in the computer-readable storage medium, and the processor 510 may execute the computer-readable instructions to realize various functions of the electronic device 500. Various application programs and various data, etc. may also be stored in the storage medium.
[0208] For example, for a detailed description of the process in which the electronic device 500 executes and creates an action resource, reference may be made to the relevant description of the embodiment of the action resource creation method, and overlapping points will not be described.
[0209] Some embodiments of the present disclosure further provide an electronic device. For example, the electronic device may include a memory for non-temporarily storing computer-readable instructions, and a processor for executing the computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the action execution method of any of the above embodiments. Note that detailed descriptions of the memory and the processor may refer to the related descriptions above. They will not be described here. Detailed descriptions of the process in which the electronic device executes the action resource may refer to the related descriptions of the embodiments of the action execution method, and overlapping points will not be described.
[0210] Some embodiments of the present disclosure further provide a computer-readable storage medium. Figure 11 is a schematic diagram of a computer-readable storage medium provided by some embodiments of the present disclosure. For example, as shown in Figure 11, a computer-readable storage medium 900 can non-transiently store one or more computer-readable instructions 901. For example, when the computer-readable instructions 901 are executed by a computer, the computer can perform one or more steps of the method for creating an action resource or the method for performing an action according to any of the above embodiments.
[0211] For example, the computer-readable storage medium 900 can be applied to the above-mentioned electronic devices, and can be, for example, a memory in the electronic device.
[0212] For example, the description of the computer-readable storage medium 900 may refer to the description of the memory of the electronic device of any of the above embodiments, and overlapping points will not be described.
[0213] The following points need to be explained regarding this disclosure: (1) The drawings of the embodiments of the present disclosure only relate to structures related to the embodiments of the present disclosure, and other structures may refer to conventional designs.
[0214] (2) For clarity, the thickness and dimensions of layers or structures are exaggerated in the drawings to illustrate the embodiments of the present invention. For example, when an element such as a layer, film, region, or substrate is referred to as being located "on" or "below" another element, it can be understood that the element is located "directly" on or "below" the other element, or intermediate elements may be present.
[0215] (3) Where no conflict exists, the embodiments and features of the embodiments of the present disclosure may be combined with each other to obtain new embodiments.
[0216] The above is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto, and the scope of protection of the present disclosure shall be equivalent to the scope of protection of the claims.< / dependency> < / dependency> < / action> < / action>
Claims
1. A computer-implemented method for creating an action resource, comprising: receiving a first create request that includes a target resource; creating a first action resource for triggering a first action on the target resource based on the first creation request; The step of creating a first action resource includes: creating at least one of a first collision priority attribute and a first collision priority validity time attribute for use with the first action resource; the first conflict priority attribute represents a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource; the first conflict priority effective time attribute represents a time range during which the first action resource has exclusive use of the target resource; The step of creating a first action resource includes: creating a first collision target resource attribute and a first collision target action attribute for use with the first action resource; the first collision target resource attribute represents an identification code of the target resource; the first collision target action attribute represents an action that collides with the first action; 13. A method for creating an action resource comprising:
2. The first action resource includes a collision strategy sub-resource, the collision strategy sub-resource including at least one of the first collision priority attribute and the first collision priority effective time attribute, the first collision target resource attribute, and the first collision target action attribute.
2. The method for creating an action resource according to claim 1.
3. The step of creating a first action resource includes: creating a first action state attribute for use with the first action resource, the first action state attribute representing a state of the first action; 3. The method for creating an action resource according to claim 1 or 2.
4. The step of creating a first action resource includes: creating a first action time attribute for use with the first action resource, the first action time attribute being used to indicate a time parameter associated with the first action; 4. The method for creating an action resource according to claim 3.
5. The step of creating a first action resource includes: creating a first action time attribute for use with the first action resource, the first action time attribute being used to indicate a time parameter associated with the first action; 3. The method for creating an action resource according to claim 1 or 2.
6. the time parameters associated with the first action include at least one of a duration after performing the first action, a start time for performing the first action, and an end time for performing the first action; 6. The method for creating an action resource according to claim 4 or 5.
7. A computer-implemented method for performing an action, comprising: determining a first action resource for triggering a first action on a target resource, the first action resource including a first conflict priority attribute, the first conflict priority attribute representing a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource; receiving a first data resource; determining a second action resource that conflicts with the first action resource based on the first data resource satisfying a first trigger condition, the second action resource being a resource for triggering a second action on the target resource, the second action resource including a second conflict priority attribute and a second conflict priority effective time attribute, the second conflict priority attribute representing a priority of the second action resource relative to an action resource that conflicts with the second action resource and is directed to the target resource, and the second conflict priority effective time attribute representing a time range during which the second action resource occupies the target resource; obtaining an attribute value of the first collision priority attribute, an attribute value of the second collision priority attribute, and an attribute value of the second collision priority effective time attribute, and determining whether a collision determination condition is satisfied; executing the first action on the target resource when the collision determination condition is satisfied, and not executing the first action when the collision determination condition is not satisfied; The first action resource includes a collision strategy sub-resource including the first collision priority attribute, a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute, the first collision priority effective time attribute representing a time range during which the first action resource occupies the target resource, the first collision target resource attribute representing an identification code of the target resource, and the first collision target action attribute representing an action that conflicts with the first action; The step of determining the second action resource that conflicts with the first action resource includes: Obtaining the first collision target resource attribute and the first collision target action attribute, and determining a candidate action resource list based on the first collision target resource attribute and the first collision target action attribute, wherein an identification code of a candidate target resource corresponding to each candidate action resource in the candidate action resource list is the same as the first collision target resource attribute, and a candidate action of each candidate action resource is the same as the first collision target action attribute; selecting at least one candidate action resource from the list of candidate action resources; obtaining an execution status of the at least one candidate action resource; determining that an execution status of the at least one candidate action resource has already been executed, and setting the at least one candidate action resource as the second action resource; A method of performing an action, comprising:
8. The fact that the collision judgment condition is satisfied means that an attribute value of the first collision priority attribute taking precedence over an attribute value of the second collision priority attribute; or an occupancy time of the second action resource for the target resource is greater than or equal to an attribute value of the second collision priority validity time attribute; or an attribute value of the first collision priority attribute takes precedence over an attribute value of the second collision priority attribute, and an occupancy time of the second action resource for the target resource is equal to or greater than an attribute value of the second collision priority effective time attribute; The method of claim 7, wherein the action execution method is a method for executing an action.
9. The step of determining whether or not an attribute value of the first collision priority attribute, an attribute value of the second collision priority attribute, and an attribute value of the second collision priority effective time attribute satisfy a collision determination condition includes: determining whether an attribute value of the first collision priority attribute has priority over an attribute value of the second collision priority attribute, and determining that the collision determination condition is satisfied if the attribute value of the first collision priority attribute has priority over the attribute value of the second collision priority attribute; if the attribute value of the first collision priority attribute is not prioritized over the attribute value of the second collision priority attribute, obtaining an occupation time of the second action resource for the target resource, judging whether the occupation time of the second action resource for the target resource is greater than an attribute value of the second collision priority effective time attribute, determining that the collision judgment condition is satisfied if the occupation time of the second action resource for the target resource is greater than or equal to the attribute value of the second collision priority effective time attribute, and determining that the collision judgment condition is not satisfied if the occupation time of the second action resource for the target resource is less than the attribute value of the second collision priority effective time attribute. The method of claim 8, wherein the action execution method is a method for executing an action.
10. The second action resource further includes a second action time attribute; The step of obtaining an occupancy time of the second action resource for the target resource includes: obtaining an attribute value of the second action time attribute as an occupancy time of the second action resource for the target resource; The method of claim 9, wherein the action execution method is a method for executing an action.
11. each candidate action resource includes an action state attribute; The step of acquiring an execution status of at least one candidate action resource includes: obtaining an attribute value of an action state attribute of the at least one candidate action resource as an execution status of the at least one candidate action resource; The action execution method according to any one of claims 7 to 10.
12. the first action and the second action collide with each other; The action execution method according to any one of claims 7 to 11.
13. The first action and the second action are opposite. The method of claim 12 .
14. A computer-implemented method for performing an action, comprising: determining a first action resource for triggering a first action on a target resource, the first action resource including a first conflict priority attribute, the first conflict priority attribute representing a priority of the first action resource relative to an action resource that conflicts with the first action resource and is directed to the target resource; receiving a first data resource; determining a second action resource that conflicts with the first action resource based on the first data resource satisfying a first trigger condition, the second action resource being a resource for triggering a second action on the target resource, the second action resource including a second conflict priority attribute, the second conflict priority attribute representing a priority of the second action resource relative to an action resource that conflicts with the second action resource and is directed to the target resource; obtaining an attribute value of the first collision priority attribute and an attribute value of the second collision priority attribute and determining whether a collision determination condition is satisfied; executing the first action on the target resource when the collision determination condition is satisfied, and not executing the first action when the collision determination condition is not satisfied; The first action resource includes a collision strategy sub-resource including the first collision priority attribute, a first collision priority effective time attribute, a first collision target resource attribute, and a first collision target action attribute, the first collision priority effective time attribute representing a time range during which the first action resource occupies the target resource, the first collision target resource attribute representing an identification code of the target resource, and the first collision target action attribute representing an action that conflicts with the first action; The step of determining the second action resource that conflicts with the first action resource includes: Obtaining the first collision target resource attribute and the first collision target action attribute, and determining a candidate action resource list based on the first collision target resource attribute and the first collision target action attribute, wherein an identification code of a candidate target resource corresponding to each candidate action resource in the candidate action resource list is the same as the first collision target resource attribute, and a candidate action of each candidate action resource is the same as the first collision target action attribute; selecting at least one candidate action resource from the list of candidate action resources; obtaining an execution status of the at least one candidate action resource; determining that an execution status of the at least one candidate action resource has already been executed, and setting the at least one candidate action resource as the second action resource; A method of performing an action, comprising:
15. An electronic device, a memory for non-transiently storing computer readable instructions; a processor for executing the computer-readable instructions; When the computer-readable instructions are executed by the processor, a method for creating an action resource according to any one of claims 1 to 6 is performed.
1. An electronic device comprising:
16. An electronic device, a memory for non-transiently storing computer readable instructions; a processor for executing the computer-readable instructions; When the computer readable instructions are executed by the processor, the processor performs the method of performing actions according to any one of claims 7 to 14.
1. An electronic device comprising:
17. A computer-readable storage medium for non-transitoryly storing computer-readable instructions, comprising: When the computer-readable instructions are executed by a computer, the computer performs the method for creating an action resource according to any one of claims 1 to 6. A computer-readable storage medium comprising:
18. A computer-readable storage medium for non-transiently storing computer-readable instructions, comprising: The computer readable instructions, when executed by a computer, cause the computer to perform the method of performing an action according to any one of claims 7 to 14. A computer-readable storage medium comprising:
Citation Information
Patent Citations
Event-Action conflict resolution method and Event-Action conflict resolution device
CN104678769A
Resource Control Method based on Priority for IoT System
KR1020160094467A