Equipment message processing method and device, equipment, storage medium and program product
By combining object models and processing matrix tables, the device message processing strategy of the IoT platform is dynamically adjusted, which solves the processing blockage problem during data peaks and enables timely delivery of important data and business continuity.
Patent Information
- Application Number
- CN202511928506.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-02-27
AI Technical Summary
During peak data periods, IoT platforms may experience data processing bottlenecks or loss due to limited computing resources, impacting business continuity.
By constructing an object model, the importance of device messages is determined and mapped to a preset processing matrix table. The processing actions are dynamically adjusted according to the running status of the service terminal to achieve differentiated processing.
Ensure timely delivery of critical data during peak data periods to guarantee business continuity and reduce platform processing pressure.
Smart Images

Figure CN121585703A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing, and particularly relates to a device message processing method and device, a device, a storage medium and a program product. BACKGROUND
[0002] In the field of Internet of Things technology, a thing model is modeling of a physical device in the objective world, which can describe the characteristics, behaviors and supportable operations of the device, and information generated by the physical device is defined based on the thing model. The most core function of an Internet of Things platform is to process information generated by the physical device, but as the number of physical devices connected to the Internet of Things platform increases, various types of data collected from the device end also grow rapidly and are diverse. Under the condition of limited computing resources of the Internet of Things platform, if the platform maintains the same processing mode for all data, when a data peak occurs, the device data processing of the Internet of Things platform will be blocked or even lost, affecting the development of business. SUMMARY
[0003] The embodiments of the present application provide a device message processing method and device, a device, a storage medium and a program product, which can realize differentiated processing of device messages, ensure the delivery and timeliness of important data of the platform at a data peak, and guarantee business continuity.
[0004] In a first aspect, the embodiments of the present application provide a device message processing method applied to a service terminal of an Internet of Things, and the method comprises the following steps: receiving at least one device message sent by a device terminal in the Internet of Things; determining a target importance degree corresponding to each of the device messages according to a thing model preset by the device terminal, wherein the thing model comprises importance degrees of a plurality of device events and device attributes in the device terminal; obtaining running state information of the service terminal to determine a current processing mode of the service terminal; mapping the target importance degree corresponding to each of the device messages and the current processing mode of the service terminal in a preset first processing matrix table to determine a target processing action of each of the device messages, wherein the first processing matrix table comprises a plurality of importance degrees, a plurality of processing modes, and processing actions corresponding to each of the importance degrees and each of the processing modes, and the processing action of the service terminal on the device message is different under different importance degrees and different processing modes; performing the corresponding target processing action on each of the device messages.
[0005] In a second aspect, the embodiments of the present application provide a device message processing device applied to a service terminal of an Internet of Things, and the device comprises: a receiving module, configured to receive at least one device message sent by a device terminal in the Internet of Things; The first determining module is configured to determine the importance degree corresponding to each device message according to a preset object model of the device terminal, wherein the object model comprises the importance degrees of a plurality of device events and device attributes in the device terminal; The obtaining module is configured to obtain the running state information of the service terminal and determine the current processing mode of the service terminal; The second determining module is configured to map the importance degree corresponding to each device message and the current processing mode of the service terminal in a preset first processing matrix table to determine the target processing action of each device message, wherein the first processing matrix table comprises a plurality of importance degrees, a plurality of processing modes, and processing actions corresponding to each importance degree and each processing mode, and the processing actions of the service terminal on the device messages are different under different importance degrees and different processing modes; The executing module is configured to execute the target processing action corresponding to each device message.
[0006] In a third aspect, an electronic device is provided, which comprises a processor and a memory storing computer program instructions; the processor implements the device message processing method according to any one of the preceding aspects when executing the computer program instructions.
[0007] In a fourth aspect, a computer readable storage medium is provided, which stores computer program instructions; the computer program instructions are executed by a processor to implement the device message processing method according to any one of the preceding aspects.
[0008] In a fifth aspect, a computer program product is provided, which comprises instructions executed by a processor of an electronic device to cause the electronic device to perform the device message processing method according to any one of the preceding aspects.
[0009] The device message processing method, device, apparatus, storage medium and program product provided by the embodiments of the present application are applied to a service terminal of an Internet of Things, can receive at least one device message sent by a device terminal in the Internet of Things, determine a target importance degree corresponding to each device message according to a thing model preset by the device terminal, acquire running state information of the service terminal, determine a current processing mode of the service terminal, then map the target importance degree corresponding to each device message and the current processing mode of the service terminal in a preset first processing matrix table, determine a target processing action of each device message, and finally execute the corresponding target processing action on each device message. In this way, in the embodiments of the present application, since the first processing matrix table includes a plurality of importance degrees, a plurality of processing modes, and processing actions corresponding to each importance degree and each processing mode, the processing action of the service terminal on the device message is different under different importance degrees and different processing modes, so that the service terminal can map the importance degree of each device message and the running state of the service terminal in the first processing matrix table, determine the target processing action of each device message, thereby realizing differentiated processing of the device message, ensuring the delivery and timeliness of important data of the platform at a data peak, and guaranteeing business continuity. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly explain the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. Those skilled in the art can also obtain other drawings according to these drawings without paying creative labor.
[0011] Figure 1 is a flowchart of a device message processing method provided by an embodiment of the present application; Figure 2 is a flowchart of another device message processing method provided by an embodiment of the present application; Figure 3 is a flowchart of still another device message processing method provided by an embodiment of the present application; Figure 4 is a structural diagram of a device message processing apparatus provided by an embodiment of the present application; Figure 5 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0012] The features and exemplary embodiments of the various aspects of the present application will be described in detail below with reference to the drawings. For the purpose of clarity, the description is divided into the following sections: technical scheme, advantages, and specific embodiments. It should be understood that the specific embodiments described herein are merely intended to explain the present application, but not to limit the present application. The present application can be implemented without some of the specific details described below. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
[0013] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Also, the terms "comprise", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or device. Without more limitations, the elements defined by the statement "comprise" do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.
[0014] In the field of Internet of Things technology, a thing model is a modeling of a physical device in the objective world, which can describe the characteristics, behaviors and supportable operations of the device. Information generated by the physical device is defined based on the thing model. The most core function of the Internet of Things platform is to process the information generated by the physical device. However, as the number of physical devices connected to the Internet of Things platform increases, various types of data collected from the device side also grow rapidly and are diverse. Under the condition of limited computing resources of the Internet of Things platform, if the platform maintains the same processing mode for all data, when a data peak occurs, the processing of device data by the Internet of Things platform will be blocked or even lost, affecting the development of business.
[0015] In the technical scheme of the present application, the acquisition, storage, use, processing and the like of data comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, some existing industry solutions may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical scheme of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0016] To solve the problems in the prior art, the embodiments of the present application provide a device message processing method, device, storage medium and program product. First, the device message processing method provided by the embodiments of the present application will be introduced.
[0017] Figure 1 A flowchart of a device message processing method provided by an embodiment of the present application is shown. As shown in Figure 1 The device message processing method can be applied to a service terminal of an Internet of Things. The method can include the following steps S101-S105: S101, receiving at least one device message sent by a device terminal in an Internet of Things; S102, determining a target importance degree corresponding to each device message according to a preset thing model of the device terminal, the thing model including importance degrees of multiple device events and device attributes in the device terminal; S103, obtaining running state information of the service terminal to determine a current processing mode of the service terminal; S104, mapping the target importance degree corresponding to each device message and the current processing mode of the service terminal in a preset first processing matrix table to determine a target processing action of each device message, the first processing matrix table including multiple importance degrees, multiple processing modes, and processing actions corresponding to each importance degree and each processing mode, the processing action of the service terminal to the device message being different under different importance degrees and different processing modes; S105, performing the corresponding target processing action on each device message.
[0018] The device message processing method of the embodiment of the present application can be applied to a service terminal of an Internet of Things. The method can receive at least one device message sent by a device terminal in an Internet of Things, determine a target importance degree corresponding to each device message according to a preset thing model of the device terminal, obtain running state information of the service terminal to determine a current processing mode of the service terminal, then map the target importance degree corresponding to each device message and the current processing mode of the service terminal in a preset first processing matrix table to determine a target processing action of each device message, and finally perform the corresponding target processing action on each device message. In this way, in the embodiment of the present application, the first processing matrix table includes multiple importance degrees, multiple processing modes, and processing actions corresponding to each importance degree and each processing mode, the processing action of the service terminal to the device message being different under different importance degrees and different processing modes. This allows the service terminal to map the importance degree of each device message and the running state of the service terminal in the first processing matrix table to determine the target processing action of each device message, thereby realizing differentiated processing of device messages, ensuring the delivery and timeliness of important data during a data peak, and guaranteeing business continuity.
[0019] In S101, the service terminal can be an Internet of Things platform. For example, the physical network platform can be a cloud platform.
[0020] The device terminal can be a terminal of a device connected to the service terminal in the Internet of Things. The device can exemplarily include a teller device of a network point, an automatic teller machine, a smart lamp, an air conditioner, a human body sensor, a light sensor, a logistics device, an asset, an archive device, a government vehicle, and the like.
[0021] The device message can be a device event or a device attribute. The device attribute can be a static feature or a running state of the device, and can be divided into readable attributes (such as environmental temperature and humidity, device power) and writable attributes (such as air conditioner setting temperature, device working mode). The device event can be an exception or an important state actively reported by the device to the cloud, usually accompanied by an alarm or a notification, such as device failure, low power, sensor detecting abnormal value, and the like.
[0022] In some embodiments of the present application, receiving at least one device message sent by a device terminal in the Internet of Things can exemplarily be receiving at least one device message sent by a device terminal in the Internet of Things, the at least one device message not being processed by the device terminal; or can also be receiving at least one device message sent by a device terminal in the Internet of Things, the at least one device message being a message after a plurality of device messages generated by the device terminal are processed according to a device model of the device terminal and a preset second processing matrix table, the second processing matrix table including a plurality of importance levels, a plurality of processing modes of the device terminal, and processing actions corresponding to each importance level and each processing mode, the plurality of processing modes in the second processing matrix table being less than the plurality of processing modes in the first processing matrix table, and the processing actions in the second processing matrix table being less than the processing actions in the first processing matrix table.
[0023] In S102, the target importance level can be an importance level of the device message.
[0024] The device model can include importance levels of a plurality of device events and device attributes in the device terminal. The importance level can exemplarily include 1-5 levels, in which level 5 is a high level, level 4 is a relatively high level, level 3 is a middle level, level 2 is a relatively low level, and level 1 is a low level. It should be noted that the importance level in the present application is not limited to 1-5 levels, and can include other numbers of levels according to actual application scene requirements, which are not limited here.
[0025] In S103, the running state information of the service terminal can be information reflecting a current working load, resource occupation, business processing capacity, and overall running situation of the service terminal.
[0026] The current processing mode of the aforementioned service terminal may include one of the following: no processing mode, normal processing mode, and idle processing mode. The no processing mode can be represented by 0, indicating that for device messages meeting the specified level, no processing is performed and the process proceeds to the next stage. The normal processing mode can be represented by 1, indicating that for device messages meeting the specified level, processing is performed according to the module's normal logic. The idle processing mode can be represented by 2, which, in conjunction with platform rate limiting and other thresholds, allows for normal processing when platform resources are idle and no processing when platform resources are busy.
[0027] In some embodiments of this application, the running status information of the service terminal is obtained, and the current processing mode of the service terminal is determined. For example, the running status information of the service terminal, including the busy level, is obtained; if the busy level is less than a preset first threshold, the current processing mode of the service terminal is determined to be a no-processing mode; if the busy level is greater than or equal to the first threshold and less than a preset second threshold, the current processing mode of the service terminal is determined to be a normal processing mode, where the second threshold is greater than the first threshold; if the busy level is greater than or equal to the second threshold, the current processing mode of the service terminal is determined to be an idle processing mode.
[0028] In S104, the first processing matrix table may include multiple importance levels, multiple processing modes, and processing actions corresponding to each importance level and processing mode. These processing actions may include filtering, verification, historical value comparison, storage, caching, and distribution. Of course, the processing actions in this application are not limited to the examples above; adjustments such as additions or deletions can be made to the first processing matrix table according to actual needs, and no specific limitations are made here. The service terminal performs different processing actions on device messages under different importance levels and different processing modes. In some embodiments of this application, the importance level corresponding to each device message and the current processing mode of the service terminal are mapped to a preset first processing matrix table to determine the target processing action for each device message. For example, this can be achieved by querying the processing mode of each processing action under the corresponding importance level of each device message in the preset first processing matrix table; if the current processing mode of the service terminal matches the processing mode of the processing action, the processing action is determined as the target processing action for each device message.
[0029] In S105, the aforementioned target processing action may be to map the target importance corresponding to the device message and the current processing mode of the service terminal to a preset first processing matrix table to determine the obtained processing action.
[0030] In some embodiments of this application, the above-mentioned execution of corresponding target processing actions on each device message can, for example, be the service terminal performing filtering processing actions on low-level device messages in normal processing mode, or it can be the service terminal performing filtering, verification, historical value comparison and caching processing actions on mid-level device messages in idle processing mode.
[0031] In some embodiments, the above-described S101 may specifically include: The system receives at least one device message sent by a device terminal in the Internet of Things (IoT). The at least one device message is a message generated after the device terminal performs corresponding processing actions in the second processing matrix table on multiple device messages generated by the device, based on the device terminal's object model and a preset second processing matrix table. The second processing matrix table includes multiple importance levels, multiple processing modes of the device terminal, and processing actions corresponding to each importance level and each processing mode. The number of processing modes in the second processing matrix table is less than the number of processing modes in the first processing matrix table, and the number of processing actions in the second processing matrix table is less than the number of processing actions in the first processing matrix table.
[0032] The aforementioned at least one device message can be a message generated by a device terminal after performing the corresponding processing action in the second processing matrix table on multiple device messages generated by the device according to the device terminal's object model and a preset second processing matrix table.
[0033] The second processing matrix table can be a processing matrix table obtained by updating the first processing matrix table according to the preset object model of the device terminal by the service terminal.
[0034] The number of processing modes in the second processing matrix table is less than the number of processing modes in the first processing matrix table. For example, if the number of processing modes in the first processing matrix table includes a no-processing mode, a normal processing mode, and an idle-time processing mode, then the number of processing modes in the second processing matrix table may include a no-processing mode and a normal processing mode.
[0035] The processing actions in the second processing matrix table are fewer than those in the first processing matrix table. For example, if the processing actions in the first processing matrix table include filtering, verification, historical value comparison, storage, caching, and distribution, then the processing actions in the second processing matrix table may include filtering, verification, and historical value comparison.
[0036] In this embodiment, since the device terminal can perform the corresponding processing actions in the second processing matrix table on multiple device messages generated by the device according to the device terminal's object model and the preset second processing matrix table, the amount of data of device messages sent by the device terminal to the service terminal can be reduced, thereby alleviating the data processing pressure of the service terminal in the Internet of Things.
[0037] In some embodiments of this application, to facilitate timely and local processing of device messages by the device terminal, the method further includes the following steps before S101: Based on the preset object model of the device terminal, the first processing matrix table is updated to obtain the second processing matrix table; Send the object model and the second processing matrix table of the device terminal to the device terminal.
[0038] In some embodiments of this application, the first processing matrix table is updated according to the preset object model of the device terminal to obtain the second processing matrix table. For example, in order to process the device messages of the nearest device on the device terminal to alleviate the data processing pressure of the service terminal, the processing actions and idle processing modes stored, cached and distributed in the first processing matrix table can be modified and updated according to the importance of each device event and device attribute in the preset object model of the device terminal to obtain the second processing matrix table.
[0039] In some embodiments of this application, the object model and the second processing matrix table of the device terminal are sent to the device terminal. For example, when a user logs into an administrator account on the device terminal, the device terminal sends a request to the service terminal, causing the service terminal to respond to the request and send the object model and the second processing matrix table of the device terminal to the device terminal. Alternatively, the service terminal may update the first processing matrix table according to the preset object model of the device terminal to obtain the second processing matrix table, and then send a broadcast notification to the device terminal to prompt the device terminal to send a request to the service terminal. In this way, the service terminal can respond to the request and send the object model and the second processing matrix table of the device terminal to the device terminal.
[0040] In this embodiment of the application, before receiving at least one device message sent by a device terminal in the Internet of Things, the first processing matrix table is updated by using a preset object model of the device terminal to obtain a second processing matrix table, and the object model of the device terminal and the second processing matrix table are sent to the device terminal. This can facilitate the device terminal to process device messages in a timely and nearby manner.
[0041] In some embodiments, the above-described S103 may specifically include: Obtain the service terminal's operating status information, including its busy level; If the busy level is less than a preset first threshold, the current processing mode of the service terminal is determined to be no processing mode; If the busyness level is greater than or equal to the first threshold and less than the preset second threshold, the current processing mode of the service terminal is determined to be the normal processing mode, where the second threshold is greater than the first threshold. If the busy level is greater than or equal to the second threshold, the current processing mode of the service terminal is determined to be the idle processing mode.
[0042] The aforementioned operational status information can include workload, which can be an indicator that quantifies the current resource load and business processing pressure of the service terminal. Specifically, workload can be quantified from both hardware resource and business processing dimensions. Hardware resource dimension: such as the terminal's CPU utilization, memory usage, network bandwidth utilization, disk I / O load, etc. (for example, a terminal CPU utilization of 80% and memory usage of 75% indicates a high hardware load); Business processing dimension: such as the number of messages to be processed by the terminal per unit time, message queue backlog length, concurrent interface calls, etc. (for example, if the terminal has 1000 messages to be processed within 1 minute and the queue continues to grow, it indicates significant business pressure).
[0043] The first threshold and the second threshold mentioned above can be numbers set by the user according to actual application needs, and are not limited to a certain fixed value. In this embodiment of the application, no specific limitation is made. It should be noted that the second threshold is greater than the first threshold.
[0044] In this embodiment of the application, the busyness of the service terminal can be judged by the first threshold and the second threshold to realize the elastic scheduling of service terminal resources and dynamic adaptation of business processing mode.
[0045] In some embodiments, the above-described S104 may specifically include: In the preset first processing matrix table, query the processing mode of each processing action under the importance of each device message; If the current processing mode of the service terminal matches the processing mode of the processing action, the processing action will be determined as the target processing action for each device message.
[0046] In some embodiments of this application, the processing mode of each processing action under the importance level of each device message is queried in a preset first processing matrix table. For example, in the first processing matrix table, under the medium level of importance, the processing mode corresponding to the processing actions of filtering, verification, historical value comparison and caching is the idle processing mode, and the processing mode corresponding to the storage and distribution processing actions is the normal processing mode.
[0047] In some embodiments of this application, when the current processing mode of the service terminal matches the processing mode of the processing action, the processing action is determined as the target processing action for each device message. For example, if the current processing mode of the service terminal is the normal processing mode, since the current processing mode matches the processing mode corresponding to the storage and distribution processing action, the target processing action for the device message of medium importance is the storage and distribution processing action.
[0048] In this embodiment of the application, by querying the processing mode of each processing action under the importance of each device message in a preset first processing matrix table, and then, when the current processing mode of the service terminal matches the processing mode of the processing action, the processing action is determined as the target processing action of each device message. In this way, the processing action of device messages can be accurately adapted, and resource mismatch can be avoided.
[0049] As another implementation of this application, in order to define the importance of each device event or each device attribute in the object model, before S102 above, the method may further include: Construct a physical model corresponding to the device terminal. The physical model includes multiple device events and device attributes. Define the importance of each device event or each device attribute in the object model.
[0050] In some embodiments of this application, constructing a physical model corresponding to a device terminal can specifically involve: First, clarifying the business scenarios and core capabilities of the device terminal. Taking a smart air conditioner as an example, core functions include temperature adjustment, mode switching, fan speed control, and fault alarms, while interaction scenarios include remote user control, device status reporting, and automatic fault alarms. Then, based on the device functions, abstractly defining device attributes that describe the device status and characteristics. Next, identifying the abnormal or critical states that the device needs to actively report, clarifying the triggering conditions and parameters of the events, and defining the device events. Finally, adding unified metadata to the physical model and standardizing the interaction protocol to facilitate identification by the service terminal.
[0051] In some embodiments of this application, the importance of each device event or device attribute is defined in the object model. For example, from a business perspective, the importance of device attributes or device events can be categorized. For instance, referring to general data classification methods, data importance can be divided into 5 levels, defined as levels 1-5, where level 5 is high, 4 is relatively high, 3 is medium, 2 is relatively low, and 1 is low. When defining the object model, an importance level can be added; if no level is set, it can default to level 3. It should be noted that the importance level in this application is not limited to 1-5 levels; other numbers of levels can be set according to the actual application scenario, and no specific limitation is made here.
[0052] In this embodiment, by constructing a physical model corresponding to the device terminal and defining the importance of each device event or each device attribute in the physical model, the IoT service terminal can execute lightweight strategies such as idle time processing or no processing on device messages of different importance according to the importance defined in the physical model, thereby reducing the computing power and bandwidth consumption of real-time processing and reducing the overall operating cost of the platform.
[0053] In some embodiments, the processing actions in the first processing matrix table may specifically include: filtering, verification, historical value comparison, storage, caching, and distribution.
[0054] In this embodiment of the application, the processing actions in the first processing matrix table can be classified according to the processing actions in the device message processing process. The processing of attribute and event messages sent by the device end is divided into filtering, verification, historical value comparison, storage, and caching processing actions.
[0055] The aforementioned filtering can refer to judging device messages based on set filtering conditions, deciding whether to filter them out or allow them to pass.
[0056] The aforementioned verification may refer to whether to strictly verify the device message based on the object model; if it does not conform to the model definition, it should be discarded, and if it does conform, it should be allowed.
[0057] The above historical value comparison can be performed only on attribute-type messages and compared with historical values. If the historical value is the same as the latest reported historical value, it will not be reported again; otherwise, it will be sent to the application layer.
[0058] The aforementioned storage may refer to whether or not event-type messages are persistently stored.
[0059] The aforementioned caching can refer to a data processing method that temporarily stores device messages in the system's high-speed storage medium (such as memory) instead of writing them directly to a persistent database.
[0060] The aforementioned distribution can refer to sending messages to the application layer.
[0061] In this embodiment of the application, the processing actions in the first processing matrix table may specifically include filtering, verification, historical value comparison, storage, caching and distribution. The configuration of these six types of processing actions not only constructs a complete closed loop of data filtering, verification, processing, flow and retention, but also realizes refined management of resources, business and risks, making device message processing efficient, reliable and flexible.
[0062] To facilitate understanding of the device message processing method in the embodiments of this application, the actual application process of this device message processing method is described as follows: 1. Definition of hierarchical processing From a business perspective, the importance of device data is categorized, referencing general data hierarchy methods, into five levels, defined as 1-5, with level 5 being the highest. When defining the object model, an importance level attribute is added; if this attribute is not set, the default level is 3.
[0063] 2. Definition of Classification Processing Based on the processing actions in the device data processing process, the processing of attribute and event messages sent by the device (equivalent to the aforementioned device terminal) is typically divided into processing stages such as filtering, verification, historical value comparison, storage, and caching. Filtering: refers to judging device messages based on set filtering conditions, deciding whether to filter them out or allow them to pass. Verification: This refers to whether the device message is strictly verified according to the object model. If it does not conform to the model definition, it is discarded; if it does, it is allowed. Historical value comparison: Only attribute-type messages are compared with historical values. If the value is the same as the latest reported historical value, it will not be reported again. If the value is different, it will be sent to the application layer. Storage: refers to whether to persist event messages; Distribution: refers to sending messages to the application layer.
[0064] 3. Definition of Processing Mode Based on the characteristics of the IoT platform (equivalent to the aforementioned service terminal) operation status, message processing modes are divided into several categories, such as 0 - no processing: in the processing module, device messages that meet the level are not processed and proceed to the next stage; 1 - normal processing: in the processing module, device messages that meet the level are processed according to the module's normal logic; 2 - idle time processing: combined with platform rate limiting and other thresholds, messages are processed normally when platform resources are idle, and are not processed when platform resources are busy.
[0065] 4. Generate a global classification and hierarchical processing matrix table. Using the hierarchical levels as the horizontal axis and the classification processes as the vertical axis, a processing matrix is formed, as shown in the example below: 5. Cloud Platform Processing Flow When the platform receives attribute and event messages from the device, each category processing module on the platform processes them according to... Figure 2 The process shown is as follows: S201, The platform receives device messages (events, attributes) sent by the device.
[0066] S202. Obtain the object model and processing matrix table (equivalent to the first processing matrix table mentioned above) defined by the specification of the device, and determine the level of the device message in the object model.
[0067] S203. Obtain the platform's operating status.
[0068] S204. Calculate the current processing mode executed by the platform based on the platform's runtime information (e.g., busy level).
[0069] S205. Match the processing action in the matrix table according to the message level and processing mode; when entering each processing module, according to the category processed by this module, for example, if this module performs verification processing, query the processing modes of each level of "verification" in the global matrix table.
[0070] S206. Perform message processing actions and move the message to the next stage.
[0071] 6. Equipment-side processing flow For some high-capacity devices, the device's object model and processing matrix table can be sent to the device side, where the device can process messages locally based on the object model definition, reducing the processing pressure on the cloud. The processing flow is as follows: Figure 3 As shown: S301. Update the object model and processing matrix table in memory on the device side. Method 1: The user configures and updates the classification and hierarchical processing matrix table (equivalent to the second processing matrix table mentioned above) on the platform side and distributes it to all devices so that the updated object model and processing matrix table can be obtained when the devices log in. Method 2: The user sets the event and attribute levels in the object model definition on the platform side, and updates the classification and hierarchical processing matrix table (equivalent to the second processing matrix table mentioned above); then distributes the object model to the device side of that specification.
[0072] S302, the equipment analysis model and processing matrix table, and the processing modes of the supported processing links are calculated in sequence; S303. When the device generates a device message, it is specified that the processing action in the processing matrix table (equivalent to the second processing matrix table mentioned above) will be executed on the device side, such as filtering, verification and / or historical value comparison category, and the processing mode is specified as 0 or 1. Then the device side can perform the corresponding processing according to the settings, such as sending the data to the cloud platform or discarding it directly on the device side.
[0073] In this embodiment of the application, based on the object model design, by adding hierarchical identifiers to the attributes and events of the object model, the processing of messages can be classified on the platform, thereby forming a hierarchical classification processing matrix. This enables the system to flexibly control the differentiated processing of messages from different devices and at different levels, so as to ensure the delivery and timeliness of important data and ensure business continuity.
[0074] Based on the device message processing method provided in the above embodiments, this application also provides specific implementations of a device message processing apparatus. Please refer to the following embodiments.
[0075] like Figure 4 As shown, the device message processing apparatus 400 provided in this application embodiment is applied to a service terminal of the Internet of Things. The apparatus 400 may include the following modules: receiving module 401, first determining module 402, obtaining module 403, second determining module 404, and execution module 405.
[0076] The receiving module 401 is used to receive at least one device message sent by a device terminal in the Internet of Things; The first determining module 402 is used to determine the importance of each device message according to the preset object model of the device terminal. The object model includes the importance of multiple device events and device attributes in the device terminal. The acquisition module 403 is used to acquire the running status information of the service terminal and determine the current processing mode of the service terminal. The second determining module 404 is used to map the importance of each device message and the current processing mode of the service terminal to a preset first processing matrix table to determine the target processing action of each device message. The first processing matrix table includes multiple importance levels, multiple processing modes, and processing actions corresponding to each importance level and each processing mode. The service terminal performs different processing actions on device messages under different importance levels and different processing modes. The execution module 405 is used to perform corresponding target processing actions on messages from each device.
[0077] The device message processing apparatus of this application embodiment is applied to a service terminal of the Internet of Things (IoT). It can receive at least one device message sent by a device terminal in the IoT, determine the target importance of each device message based on a preset object model of the device terminal, obtain the service terminal's operating status information, determine the service terminal's current processing mode, and then map the target importance of each device message and the service terminal's current processing mode to a preset first processing matrix table to determine the target processing action for each device message. Finally, it executes the corresponding target processing action on each device message. Thus, in this application embodiment, since the first processing matrix table includes multiple importance levels, multiple processing modes, and processing actions corresponding to each importance level and processing mode, the service terminal's processing actions for device messages differ depending on the importance level and processing mode. This allows the service terminal to map the importance of each device message and the service terminal's operating status to the first processing matrix table, determine the target processing action for each device message, thereby achieving differentiated processing of device messages, ensuring the delivery and timeliness of important data during peak data periods, and guaranteeing business continuity.
[0078] In some embodiments, the receiving module 401 described above can be specifically used to: receive at least one device message sent by a device terminal in the Internet of Things, wherein the at least one device message is a message after the device terminal performs corresponding processing actions in the second processing matrix table on multiple device messages generated by the device according to the device terminal's object model and a preset second processing matrix table, the second processing matrix table includes multiple importance levels, multiple processing modes of the device terminal, and processing actions corresponding to each importance level and each processing mode, the multiple processing modes in the second processing matrix table are fewer than the multiple processing modes in the first processing matrix table, and the processing actions in the second processing matrix table are fewer than the processing actions in the first processing matrix table.
[0079] In some embodiments of this application, to facilitate timely and local processing of device messages by the device terminal, the aforementioned apparatus 400 may further include: The update module is used to update the first processing matrix table according to the preset object model of the device terminal to obtain the second processing matrix table. The sending module is used to send the object model and the second processing matrix table of the device terminal to the device terminal.
[0080] In some embodiments, the acquisition module 403 described above may specifically include: The acquisition unit is used to acquire the running status information of the service terminal, including the busy level. The first determining unit is used to determine that the current processing mode of the service terminal is the no-processing mode when the busy level is less than a preset first threshold. The second determining unit is used to determine that the current processing mode of the service terminal is the normal processing mode when the busyness is greater than or equal to the first threshold and less than the preset second threshold, wherein the second threshold is greater than the first threshold. The third determining unit is used to determine that the current processing mode of the service terminal is the idle processing mode when the busy level is greater than or equal to the second threshold.
[0081] In some embodiments, the second determining module 404 described above may specifically include: The query unit is used to query the processing mode of each processing action under the importance of each device message in the preset first processing matrix table; The fourth determining unit is used to determine the processing action as the target processing action for each device message when the current processing mode of the service terminal matches the processing mode of the processing action.
[0082] As another implementation of this application, in order to define the importance of each device event or each device attribute in the object model, the above-mentioned device 400 further includes: The building module is used to build the object model corresponding to the device terminal. The object model includes multiple device events and device attributes. The definition module is used to define the importance of each device event or each device attribute in the object model.
[0083] In some embodiments, the processing actions in the first processing matrix table described above may specifically include: filtering, verification, historical value comparison, storage, caching, and distribution.
[0084] Figure 5 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0085] An electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0086] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0087] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.
[0088] In a particular embodiment, memory 502 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0089] The processor 501 reads and executes computer program instructions stored in the memory 502 to implement any of the device message processing methods in the above embodiments.
[0090] In one example, the electronic device may also include a communication interface 503 and a bus 510. Wherein, as... Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.
[0091] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0092] Bus 510 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0093] The electronic device can execute the device message processing method described in the embodiments of this application, thereby achieving the combination Figure 1 and Figure 4 The described method and apparatus for processing device messages.
[0094] Furthermore, in conjunction with the device message processing methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the device message processing methods in the above embodiments.
[0095] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the device message processing methods described in the above embodiments.
[0096] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0097] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0098] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0099] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0100] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for processing device messages, characterized in that, The method, applied to a service terminal for the Internet of Things, includes: Receive at least one device message sent by a device terminal in the Internet of Things; Based on the object model preset by the device terminal, the target importance corresponding to each device message is determined. The object model includes the importance of multiple device events and device attributes in the device terminal. Obtain the operating status information of the service terminal and determine the current processing mode of the service terminal; The target importance of each device message and the current processing mode of the service terminal are mapped to a preset first processing matrix table to determine the target processing action of each device message. The first processing matrix table includes multiple importance levels, multiple processing modes, and processing actions corresponding to each importance level and each processing mode. The processing actions of the service terminal on the device messages are different for different importance levels and different processing modes. Perform the corresponding target processing action on each of the device messages.
2. The method according to claim 1, characterized in that, Receiving at least one device message sent by a device terminal in the Internet of Things includes: The system receives at least one device message sent by a device terminal in the Internet of Things (IoT). The at least one device message is a message generated by the device terminal after performing corresponding processing actions from the second processing matrix table on multiple device messages generated by the device, based on the device terminal's object model and a preset second processing matrix table. The second processing matrix table includes multiple importance levels, multiple processing modes, and processing actions corresponding to each importance level and each processing mode. The number of processing modes in the second processing matrix table is less than the number of processing modes in the first processing matrix table, and the number of processing actions in the second processing matrix table is less than the number of processing actions in the first processing matrix table.
3. The method according to claim 2, characterized in that, Before receiving at least one device message sent by a device terminal in the Internet of Things, the method further includes: Based on the preset object model of the device terminal, the first processing matrix table is updated to obtain the second processing matrix table; The object model of the device terminal and the second processing matrix table are sent to the device terminal.
4. The method according to claim 1, characterized in that, The step of obtaining the operating status information of the service terminal and determining the current processing mode of the service terminal includes: Obtain the operating status information of the service terminal, including its busy level; If the busy level is less than a preset first threshold, the current processing mode of the service terminal is determined to be the no-processing mode. If the busyness level is greater than or equal to the first threshold and less than the preset second threshold, the current processing mode of the service terminal is determined to be the normal processing mode, where the second threshold is greater than the first threshold. If the busy level is greater than or equal to the second threshold, the current processing mode of the service terminal is determined to be the idle processing mode.
5. The method according to claim 1, characterized in that, The step of mapping the importance of each device message and the current processing mode of the service terminal to a preset first processing matrix table to determine the target processing action for each device message includes: In the preset first processing matrix table, query the processing mode of each processing action under the importance of each device message; If the current processing mode of the service terminal matches the processing mode of the processing action, the processing action is determined as the target processing action for each of the device messages.
6. The method according to claim 1, characterized in that, Before determining the importance of the device message based on the preset object model of the device terminal, the method further includes: Construct a physical model corresponding to the device terminal, the physical model including multiple device events and device attributes; The importance of each device event or each device attribute is defined in the object model.
7. The method according to claim 1, characterized in that, The processing actions described in the first processing matrix table include: filtering, verification, historical value comparison, storage, caching, and distribution.
8. A device message processing apparatus, characterized in that, The device, used as a service terminal for the Internet of Things, includes: A receiving module is used to receive at least one device message sent by a device terminal in the Internet of Things; The first determining module is used to determine the importance of each device message according to a preset object model of the device terminal. The object model includes the importance of multiple device events and device attributes in the device terminal. The acquisition module is used to acquire the running status information of the service terminal and determine the current processing mode of the service terminal; The second determining module is used to map the importance of each device message and the current processing mode of the service terminal to a preset first processing matrix table to determine the target processing action of each device message. The first processing matrix table includes multiple importance levels, multiple processing modes, and processing actions corresponding to each importance level and each processing mode. The processing actions of the service terminal on the device messages are different for different importance levels and different processing modes. The execution module is used to perform the corresponding target processing action on each of the device messages.
9. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the device message processing method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the device message processing method as described in any one of claims 1-7.
11. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the device message processing method as described in any one of claims 1-7.